menu.js 5.6 KB
Newer Older
L
ligang 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import i18n from '@/module/i18n'
19
import config from '~/external/config'
G
gongzijian 已提交
20
import Permissions from '@/module/permissions'
21

22
const menu = {
L
ligang 已提交
23 24
  projects: [
    {
G
i18n  
gongzijian 已提交
25
      name: `${i18n.$t('Project Home')}`,
26
      id: 0,
L
ligang 已提交
27 28
      path: 'projects-index',
      isOpen: true,
29
      disabled: true,
30
      icon: 'ri-home-4-line',
L
ligang 已提交
31 32 33
      children: []
    },
    {
L
LiemLin 已提交
34
      name: `${i18n.$t('Kinship')}`,
35
      id: 1,
L
LiemLin 已提交
36 37 38
      path: 'projects-kinship',
      isOpen: true,
      disabled: true,
39
      icon: 'ri-node-tree',
L
LiemLin 已提交
40 41 42 43 44
      children: []
    },
    {
      name: `${i18n.$t('Process')}`,
      id: 2,
L
ligang 已提交
45 46
      path: '',
      isOpen: true,
47
      disabled: true,
48
      icon: 'el-icon-s-tools',
L
ligang 已提交
49 50
      children: [
        {
G
i18n  
gongzijian 已提交
51
          name: `${i18n.$t('Process definition')}`,
L
ligang 已提交
52
          path: 'definition',
53
          id: 0,
54
          disabled: true
L
ligang 已提交
55 56
        },
        {
G
i18n  
gongzijian 已提交
57
          name: `${i18n.$t('Process Instance')}`,
L
ligang 已提交
58
          path: 'instance',
59
          id: 1,
60
          disabled: true
L
ligang 已提交
61 62
        },
        {
G
i18n  
gongzijian 已提交
63
          name: `${i18n.$t('Task Instance')}`,
64
          path: 'task-instance',
65
          id: 2,
66
          disabled: true
G
i18n  
gongzijian 已提交
67 68 69
        },
        {
          name: `${i18n.$t('Task record')}`,
70
          path: 'task-record',
71
          id: 3,
72
          disabled: config.recordSwitch
73 74 75 76
        },
        {
          name: `${i18n.$t('History task record')}`,
          path: 'history-task-record',
77
          id: 4,
78
          disabled: config.recordSwitch
L
ligang 已提交
79 80 81 82 83 84 85
        }
      ]
    }
  ],

  security: [
    {
G
gongzijian 已提交
86
      name: `${i18n.$t('Tenant Manage')}`,
87
      id: 0,
L
ligang 已提交
88 89
      path: 'tenement-manage',
      isOpen: true,
90
      disabled: true,
91
      icon: 'el-icon-user-solid',
L
ligang 已提交
92 93 94
      children: []
    },
    {
G
gongzijian 已提交
95
      name: `${i18n.$t('User Manage')}`,
L
ligang 已提交
96 97 98
      id: 1,
      path: 'users-manage',
      isOpen: true,
99
      disabled: true,
100
      icon: 'el-icon-user-solid',
L
ligang 已提交
101 102 103
      children: []
    },
    {
G
gongzijian 已提交
104
      name: `${i18n.$t('Warning group manage')}`,
105
      id: 2,
L
ligang 已提交
106 107
      path: 'warning-groups-manage',
      isOpen: true,
108
      disabled: true,
109
      icon: 'el-icon-warning',
L
ligang 已提交
110 111
      children: []
    },
G
gongzijian 已提交
112
    {
B
fix  
break60 已提交
113 114 115
      name: `${i18n.$t('Worker group manage')}`,
      id: 4,
      path: 'worker-groups-manage',
G
gongzijian 已提交
116
      isOpen: true,
117
      disabled: true,
118
      icon: 'el-icon-s-custom',
G
gongzijian 已提交
119
      children: []
G
gongzijian 已提交
120
    },
B
break60 已提交
121
    {
B
fix  
break60 已提交
122 123 124
      name: `${i18n.$t('Queue manage')}`,
      id: 3,
      path: 'queue-manage',
B
break60 已提交
125 126
      isOpen: true,
      disabled: true,
127
      icon: 'ri-group-line',
B
break60 已提交
128 129
      children: []
    },
G
gongzijian 已提交
130
    {
G
gongzijian 已提交
131
      name: `${i18n.$t('Token manage')}`,
G
gongzijian 已提交
132 133 134
      id: 2,
      path: 'token-manage',
      isOpen: true,
135
      icon: 'el-icon-document',
G
gongzijian 已提交
136 137
      children: [],
      disabled: true
L
ligang 已提交
138 139 140 141
    }
  ],
  resource: [
    {
G
gongzijian 已提交
142
      name: `${i18n.$t('File Manage')}`,
143
      id: 0,
L
ligang 已提交
144 145
      path: 'file',
      isOpen: true,
146
      icon: 'el-icon-document-copy',
L
ligang 已提交
147
      children: [],
148
      disabled: true
L
ligang 已提交
149 150
    },
    {
G
gongzijian 已提交
151
      name: `${i18n.$t('UDF manage')}`,
L
ligang 已提交
152 153 154
      id: 1,
      path: '',
      isOpen: true,
155
      icon: 'el-icon-document',
156
      disabled: true,
L
ligang 已提交
157 158
      children: [
        {
G
gongzijian 已提交
159
          name: `${i18n.$t('Resource manage')}`,
B
break60 已提交
160
          path: 'resource-udf',
161
          id: 0,
162
          disabled: true
L
ligang 已提交
163 164
        },
        {
G
gongzijian 已提交
165
          name: `${i18n.$t('Function manage')}`,
B
break60 已提交
166
          path: 'resource-func',
167
          id: 1,
168
          disabled: true
L
ligang 已提交
169 170 171 172 173 174
        }
      ]
    }
  ],
  user: [
    {
G
i18n  
gongzijian 已提交
175
      name: `${i18n.$t('User Information')}`,
176
      id: 0,
L
ligang 已提交
177 178
      path: 'account',
      isOpen: true,
179
      icon: 'el-icon-user-solid',
L
ligang 已提交
180
      children: [],
181
      disabled: true
L
ligang 已提交
182 183
    },
    {
G
i18n  
gongzijian 已提交
184
      name: `${i18n.$t('Edit password')}`,
L
ligang 已提交
185 186 187
      id: 1,
      path: 'password',
      isOpen: true,
188
      icon: 'el-icon-key',
L
ligang 已提交
189
      children: [],
190 191 192
      disabled: true
    },
    {
G
gongzijian 已提交
193
      name: `${i18n.$t('Token manage')}`,
194 195 196
      id: 2,
      path: 'token',
      isOpen: true,
197
      icon: 'el-icon-s-custom',
198
      children: [],
G
gongzijian 已提交
199
      disabled: Permissions.getAuth()
L
ligang 已提交
200
    }
201 202 203 204
  ],
  monitor: [
    {
      name: `${i18n.$t('Servers manage')}`,
205
      id: 1,
206 207 208
      path: '',
      isOpen: true,
      disabled: true,
209
      icon: 'el-icon-menu',
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
      children: [
        {
          name: 'Master',
          path: 'servers-master',
          id: 0,
          disabled: true
        },
        {
          name: 'Worker',
          path: 'servers-worker',
          id: 1,
          disabled: true
        },
        {
          name: 'Zookeeper',
          path: 'servers-zookeeper',
          id: 4,
          disabled: true
        },
        {
230 231
          name: 'DB',
          path: 'servers-db',
232 233 234 235
          id: 6,
          disabled: true
        }
      ]
236 237 238 239 240 241 242
    },
    {
      name: `${i18n.$t('Statistics manage')}`,
      id: 0,
      path: '',
      isOpen: true,
      disabled: true,
243
      icon: 'el-icon-menu',
244 245
      children: [
        {
246
          name: 'Statistics',
247 248 249 250 251
          path: 'statistics',
          id: 0,
          disabled: true
        }
      ]
252
    }
L
ligang 已提交
253 254 255 256
  ]
}

export default type => menu[type]