Browse Source

[Improvement][UI] Rename disabled to enabled in menu (#4414)

pull/3/MERGE
Shiwen Cheng 4 years ago committed by GitHub
parent
commit
58a9e12dcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 56
      dolphinscheduler-ui/src/js/module/components/secondaryMenu/_source/menu.js
  2. 4
      dolphinscheduler-ui/src/js/module/components/secondaryMenu/secondaryMenu.vue

56
dolphinscheduler-ui/src/js/module/components/secondaryMenu/_source/menu.js

@ -26,7 +26,7 @@ const menu = {
id: 0, id: 0,
path: 'projects-index', path: 'projects-index',
isOpen: true, isOpen: true,
disabled: true, enabled: true,
icon: 'ri-home-4-line', icon: 'ri-home-4-line',
children: [] children: []
}, },
@ -35,7 +35,7 @@ const menu = {
id: 1, id: 1,
path: 'projects-kinship', path: 'projects-kinship',
isOpen: true, isOpen: true,
disabled: true, enabled: true,
icon: 'ri-node-tree', icon: 'ri-node-tree',
children: [] children: []
}, },
@ -44,38 +44,38 @@ const menu = {
id: 2, id: 2,
path: '', path: '',
isOpen: true, isOpen: true,
disabled: true, enabled: true,
icon: 'el-icon-s-tools', icon: 'el-icon-s-tools',
children: [ children: [
{ {
name: `${i18n.$t('Process definition')}`, name: `${i18n.$t('Process definition')}`,
path: 'definition', path: 'definition',
id: 0, id: 0,
disabled: true enabled: true
}, },
{ {
name: `${i18n.$t('Process Instance')}`, name: `${i18n.$t('Process Instance')}`,
path: 'instance', path: 'instance',
id: 1, id: 1,
disabled: true enabled: true
}, },
{ {
name: `${i18n.$t('Task Instance')}`, name: `${i18n.$t('Task Instance')}`,
path: 'task-instance', path: 'task-instance',
id: 2, id: 2,
disabled: true enabled: true
}, },
{ {
name: `${i18n.$t('Task record')}`, name: `${i18n.$t('Task record')}`,
path: 'task-record', path: 'task-record',
id: 3, id: 3,
disabled: config.recordSwitch enabled: config.recordSwitch
}, },
{ {
name: `${i18n.$t('History task record')}`, name: `${i18n.$t('History task record')}`,
path: 'history-task-record', path: 'history-task-record',
id: 4, id: 4,
disabled: config.recordSwitch enabled: config.recordSwitch
} }
] ]
} }
@ -87,7 +87,7 @@ const menu = {
id: 0, id: 0,
path: 'tenement-manage', path: 'tenement-manage',
isOpen: true, isOpen: true,
disabled: true, enabled: true,
icon: 'el-icon-user-solid', icon: 'el-icon-user-solid',
children: [] children: []
}, },
@ -96,7 +96,7 @@ const menu = {
id: 1, id: 1,
path: 'users-manage', path: 'users-manage',
isOpen: true, isOpen: true,
disabled: true, enabled: true,
icon: 'el-icon-user-solid', icon: 'el-icon-user-solid',
children: [] children: []
}, },
@ -105,7 +105,7 @@ const menu = {
id: 2, id: 2,
path: 'warning-groups-manage', path: 'warning-groups-manage',
isOpen: true, isOpen: true,
disabled: true, enabled: true,
icon: 'el-icon-warning', icon: 'el-icon-warning',
children: [] children: []
}, },
@ -114,7 +114,7 @@ const menu = {
id: 4, id: 4,
path: 'worker-groups-manage', path: 'worker-groups-manage',
isOpen: true, isOpen: true,
disabled: true, enabled: true,
icon: 'el-icon-s-custom', icon: 'el-icon-s-custom',
children: [] children: []
}, },
@ -123,7 +123,7 @@ const menu = {
id: 3, id: 3,
path: 'queue-manage', path: 'queue-manage',
isOpen: true, isOpen: true,
disabled: true, enabled: true,
icon: 'ri-group-line', icon: 'ri-group-line',
children: [] children: []
}, },
@ -134,7 +134,7 @@ const menu = {
isOpen: true, isOpen: true,
icon: 'el-icon-document', icon: 'el-icon-document',
children: [], children: [],
disabled: true enabled: true
} }
], ],
resource: [ resource: [
@ -145,7 +145,7 @@ const menu = {
isOpen: true, isOpen: true,
icon: 'el-icon-document-copy', icon: 'el-icon-document-copy',
children: [], children: [],
disabled: true enabled: true
}, },
{ {
name: `${i18n.$t('UDF manage')}`, name: `${i18n.$t('UDF manage')}`,
@ -153,19 +153,19 @@ const menu = {
path: '', path: '',
isOpen: true, isOpen: true,
icon: 'el-icon-document', icon: 'el-icon-document',
disabled: true, enabled: true,
children: [ children: [
{ {
name: `${i18n.$t('Resource manage')}`, name: `${i18n.$t('Resource manage')}`,
path: 'resource-udf', path: 'resource-udf',
id: 0, id: 0,
disabled: true enabled: true
}, },
{ {
name: `${i18n.$t('Function manage')}`, name: `${i18n.$t('Function manage')}`,
path: 'resource-func', path: 'resource-func',
id: 1, id: 1,
disabled: true enabled: true
} }
] ]
} }
@ -178,7 +178,7 @@ const menu = {
isOpen: true, isOpen: true,
icon: 'el-icon-user-solid', icon: 'el-icon-user-solid',
children: [], children: [],
disabled: true enabled: true
}, },
{ {
name: `${i18n.$t('Edit password')}`, name: `${i18n.$t('Edit password')}`,
@ -187,7 +187,7 @@ const menu = {
isOpen: true, isOpen: true,
icon: 'el-icon-key', icon: 'el-icon-key',
children: [], children: [],
disabled: true enabled: true
}, },
{ {
name: `${i18n.$t('Token manage')}`, name: `${i18n.$t('Token manage')}`,
@ -196,7 +196,7 @@ const menu = {
isOpen: true, isOpen: true,
icon: 'el-icon-s-custom', icon: 'el-icon-s-custom',
children: [], children: [],
disabled: Permissions.getAuth() enabled: Permissions.getAuth()
} }
], ],
monitor: [ monitor: [
@ -205,32 +205,32 @@ const menu = {
id: 1, id: 1,
path: '', path: '',
isOpen: true, isOpen: true,
disabled: true, enabled: true,
icon: 'el-icon-menu', icon: 'el-icon-menu',
children: [ children: [
{ {
name: 'Master', name: 'Master',
path: 'servers-master', path: 'servers-master',
id: 0, id: 0,
disabled: true enabled: true
}, },
{ {
name: 'Worker', name: 'Worker',
path: 'servers-worker', path: 'servers-worker',
id: 1, id: 1,
disabled: true enabled: true
}, },
{ {
name: 'Zookeeper', name: 'Zookeeper',
path: 'servers-zookeeper', path: 'servers-zookeeper',
id: 4, id: 4,
disabled: true enabled: true
}, },
{ {
name: 'DB', name: 'DB',
path: 'servers-db', path: 'servers-db',
id: 6, id: 6,
disabled: true enabled: true
} }
] ]
}, },
@ -239,14 +239,14 @@ const menu = {
id: 0, id: 0,
path: '', path: '',
isOpen: true, isOpen: true,
disabled: true, enabled: true,
icon: 'el-icon-menu', icon: 'el-icon-menu',
children: [ children: [
{ {
name: 'Statistics', name: 'Statistics',
path: 'statistics', path: 'statistics',
id: 0, id: 0,
disabled: true enabled: true
} }
] ]
} }

4
dolphinscheduler-ui/src/js/module/components/secondaryMenu/secondaryMenu.vue

@ -21,7 +21,7 @@
<a href="javascript:" class="tog-open" @click="_toggleMenu" v-if="isTogHide"></a> <a href="javascript:" class="tog-open" @click="_toggleMenu" v-if="isTogHide"></a>
</div> </div>
<div class="leven-1" v-for="(item,$index) in menuList" :key="$index"> <div class="leven-1" v-for="(item,$index) in menuList" :key="$index">
<div v-if="item.disabled"> <div v-if="item.enabled">
<template v-if="item.path"> <template v-if="item.path">
<router-link :to="{ name: item.path}"> <router-link :to="{ name: item.path}">
<div class="name" @click="_toggleSubMenu(item)"> <div class="name" @click="_toggleSubMenu(item)">
@ -44,7 +44,7 @@
</template> </template>
<ul v-if="item.isOpen && item.children.length"> <ul v-if="item.isOpen && item.children.length">
<template v-for="(el,index) in item.children"> <template v-for="(el,index) in item.children">
<router-link :to="{ name: el.path}" tag="li" active-class="active" v-if="el.disabled" :key="index"> <router-link :to="{ name: el.path}" tag="li" active-class="active" v-if="el.enabled" :key="index">
<span>{{el.name}}</span> <span>{{el.name}}</span>
</router-link> </router-link>
</template> </template>

Loading…
Cancel
Save