dashboard-shell-shell 3.0.5-test.2 → 3.0.5-test.20
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/icons/iconfont.css +4 -1
- package/assets/images/pl/dark/logo.png +0 -0
- package/assets/styles/base/_variables.scss +5 -5
- package/assets/styles/global/_button.scss +8 -8
- package/assets/styles/global/_select.scss +1 -1
- package/assets/styles/global/_tooltip.scss +9 -5
- package/assets/styles/themes/_light.scss +3 -1
- package/assets/translations/zh-hans.yaml +139 -11
- package/components/ActionDropdown.vue +1 -1
- package/components/CodeMirror.vue +6 -4
- package/components/ContainerResourceLimit.vue +2 -2
- package/components/CopyToClipboard.vue +15 -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/GlobalRoleBindings.vue +48 -112
- package/components/PodSecurityAdmission.vue +1 -1
- 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 +113 -25
- package/components/ResourceDetail/Masthead/index.vue +1 -1
- package/components/ResourceDetail/Masthead/latest.vue +1 -1
- package/components/ResourceDetail/Masthead/legacy.vue +236 -165
- package/components/ResourceDetail/legacy.vue +44 -28
- package/components/ResourceList/Masthead.vue +11 -15
- package/components/SideNav.vue +1 -1
- package/components/SortableTable/index.vue +6 -3
- package/components/Tabbed/index.vue +6 -1
- package/components/auth/Principal.vue +42 -13
- package/components/auth/RoleDetailEdit.vue +11 -7
- package/components/breadcrumb/index.vue +124 -0
- package/components/form/ArrayList.vue +162 -147
- package/components/form/ArrayListGrouped.vue +3 -1
- package/components/form/ChangePassword.vue +1 -1
- package/components/form/Command.vue +4 -5
- package/components/form/Footer.vue +1 -0
- package/components/form/HealthCheck.vue +0 -2
- package/components/form/HookOption.vue +87 -58
- package/components/form/InputWithSelect.vue +8 -7
- package/components/form/KeyValue.vue +20 -2
- package/components/form/LabeledSelect.vue +3 -2
- package/components/form/Labels.vue +2 -2
- package/components/form/MatchExpressions.vue +3 -4
- package/components/form/Members/ClusterMembershipEditor.vue +1 -1
- package/components/form/Members/ClusterPermissionsEditor.vue +5 -5
- package/components/form/Members/MembershipEditor.vue +2 -2
- package/components/form/NameNsDescription.vue +1 -1
- package/components/form/Networking.vue +6 -9
- package/components/form/NodeAffinity.vue +29 -28
- package/components/form/PodAffinity.vue +23 -23
- package/components/form/Probe.vue +15 -11
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +11 -9
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +36 -30
- package/components/form/ResourceSelector.vue +1 -1
- package/components/form/Security.vue +1 -3
- package/components/form/Select.vue +6 -1
- package/components/form/ServiceNameSelect.vue +2 -5
- package/components/form/ServicePorts.vue +149 -75
- package/components/form/Taints.vue +2 -1
- package/components/form/Tolerations.vue +12 -9
- package/components/form/ValueFromResource.vue +110 -96
- package/components/form/WorkloadPorts.vue +143 -123
- package/components/nav/Header.vue +3 -4
- package/components/nav/NamespaceFilter.vue +15 -21
- package/components/nav/TopLevelMenu.vue +99 -125
- package/components/nav/Type.vue +3 -3
- package/config/product/explorer.js +4 -1
- package/config/router/navigation-guards/index.js +52 -3
- package/detail/node.vue +28 -23
- package/dialog/AddCustomBadgeDialog.vue +17 -9
- 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/networking.k8s.io.ingress/Certificate.vue +7 -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/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/workload/Job.vue +31 -34
- package/edit/workload/Upgrading.vue +5 -5
- package/edit/workload/index.vue +21 -17
- 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/package.json +1 -1
- package/pages/account/index.vue +95 -115
- package/pages/auth/setup.vue +35 -16
- package/pages/c/_cluster/auth/roles/index.vue +38 -5
- package/pages/c/_cluster/explorer/ConfigBadge.vue +1 -1
- package/pages/c/_cluster/explorer/tools/index.vue +6 -6
- package/pages/home.vue +3 -4
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.js +1 -1
- package/plugins/dashboard-store/resource-class.js +28 -27
- package/rancher-components/BadgeState/BadgeState.vue +33 -52
- package/rancher-components/Banner/Banner.vue +6 -3
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +31 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +8 -7
- package/scripts/publish-shell.sh +1 -1
- package/store/i18n.js +4 -0
- package/store/type-map.js +1 -1
- package/types/shell/index.d.ts +4 -30
- package/utils/error.js +3 -1
- package/utils/errorTranslate.json +247 -2
- package/vue.config.js +1 -1
|
@@ -443,7 +443,7 @@ export default {
|
|
|
443
443
|
|
|
444
444
|
const resources = this.location?.params?.resource || ''
|
|
445
445
|
|
|
446
|
-
return this.$store.getters['type-map/groupsForVirTypes'](product, resources);
|
|
446
|
+
return this.$store.getters['type-map/groupsForVirTypes'](product, resources) || 'default menuIcon';
|
|
447
447
|
},
|
|
448
448
|
|
|
449
449
|
location() {
|
|
@@ -491,192 +491,263 @@ export default {
|
|
|
491
491
|
</script>
|
|
492
492
|
|
|
493
493
|
<template>
|
|
494
|
-
|
|
495
|
-
<!-- 顶部区域的容器 -->
|
|
496
494
|
<div class="masthead">
|
|
497
495
|
<div class="title">
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
<!-- <div
|
|
496
|
+
<!-- 创建api密钥不需要面包屑 -->
|
|
497
|
+
<div
|
|
501
498
|
v-if="!(parentRouteOverride === 'account' && resource=== 'token')"
|
|
502
499
|
class="excram-list"
|
|
503
500
|
>
|
|
504
|
-
|
|
505
|
-
遍历 demoDisplay 生成面包屑路径
|
|
506
501
|
<span
|
|
507
502
|
v-for="(item,index) in demoDisplay"
|
|
508
503
|
:key="index"
|
|
509
504
|
>
|
|
510
|
-
<span
|
|
511
|
-
<span
|
|
505
|
+
<span>{{ item }}</span>
|
|
506
|
+
<span>/</span>
|
|
512
507
|
</span>
|
|
513
|
-
|
|
514
|
-
最后一个面包屑显示当前操作(查看/编辑/创建)+ 父资源名称
|
|
515
508
|
<span class="excram-last-name">
|
|
516
|
-
{{ (realMode === 'view'? '查看': realMode === 'edit' ? '编辑':'创建') + parent
|
|
509
|
+
{{ (realMode === 'view'? '查看': realMode === 'edit' ? '编辑':'创建') + parent?.displayName }}
|
|
517
510
|
</span>
|
|
518
|
-
</div>
|
|
519
|
-
|
|
520
|
-
<
|
|
521
|
-
<div class="
|
|
522
|
-
<
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
v-else
|
|
535
|
-
:class="'icon-'+ menuIcon + ' detailIcon'"
|
|
536
|
-
/>
|
|
537
|
-
</span>
|
|
538
|
-
|
|
539
|
-
<!-- 资源标题(创建时只显示“创建+名称”,否则显示“名称:”) -->
|
|
540
|
-
<span class="detailIcon-span-title">{{ realMode=== 'create'? '创建': '' }}{{ parent.displayName }}{{ realMode=== 'create'? '': '名称:' }}</span>
|
|
541
|
-
|
|
542
|
-
<!-- 如果不是创建模式,显示操作描述 -->
|
|
543
|
-
<span v-if="realMode !== 'create'">
|
|
544
|
-
|
|
545
|
-
<!-- 如果有覆盖方法,优先显示覆盖内容 -->
|
|
546
|
-
<span v-if="value.detailPageHeaderActionOverride && value.detailPageHeaderActionOverride(realMode)">{{ value.detailPageHeaderActionOverride(realMode) }}</span>
|
|
547
|
-
|
|
548
|
-
<!-- 否则用 t 组件国际化显示 -->
|
|
549
|
-
<t
|
|
550
|
-
v-else
|
|
551
|
-
:k="'resourceDetail.header.' + realMode"
|
|
552
|
-
:subtype="resourceSubtype"
|
|
553
|
-
:name="displayName"
|
|
554
|
-
:escapehtml="false"
|
|
555
|
-
/>
|
|
556
|
-
</span>
|
|
557
|
-
|
|
558
|
-
<!-- 状态点(DotState 组件) -->
|
|
559
|
-
<DotState
|
|
560
|
-
v-if="!isCreate && parent.showState"
|
|
561
|
-
class="masthead-state"
|
|
562
|
-
:value="value"
|
|
563
|
-
/>
|
|
564
|
-
|
|
565
|
-
<!-- Istio 注入状态 -->
|
|
566
|
-
<span
|
|
567
|
-
v-if="!isCreate && value.injectionEnabled"
|
|
568
|
-
class="masthead-istio"
|
|
511
|
+
</div>
|
|
512
|
+
<header>
|
|
513
|
+
<div class="title">
|
|
514
|
+
<div class="primaryheader">
|
|
515
|
+
<span class="primary-title">
|
|
516
|
+
<!-- <nuxt-link
|
|
517
|
+
v-if="location"
|
|
518
|
+
:to="location"
|
|
519
|
+
>
|
|
520
|
+
{{ parent.displayName }}:
|
|
521
|
+
</nuxt-link> -->
|
|
522
|
+
<span class="detailIcon-span">
|
|
523
|
+
<img
|
|
524
|
+
v-if="parentRouteOverride === 'account' && resource=== 'token'"
|
|
525
|
+
:src="Svg"
|
|
526
|
+
style="margin-top: 4px; margin-left: 5px;"
|
|
569
527
|
>
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
</span>
|
|
528
|
+
<i
|
|
529
|
+
v-else
|
|
530
|
+
:class="'icon-'+ menuIcon + ' detailIcon'"
|
|
531
|
+
/>
|
|
575
532
|
</span>
|
|
576
|
-
|
|
577
|
-
|
|
533
|
+
<span class="detailIcon-span-title">{{ realMode=== 'create'? '创建': '' }}{{ parent?.displayName }}{{ realMode=== 'create'? '': '名称:' }}</span>
|
|
534
|
+
<span v-if="realMode !== 'create'">
|
|
535
|
+
<span v-if="value.detailPageHeaderActionOverride && value.detailPageHeaderActionOverride(realMode)">{{ value.detailPageHeaderActionOverride(realMode) }}</span>
|
|
536
|
+
<t
|
|
537
|
+
v-else
|
|
538
|
+
:k="'resourceDetail.header.' + realMode"
|
|
539
|
+
:subtype="resourceSubtype"
|
|
540
|
+
:name="displayName"
|
|
541
|
+
:escapehtml="false"
|
|
542
|
+
/>
|
|
543
|
+
</span>
|
|
544
|
+
<DotState
|
|
545
|
+
v-if="!isCreate && parent.showState"
|
|
546
|
+
class="masthead-state"
|
|
547
|
+
:value="value"
|
|
548
|
+
/>
|
|
578
549
|
<span
|
|
579
|
-
v-if="
|
|
580
|
-
class="
|
|
581
|
-
>|</span>
|
|
582
|
-
<router-link
|
|
583
|
-
v-if="location"
|
|
584
|
-
:to="location"
|
|
550
|
+
v-if="!isCreate && value.injectionEnabled"
|
|
551
|
+
class="masthead-istio"
|
|
585
552
|
>
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
553
|
+
<i
|
|
554
|
+
v-clean-tooltip="t('projectNamespaces.isIstioInjectionEnabled')"
|
|
555
|
+
class="icon icon-sm icon-istio"
|
|
556
|
+
/>
|
|
557
|
+
</span>
|
|
558
|
+
</span>
|
|
559
|
+
<span
|
|
560
|
+
v-if="location"
|
|
561
|
+
class="valid"
|
|
562
|
+
>|</span>
|
|
563
|
+
<router-link
|
|
564
|
+
v-if="location"
|
|
565
|
+
:to="location"
|
|
566
|
+
>
|
|
567
|
+
返回
|
|
568
|
+
</router-link>
|
|
569
|
+
<!-- <h1>
|
|
570
|
+
<TabTitle
|
|
571
|
+
v-if="isCreate"
|
|
572
|
+
:showChild="false"
|
|
573
|
+
>
|
|
574
|
+
{{ parent.displayName }}
|
|
575
|
+
</TabTitle>
|
|
576
|
+
<TabTitle
|
|
577
|
+
v-else
|
|
578
|
+
:showChild="false"
|
|
579
|
+
>
|
|
580
|
+
{{ displayName }}
|
|
581
|
+
</TabTitle>
|
|
582
|
+
<router-link
|
|
583
|
+
v-if="location"
|
|
584
|
+
:to="location"
|
|
585
|
+
role="link"
|
|
586
|
+
class="masthead-resource-list-link"
|
|
587
|
+
:aria-label="parent.displayName"
|
|
588
|
+
>
|
|
589
|
+
{{ parent.displayName }}:
|
|
590
|
+
</router-link>
|
|
591
|
+
<span v-else>{{ parent.displayName }}:</span>
|
|
592
|
+
<span v-if="value?.detailPageHeaderActionOverride && value?.detailPageHeaderActionOverride(realMode)">{{ value?.detailPageHeaderActionOverride(realMode) }}</span>
|
|
593
|
+
<t
|
|
594
|
+
v-else
|
|
595
|
+
class="masthead-resource-title"
|
|
596
|
+
:k="'resourceDetail.header.' + realMode"
|
|
597
|
+
:subtype="resourceSubtype"
|
|
598
|
+
:name="displayName"
|
|
599
|
+
:escapehtml="false"
|
|
600
|
+
/>
|
|
601
|
+
<BadgeState
|
|
602
|
+
v-if="!isCreate && parent.showState"
|
|
603
|
+
class="masthead-state"
|
|
604
|
+
:value="value"
|
|
605
|
+
/>
|
|
606
|
+
<span
|
|
607
|
+
v-if="!isCreate && value.injectionEnabled"
|
|
608
|
+
class="masthead-istio"
|
|
609
|
+
>
|
|
610
|
+
<i
|
|
611
|
+
v-clean-tooltip="t('projectNamespaces.isIstioInjectionEnabled')"
|
|
612
|
+
class="icon icon-sm icon-istio"
|
|
613
|
+
/>
|
|
614
|
+
</span>
|
|
615
|
+
<a
|
|
616
|
+
v-if="dev && !!resourceExternalLink"
|
|
617
|
+
v-clean-tooltip="t(resourceExternalLink.tipsKey || 'generic.resourceExternalLinkTips')"
|
|
618
|
+
class="resource-external"
|
|
619
|
+
rel="nofollow noopener noreferrer"
|
|
620
|
+
target="_blank"
|
|
621
|
+
:href="resourceExternalLink.url"
|
|
622
|
+
>
|
|
623
|
+
<i class="icon icon-external-link" />
|
|
624
|
+
</a>
|
|
625
|
+
</h1> -->
|
|
589
626
|
</div>
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
627
|
+
<!-- <div
|
|
628
|
+
v-if="!isCreate"
|
|
629
|
+
class="subheader"
|
|
630
|
+
>
|
|
631
|
+
<span v-if="isNamespace && project">{{ t("resourceDetail.masthead.project") }}: <router-link :to="project.detailLocation">{{ project.nameDisplay }}</router-link></span>
|
|
632
|
+
<span v-else-if="isWorkspace">{{ t("resourceDetail.masthead.workspace") }}: <router-link :to="workspaceLocation">{{ namespace }}</router-link></span>
|
|
633
|
+
<span v-else-if="namespace && !hasMultipleNamespaces">
|
|
634
|
+
{{ t("resourceDetail.masthead.namespace") }}:
|
|
635
|
+
<router-link
|
|
636
|
+
v-if="!hideNamespaceLocation"
|
|
637
|
+
:to="namespaceLocation"
|
|
638
|
+
data-testid="masthead-subheader-namespace"
|
|
639
|
+
>
|
|
640
|
+
{{ namespace }}
|
|
641
|
+
</router-link>
|
|
642
|
+
<span v-else>
|
|
643
|
+
{{ namespace }}
|
|
644
|
+
</span>
|
|
645
|
+
</span>
|
|
646
|
+
<span v-if="parent.showAge">
|
|
647
|
+
{{ t("resourceDetail.masthead.age") }}:
|
|
648
|
+
<LiveDate
|
|
649
|
+
class="live-date"
|
|
650
|
+
:value="value.creationTimestamp"
|
|
651
|
+
/>
|
|
652
|
+
</span>
|
|
653
|
+
<span
|
|
654
|
+
v-if="value.showCreatedBy"
|
|
655
|
+
data-testid="masthead-subheader-createdBy"
|
|
656
|
+
>
|
|
657
|
+
{{ t("resourceDetail.masthead.createdBy") }}:
|
|
658
|
+
<router-link
|
|
659
|
+
v-if="value.createdBy.location"
|
|
660
|
+
:to="value.createdBy.location"
|
|
661
|
+
data-testid="masthead-subheader-createdBy-link"
|
|
662
|
+
>
|
|
663
|
+
{{ value.createdBy.displayName }}
|
|
664
|
+
</router-link>
|
|
665
|
+
<span
|
|
666
|
+
v-else
|
|
667
|
+
data-testid="masthead-subheader-createdBy_plain-text"
|
|
668
|
+
>
|
|
669
|
+
{{ value.createdBy.displayName }}
|
|
670
|
+
</span>
|
|
671
|
+
</span>
|
|
672
|
+
<span v-if="value.showPodRestarts">{{ t("resourceDetail.masthead.restartCount") }}:<span class="live-data"> {{ value.restartCount }}</span></span>
|
|
673
|
+
</div> -->
|
|
674
|
+
</div>
|
|
675
|
+
<slot name="right">
|
|
676
|
+
<div class="actions-container align-start">
|
|
677
|
+
<div class="actions">
|
|
678
|
+
<button
|
|
679
|
+
v-if="detailsAction && currentView === DETAIL_VIEW && isView"
|
|
680
|
+
type="button"
|
|
681
|
+
class="btn role-primary actions mr-10"
|
|
682
|
+
:disabled="!detailsAction.enabled"
|
|
683
|
+
@click="invokeDetailsAction"
|
|
684
|
+
>
|
|
685
|
+
{{ detailsAction.label }}
|
|
686
|
+
</button>
|
|
687
|
+
<ButtonGroup
|
|
688
|
+
v-if="showSensitiveToggle"
|
|
689
|
+
:value="!!hideSensitiveData"
|
|
690
|
+
icon-size="lg"
|
|
691
|
+
:options="sensitiveOptions"
|
|
692
|
+
class="mr-10"
|
|
693
|
+
@update:value="toggleSensitiveData"
|
|
694
|
+
/>
|
|
695
|
+
|
|
696
|
+
<ButtonGroup
|
|
697
|
+
v-if="viewOptions && isView"
|
|
698
|
+
v-model:value="currentView"
|
|
699
|
+
:options="viewOptions"
|
|
700
|
+
class="mr-10"
|
|
701
|
+
/>
|
|
702
|
+
|
|
703
|
+
<template v-if="featureDropdownMenu">
|
|
704
|
+
<ActionMenu
|
|
705
|
+
v-if="isView"
|
|
706
|
+
button-role="multiAction"
|
|
707
|
+
button-size="compact"
|
|
708
|
+
:resource="value"
|
|
709
|
+
data-testid="masthead-action-menu"
|
|
710
|
+
/>
|
|
711
|
+
</template>
|
|
712
|
+
<template v-else>
|
|
597
713
|
<button
|
|
598
|
-
v-if="
|
|
714
|
+
v-if="isView"
|
|
715
|
+
ref="actions"
|
|
716
|
+
data-testid="masthead-action-menu"
|
|
717
|
+
aria-haspopup="true"
|
|
599
718
|
type="button"
|
|
600
|
-
class="btn role-
|
|
601
|
-
|
|
602
|
-
@click="invokeDetailsAction"
|
|
719
|
+
class="btn role-multi-action actions"
|
|
720
|
+
@click="showActions"
|
|
603
721
|
>
|
|
604
|
-
|
|
722
|
+
<i class="icon icon-actions" />
|
|
605
723
|
</button>
|
|
606
|
-
|
|
607
|
-
<!-- 敏感信息显示/隐藏切换 -->
|
|
608
|
-
<ButtonGroup
|
|
609
|
-
v-if="showSensitiveToggle"
|
|
610
|
-
:value="!!hideSensitiveData"
|
|
611
|
-
icon-size="lg"
|
|
612
|
-
:options="sensitiveOptions"
|
|
613
|
-
class="mr-10"
|
|
614
|
-
@update:value="toggleSensitiveData"
|
|
615
|
-
/>
|
|
616
|
-
|
|
617
|
-
<!-- 视图切换按钮 -->
|
|
618
|
-
<ButtonGroup
|
|
619
|
-
v-if="viewOptions && isView"
|
|
620
|
-
v-model:value="currentView"
|
|
621
|
-
:options="viewOptions"
|
|
622
|
-
class="mr-10"
|
|
623
|
-
/>
|
|
624
|
-
|
|
625
|
-
<!-- 功能菜单:优先使用 ActionMenu 组件 -->
|
|
626
|
-
<template v-if="featureDropdownMenu">
|
|
627
|
-
<ActionMenu
|
|
628
|
-
v-if="isView"
|
|
629
|
-
button-role="multiAction"
|
|
630
|
-
button-size="compact"
|
|
631
|
-
:resource="value"
|
|
632
|
-
data-testid="masthead-action-menu"
|
|
633
|
-
/>
|
|
634
|
-
</template>
|
|
635
|
-
|
|
636
|
-
<!-- 如果没有 featureDropdownMenu,则使用普通的多操作按钮 -->
|
|
637
|
-
<template v-else>
|
|
638
|
-
<button
|
|
639
|
-
v-if="isView"
|
|
640
|
-
ref="actions"
|
|
641
|
-
data-testid="masthead-action-menu"
|
|
642
|
-
aria-haspopup="true"
|
|
643
|
-
type="button"
|
|
644
|
-
class="btn role-multi-action actions"
|
|
645
|
-
@click="showActions"
|
|
646
|
-
>
|
|
647
|
-
<i class="icon icon-actions" />
|
|
648
|
-
</button>
|
|
649
|
-
</template>
|
|
650
|
-
</div>
|
|
724
|
+
</template>
|
|
651
725
|
</div>
|
|
652
|
-
</
|
|
653
|
-
</
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
<!-- 内容插槽 -->
|
|
679
|
-
<slot />
|
|
726
|
+
</div>
|
|
727
|
+
</slot>
|
|
728
|
+
</header>
|
|
729
|
+
|
|
730
|
+
<!-- Extension area -->
|
|
731
|
+
<ExtensionPanel
|
|
732
|
+
:resource="value"
|
|
733
|
+
:type="extensionType"
|
|
734
|
+
:location="extensionLocation"
|
|
735
|
+
/>
|
|
736
|
+
|
|
737
|
+
<Banner
|
|
738
|
+
v-if="banner && isView && !parent.hideBanner"
|
|
739
|
+
class="state-banner mb-10"
|
|
740
|
+
:color="banner.color"
|
|
741
|
+
:label="banner.message"
|
|
742
|
+
/>
|
|
743
|
+
<Banner
|
|
744
|
+
v-if="managedWarning.show"
|
|
745
|
+
color="warning"
|
|
746
|
+
class="mb-20"
|
|
747
|
+
:label="t('resourceDetail.masthead.managedWarning', managedWarning)"
|
|
748
|
+
/>
|
|
749
|
+
|
|
750
|
+
<slot />
|
|
680
751
|
</div>
|
|
681
752
|
</div>
|
|
682
753
|
</template>
|
|
@@ -6,13 +6,14 @@ import {
|
|
|
6
6
|
_VIEW, _EDIT, _CLONE, _IMPORT, _STAGE, _CREATE,
|
|
7
7
|
AS, _YAML, _DETAIL, _CONFIG, _GRAPH, PREVIEW, MODE,
|
|
8
8
|
} from '@shell/config/query-params';
|
|
9
|
-
import { SCHEMA } from '@shell/config/types';
|
|
9
|
+
import { FLEET, SCHEMA } from '@shell/config/types';
|
|
10
10
|
import { createYaml } from '@shell/utils/create-yaml';
|
|
11
11
|
import Masthead from '@shell/components/ResourceDetail/Masthead';
|
|
12
12
|
import DetailTop from '@shell/components/DetailTop';
|
|
13
13
|
import { clone, diff } from '@shell/utils/object';
|
|
14
14
|
import IconMessage from '@shell/components/IconMessage';
|
|
15
15
|
import ForceDirectedTreeChart from '@shell/components/ForceDirectedTreeChart';
|
|
16
|
+
import { checkSchemasForFindAllHash } from '@shell/utils/auth';
|
|
16
17
|
import { stringify } from '@shell/utils/error';
|
|
17
18
|
import { Banner } from '@components/Banner';
|
|
18
19
|
|
|
@@ -171,6 +172,28 @@ export default {
|
|
|
171
172
|
yaml = createYaml(schemas, resourceType, data);
|
|
172
173
|
}
|
|
173
174
|
} else {
|
|
175
|
+
if ( as === _GRAPH ) {
|
|
176
|
+
const graphSchema = await checkSchemasForFindAllHash({
|
|
177
|
+
cluster: {
|
|
178
|
+
inStoreType: 'management',
|
|
179
|
+
type: FLEET.CLUSTER
|
|
180
|
+
},
|
|
181
|
+
bundle: {
|
|
182
|
+
inStoreType: 'management',
|
|
183
|
+
type: FLEET.BUNDLE,
|
|
184
|
+
opt: { excludeFields: ['metadata.managedFields', 'spec.resources'] },
|
|
185
|
+
},
|
|
186
|
+
|
|
187
|
+
bundleDeployment: {
|
|
188
|
+
inStoreType: 'management',
|
|
189
|
+
type: FLEET.BUNDLE_DEPLOYMENT
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
}, this.$store);
|
|
193
|
+
|
|
194
|
+
this.canViewChart = graphSchema.cluster && graphSchema.bundle && graphSchema.bundleDeployment;
|
|
195
|
+
}
|
|
196
|
+
|
|
174
197
|
let fqid = id;
|
|
175
198
|
|
|
176
199
|
if ( schema.attributes?.namespaced && namespace ) {
|
|
@@ -273,6 +296,7 @@ export default {
|
|
|
273
296
|
value: null,
|
|
274
297
|
model: null,
|
|
275
298
|
notFound: null,
|
|
299
|
+
canViewChart: true,
|
|
276
300
|
canViewYaml: null,
|
|
277
301
|
errors: []
|
|
278
302
|
};
|
|
@@ -451,17 +475,16 @@ export default {
|
|
|
451
475
|
:has-graph="hasGraph"
|
|
452
476
|
:has-detail="hasCustomDetail"
|
|
453
477
|
:has-edit="hasCustomEdit"
|
|
454
|
-
:can-view-yaml="canViewYaml"
|
|
455
478
|
:resource-subtype="resourceSubtype"
|
|
456
479
|
:parent-route-override="parentRouteOverride"
|
|
457
480
|
:store-override="storeOverride"
|
|
458
481
|
|
|
459
482
|
:isManuallyHide="false"
|
|
460
483
|
>
|
|
461
|
-
<DetailTop
|
|
484
|
+
<!-- <DetailTop
|
|
462
485
|
v-if="isView && isDetail"
|
|
463
486
|
:value="liveModel"
|
|
464
|
-
/>
|
|
487
|
+
/> -->
|
|
465
488
|
</Masthead>
|
|
466
489
|
<div
|
|
467
490
|
v-if="hasErrors"
|
|
@@ -481,7 +504,7 @@ export default {
|
|
|
481
504
|
</div>
|
|
482
505
|
|
|
483
506
|
<ForceDirectedTreeChart
|
|
484
|
-
v-if="isGraph"
|
|
507
|
+
v-if="isGraph && canViewChart"
|
|
485
508
|
:data="chartData"
|
|
486
509
|
:fdc-config="getGraphConfig"
|
|
487
510
|
/>
|
|
@@ -495,27 +518,26 @@ export default {
|
|
|
495
518
|
:offer-preview="offerPreview"
|
|
496
519
|
:done-route="doneRoute"
|
|
497
520
|
:done-override="value ? value.doneOverride : null"
|
|
498
|
-
:show-errors="false"
|
|
499
521
|
@update:value="$emit('input', $event)"
|
|
500
|
-
@error="
|
|
522
|
+
@error="e=>errors.push(e)"
|
|
501
523
|
/>
|
|
502
524
|
|
|
503
525
|
<component
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
526
|
+
:is="showComponent"
|
|
527
|
+
v-else
|
|
528
|
+
ref="comp"
|
|
529
|
+
v-model:value="value"
|
|
530
|
+
v-bind="$data"
|
|
531
|
+
:done-params="doneParams"
|
|
532
|
+
:done-route="doneRoute"
|
|
533
|
+
:mode="mode"
|
|
534
|
+
:initial-value="initialModel"
|
|
535
|
+
:live-value="liveModel"
|
|
536
|
+
:real-mode="realMode"
|
|
537
|
+
:class="{'flex-content': flexContent}"
|
|
538
|
+
@update:value="$emit('input', $event)"
|
|
539
|
+
@update:mode="setMode"
|
|
540
|
+
@set-subtype="setSubtype"
|
|
519
541
|
/>
|
|
520
542
|
|
|
521
543
|
<button
|
|
@@ -555,10 +577,4 @@ export default {
|
|
|
555
577
|
flex-direction: column;
|
|
556
578
|
flex-grow: 1;
|
|
557
579
|
}
|
|
558
|
-
.cru__errors {
|
|
559
|
-
position: sticky;
|
|
560
|
-
top: 0;
|
|
561
|
-
z-index: 1;
|
|
562
|
-
background-color: var(--header-bg);
|
|
563
|
-
}
|
|
564
580
|
</style>
|
|
@@ -156,37 +156,34 @@ export default {
|
|
|
156
156
|
demoDisplay() {
|
|
157
157
|
|
|
158
158
|
const product = this.$store.getters['productId'];
|
|
159
|
-
const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], this._createLocation
|
|
160
|
-
|
|
159
|
+
const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], this._createLocation?.params?.resource);
|
|
160
|
+
console.log(this._createLocation, 'this._createLocation?.params?.resource')
|
|
161
|
+
console.log(this._createLocation?.params?.resource, 'this._createLocation?.params?.resource')
|
|
162
|
+
let parts = productId?.split('::');
|
|
161
163
|
const newString = 'root';
|
|
162
164
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
165
|
+
if (!parts) {
|
|
166
|
+
if (this.$route.path.includes('/c/local/explorer/secret')) {
|
|
167
|
+
parts = ['storage']
|
|
168
|
+
}
|
|
169
|
+
}
|
|
169
170
|
|
|
170
171
|
const breadcrumbList = {
|
|
171
172
|
'harvesterhci.io.management.cluster': {
|
|
172
173
|
origin: 'Harvester 集群',
|
|
173
174
|
bread: ['虚拟化管理'],
|
|
174
|
-
description: '提供虚拟化集群的实时健康状态监控、版本号管理及资源负载管理,支持批量导入/删除集群、配置调优与权限分级功能,实现高效运维管控。'
|
|
175
175
|
},
|
|
176
176
|
'management.cattle.io.user': {
|
|
177
177
|
origin: '用户',
|
|
178
178
|
bread: ['用户 & 认证'],
|
|
179
|
-
description: '用于管理用户账号,支持创建、维护用户信息,可设置用户权限、管理密码等,保障系统资源仅由授权用户访问,提升系统安全性。'
|
|
180
179
|
},
|
|
181
180
|
'management.cattle.io.setting':{
|
|
182
181
|
origin: '基础设置',
|
|
183
182
|
bread: ['全局设置'],
|
|
184
|
-
description: '统一配置平台基础选项与全局设置,支持CA证书、密码规则、域名、Token时效等核心配置。'
|
|
185
183
|
},
|
|
186
184
|
'management.cattle.io.feature':{
|
|
187
185
|
origin: '功能开关',
|
|
188
186
|
bread: ['全局设置'],
|
|
189
|
-
description: '还没有添加描述。。。。'
|
|
190
187
|
},
|
|
191
188
|
}
|
|
192
189
|
const resourcePath = this.$route.params.resource || ''
|
|
@@ -194,7 +191,6 @@ export default {
|
|
|
194
191
|
const breadcrumb = []
|
|
195
192
|
if (breadcrumbList[resourcePath] && Object.keys(breadcrumbList[resourcePath]).length > 0) {
|
|
196
193
|
breadcrumb.push(...breadcrumbList[resourcePath].bread)
|
|
197
|
-
this.description = breadcrumbList[resourcePath].description
|
|
198
194
|
return breadcrumb
|
|
199
195
|
} else {
|
|
200
196
|
if (!parts?.includes(newString)) {
|
|
@@ -325,7 +321,7 @@ export default {
|
|
|
325
321
|
<!-- 操作按钮区域 -->
|
|
326
322
|
<div
|
|
327
323
|
ref="actionsContainer"
|
|
328
|
-
v-if="!(tabList.includes(_typeDisplay))
|
|
324
|
+
v-if="!(tabList.includes(_typeDisplay))"
|
|
329
325
|
class="actions-container actions-positioning"
|
|
330
326
|
style="min-height: 32px;align-self: flex-end;"
|
|
331
327
|
>
|
|
@@ -419,6 +415,6 @@ export default {
|
|
|
419
415
|
.actions-positioning {
|
|
420
416
|
position: absolute;
|
|
421
417
|
bottom: -48px;
|
|
422
|
-
z-index:
|
|
418
|
+
z-index: 15;
|
|
423
419
|
}
|
|
424
420
|
</style>
|
package/components/SideNav.vue
CHANGED
|
@@ -436,7 +436,7 @@ export default {
|
|
|
436
436
|
:aria-label="t('nav.ariaLabel.sideNav')"
|
|
437
437
|
>
|
|
438
438
|
<div class="side-all-title">
|
|
439
|
-
{{ prod == 'Cloud' && currentCluster ? '控制台' : prod }}
|
|
439
|
+
{{ (prod == 'Cloud' || prod == 'Harvester') && currentCluster ? '控制台' : prod }}
|
|
440
440
|
</div>
|
|
441
441
|
|
|
442
442
|
<!-- Actual nav -->
|