mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-28 16:06:41 +01:00
column logs: only allow logging view for connector/action/default value/derivative
This commit is contained in:
@@ -318,7 +318,15 @@ export default function ColumnMenu({
|
||||
},
|
||||
disabled: !isConfigurable,
|
||||
},
|
||||
{
|
||||
];
|
||||
|
||||
if (
|
||||
column?.config?.defaultValue?.type === "dynamic" ||
|
||||
[FieldType.action, FieldType.derivative, FieldType.connector].includes(
|
||||
column.type
|
||||
)
|
||||
) {
|
||||
configActions.push({
|
||||
key: "logs",
|
||||
label: altPress ? "Logs" : "Logs…",
|
||||
icon: <LogsIcon />,
|
||||
@@ -330,8 +338,8 @@ export default function ColumnMenu({
|
||||
column: [column.key],
|
||||
});
|
||||
},
|
||||
},
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
// TODO: Generalize
|
||||
const handleEvaluateAll = async () => {
|
||||
|
||||
@@ -43,6 +43,7 @@ import {
|
||||
cloudLogFiltersAtom,
|
||||
} from "@src/atoms/tableScope";
|
||||
import { cloudLogFetcher } from "./utils";
|
||||
import { FieldType } from "@src/constants/fields";
|
||||
|
||||
export default function CloudLogsModal({ onClose }: ITableModalProps) {
|
||||
const [projectId] = useAtom(projectIdAtom, projectScope);
|
||||
@@ -312,13 +313,21 @@ export default function CloudLogsModal({ onClose }: ITableModalProps) {
|
||||
<MultiSelect
|
||||
multiple
|
||||
aria-label={"Column"}
|
||||
options={Object.entries(tableSchema.columns ?? {}).map(
|
||||
([key, config]) => ({
|
||||
options={Object.entries(tableSchema.columns ?? {})
|
||||
.filter(
|
||||
([key, config]) =>
|
||||
config?.config?.defaultValue?.type === "dynamic" ||
|
||||
[
|
||||
FieldType.action,
|
||||
FieldType.derivative,
|
||||
FieldType.connector,
|
||||
].includes(config.type)
|
||||
)
|
||||
.map(([key, config]) => ({
|
||||
label: config.name,
|
||||
value: key,
|
||||
type: config.type,
|
||||
})
|
||||
)}
|
||||
}))}
|
||||
value={cloudLogFilters.column ?? []}
|
||||
onChange={(v) =>
|
||||
setCloudLogFilters((prev) => ({ ...prev, column: v }))
|
||||
|
||||
Reference in New Issue
Block a user