Removed unused code from flowLogsModal
This commit is contained in:
parent
1cdc8e0efc
commit
c2b58d40fa
1 changed files with 0 additions and 36 deletions
|
|
@ -16,41 +16,15 @@ export default function FlowLogsModal({
|
||||||
open,
|
open,
|
||||||
setOpen,
|
setOpen,
|
||||||
}: FlowSettingsPropsType): JSX.Element {
|
}: FlowSettingsPropsType): JSX.Element {
|
||||||
const saveFlow = useFlowsManagerStore((state) => state.saveFlow);
|
|
||||||
const nodes = useFlowStore((state) => state.nodes);
|
const nodes = useFlowStore((state) => state.nodes);
|
||||||
const currentFlow = useFlowsManagerStore((state) => state.currentFlow);
|
|
||||||
const currentFlowId = useFlowsManagerStore((state) => state.currentFlowId);
|
const currentFlowId = useFlowsManagerStore((state) => state.currentFlowId);
|
||||||
const flows = useFlowsManagerStore((state) => state.flows);
|
|
||||||
const setNoticeData = useAlertStore((state) => state.setNoticeData);
|
const setNoticeData = useAlertStore((state) => state.setNoticeData);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
setName(currentFlow!.name);
|
|
||||||
setDescription(currentFlow!.description);
|
|
||||||
}, [currentFlow!.name, currentFlow!.description, open]);
|
|
||||||
|
|
||||||
const [name, setName] = useState(currentFlow!.name);
|
|
||||||
const [description, setDescription] = useState(currentFlow!.description);
|
|
||||||
const [columns, setColumns] = useState<Array<ColDef | ColGroupDef>>([]);
|
const [columns, setColumns] = useState<Array<ColDef | ColGroupDef>>([]);
|
||||||
const [rows, setRows] = useState<any>([]);
|
const [rows, setRows] = useState<any>([]);
|
||||||
const [activeTab, setActiveTab] = useState("Executions");
|
const [activeTab, setActiveTab] = useState("Executions");
|
||||||
const noticed = useRef(false);
|
const noticed = useRef(false);
|
||||||
|
|
||||||
function handleClick(): void {
|
|
||||||
currentFlow!.name = name;
|
|
||||||
currentFlow!.description = description;
|
|
||||||
saveFlow(currentFlow!)
|
|
||||||
?.then(() => {
|
|
||||||
setOpen(false);
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
useAlertStore.getState().setErrorData({
|
|
||||||
title: "Error while saving changes",
|
|
||||||
list: [(err as AxiosError).response?.data.detail ?? ""],
|
|
||||||
});
|
|
||||||
console.error(err);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (activeTab === "Executions") {
|
if (activeTab === "Executions") {
|
||||||
getTransactionTable(currentFlowId, "union").then((data) => {
|
getTransactionTable(currentFlowId, "union").then((data) => {
|
||||||
|
|
@ -86,16 +60,6 @@ export default function FlowLogsModal({
|
||||||
}
|
}
|
||||||
}, [open, activeTab]);
|
}, [open, activeTab]);
|
||||||
|
|
||||||
const [nameLists, setNameList] = useState<string[]>([]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
const tempNameList: string[] = [];
|
|
||||||
flows.forEach((flow: FlowType) => {
|
|
||||||
if ((flow.is_component ?? false) === false) tempNameList.push(flow.name);
|
|
||||||
});
|
|
||||||
setNameList(tempNameList.filter((name) => name !== currentFlow!.name));
|
|
||||||
}, [flows]);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BaseModal open={open} setOpen={setOpen} size="large">
|
<BaseModal open={open} setOpen={setOpen} size="large">
|
||||||
<BaseModal.Header description="Inspect component executions and monitor sent messages in the playground.">
|
<BaseModal.Header description="Inspect component executions and monitor sent messages in the playground.">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue