| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- import Layout from '@/layouts/RouterView'
- import { hasSetupKey } from '@/utils/auth'
- import i18n from '@/locales'
- import store from '@/store'
- import { isScopedPolicyMenuHidden } from '@/utils/scopedPolicy'
- const BackupStorage = () => import(/* webpackChunkName: "storage" */ /* webpackPrefetch: true */ '@Storage/views/backup-storage')
- const Tablestore = () => import(/* webpackChunkName: "storage" */ /* webpackPrefetch: true */ '@Storage/views/tablestore')
- const AccessGroup = () => import(/* webpackChunkName: "storage" */ /* webpackPrefetch: true */ '@Storage/views/access-group')
- const FileSystem = () => import(/* webpackChunkName: "storage" */ /* webpackPrefetch: true */ '@Storage/views/file-system')
- const Bucket = () => import(/* webpackChunkName: "storage" */ /* webpackPrefetch: true */ '@Storage/views/bucket')
- const BlockStorage = () => import(/* webpackChunkName: "storage" */ /* webpackPrefetch: true */ '@Storage/views/blockstorage')
- const BucketCreate = () => import(/* webpackChunkName: "storage" */ /* webpackPrefetch: true */ '@Storage/views/bucket/create')
- const BucketSetStaticWebsit = () => import(/* webpackChunkName: "storage" */ /* webpackPrefetch: true */ '@Storage/views/bucket/components/SetStaticWebsit')
- const FileSystemCreate = () => import(/* webpackChunkName: "storage" */ /* webpackPrefetch: true */ '@Storage/views/file-system/create/index')
- export default {
- index: 50,
- meta: {
- label: i18n.t('storage.text_16'),
- icon: 'menu-storage',
- },
- menus: [
- /**
- * 块存储
- */
- {
- meta: {
- label: i18n.t('dictionary.blockstorage'),
- t: 'dictionary.blockstorage',
- },
- submenus: [
- {
- path: '/blockstorage',
- meta: {
- label: i18n.t('dictionary.blockstorage'),
- permission: 'storages_list',
- t: 'dictionary.blockstorage',
- hidden: () => {
- if (isScopedPolicyMenuHidden('sub_hidden_menus.blockstorage')) {
- return true
- }
- return !hasSetupKey(['onestack', 'openstack', 'dstack', 'zstack', 'vmware', 'nutanix', 'bingocloud', 'proxmox'])
- },
- },
- component: Layout,
- children: [
- {
- name: 'BlockStorage',
- path: '',
- component: BlockStorage,
- },
- ],
- },
- ],
- },
- /**
- * 存储桶
- */
- {
- meta: {
- label: i18n.t('storage.object_storage'),
- },
- submenus: [
- {
- path: '/bucket',
- meta: {
- label: i18n.t('storage.text_18'),
- permission: 'buckets_list',
- hidden: () => {
- if (isScopedPolicyMenuHidden('sub_hidden_menus.bucket')) {
- return true
- }
- return !hasSetupKey(['aliyun', 'aws', 'azure', 'huawei', 'qcloud', 'google', 'storage', 'hcso', 'hcs', 'apsara'])
- },
- },
- component: Layout,
- children: [
- {
- name: 'Bucket',
- path: '',
- component: Bucket,
- },
- {
- name: 'BucketCreate',
- path: 'create',
- component: BucketCreate,
- },
- {
- name: 'BucketSetStaticWebsit',
- path: 'setstaticwebsit',
- component: BucketSetStaticWebsit,
- },
- ],
- },
- ],
- },
- /**
- * 表格存储
- */
- {
- meta: {
- label: i18n.t('dictionary.tablestore'),
- },
- submenus: [
- {
- path: '/table-storage',
- meta: {
- label: i18n.t('dictionary.tablestore'),
- permission: 'tablestores_list',
- hidden: () => {
- if (isScopedPolicyMenuHidden('sub_hidden_menus.table_storage')) {
- return true
- }
- if (store.getters.isProjectMode) return true
- return !hasSetupKey(['apsara', 'aliyun'])
- },
- },
- component: Layout,
- children: [
- {
- name: 'TableStorage',
- path: '',
- component: Tablestore,
- },
- ],
- },
- ],
- },
- /**
- * 文件存储
- */
- {
- meta: {
- label: i18n.t('storage.nas'),
- },
- submenus: [
- {
- path: '/nas',
- meta: {
- label: i18n.t('dictionary.filesystem'),
- permission: 'file_systems_list',
- hidden: () => {
- if (isScopedPolicyMenuHidden('sub_hidden_menus.nas')) {
- return true
- }
- return !hasSetupKey(['aliyun', 'huawei', 'hcs', 'cephfs'])
- },
- },
- component: Layout,
- children: [
- {
- name: 'FileSystem',
- path: '',
- component: FileSystem,
- },
- {
- name: 'FileSystemCreate',
- path: 'create',
- component: FileSystemCreate,
- },
- ],
- },
- {
- path: '/access-group',
- meta: {
- label: i18n.t('dictionary.access_group'),
- permission: 'access_groups_list',
- hidden: () => {
- if (isScopedPolicyMenuHidden('sub_hidden_menus.access_group')) {
- return true
- }
- return !hasSetupKey(['aliyun', 'huawei', 'hcs', 'cephfs'])
- },
- },
- component: Layout,
- children: [
- {
- name: 'AccessGroup',
- path: '',
- component: AccessGroup,
- },
- ],
- },
- ],
- },
- /**
- * 备份存储
- */
- {
- meta: {
- label: i18n.t('dictionary.backup_storage'),
- },
- submenus: [
- {
- path: '/backup-storage',
- meta: {
- label: i18n.t('dictionary.backup_storage'),
- permission: 'backupstorages_list',
- hidden: () => {
- if (isScopedPolicyMenuHidden('sub_hidden_menus.backup_storage')) {
- return true
- }
- if (store.getters.isProjectMode) return true
- return !hasSetupKey(['onestack'])
- },
- },
- component: Layout,
- children: [
- {
- name: 'BackupStorage',
- path: '',
- component: BackupStorage,
- },
- ],
- },
- ],
- },
- ],
- }
|