Skip to content

Commit

Permalink
[WIP][Improve] reorganize the menus
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfboys committed Oct 8, 2023
1 parent 095be65 commit 8592a25
Show file tree
Hide file tree
Showing 15 changed files with 50 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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());
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
v-bind="$props"
:class="getLevelClass"
>
<Icon v-if="getIcon" :icon="getIcon" :size="20" />
<SvgIcon v-if="item.path === '/project'" name="app" size="25" />
<SvgIcon v-if="item.path === '/spark'" name="spark" size="30" />
<div v-if="collapsedShowTitle && getIsCollapseParent" class="mt-1 collapse-title">
{{ getI18nName }}
</div>
Expand All @@ -42,7 +43,6 @@
<span>
<SvgIcon v-if="item.path === '/system'" name="management" size="25" />
<SvgIcon v-if="item.path === '/flink'" name="flink3" size="25" />
<SvgIcon v-if="item.path === '/spark'" name="spark" size="25" />
<SvgIcon v-if="item.path === '/setting'" name="settings" size="25" />
</span>
<div v-if="collapsedShowTitle && getIsCollapseParent" class="mt-2 collapse-title">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 网关',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { useI18n } from '/@/hooks/web/useI18n';
import { useLog } from '../../hooks/useLog';
import { useLog } from '/@/hooks/web/useLog';
export default defineComponent({
name: 'LogModal',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
let projectDataSource = ref<Array<ProjectRecord>>([]);

function onAdd() {
go(`/flink/project/add`);
go(`/project/add`);
}

function handleSearch(value: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
}

const handleEdit = function () {
go(`/flink/project/edit?id=${props.item.id}`);
go(`/project/edit?id=${props.item.id}`);
};

async function handleDelete() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</script>
<script setup lang="ts" name="BuildLogModal">
import { useI18n } from '/@/hooks/web/useI18n';
import { useLog } from '../../app/hooks/useLog';
import { useLog } from '/@/hooks/web/useLog';
import { buildLog } from '/@/api/flink/project';
import { reactive, ref, unref } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ import { useForm } from '/@/components/Form';
import { useMessage } from '/@/hooks/web/useMessage';
import { useRoute } from 'vue-router';
import { ProjectRecord } from '/@/api/flink/project/model/projectModel';
import { filterOption } from '../app/utils';
import { useI18n } from '/@/hooks/web/useI18n';
import { GitCredentialEnum, ProjectTypeEnum, CVSTypeEnum } from '/@/enums/projectEnum';
import RepositoryGroup from './components/RepositoryGroup';
import { Form } from 'ant-design-vue';

const { t } = useI18n();

export const filterOption = (input: string, options: Recordable) => {
return options.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
};

export const useProject = () => {
const route = useRoute();
const { createMessage, createErrorSwal } = useMessage();
Expand Down

0 comments on commit 8592a25

Please sign in to comment.