dashboard-shell-shell 3.0.5-test.6 → 3.0.5-test.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/brand/csp/favicon.png +0 -0
- package/assets/brand/harvester/favicon.png +0 -0
- package/assets/brand/suse/favicon.png +0 -0
- package/assets/icons/demo.css +539 -0
- package/assets/icons/demo.css:Zone.Identifier +0 -0
- package/assets/icons/demo_index.html +1131 -0
- package/assets/icons/demo_index.html:Zone.Identifier +0 -0
- package/assets/icons/iconfont.css +219 -0
- package/assets/icons/iconfont.css:Zone.Identifier +0 -0
- package/assets/icons/iconfont.js +1 -0
- package/assets/icons/iconfont.js:Zone.Identifier +0 -0
- package/assets/icons/iconfont.json +324 -0
- package/assets/icons/iconfont.json:Zone.Identifier +0 -0
- package/assets/icons/iconfont.ttf +0 -0
- package/assets/icons/iconfont.ttf:Zone.Identifier +0 -0
- package/assets/icons/iconfont.woff +0 -0
- package/assets/icons/iconfont.woff2 +0 -0
- package/assets/icons/iconfont.woff2:Zone.Identifier +0 -0
- package/assets/icons/iconfont.woff:Zone.Identifier +0 -0
- package/assets/iconsNew/demo.css +539 -0
- package/assets/iconsNew/demo.css:Zone.Identifier +0 -0
- package/assets/iconsNew/demo_index.html +303 -0
- package/assets/iconsNew/demo_index.html:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.css +43 -0
- package/assets/iconsNew/iconfont.css:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.js +1 -0
- package/assets/iconsNew/iconfont.js:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.json +44 -0
- package/assets/iconsNew/iconfont.json:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.ttf +0 -0
- package/assets/iconsNew/iconfont.ttf:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.woff +0 -0
- package/assets/iconsNew/iconfont.woff2 +0 -0
- package/assets/iconsNew/iconfont.woff2:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.woff:Zone.Identifier +0 -0
- package/assets/images/API.svg +3 -0
- package/assets/images/action.svg +6 -0
- package/assets/images/login/password.svg +20 -0
- package/assets/images/login/user.svg +6 -0
- package/assets/images/login-bg.png +0 -0
- package/assets/images/login-left.png +0 -0
- package/assets/images/login-logo.svg +44 -0
- package/assets/images/logo.png +0 -0
- package/assets/images/logo.svg +47 -0
- package/assets/images/pl/dark/logo.png +0 -0
- package/assets/images/pl/half-logo.svg +2 -23
- package/assets/images/pl/harvester.png +0 -0
- package/assets/images/pl/logo.png +0 -0
- package/assets/images/promp-yellow.svg +5 -0
- package/assets/images/user.png +0 -0
- package/assets/styles/all.scss +83 -0
- package/assets/styles/app.scss +5 -0
- package/assets/styles/base/_basic.scss +2 -2
- package/assets/styles/base/_helpers.scss +1 -1
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/base/_typography.scss +2 -1
- package/assets/styles/base/_variables.scss +14 -7
- package/assets/styles/fonts/_icons.scss +3 -2
- package/assets/styles/global/_button.scss +44 -26
- package/assets/styles/global/_columns.scss +3 -1
- package/assets/styles/global/_form.scss +46 -13
- package/assets/styles/global/_labeled-input.scss +54 -26
- package/assets/styles/global/_layout.scss +8 -3
- package/assets/styles/global/_select.scss +25 -17
- package/assets/styles/global/_table.scss +7 -1
- package/assets/styles/global/_tooltip.scss +60 -8
- package/assets/styles/themes/_dark.scss +3 -0
- package/assets/styles/themes/_light.scss +69 -46
- package/assets/styles/vendor/vue-select.scss +24 -10
- package/assets/translations/en-us.yaml +92 -4
- package/assets/translations/zh-hans.yaml +668 -206
- package/components/ActionDropdown.vue +2 -1
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +2 -0
- package/components/AppModal.vue +46 -5
- package/components/BrandImage.vue +1 -0
- package/components/ButtonDropdown.vue +28 -4
- package/components/ButtonMultiAction.vue +1 -0
- package/components/ClusterIconMenu.vue +2 -2
- package/components/CodeMirror.vue +26 -10
- package/components/ConsumptionGauge.vue +24 -5
- package/components/ContainerResourceLimit.vue +2 -2
- package/components/CopyToClipboard.vue +15 -0
- package/components/CruResource.vue +12 -10
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +29 -17
- package/components/DotState.vue +84 -0
- package/components/Drawer/Chrome.vue +2 -2
- package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +30 -27
- package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +1 -1
- package/components/Drawer/ResourceDetailDrawer/index.vue +5 -4
- package/components/ExplorerMembers.vue +28 -4
- package/components/ExplorerProjectsNamespaces.vue +19 -5
- package/components/GlobalRoleBindings.vue +23 -4
- package/components/GrafanaDashboard.vue +4 -4
- package/components/GrowlManager.vue +3 -1
- package/components/HardwareResourceGauge.vue +39 -3
- package/components/IndentedPanel.vue +4 -10
- package/components/InfoBox.vue +3 -3
- package/components/InputOrDisplay.vue +28 -2
- package/components/LabelValue.vue +20 -1
- package/components/ModalWithCard.vue +12 -3
- package/components/PodSecurityAdmission.vue +2 -2
- package/components/PromptModal.vue +1 -1
- package/components/PromptRemove.vue +53 -12
- package/components/RelatedResources.vue +3 -0
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +1 -3
- package/components/Resource/Detail/Metadata/KeyValue.vue +8 -4
- package/components/Resource/Detail/Metadata/index.vue +3 -1
- package/components/Resource/Detail/TitleBar/Title.vue +4 -3
- package/components/Resource/Detail/TitleBar/Top.vue +2 -0
- package/components/Resource/Detail/TitleBar/composables.ts +16 -1
- package/components/Resource/Detail/TitleBar/index.vue +125 -27
- package/components/ResourceDetail/Masthead/index.vue +1 -1
- package/components/ResourceDetail/Masthead/latest.vue +1 -1
- package/components/ResourceDetail/Masthead/legacy.vue +183 -39
- package/components/ResourceDetail/legacy.vue +47 -29
- package/components/ResourceList/Masthead.vue +222 -54
- package/components/ResourceList/ResourceLoadingIndicator.vue +5 -2
- package/components/ResourceTable.vue +40 -2
- package/components/SideNav.vue +74 -20
- package/components/SingleClusterInfo.vue +2 -1
- package/components/SortableTable/THead.vue +79 -4
- package/components/SortableTable/index.vue +1053 -464
- package/components/SortableTable/paging.js +26 -16
- package/components/SortableTable/selection.js +2 -2
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +53 -30
- package/components/YamlEditor.vue +0 -1
- package/components/auth/Principal.vue +51 -19
- package/components/auth/RoleDetailEdit.vue +69 -14
- package/components/auth/SelectPrincipal.vue +1 -0
- package/components/breadcrumb/index.vue +119 -0
- package/components/form/ArrayList.vue +177 -152
- package/components/form/ArrayListGrouped.vue +13 -3
- package/components/form/ArrayListSelect.vue +1 -1
- package/components/form/BannerSettings.vue +64 -59
- package/components/form/ChangePassword.vue +5 -5
- package/components/form/ClusterAppearance.vue +4 -3
- package/components/form/ColorInput.vue +32 -8
- package/components/form/Command.vue +4 -5
- package/components/form/Conditions.vue +15 -1
- package/components/form/Footer.vue +12 -8
- package/components/form/HealthCheck.vue +0 -2
- package/components/form/HookOption.vue +87 -58
- package/components/form/InputWithSelect.vue +8 -4
- package/components/form/KeyValue.vue +66 -8
- package/components/form/LabeledSelect.vue +216 -242
- package/components/form/Labels.vue +4 -4
- package/components/form/MatchExpressions.vue +28 -11
- package/components/form/Members/ClusterMembershipEditor.vue +1 -1
- package/components/form/Members/ClusterPermissionsEditor.vue +61 -43
- package/components/form/Members/MembershipEditor.vue +4 -4
- package/components/form/Members/ProjectMembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +62 -22
- package/components/form/Networking.vue +6 -9
- package/components/form/NodeAffinity.vue +29 -28
- package/components/form/Password.vue +16 -7
- package/components/form/PodAffinity.vue +24 -25
- package/components/form/Probe.vue +15 -11
- package/components/form/ProjectMemberEditor.vue +66 -48
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +26 -23
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +38 -35
- package/components/form/ResourceSelector.vue +1 -1
- package/components/form/SecretSelector.vue +24 -23
- package/components/form/Security.vue +1 -3
- package/components/form/Select.vue +12 -3
- package/components/form/ServiceNameSelect.vue +2 -5
- package/components/form/ServicePorts.vue +149 -75
- package/components/form/SimpleSecretSelector.vue +29 -9
- package/components/form/Taints.vue +2 -1
- package/components/form/Tolerations.vue +13 -9
- package/components/form/UnitInput.vue +8 -3
- package/components/form/ValueFromResource.vue +110 -96
- package/components/form/WorkloadPorts.vue +143 -123
- package/components/formatter/BadgeStateFormatter.vue +8 -5
- package/components/formatter/LiveDate.vue +3 -3
- package/components/formatter/WorkloadHealthScale.vue +4 -3
- package/components/nav/Favorite.vue +5 -1
- package/components/nav/Group.vue +139 -99
- package/components/nav/Header.vue +138 -164
- package/components/nav/HeaderPageActionMenu.vue +1 -0
- package/components/nav/NamespaceFilter.vue +34 -36
- package/components/nav/TopLevelMenu.vue +62 -25
- package/components/nav/Type.vue +73 -43
- package/composables/useClickOutside.ts +1 -1
- package/config/menuRouteMap.js +10 -0
- package/config/private-label.js +14 -11
- package/config/product/auth.js +17 -7
- package/config/product/explorer.js +32 -10
- package/config/product/manager.js +28 -17
- package/config/product/settings.js +19 -9
- package/config/product/uiplugins.js +13 -10
- package/config/router/navigation-guards/index.js +61 -3
- package/config/settings.ts +28 -0
- package/config/table-headers.js +3 -2
- package/detail/node.vue +28 -23
- package/dialog/AddCustomBadgeDialog.vue +17 -9
- package/dialog/ForceMachineRemoveDialog.vue +2 -2
- package/dialog/RollbackWorkloadDialog.vue +1 -1
- package/dialog/ScalePoolDownDialog.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +1 -1
- package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +9 -6
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +3 -1
- package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +7 -5
- package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +5 -3
- package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +1 -1
- package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +2 -2
- package/edit/configmap.vue +4 -0
- package/edit/logging-flow/index.vue +1 -2
- package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +3 -3
- package/edit/logging.banzaicloud.io.output/providers/azurestorage.vue +19 -19
- package/edit/logging.banzaicloud.io.output/providers/cloudwatch.vue +23 -23
- package/edit/logging.banzaicloud.io.output/providers/datadog.vue +19 -19
- package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +14 -14
- package/edit/logging.banzaicloud.io.output/providers/forward.vue +12 -12
- package/edit/logging.banzaicloud.io.output/providers/gcs.vue +23 -23
- package/edit/logging.banzaicloud.io.output/providers/gelf.vue +6 -6
- package/edit/logging.banzaicloud.io.output/providers/kafka.vue +10 -10
- package/edit/logging.banzaicloud.io.output/providers/kinesisStream.vue +8 -8
- package/edit/logging.banzaicloud.io.output/providers/logdna.vue +17 -17
- package/edit/logging.banzaicloud.io.output/providers/logz.vue +7 -7
- package/edit/logging.banzaicloud.io.output/providers/loki.vue +12 -12
- package/edit/logging.banzaicloud.io.output/providers/newrelic.vue +3 -3
- package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +14 -14
- package/edit/logging.banzaicloud.io.output/providers/redis.vue +6 -6
- package/edit/logging.banzaicloud.io.output/providers/s3.vue +23 -23
- package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +13 -13
- package/edit/logging.banzaicloud.io.output/providers/sumologic.vue +2 -2
- package/edit/logging.banzaicloud.io.output/providers/syslog.vue +54 -54
- package/edit/management.cattle.io.user.vue +17 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +19 -19
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +50 -26
- package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +36 -12
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/dingding.vue +32 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/message.vue +52 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/snmp.vue +45 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/work.vue +31 -0
- package/edit/monitoring.coreos.com.receiver/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +5 -5
- package/edit/monitoring.coreos.com.receiver/types/slack.vue +4 -4
- package/edit/namespace.vue +1 -2
- package/edit/networking.k8s.io.ingress/Certificate.vue +14 -5
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -2
- package/edit/networking.k8s.io.ingress/Rule.vue +5 -11
- package/edit/networking.k8s.io.ingress/RulePath.vue +105 -96
- package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +3 -3
- package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +4 -2
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +12 -11
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
- package/edit/persistentvolume/index.vue +3 -1
- package/edit/persistentvolumeclaim.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +1 -1
- package/edit/secret/index.vue +2 -2
- package/edit/service.vue +4 -1
- package/edit/storage.k8s.io.storageclass/index.vue +10 -8
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +34 -27
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +15 -13
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +41 -39
- package/edit/token.vue +31 -12
- package/edit/workload/Job.vue +31 -34
- package/edit/workload/Upgrading.vue +5 -5
- package/edit/workload/index.vue +22 -18
- package/edit/workload/storage/Mount.vue +1 -0
- package/edit/workload/storage/awsElasticBlockStore.vue +9 -7
- package/edit/workload/storage/azureDisk.vue +14 -10
- package/edit/workload/storage/azureFile.vue +9 -7
- package/edit/workload/storage/csi/index.vue +6 -9
- package/edit/workload/storage/emptyDir.vue +7 -5
- package/edit/workload/storage/gcePersistentDisk.vue +9 -7
- package/edit/workload/storage/hostPath.vue +7 -5
- package/edit/workload/storage/nfs.vue +8 -6
- package/edit/workload/storage/persistentVolumeClaim/index.vue +12 -10
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +20 -15
- package/edit/workload/storage/secret.vue +9 -6
- package/edit/workload/storage/vsphereVolume.vue +11 -7
- package/initialize/app-extended.js +7 -1
- package/list/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +8 -6
- package/list/management.cattle.io.setting.vue +22 -13
- package/list/management.cattle.io.user.vue +7 -3
- package/list/namespace.vue +3 -0
- package/list/provisioning.cattle.io.cluster.vue +6 -7
- package/mixins/brand.js +17 -0
- package/mixins/create-edit-view/impl.js +10 -0
- package/models/provisioning.cattle.io.cluster.js +19 -18
- package/models/workload.js +2 -2
- package/package.json +1 -1
- package/pages/account/index.vue +93 -58
- package/pages/account/pri.vue +229 -0
- package/pages/auth/login.vue +216 -51
- package/pages/auth/setup.vue +175 -33
- package/pages/c/_cluster/_product/namespaces.vue +5 -5
- package/pages/c/_cluster/auth/roles/index.vue +83 -8
- package/pages/c/_cluster/explorer/ConfigBadge.vue +1 -1
- package/pages/c/_cluster/explorer/index.vue +2 -1
- package/pages/c/_cluster/explorer/tools/index.vue +6 -6
- package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
- package/pages/c/_cluster/settings/banners.vue +174 -102
- package/pages/c/_cluster/settings/brand.vue +350 -302
- package/pages/c/_cluster/settings/performance.vue +61 -38
- package/pages/home.vue +119 -37
- package/pages/prefs.vue +27 -25
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.js +1 -1
- package/plugins/dashboard-store/actions.js +1 -1
- package/plugins/dashboard-store/resource-class.js +28 -27
- package/promptRemove/mixin/roleDeletionCheck.js +2 -2
- package/public/index.html +4 -4
- package/rancher-components/BadgeState/BadgeState.vue +38 -55
- package/rancher-components/Banner/Banner.vue +25 -9
- package/rancher-components/Card/Card.vue +7 -8
- package/rancher-components/Form/Checkbox/Checkbox.vue +4 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +42 -3
- package/rancher-components/Form/Radio/RadioButton.vue +35 -11
- package/rancher-components/Form/Radio/RadioGroup.vue +22 -6
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +1 -0
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +41 -4
- package/rancher-components/RcDropdown/RcDropdown.vue +35 -7
- package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +12 -6
- package/rancher-components/RcDropdown/types.ts +1 -0
- package/rancher-components/StringList/StringList.vue +1 -1
- package/scripts/build-pkg.sh +18 -23
- package/scripts/publish-shell.sh +1 -1
- package/static/favicon.ico +0 -0
- package/static/favicon.png +0 -0
- package/static/loading-indicator.html +3 -3
- package/store/i18n.js +6 -2
- package/store/modal.ts +3 -3
- package/store/prefs.js +11 -4
- package/store/type-map.js +30 -2
- package/types/shell/index.d.ts +86 -97
- package/utils/error.js +109 -8
- package/utils/errorTranslate.json +1740 -0
- package/utils/errorTranslateNew.json +39 -0
- package/utils/roleFiltering.js +33 -0
- package/utils/router.js +21 -0
- package/utils/select.js +26 -3
- package/utils/string.js +8 -5
- package/utils/title.ts +1 -1
- package/vue.config.js +1 -1
package/components/nav/Group.vue
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import Type from '@shell/components/nav/Type';
|
|
3
|
+
import { menuRouteMap } from '@shell/config/menuRouteMap';
|
|
4
|
+
|
|
3
5
|
export default {
|
|
4
6
|
name: 'Group',
|
|
5
7
|
|
|
@@ -8,6 +10,11 @@ export default {
|
|
|
8
10
|
emits: ['expand', 'close'],
|
|
9
11
|
|
|
10
12
|
props: {
|
|
13
|
+
loginName: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: '',
|
|
16
|
+
},
|
|
17
|
+
|
|
11
18
|
depth: {
|
|
12
19
|
type: Number,
|
|
13
20
|
default: 0,
|
|
@@ -46,8 +53,17 @@ export default {
|
|
|
46
53
|
|
|
47
54
|
data() {
|
|
48
55
|
const id = (this.idPrefix || '') + this.group.name;
|
|
56
|
+
const icons = {
|
|
57
|
+
'虚拟机管理': 'icon-backupandsnapshot',
|
|
58
|
+
'网络管理': 'icon-networks',
|
|
59
|
+
'镜像管理': 'icon-imagelist',
|
|
60
|
+
'资源管理': 'icon-sorcetype',
|
|
61
|
+
'运维管理': 'icon-monitoringandlogging',
|
|
62
|
+
'日志管理': 'icon-new-Logging'
|
|
63
|
+
}
|
|
64
|
+
|
|
49
65
|
|
|
50
|
-
return { id, expanded: false };
|
|
66
|
+
return { id, expanded: false, icons };
|
|
51
67
|
},
|
|
52
68
|
|
|
53
69
|
computed: {
|
|
@@ -165,6 +181,7 @@ export default {
|
|
|
165
181
|
|
|
166
182
|
let parentPath = '';
|
|
167
183
|
const cluster = this.$route.params?.cluster;
|
|
184
|
+
const resource = this.$route?.params?.resource || ''
|
|
168
185
|
|
|
169
186
|
// Where we use nested route configuration, consider the parent route when trying to identify the nav location
|
|
170
187
|
if (this.$route.matched.length > 1) {
|
|
@@ -188,6 +205,9 @@ export default {
|
|
|
188
205
|
return true;
|
|
189
206
|
} else if (parentPath && itemFullPath === parentPath) {
|
|
190
207
|
return true;
|
|
208
|
+
// === 新增映射逻辑 ===
|
|
209
|
+
} else if (menuRouteMap[item.name] && menuRouteMap[item.name].includes(resource)) {
|
|
210
|
+
return true;
|
|
191
211
|
}
|
|
192
212
|
}
|
|
193
213
|
}
|
|
@@ -224,41 +244,51 @@ export default {
|
|
|
224
244
|
<template>
|
|
225
245
|
<div
|
|
226
246
|
class="accordion"
|
|
227
|
-
:class="{[`depth-${depth}`]: true, 'expanded': isExpanded, 'has-children': hasChildren, 'group-highlight': isGroupActive
|
|
247
|
+
:class="{[`depth-${depth}`]: true, 'expanded': isExpanded, 'has-children': hasChildren, 'group-highlight': isGroupActive}"
|
|
228
248
|
>
|
|
249
|
+
<!-- 分组标题区 -->
|
|
229
250
|
<div
|
|
230
|
-
v-if="showHeader
|
|
231
|
-
class="
|
|
251
|
+
v-if="showHeader"
|
|
252
|
+
class="header"
|
|
253
|
+
:class="{'active': isOverview, 'noHover': !canCollapse}"
|
|
254
|
+
role="button"
|
|
255
|
+
tabindex="0"
|
|
256
|
+
:aria-label="group.labelDisplay || group.label || ''"
|
|
257
|
+
@click="groupSelected()"
|
|
258
|
+
@keyup.enter="groupSelected()"
|
|
259
|
+
@keyup.space="groupSelected()"
|
|
232
260
|
>
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
:aria-label="group.labelDisplay || group.label || ''"
|
|
240
|
-
@click="groupSelected()"
|
|
241
|
-
@keyup.enter="groupSelected()"
|
|
242
|
-
@keyup.space="groupSelected()"
|
|
243
|
-
>
|
|
244
|
-
<slot name="header">
|
|
261
|
+
|
|
262
|
+
<!-- 具名插槽 header,允许外部自定义标题内容 -->
|
|
263
|
+
<slot name="header">
|
|
264
|
+
|
|
265
|
+
<!-- 如果分组有概览页(overview) 跳转到第一个子路由 -->
|
|
266
|
+
<h6 v-if="hasOverview">
|
|
245
267
|
<router-link
|
|
246
|
-
|
|
268
|
+
class="menuRouterLink"
|
|
247
269
|
:to="group.children[0].route"
|
|
248
270
|
:exact="group.children[0].exact"
|
|
249
271
|
:tabindex="-1"
|
|
250
272
|
>
|
|
251
|
-
<
|
|
252
|
-
<span v-clean-html="group.labelDisplay || group.label" />
|
|
253
|
-
</h6>
|
|
254
|
-
</router-link>
|
|
255
|
-
<h6
|
|
256
|
-
v-else
|
|
257
|
-
>
|
|
273
|
+
<i v-if="!group.labelDisplay || (group.labelDisplay && group.labelDisplay.indexOf('</i>') === -1)" class="icon" :class="icons[group.label] ? icons[group.label] + ' init_icon' : 'icon-globe'" style="color: var(--muted);width: 32px;" />
|
|
258
274
|
<span v-clean-html="group.labelDisplay || group.label" />
|
|
259
|
-
</
|
|
260
|
-
</
|
|
261
|
-
|
|
275
|
+
</router-link>
|
|
276
|
+
</h6>
|
|
277
|
+
<!-- 虚拟机管理:icon-backupandsnapshot -->
|
|
278
|
+
<!-- 网络管理:icon-networks -->
|
|
279
|
+
<!-- 镜像管理:icon-imagelist -->
|
|
280
|
+
<!-- 资源管理:icon-sorcetype -->
|
|
281
|
+
<!-- 运维管理:icon-monitoringandlogging -->
|
|
282
|
+
<!-- 没有概览页的情况 -->
|
|
283
|
+
<h6
|
|
284
|
+
v-else
|
|
285
|
+
>
|
|
286
|
+
<i v-if="!group.labelDisplay || (group.labelDisplay && group.labelDisplay.indexOf('</i>') === -1)" class="icon" :class="icons[group.label] ? icons[group.label] + ' init_icon' : 'icon-globe'" style="color: var(--muted);width: 32px;" />
|
|
287
|
+
<span v-clean-html="group.labelDisplay || group.label" />
|
|
288
|
+
</h6>
|
|
289
|
+
</slot>
|
|
290
|
+
|
|
291
|
+
<!-- 折叠/展开图标 -->
|
|
262
292
|
<i
|
|
263
293
|
v-if="!onlyHasOverview && canCollapse"
|
|
264
294
|
class="icon toggle toggle-accordion"
|
|
@@ -271,6 +301,8 @@ export default {
|
|
|
271
301
|
@keyup.space="peek($event, true)"
|
|
272
302
|
/>
|
|
273
303
|
</div>
|
|
304
|
+
|
|
305
|
+
<!-- 子列表(Accordion 内容) -->
|
|
274
306
|
<ul
|
|
275
307
|
v-if="isExpanded"
|
|
276
308
|
class="list-unstyled body"
|
|
@@ -280,6 +312,7 @@ export default {
|
|
|
280
312
|
v-for="(child, idx) in group[childrenKey]"
|
|
281
313
|
:key="idx"
|
|
282
314
|
>
|
|
315
|
+
<!-- <template v-if="!(loginName && loginName !== 'admin' && child.label === '资源大盘')"></template> -->
|
|
283
316
|
<li
|
|
284
317
|
v-if="child.divider"
|
|
285
318
|
:key="idx"
|
|
@@ -325,21 +358,20 @@ export default {
|
|
|
325
358
|
position: relative;
|
|
326
359
|
cursor: pointer;
|
|
327
360
|
color: var(--body-text);
|
|
328
|
-
height:
|
|
329
|
-
outline: none;
|
|
361
|
+
height: 50px;
|
|
330
362
|
|
|
331
363
|
H6 {
|
|
332
364
|
color: var(--body-text);
|
|
333
365
|
user-select: none;
|
|
334
366
|
text-transform: none;
|
|
335
367
|
font-size: 14px;
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
368
|
+
.menuRouterLink {
|
|
369
|
+
color: var(--body-text);
|
|
370
|
+
user-select: none;
|
|
339
371
|
text-transform: none;
|
|
340
|
-
|
|
341
|
-
padding: 8px 0 8px 16px;
|
|
372
|
+
font-size: 14px;
|
|
342
373
|
}
|
|
374
|
+
}
|
|
343
375
|
|
|
344
376
|
> A {
|
|
345
377
|
display: block;
|
|
@@ -359,19 +391,6 @@ export default {
|
|
|
359
391
|
}
|
|
360
392
|
|
|
361
393
|
.accordion {
|
|
362
|
-
.accordion-item {
|
|
363
|
-
position: relative;
|
|
364
|
-
cursor: pointer;
|
|
365
|
-
color: var(--body-text);
|
|
366
|
-
height: 33px;
|
|
367
|
-
outline: none;
|
|
368
|
-
|
|
369
|
-
.toggle-accordion:focus-visible {
|
|
370
|
-
@include focus-outline;
|
|
371
|
-
outline-offset: -6px;
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
|
|
375
394
|
.header {
|
|
376
395
|
&:focus-visible {
|
|
377
396
|
h6 span {
|
|
@@ -379,30 +398,40 @@ export default {
|
|
|
379
398
|
outline-offset: 2px;
|
|
380
399
|
}
|
|
381
400
|
}
|
|
401
|
+
.toggle-accordion:focus-visible {
|
|
402
|
+
@include focus-outline;
|
|
403
|
+
outline-offset: -6px;
|
|
404
|
+
}
|
|
382
405
|
|
|
383
406
|
&.active {
|
|
384
|
-
color: var(--
|
|
385
|
-
background-color: var(--
|
|
407
|
+
color: var(--nav-hover-color);
|
|
408
|
+
background-color: var(--nav-active);
|
|
386
409
|
|
|
387
410
|
h6 {
|
|
388
|
-
padding: 8px 0 8px 16px;
|
|
389
|
-
font-weight: bold;
|
|
390
|
-
color: var(--
|
|
411
|
+
/* padding: 8px 0 8px 16px;
|
|
412
|
+
font-weight: bold; */
|
|
413
|
+
color: var(--nav-hover-color);
|
|
414
|
+
.menuRouterLink {
|
|
415
|
+
color: var(--nav-hover-color);
|
|
416
|
+
}
|
|
391
417
|
}
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
background-color: var(--primary-hover-bg);
|
|
418
|
+
I{
|
|
419
|
+
color: var(--nav-hover-color);
|
|
395
420
|
}
|
|
396
421
|
|
|
397
|
-
|
|
398
|
-
color: var(--primary-hover-
|
|
399
|
-
}
|
|
422
|
+
/* &:hover {
|
|
423
|
+
background-color: var(--primary-hover-bg);
|
|
424
|
+
} */
|
|
400
425
|
}
|
|
401
426
|
&:hover:not(.active) {
|
|
402
|
-
background-color: var(--nav-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
427
|
+
background-color: var(--nav-active);
|
|
428
|
+
color: var(--nav-hover-color);
|
|
429
|
+
h6{
|
|
430
|
+
color: var(--nav-hover-color);
|
|
431
|
+
.menuRouterLink {
|
|
432
|
+
color: var(--nav-hover-color);
|
|
433
|
+
}
|
|
434
|
+
}
|
|
406
435
|
}
|
|
407
436
|
}
|
|
408
437
|
}
|
|
@@ -410,83 +439,92 @@ export default {
|
|
|
410
439
|
.accordion {
|
|
411
440
|
&.depth-0 {
|
|
412
441
|
> .header {
|
|
442
|
+
/* padding: 8px 0; */
|
|
443
|
+
padding: 0px 0px 0px 20px;
|
|
444
|
+
height: 50px;
|
|
413
445
|
|
|
414
446
|
&.noHover {
|
|
415
447
|
cursor: default;
|
|
416
448
|
}
|
|
417
449
|
|
|
418
450
|
> H6 {
|
|
451
|
+
font-size: 14px;
|
|
419
452
|
text-transform: none;
|
|
420
|
-
|
|
453
|
+
line-height: 50px;
|
|
454
|
+
display: flex;
|
|
455
|
+
align-items: center;
|
|
421
456
|
}
|
|
422
|
-
}
|
|
423
457
|
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
458
|
+
> I {
|
|
459
|
+
position: absolute;
|
|
460
|
+
right: 0;
|
|
461
|
+
top: 0;
|
|
462
|
+
padding: 0px 20px 0px 0px;
|
|
463
|
+
user-select: none;
|
|
464
|
+
line-height: 50px;
|
|
465
|
+
}
|
|
430
466
|
}
|
|
431
467
|
|
|
432
468
|
> .body {
|
|
433
469
|
margin-left: 0;
|
|
434
470
|
}
|
|
435
|
-
|
|
436
|
-
&.group-highlight {
|
|
437
|
-
background: var(--nav-active);
|
|
438
|
-
}
|
|
439
471
|
}
|
|
440
472
|
|
|
441
473
|
&.depth-1 {
|
|
442
474
|
> .header {
|
|
443
|
-
|
|
475
|
+
line-height: 50px;
|
|
444
476
|
> H6 {
|
|
445
|
-
|
|
477
|
+
font-size: 13px;
|
|
478
|
+
line-height: 16px;
|
|
446
479
|
padding: 8px 0 7px 5px !important;
|
|
447
480
|
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
.accordion-item > I {
|
|
452
|
-
padding: 10px 7px 9px 7px !important;
|
|
481
|
+
> I {
|
|
482
|
+
padding: 9px 7px 8px 7px !important;
|
|
483
|
+
}
|
|
453
484
|
}
|
|
454
485
|
|
|
455
|
-
&:deep() .type-link > .label {
|
|
456
|
-
padding-left: 10px;
|
|
457
|
-
}
|
|
458
486
|
}
|
|
459
487
|
|
|
460
488
|
&:not(.depth-0) {
|
|
461
489
|
> .header {
|
|
490
|
+
padding-left: 30px;
|
|
491
|
+
line-height: 50px;
|
|
462
492
|
> H6 {
|
|
463
493
|
// Child groups that aren't linked themselves
|
|
464
494
|
display: inline-block;
|
|
465
495
|
padding: 5px 0 5px 5px;
|
|
466
496
|
}
|
|
467
|
-
}
|
|
468
497
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
498
|
+
> I {
|
|
499
|
+
position: absolute;
|
|
500
|
+
right: 0;
|
|
501
|
+
top: 0;
|
|
502
|
+
padding: 0px 20px 0px 0px !important;
|
|
503
|
+
user-select: none;
|
|
504
|
+
line-height: 50px;
|
|
505
|
+
}
|
|
474
506
|
}
|
|
475
507
|
}
|
|
476
508
|
}
|
|
477
509
|
|
|
478
510
|
.body :deep() > .child.router-link-active,
|
|
479
|
-
.
|
|
511
|
+
.header :deep() > .child.router-link-exact-active {
|
|
480
512
|
padding: 0;
|
|
481
513
|
|
|
482
514
|
A, A I {
|
|
483
|
-
color: var(--primary-hover-text);
|
|
515
|
+
/* color: var(--primary-hover-text); */
|
|
516
|
+
color: var(--nav-hover-color);
|
|
517
|
+
.menuRouterLink {
|
|
518
|
+
color: var(--nav-hover-color);
|
|
519
|
+
}
|
|
484
520
|
}
|
|
485
521
|
|
|
486
522
|
A {
|
|
487
|
-
color: var(--
|
|
488
|
-
|
|
489
|
-
|
|
523
|
+
background-color: var(--nav-active);
|
|
524
|
+
::v-deep .icon {
|
|
525
|
+
/* color: var(--body-text); */
|
|
526
|
+
color: var(--nav-hover-color);
|
|
527
|
+
}
|
|
490
528
|
}
|
|
491
529
|
}
|
|
492
530
|
|
|
@@ -495,9 +533,6 @@ export default {
|
|
|
495
533
|
border-left: solid 5px transparent;
|
|
496
534
|
line-height: 16px;
|
|
497
535
|
font-size: 14px;
|
|
498
|
-
padding-left: 24px;
|
|
499
|
-
display: flex;
|
|
500
|
-
justify-content: space-between;
|
|
501
536
|
}
|
|
502
537
|
|
|
503
538
|
A:focus {
|
|
@@ -507,8 +542,13 @@ export default {
|
|
|
507
542
|
&.root {
|
|
508
543
|
background: transparent;
|
|
509
544
|
A {
|
|
510
|
-
padding-left:
|
|
545
|
+
padding-left: 19px;
|
|
511
546
|
}
|
|
512
547
|
}
|
|
513
548
|
}
|
|
549
|
+
|
|
550
|
+
.init_icon{
|
|
551
|
+
font-size: 32px;
|
|
552
|
+
padding-left: 0px;
|
|
553
|
+
}
|
|
514
554
|
</style>
|