From 8592a250ce5b335587dacb3e7850b457a5a3132a Mon Sep 17 00:00:00 2001 From: benjobs Date: Sun, 8 Oct 2023 23:35:13 +0800 Subject: [PATCH] [WIP][Improve] reorganize the menus --- .../src/main/resources/db/data-h2.sql | 45 ++++++++++--------- .../src/assets/icons/app.svg | 2 +- .../SimpleMenu/src/SimpleSubMenu.vue | 4 +- .../flink/app/hooks => hooks/web}/useLog.ts | 0 .../src/locales/lang/en/menu.ts | 18 ++++---- .../src/locales/lang/zh-CN/menu.ts | 8 ++-- .../flink/app/components/AppView/LogModal.vue | 2 +- .../src/views/{flink => }/project/Add.vue | 0 .../src/views/{flink => }/project/Edit.vue | 0 .../src/views/{flink => }/project/View.vue | 2 +- .../project/components/ListItem.vue | 2 +- .../project/components/LogModal.vue | 2 +- .../project/components/RepositoryGroup.tsx | 0 .../views/{flink => }/project/project.data.ts | 0 .../views/{flink => }/project/useProject.tsx | 6 ++- 15 files changed, 50 insertions(+), 41 deletions(-) rename streampark-console/streampark-console-webapp/src/{views/flink/app/hooks => hooks/web}/useLog.ts (100%) rename streampark-console/streampark-console-webapp/src/views/{flink => }/project/Add.vue (100%) rename streampark-console/streampark-console-webapp/src/views/{flink => }/project/Edit.vue (100%) rename streampark-console/streampark-console-webapp/src/views/{flink => }/project/View.vue (99%) rename streampark-console/streampark-console-webapp/src/views/{flink => }/project/components/ListItem.vue (99%) rename streampark-console/streampark-console-webapp/src/views/{flink => }/project/components/LogModal.vue (98%) rename streampark-console/streampark-console-webapp/src/views/{flink => }/project/components/RepositoryGroup.tsx (100%) rename streampark-console/streampark-console-webapp/src/views/{flink => }/project/project.data.ts (100%) rename streampark-console/streampark-console-webapp/src/views/{flink => }/project/useProject.tsx (98%) diff --git a/streampark-console/streampark-console-service/src/main/resources/db/data-h2.sql b/streampark-console/streampark-console-service/src/main/resources/db/data-h2.sql index 5d486f3442..a9128b2d90 100644 --- a/streampark-console/streampark-console-service/src/main/resources/db/data-h2.sql +++ b/streampark-console/streampark-console-service/src/main/resources/db/data-h2.sql @@ -46,24 +46,25 @@ insert into `t_flink_sql` values (100000, 100000, 'eNqlUUtPhDAQvu+vmFs1AYIHT5s94 -- Records of t_menu -- ---------------------------- insert into `t_menu` values (110000, 0, 'menu.system', '/system', 'PageView', null, 'desktop', '0', 1, 1, now(), now()); -insert into `t_menu` values (120000, 0, 'Apache Flink', '/flink', 'PageView', null, 'build', '0', 1, 2, now(), now()); +insert into `t_menu` values (120000, 0, 'Apache Flink', '/flink', 'PageView', null, null, '0', 1, 3, now(), now()); insert into `t_menu` values (130000, 0, 'menu.setting', '/setting', 'PageView', null, 'setting', '0', 1, 5, now(), now()); -insert into `t_menu` values (110100, 110000, 'menu.userManagement', '/system/user', 'system/user/User', null, 'user', '0', 1, 1, now(), now()); -insert into `t_menu` values (110200, 110000, 'menu.roleManagement', '/system/role', 'system/role/Role', null, 'smile', '0', 1, 2, now(), now()); -insert into `t_menu` values (110300, 110000, 'menu.menuManagement', '/system/menu', 'system/menu/Menu', 'menu:view', 'bars', '0', 1, 3, now(), now()); -insert into `t_menu` values (110400, 110000, 'menu.tokenManagement', '/system/token', 'system/token/Token', null, 'lock', '0', 1, 1, now(), now()); -insert into `t_menu` values (110500, 110000, 'menu.teamManagement', '/system/team', 'system/team/Team', null, 'team', '0', 1, 2, now(), now()); -insert into `t_menu` values (110600, 110000, 'menu.memberManagement', '/system/member', 'system/member/Member', null, 'usergroup-add', '0', 1, 2, now(), now()); -insert into `t_menu` values (120100, 120000, 'menu.project', '/flink/project', 'flink/project/View', null, 'github', '0', 1, 1, now(), now()); -insert into `t_menu` values (120200, 120000, 'menu.application', '/flink/app', 'flink/app/View', null, 'mobile', '0', 1, 2, now(), now()); -insert into `t_menu` values (120300, 120000, 'menu.variable', '/flink/variable', 'flink/variable/View', null, 'code', '0', 1, 3, now(), now()); -insert into `t_menu` values (120400, 120000, 'menu.resource', '/flink/resource', 'flink/resource/View', null, 'apartment', '0', 1, 3, now(), now()); -insert into `t_menu` values (130100, 130000, 'setting.system', '/setting/system', 'setting/System/index', null, 'database', '0', 1, 1, now(), now()); -insert into `t_menu` values (130200, 130000, 'setting.alarm', '/setting/alarm', 'setting/Alarm/index', null, 'alert', '0', 1, 2, now(), now()); -insert into `t_menu` values (130300, 130000, 'setting.flinkHome', '/setting/flinkHome', 'setting/FlinkHome/index', null, 'desktop', '0', 1, 3, now(), now()); -insert into `t_menu` values (130400, 130000, 'setting.flinkCluster', '/setting/flinkCluster', 'setting/FlinkCluster/index', 'menu:view', 'cluster', '0', 1, 4, now(), now()); -insert into `t_menu` values (130500, 130000, 'setting.externalLink', '/setting/externalLink', 'setting/ExternalLink/index', 'menu:view', 'link', '0', 1, 5, now(), now()); -insert into `t_menu` values (130600, 130000, 'setting.yarnQueue', '/setting/yarnQueue', 'setting/YarnQueue/index', 'menu:view', 'bars', '0', 1, 6, now(), now()); +insert into `t_menu` values (140000, 0, 'menu.project', '/project', 'project/View', null, 'github', '0', 1, 2, now(), now()); +insert into `t_menu` values (150000, 0, 'Apache Spark', '/spark', 'PageView', null, null, '0', 1, 4, now(), now()); +insert into `t_menu` values (110100, 110000, 'menu.userManagement', '/system/user', 'system/user/User', null, null, '0', 1, 1, now(), now()); +insert into `t_menu` values (110200, 110000, 'menu.roleManagement', '/system/role', 'system/role/Role', null, null, '0', 1, 2, now(), now()); +insert into `t_menu` values (110300, 110000, 'menu.menuManagement', '/system/menu', 'system/menu/Menu', 'menu:view', null, '0', 1, 3, now(), now()); +insert into `t_menu` values (110400, 110000, 'menu.tokenManagement', '/system/token', 'system/token/Token', null, null, '0', 1, 1, now(), now()); +insert into `t_menu` values (110500, 110000, 'menu.teamManagement', '/system/team', 'system/team/Team', null, null, '0', 1, 2, now(), now()); +insert into `t_menu` values (110600, 110000, 'menu.memberManagement', '/system/member', 'system/member/Member', null, null, '0', 1, 2, now(), now()); +insert into `t_menu` values (120200, 120000, 'menu.application', '/flink/app', 'flink/app/View', null, null, '0', 1, 2, now(), now()); +insert into `t_menu` values (120300, 120000, 'menu.variable', '/flink/variable', 'flink/variable/View', null, null, '0', 1, 3, now(), now()); +insert into `t_menu` values (120400, 120000, 'menu.resource', '/flink/resource', 'flink/resource/View', null, null, '0', 1, 3, now(), now()); +insert into `t_menu` values (120500, 120000, 'flink.flinkHome', '/setting/flinkHome', 'setting/FlinkHome/index', null, null, '0', 1, 3, now(), now()); +insert into `t_menu` values (120600, 120000, 'flink.flinkCluster', '/setting/flinkCluster', 'setting/FlinkCluster/index', 'menu:view', null, '0', 1, 4, now(), now()); +insert into `t_menu` values (130100, 130000, 'setting.system', '/setting/system', 'setting/System/index', null, null, '0', 1, 1, now(), now()); +insert into `t_menu` values (130200, 130000, 'setting.alarm', '/setting/alarm', 'setting/Alarm/index', null, null, '0', 1, 2, now(), now()); +insert into `t_menu` values (130500, 130000, 'setting.externalLink', '/setting/externalLink', 'setting/ExternalLink/index', 'menu:view', null, '0', 1, 5, now(), now()); +insert into `t_menu` values (130600, 130000, 'setting.yarnQueue', '/setting/yarnQueue', 'setting/YarnQueue/index', 'menu:view', null, '0', 1, 6, now(), now()); insert into `t_menu` values (110101, 110100, 'add', null, null, 'user:add', null, '1', 1, null, now(), now()); insert into `t_menu` values (110102, 110100, 'update', null, null, 'user:update', null, '1', 1, null, now(), now()); insert into `t_menu` values (110103, 110100, 'delete', null, null, 'user:delete', null, '1', 1, null, now(), now()); @@ -86,11 +87,11 @@ insert into `t_menu` values (110602, 110600, 'update', null, null, 'member:updat insert into `t_menu` values (110603, 110600, 'delete', null, null, 'member:delete', null, '1', 1, null, now(), now()); insert into `t_menu` values (110604, 110600, 'role view', null, null, 'role:view', null, '1', 1, null, now(), now()); insert into `t_menu` values (110605, 110600, 'view', null, null, 'member:view', null, '1', 1, null, now(), now()); -insert into `t_menu` values (120101, 120100, 'add', '/flink/project/add', 'flink/project/Add', 'project:create', '', '0', 0, null, now(), now()); -insert into `t_menu` values (120102, 120100, 'build', null, null, 'project:build', null, '1', 1, null, now(), now()); -insert into `t_menu` values (120103, 120100, 'delete', null, null, 'project:delete', null, '1', 1, null, now(), now()); -insert into `t_menu` values (120104, 120100, 'edit', '/flink/project/edit', 'flink/project/Edit', 'project:update', null, '0', 0, null, now(), now()); -insert into `t_menu` values (120105, 120100, 'view', null, null, 'project:view', null, '1', 1, null, now(), now()); +insert into `t_menu` values (120101, 140000, 'add', '/project/add', 'project/Add', 'project:create', '', '0', 0, null, now(), now()); +insert into `t_menu` values (120102, 140000, 'build', null, null, 'project:build', null, '1', 1, null, now(), now()); +insert into `t_menu` values (120103, 140000, 'delete', null, null, 'project:delete', null, '1', 1, null, now(), now()); +insert into `t_menu` values (120104, 140000, 'edit', '/project/edit', 'project/Edit', 'project:update', null, '0', 0, null, now(), now()); +insert into `t_menu` values (120105, 140000, 'view', null, null, 'project:view', null, '1', 1, null, now(), now()); insert into `t_menu` values (120201, 120200, 'add', '/flink/app/add', 'flink/app/Add', 'app:create', '', '0', 0, null, now(), now()); insert into `t_menu` values (120202, 120200, 'detail app', '/flink/app/detail', 'flink/app/Detail', 'app:detail', '', '0', 0, null, now(), now()); insert into `t_menu` values (120203, 120200, 'edit flink', '/flink/app/edit_flink', 'flink/app/EditFlink', 'app:update', '', '0', 0, null, now(), now()); diff --git a/streampark-console/streampark-console-webapp/src/assets/icons/app.svg b/streampark-console/streampark-console-webapp/src/assets/icons/app.svg index d663174fac..c04912c526 100644 --- a/streampark-console/streampark-console-webapp/src/assets/icons/app.svg +++ b/streampark-console/streampark-console-webapp/src/assets/icons/app.svg @@ -1 +1 @@ - + diff --git a/streampark-console/streampark-console-webapp/src/components/SimpleMenu/src/SimpleSubMenu.vue b/streampark-console/streampark-console-webapp/src/components/SimpleMenu/src/SimpleSubMenu.vue index 581cd32a92..faeee03561 100644 --- a/streampark-console/streampark-console-webapp/src/components/SimpleMenu/src/SimpleSubMenu.vue +++ b/streampark-console/streampark-console-webapp/src/components/SimpleMenu/src/SimpleSubMenu.vue @@ -21,7 +21,8 @@ v-bind="$props" :class="getLevelClass" > - + +
{{ getI18nName }}
@@ -42,7 +43,6 @@ -
diff --git a/streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useLog.ts b/streampark-console/streampark-console-webapp/src/hooks/web/useLog.ts similarity index 100% rename from streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useLog.ts rename to streampark-console/streampark-console-webapp/src/hooks/web/useLog.ts diff --git a/streampark-console/streampark-console-webapp/src/locales/lang/en/menu.ts b/streampark-console/streampark-console-webapp/src/locales/lang/en/menu.ts index b161b7145d..4b4458f864 100644 --- a/streampark-console/streampark-console-webapp/src/locales/lang/en/menu.ts +++ b/streampark-console/streampark-console-webapp/src/locales/lang/en/menu.ts @@ -23,17 +23,19 @@ export default { tokenManagement: 'Token Management', teamManagement: 'Team Management', memberManagement: 'Member Management', - project: 'Project', - application: 'Application', - variable: 'Variable', - resource: 'Resource', + project: 'Projects', + application: 'Applications', + variable: 'Variables', + resource: 'Resources', setting: 'Settings', }, - setting: { - system: 'System Setting', - alarm: 'Alarm Setting', + flink: { flinkHome: 'Flink Home', - flinkCluster: 'Flink Cluster', + flinkCluster: 'Clusters', + }, + setting: { + system: 'Environment Settings', + alarm: 'Alarm Settings', externalLink: 'External Link', yarnQueue: 'Yarn Queue', flinkGateway: 'FLink Gateway', diff --git a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/menu.ts b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/menu.ts index 330fe9f7d4..34557cbc25 100644 --- a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/menu.ts +++ b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/menu.ts @@ -23,17 +23,19 @@ export default { tokenManagement: 'Token 管理', teamManagement: '团队管理', memberManagement: '成员管理', - project: '项目管理', + project: '项目', application: '作业管理', variable: '变量管理', resource: '资源管理', setting: '设置中心', }, + flink: { + flinkHome: 'Flink版本', + flinkCluster: '集群', + }, setting: { system: '系统设置', alarm: '告警设置', - flinkHome: 'Flink 版本', - flinkCluster: 'Flink 集群', externalLink: '扩展链接', yarnQueue: 'Yarn 队列', flinkGateway: 'FLink 网关', diff --git a/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/LogModal.vue b/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/LogModal.vue index 29cd704172..a196020c46 100644 --- a/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/LogModal.vue +++ b/streampark-console/streampark-console-webapp/src/views/flink/app/components/AppView/LogModal.vue @@ -17,7 +17,7 @@