feat(client): add filter on exist edges
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
/* eslint-disable react-hooks/exhaustive-deps */
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Layout } from 'antd';
|
||||
import Sider from 'antd/es/layout/Sider';
|
||||
import { Route, Routes, useLocation, useNavigate } from 'react-router-dom';
|
||||
import SiderMenu from '@/components/SiderMenu';
|
||||
import ProcessDiagramPage from './ProcessDiagramPage';
|
||||
import RunningProcessesPage from './RunningProcessesPage';
|
||||
import AccountsPage from './AccountsPage';
|
||||
import EventsListPage from './EventsListPage';
|
||||
import ConfigurationPage from './ConfigurationPage';
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { Layout } from "antd";
|
||||
import Sider from "antd/es/layout/Sider";
|
||||
import { Route, Routes, useLocation, useNavigate } from "react-router-dom";
|
||||
import SiderMenu from "@/components/SiderMenu";
|
||||
import ProcessDiagramPage from "./ProcessDiagramPage";
|
||||
import AccountsPage from "./AccountsPage";
|
||||
import ConfigurationPage from "./ConfigurationPage";
|
||||
import EventsListPage from "./EventsListPage";
|
||||
import RunningProcessesPage from "./RunningProcessesPage";
|
||||
|
||||
export default function MainLayout() {
|
||||
const navigate = useNavigate();
|
||||
const location = useLocation();
|
||||
const [collapsed, setCollapsed] = useState(false);
|
||||
const [selectedKey, setSelectedKey] = useState('1');
|
||||
const [selectedKey, setSelectedKey] = useState("1");
|
||||
|
||||
const [width, setWidth] = useState<number | string>('15%');
|
||||
const [width, setWidth] = useState<number | string>("15%");
|
||||
const [collapsedWidth, setCollapsedWidth] = useState(50);
|
||||
|
||||
const calculateWidths = () => {
|
||||
@@ -29,24 +29,24 @@ export default function MainLayout() {
|
||||
|
||||
useEffect(() => {
|
||||
calculateWidths();
|
||||
window.addEventListener('resize', calculateWidths);
|
||||
return () => window.removeEventListener('resize', calculateWidths);
|
||||
window.addEventListener("resize", calculateWidths);
|
||||
return () => window.removeEventListener("resize", calculateWidths);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (location.pathname === '/') {
|
||||
navigate('/process-diagram');
|
||||
if (location.pathname === "/") {
|
||||
navigate("/process-diagram");
|
||||
}
|
||||
setSelectedKey(location.pathname);
|
||||
}, [location.pathname]);
|
||||
|
||||
function hangleMenuClick(e: any) {
|
||||
const key = e.key;
|
||||
if (key === 'toggle') {
|
||||
if (key === "toggle") {
|
||||
setCollapsed(!collapsed);
|
||||
return;
|
||||
}
|
||||
if (key === 'divider') {
|
||||
if (key === "divider") {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ export default function MainLayout() {
|
||||
}
|
||||
|
||||
return (
|
||||
<Layout style={{ minHeight: '100vh' }}>
|
||||
<Layout style={{ minHeight: "100vh" }}>
|
||||
<Sider
|
||||
className="sider"
|
||||
collapsible
|
||||
|
Reference in New Issue
Block a user