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

Loading…
Cancel
Save