feat(orchestration): 新增应用编排功能并调整组件路径

master
钟良源 5 months ago
parent 91b7045c86
commit c72382140a

@ -6,8 +6,8 @@ export const menuData = [
children: [ children: [
{ {
title: '应用A', title: '应用A',
path: 'appFlow', path: 'compFlow',
key: 'appFlow', key: 'compFlow',
parentKey: 'appList', parentKey: 'appList',
children: [ children: [
{ {
@ -22,8 +22,8 @@ export const menuData = [
}, },
{ {
title: '应用B', title: '应用B',
path: 'appFlow', path: 'compFlow',
key: 'appFlow', key: 'compFlow',
parentKey: 'appList', parentKey: 'appList',
children: [ children: [
{ {
@ -40,9 +40,9 @@ export const menuData = [
}, },
{ {
title: '应用编排', title: '应用编排',
key: 'null', key: 'appFlow',
children: null, children: null,
path: 'null' path: 'appFlow'
}, },
{ {
title: '事件', title: '事件',

@ -7,6 +7,7 @@ import LogBar from './logBar';
import RightSideBar from './rightSideBar'; import RightSideBar from './rightSideBar';
import NavBar from './navBar'; import NavBar from './navBar';
import ProjectContainer from '@/pages/orchestration/project'; import ProjectContainer from '@/pages/orchestration/project';
import ApplicationContainer from '@/pages/orchestration/application';
import { menuData, menuData2 } from './config/menuData'; import { menuData, menuData2 } from './config/menuData';
interface Selected { interface Selected {
@ -32,7 +33,7 @@ const ComponentTest = () => <div style={{ height: '100%', width: '100%' }}>组
// 所有可显示的组件路径列表 // 所有可显示的组件路径列表
const ALL_PATHS = [ const ALL_PATHS = [
'appFlow', 'compList', 'appInstance', 'event', 'globalVar', 'compFlow', 'appFlow', 'compList', 'appInstance', 'event', 'globalVar',
'myComponents', 'matchingComponents', 'componentReview', 'myComponents', 'matchingComponents', 'componentReview',
'componentCoding', 'componentDeployment', 'componentTest' 'componentCoding', 'componentDeployment', 'componentTest'
]; ];
@ -52,7 +53,6 @@ function IDEContainer() {
// 当selected.currentPath变化时添加到已打开的tab集合中 // 当selected.currentPath变化时添加到已打开的tab集合中
useEffect(() => { useEffect(() => {
if (selected.currentPath) { if (selected.currentPath) {
console.log(1);
setOpenedTabs(prev => new Set(prev).add(selected.currentPath!)); setOpenedTabs(prev => new Set(prev).add(selected.currentPath!));
} }
}, [selected.currentPath]); }, [selected.currentPath]);
@ -92,8 +92,10 @@ function IDEContainer() {
// 根据路径获取对应的组件 // 根据路径获取对应的组件
const getContentByPath = (path: string) => { const getContentByPath = (path: string) => {
switch (path) { switch (path) {
case 'appFlow': case 'compFlow':
return <ProjectContainer />; return <ProjectContainer />;
case 'appFlow':
return <ApplicationContainer />;
case 'compList': case 'compList':
return <CompListComponent />; return <CompListComponent />;
case 'appInstance': case 'appInstance':

@ -0,0 +1,10 @@
import React from 'react';
import FlowEditor from '@/pages/flowEditor/index';
const ApplicationContainer = () => {
return (
<FlowEditor />
);
};
export default ApplicationContainer;
Loading…
Cancel
Save