dashboard-shell-shell 1.0.1000000117 → 1.0.1000000118
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/styles/base/_functions.scss +0 -0
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/global/_button.scss +10 -17
- package/assets/styles/global/_form.scss +2 -2
- package/assets/styles/global/_labeled-input.scss +2 -6
- package/assets/styles/global/_select.scss +7 -6
- package/assets/styles/global/_table.scss +2 -3
- package/assets/styles/global/_tooltip.scss +1 -8
- package/assets/styles/themes/_dark.scss +0 -2
- package/assets/styles/themes/_light.scss +2 -5
- package/assets/styles/vendor/vue-select.scss +1 -2
- package/assets/translations/en-us.yaml +3 -1
- package/assets/translations/zh-hans.yaml +28 -51
- package/components/ActionDropdown.vue +0 -1
- package/components/ActionMenuShell.vue +3 -6
- package/components/BrandImage.vue +0 -22
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +0 -1
- package/components/CruResource.vue +1 -1
- package/components/CruResourceFooter.vue +1 -1
- package/components/ExplorerProjectsNamespaces.vue +24 -4
- package/components/GlobalRoleBindings.vue +48 -112
- package/components/IndentedPanel.vue +10 -4
- package/components/PromptRemove.vue +3 -3
- package/components/ResourceDetail/Masthead.vue +242 -190
- package/components/ResourceDetail/index.vue +5 -20
- package/components/ResourceList/Masthead.vue +84 -146
- package/components/ResourceList/ResourceLoadingIndicator.vue +2 -5
- package/components/ResourceTable.vue +1 -76
- package/components/SideNav.vue +29 -66
- package/components/SortableTable/THead.vue +0 -6
- package/components/SortableTable/index.vue +388 -481
- package/components/Tabbed/index.vue +5 -4
- package/components/auth/Principal.vue +2 -3
- package/components/auth/RoleDetailEdit.vue +5 -58
- package/components/auth/SelectPrincipal.vue +0 -1
- package/components/form/BannerSettings.vue +16 -18
- package/components/form/ChangePassword.vue +4 -4
- package/components/form/ColorInput.vue +8 -32
- package/components/form/Footer.vue +1 -1
- package/components/form/InputWithSelect.vue +0 -2
- package/components/form/KeyValue.vue +7 -31
- package/components/form/LabeledSelect.vue +178 -178
- package/components/form/Members/ClusterPermissionsEditor.vue +2 -1
- package/components/form/Members/MembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +11 -24
- package/components/form/Password.vue +2 -6
- package/components/form/ResourceQuota/Namespace.vue +1 -1
- package/components/form/ResourceQuota/NamespaceRow.vue +10 -13
- package/components/form/ResourceQuota/ProjectRow.vue +1 -0
- package/components/form/Select.vue +2 -2
- package/components/nav/Favorite.vue +1 -5
- package/components/nav/Group.vue +23 -69
- package/components/nav/Header.vue +17 -82
- package/components/nav/HeaderPageActionMenu.vue +0 -1
- package/components/nav/NamespaceFilter.vue +3 -0
- package/components/nav/TopLevelMenu.vue +119 -182
- package/components/nav/Type.vue +11 -48
- package/components/rancherResourceDetail/Masthead.vue +769 -0
- package/components/rancherResourceDetail/__tests__/Masthead.test.ts +65 -0
- package/components/rancherResourceDetail/index.vue +591 -0
- package/components/rancherResourceList/Masthead.vue +375 -0
- package/components/rancherResourceList/ResourceLoadingIndicator.vue +140 -0
- package/components/rancherResourceList/index.vue +307 -0
- package/components/rancherResourceList/resource-list.config.js +7 -0
- package/components/rancherResourceTable.vue +783 -0
- package/components/rancherSortableTable/THead.vue +561 -0
- package/components/rancherSortableTable/actions.js +153 -0
- package/components/rancherSortableTable/advanced-filtering.js +272 -0
- package/components/rancherSortableTable/debug.js +117 -0
- package/components/rancherSortableTable/filtering.js +290 -0
- package/components/rancherSortableTable/grouping.js +48 -0
- package/components/rancherSortableTable/index.vue +2712 -0
- package/components/rancherSortableTable/paging.js +155 -0
- package/components/rancherSortableTable/selection.js +629 -0
- package/components/rancherSortableTable/sortable-config.ts +4 -0
- package/components/rancherSortableTable/sorting.js +129 -0
- package/composables/useClickOutside.ts +1 -1
- package/config/product/auth.js +7 -16
- package/config/product/explorer.js +1 -1
- package/config/product/settings.js +8 -17
- package/config/settings.ts +0 -28
- package/edit/management.cattle.io.user.vue +4 -17
- package/edit/networking.k8s.io.ingress/RulePath.vue +1 -1
- package/edit/token.vue +1 -1
- package/list/harvesterhci.io.management.cluster.vue +0 -17
- package/list/management.cattle.io.setting.vue +13 -22
- package/list/management.cattle.io.user.vue +14 -25
- package/list/provisioning.cattle.io.cluster.vue +7 -6
- package/mixins/brand.js +0 -17
- package/package.json +1 -1
- package/pages/auth/login.vue +29 -84
- package/pages/c/_cluster/auth/roles/index.vue +14 -61
- package/pages/c/_cluster/settings/banners.vue +101 -174
- package/pages/c/_cluster/settings/brand.vue +301 -348
- package/pages/c/_cluster/settings/performance.vue +38 -61
- package/pages/home.vue +21 -70
- package/pages/prefs.vue +23 -25
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.js +1 -1
- package/promptRemove/mixin/roleDeletionCheck.js +2 -2
- package/scripts/clean +0 -0
- package/scripts/extension/bundle +0 -0
- package/scripts/extension/helm/scripts/package +0 -0
- package/scripts/extension/helm/scripts/patch +0 -0
- package/scripts/extension/helm/scripts/version +0 -0
- package/scripts/extension/helmpatch +0 -0
- package/scripts/extension/parse-tag-name +0 -0
- package/scripts/extension/publish +0 -0
- package/scripts/publish-shell.sh +60 -86
- package/scripts/serve-pkgs +0 -0
- package/scripts/sync-shell-deps +0 -0
- package/scripts/typegen.sh +28 -44
- package/store/i18n.js +5 -5
- package/store/prefs.js +5 -17
- package/store/type-map.js +1 -2
- package/types/cloud-shell/index.d.ts +11014 -0
- package/types/shell/index.d.ts +1 -1
- package/utils/error.js +0 -4
- package/utils/router.js +3 -3
- package/vue.config.js +6 -1
- package/assets/images/action.svg +0 -6
- package/assets/images/pl/logo.png +0 -0
- /package/components/{ResourceList → rancherResourceList}/Masthead-btn.vue +0 -0
|
@@ -47,11 +47,6 @@ export default {
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
|
|
50
|
-
isManuallyHide: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: true
|
|
53
|
-
},
|
|
54
|
-
|
|
55
50
|
mode: {
|
|
56
51
|
type: String,
|
|
57
52
|
default: 'create'
|
|
@@ -255,7 +250,7 @@ export default {
|
|
|
255
250
|
},
|
|
256
251
|
|
|
257
252
|
parent() {
|
|
258
|
-
|
|
253
|
+
const displayName = this.value?.parentNameOverride || this.$store.getters['type-map/labelFor'](this.schema);
|
|
259
254
|
const product = this.$store.getters['currentProduct'].name;
|
|
260
255
|
|
|
261
256
|
const defaultLocation = {
|
|
@@ -273,20 +268,6 @@ export default {
|
|
|
273
268
|
}
|
|
274
269
|
|
|
275
270
|
const typeOptions = this.$store.getters[`type-map/optionsFor`]( this.resource );
|
|
276
|
-
|
|
277
|
-
// 转换为中文
|
|
278
|
-
const displayName_zh_hans = {
|
|
279
|
-
'GlobalRole': '全局角色',
|
|
280
|
-
'RoleTemplate': '集群角色',
|
|
281
|
-
}
|
|
282
|
-
if (displayName_zh_hans[displayName]) {
|
|
283
|
-
displayName = displayName_zh_hans[displayName]
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
if (displayName == '集群角色' && (this.$route.query?.roleContext == 'NAMESPACE' || location.hash == '#NAMESPACE')) {
|
|
287
|
-
displayName = '项目或资源组角色'
|
|
288
|
-
}
|
|
289
|
-
|
|
290
271
|
const out = {
|
|
291
272
|
displayName, location, ...typeOptions
|
|
292
273
|
};
|
|
@@ -337,12 +318,12 @@ export default {
|
|
|
337
318
|
});
|
|
338
319
|
}
|
|
339
320
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
321
|
+
if ( this.canViewYaml ) {
|
|
322
|
+
out.push({
|
|
323
|
+
labelKey: 'resourceDetail.masthead.yaml',
|
|
324
|
+
value: _YAML,
|
|
325
|
+
});
|
|
326
|
+
}
|
|
346
327
|
|
|
347
328
|
if ( out.length < 2 ) {
|
|
348
329
|
return null;
|
|
@@ -441,7 +422,7 @@ export default {
|
|
|
441
422
|
},
|
|
442
423
|
menuIcon() {
|
|
443
424
|
const product = this.$store.getters['productId'];
|
|
444
|
-
|
|
425
|
+
|
|
445
426
|
const resources = this.location?.params?.resource || ''
|
|
446
427
|
|
|
447
428
|
return this.$store.getters['type-map/groupsForVirTypes'](product, resources);
|
|
@@ -492,192 +473,263 @@ export default {
|
|
|
492
473
|
</script>
|
|
493
474
|
|
|
494
475
|
<template>
|
|
495
|
-
|
|
496
|
-
<!-- 顶部区域的容器 -->
|
|
497
476
|
<div class="masthead">
|
|
498
477
|
<div class="title">
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
<!-- <div
|
|
478
|
+
<!-- 创建api密钥不需要面包屑 -->
|
|
479
|
+
<div
|
|
502
480
|
v-if="!(parentRouteOverride === 'account' && resource=== 'token')"
|
|
503
481
|
class="excram-list"
|
|
504
482
|
>
|
|
505
|
-
|
|
506
|
-
遍历 demoDisplay 生成面包屑路径
|
|
507
483
|
<span
|
|
508
484
|
v-for="(item,index) in demoDisplay"
|
|
509
485
|
:key="index"
|
|
510
486
|
>
|
|
511
|
-
<span
|
|
512
|
-
<span
|
|
487
|
+
<span>{{ item }}</span>
|
|
488
|
+
<span>/</span>
|
|
513
489
|
</span>
|
|
514
|
-
|
|
515
|
-
最后一个面包屑显示当前操作(查看/编辑/创建)+ 父资源名称
|
|
516
490
|
<span class="excram-last-name">
|
|
517
491
|
{{ (realMode === 'view'? '查看': realMode === 'edit' ? '编辑':'创建') + parent.displayName }}
|
|
518
492
|
</span>
|
|
519
|
-
</div>
|
|
520
|
-
|
|
521
|
-
<
|
|
522
|
-
<div class="
|
|
523
|
-
<
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
v-else
|
|
536
|
-
:class="'icon-'+ menuIcon + ' detailIcon'"
|
|
537
|
-
/>
|
|
538
|
-
</span>
|
|
539
|
-
|
|
540
|
-
<!-- 资源标题(创建时只显示“创建+名称”,否则显示“名称:”) -->
|
|
541
|
-
<span class="detailIcon-span-title">{{ realMode=== 'create'? '创建': '' }}{{ parent.displayName }}{{ realMode=== 'create'? '': '名称:' }}</span>
|
|
542
|
-
|
|
543
|
-
<!-- 如果不是创建模式,显示操作描述 -->
|
|
544
|
-
<span v-if="realMode !== 'create'">
|
|
545
|
-
|
|
546
|
-
<!-- 如果有覆盖方法,优先显示覆盖内容 -->
|
|
547
|
-
<span v-if="value.detailPageHeaderActionOverride && value.detailPageHeaderActionOverride(realMode)">{{ value.detailPageHeaderActionOverride(realMode) }}</span>
|
|
548
|
-
|
|
549
|
-
<!-- 否则用 t 组件国际化显示 -->
|
|
550
|
-
<t
|
|
551
|
-
v-else
|
|
552
|
-
:k="'resourceDetail.header.' + realMode"
|
|
553
|
-
:subtype="resourceSubtype"
|
|
554
|
-
:name="displayName"
|
|
555
|
-
:escapehtml="false"
|
|
556
|
-
/>
|
|
557
|
-
</span>
|
|
558
|
-
|
|
559
|
-
<!-- 状态点(DotState 组件) -->
|
|
560
|
-
<DotState
|
|
561
|
-
v-if="!isCreate && parent.showState"
|
|
562
|
-
class="masthead-state"
|
|
563
|
-
:value="value"
|
|
564
|
-
/>
|
|
565
|
-
|
|
566
|
-
<!-- Istio 注入状态 -->
|
|
567
|
-
<span
|
|
568
|
-
v-if="!isCreate && value.injectionEnabled"
|
|
569
|
-
class="masthead-istio"
|
|
493
|
+
</div>
|
|
494
|
+
<header>
|
|
495
|
+
<div class="title">
|
|
496
|
+
<div class="primaryheader">
|
|
497
|
+
<span class="primary-title">
|
|
498
|
+
<!-- <nuxt-link
|
|
499
|
+
v-if="location"
|
|
500
|
+
:to="location"
|
|
501
|
+
>
|
|
502
|
+
{{ parent.displayName }}:
|
|
503
|
+
</nuxt-link> -->
|
|
504
|
+
<span class="detailIcon-span">
|
|
505
|
+
<img
|
|
506
|
+
v-if="parentRouteOverride === 'account' && resource=== 'token'"
|
|
507
|
+
:src="Svg"
|
|
508
|
+
style="margin-top: 4px; margin-left: 5px;"
|
|
570
509
|
>
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
</span>
|
|
510
|
+
<i
|
|
511
|
+
v-else
|
|
512
|
+
:class="'icon-'+ menuIcon + ' detailIcon'"
|
|
513
|
+
/>
|
|
576
514
|
</span>
|
|
577
|
-
|
|
578
|
-
|
|
515
|
+
<span class="detailIcon-span-title">{{ realMode=== 'create'? '创建': '' }}{{ parent.displayName }}{{ realMode=== 'create'? '': '名称:' }}</span>
|
|
516
|
+
<span v-if="realMode !== 'create'">
|
|
517
|
+
<span v-if="value.detailPageHeaderActionOverride && value.detailPageHeaderActionOverride(realMode)">{{ value.detailPageHeaderActionOverride(realMode) }}</span>
|
|
518
|
+
<t
|
|
519
|
+
v-else
|
|
520
|
+
:k="'resourceDetail.header.' + realMode"
|
|
521
|
+
:subtype="resourceSubtype"
|
|
522
|
+
:name="displayName"
|
|
523
|
+
:escapehtml="false"
|
|
524
|
+
/>
|
|
525
|
+
</span>
|
|
526
|
+
<DotState
|
|
527
|
+
v-if="!isCreate && parent.showState"
|
|
528
|
+
class="masthead-state"
|
|
529
|
+
:value="value"
|
|
530
|
+
/>
|
|
579
531
|
<span
|
|
580
|
-
v-if="
|
|
581
|
-
class="
|
|
582
|
-
>|</span>
|
|
583
|
-
<router-link
|
|
584
|
-
v-if="location"
|
|
585
|
-
:to="location"
|
|
532
|
+
v-if="!isCreate && value.injectionEnabled"
|
|
533
|
+
class="masthead-istio"
|
|
586
534
|
>
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
535
|
+
<i
|
|
536
|
+
v-clean-tooltip="t('projectNamespaces.isIstioInjectionEnabled')"
|
|
537
|
+
class="icon icon-sm icon-istio"
|
|
538
|
+
/>
|
|
539
|
+
</span>
|
|
540
|
+
</span>
|
|
541
|
+
<span
|
|
542
|
+
v-if="location"
|
|
543
|
+
class="valid"
|
|
544
|
+
>|</span>
|
|
545
|
+
<router-link
|
|
546
|
+
v-if="location"
|
|
547
|
+
:to="location"
|
|
548
|
+
>
|
|
549
|
+
返回
|
|
550
|
+
</router-link>
|
|
551
|
+
<!-- <h1>
|
|
552
|
+
<TabTitle
|
|
553
|
+
v-if="isCreate"
|
|
554
|
+
:showChild="false"
|
|
555
|
+
>
|
|
556
|
+
{{ parent.displayName }}
|
|
557
|
+
</TabTitle>
|
|
558
|
+
<TabTitle
|
|
559
|
+
v-else
|
|
560
|
+
:showChild="false"
|
|
561
|
+
>
|
|
562
|
+
{{ displayName }}
|
|
563
|
+
</TabTitle>
|
|
564
|
+
<router-link
|
|
565
|
+
v-if="location"
|
|
566
|
+
:to="location"
|
|
567
|
+
role="link"
|
|
568
|
+
class="masthead-resource-list-link"
|
|
569
|
+
:aria-label="parent.displayName"
|
|
570
|
+
>
|
|
571
|
+
{{ parent.displayName }}:
|
|
572
|
+
</router-link>
|
|
573
|
+
<span v-else>{{ parent.displayName }}:</span>
|
|
574
|
+
<span v-if="value?.detailPageHeaderActionOverride && value?.detailPageHeaderActionOverride(realMode)">{{ value?.detailPageHeaderActionOverride(realMode) }}</span>
|
|
575
|
+
<t
|
|
576
|
+
v-else
|
|
577
|
+
class="masthead-resource-title"
|
|
578
|
+
:k="'resourceDetail.header.' + realMode"
|
|
579
|
+
:subtype="resourceSubtype"
|
|
580
|
+
:name="displayName"
|
|
581
|
+
:escapehtml="false"
|
|
582
|
+
/>
|
|
583
|
+
<BadgeState
|
|
584
|
+
v-if="!isCreate && parent.showState"
|
|
585
|
+
class="masthead-state"
|
|
586
|
+
:value="value"
|
|
587
|
+
/>
|
|
588
|
+
<span
|
|
589
|
+
v-if="!isCreate && value.injectionEnabled"
|
|
590
|
+
class="masthead-istio"
|
|
591
|
+
>
|
|
592
|
+
<i
|
|
593
|
+
v-clean-tooltip="t('projectNamespaces.isIstioInjectionEnabled')"
|
|
594
|
+
class="icon icon-sm icon-istio"
|
|
595
|
+
/>
|
|
596
|
+
</span>
|
|
597
|
+
<a
|
|
598
|
+
v-if="dev && !!resourceExternalLink"
|
|
599
|
+
v-clean-tooltip="t(resourceExternalLink.tipsKey || 'generic.resourceExternalLinkTips')"
|
|
600
|
+
class="resource-external"
|
|
601
|
+
rel="nofollow noopener noreferrer"
|
|
602
|
+
target="_blank"
|
|
603
|
+
:href="resourceExternalLink.url"
|
|
604
|
+
>
|
|
605
|
+
<i class="icon icon-external-link" />
|
|
606
|
+
</a>
|
|
607
|
+
</h1> -->
|
|
590
608
|
</div>
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
609
|
+
<!-- <div
|
|
610
|
+
v-if="!isCreate"
|
|
611
|
+
class="subheader"
|
|
612
|
+
>
|
|
613
|
+
<span v-if="isNamespace && project">{{ t("resourceDetail.masthead.project") }}: <router-link :to="project.detailLocation">{{ project.nameDisplay }}</router-link></span>
|
|
614
|
+
<span v-else-if="isWorkspace">{{ t("resourceDetail.masthead.workspace") }}: <router-link :to="workspaceLocation">{{ namespace }}</router-link></span>
|
|
615
|
+
<span v-else-if="namespace && !hasMultipleNamespaces">
|
|
616
|
+
{{ t("resourceDetail.masthead.namespace") }}:
|
|
617
|
+
<router-link
|
|
618
|
+
v-if="!hideNamespaceLocation"
|
|
619
|
+
:to="namespaceLocation"
|
|
620
|
+
data-testid="masthead-subheader-namespace"
|
|
621
|
+
>
|
|
622
|
+
{{ namespace }}
|
|
623
|
+
</router-link>
|
|
624
|
+
<span v-else>
|
|
625
|
+
{{ namespace }}
|
|
626
|
+
</span>
|
|
627
|
+
</span>
|
|
628
|
+
<span v-if="parent.showAge">
|
|
629
|
+
{{ t("resourceDetail.masthead.age") }}:
|
|
630
|
+
<LiveDate
|
|
631
|
+
class="live-date"
|
|
632
|
+
:value="value.creationTimestamp"
|
|
633
|
+
/>
|
|
634
|
+
</span>
|
|
635
|
+
<span
|
|
636
|
+
v-if="value.showCreatedBy"
|
|
637
|
+
data-testid="masthead-subheader-createdBy"
|
|
638
|
+
>
|
|
639
|
+
{{ t("resourceDetail.masthead.createdBy") }}:
|
|
640
|
+
<router-link
|
|
641
|
+
v-if="value.createdBy.location"
|
|
642
|
+
:to="value.createdBy.location"
|
|
643
|
+
data-testid="masthead-subheader-createdBy-link"
|
|
644
|
+
>
|
|
645
|
+
{{ value.createdBy.displayName }}
|
|
646
|
+
</router-link>
|
|
647
|
+
<span
|
|
648
|
+
v-else
|
|
649
|
+
data-testid="masthead-subheader-createdBy_plain-text"
|
|
650
|
+
>
|
|
651
|
+
{{ value.createdBy.displayName }}
|
|
652
|
+
</span>
|
|
653
|
+
</span>
|
|
654
|
+
<span v-if="value.showPodRestarts">{{ t("resourceDetail.masthead.restartCount") }}:<span class="live-data"> {{ value.restartCount }}</span></span>
|
|
655
|
+
</div> -->
|
|
656
|
+
</div>
|
|
657
|
+
<slot name="right">
|
|
658
|
+
<div class="actions-container align-start">
|
|
659
|
+
<div class="actions">
|
|
660
|
+
<button
|
|
661
|
+
v-if="detailsAction && currentView === DETAIL_VIEW && isView"
|
|
662
|
+
type="button"
|
|
663
|
+
class="btn role-primary actions mr-10"
|
|
664
|
+
:disabled="!detailsAction.enabled"
|
|
665
|
+
@click="invokeDetailsAction"
|
|
666
|
+
>
|
|
667
|
+
{{ detailsAction.label }}
|
|
668
|
+
</button>
|
|
669
|
+
<ButtonGroup
|
|
670
|
+
v-if="showSensitiveToggle"
|
|
671
|
+
:value="!!hideSensitiveData"
|
|
672
|
+
icon-size="lg"
|
|
673
|
+
:options="sensitiveOptions"
|
|
674
|
+
class="mr-10"
|
|
675
|
+
@update:value="toggleSensitiveData"
|
|
676
|
+
/>
|
|
677
|
+
|
|
678
|
+
<ButtonGroup
|
|
679
|
+
v-if="viewOptions && isView"
|
|
680
|
+
v-model:value="currentView"
|
|
681
|
+
:options="viewOptions"
|
|
682
|
+
class="mr-10"
|
|
683
|
+
/>
|
|
684
|
+
|
|
685
|
+
<template v-if="featureDropdownMenu">
|
|
686
|
+
<ActionMenu
|
|
687
|
+
v-if="isView"
|
|
688
|
+
button-role="multiAction"
|
|
689
|
+
button-size="compact"
|
|
690
|
+
:resource="value"
|
|
691
|
+
data-testid="masthead-action-menu"
|
|
692
|
+
/>
|
|
693
|
+
</template>
|
|
694
|
+
<template v-else>
|
|
598
695
|
<button
|
|
599
|
-
v-if="
|
|
696
|
+
v-if="isView"
|
|
697
|
+
ref="actions"
|
|
698
|
+
data-testid="masthead-action-menu"
|
|
699
|
+
aria-haspopup="true"
|
|
600
700
|
type="button"
|
|
601
|
-
class="btn role-
|
|
602
|
-
|
|
603
|
-
@click="invokeDetailsAction"
|
|
701
|
+
class="btn role-multi-action actions"
|
|
702
|
+
@click="showActions"
|
|
604
703
|
>
|
|
605
|
-
|
|
704
|
+
<i class="icon icon-actions" />
|
|
606
705
|
</button>
|
|
607
|
-
|
|
608
|
-
<!-- 敏感信息显示/隐藏切换 -->
|
|
609
|
-
<ButtonGroup
|
|
610
|
-
v-if="showSensitiveToggle"
|
|
611
|
-
:value="!!hideSensitiveData"
|
|
612
|
-
icon-size="lg"
|
|
613
|
-
:options="sensitiveOptions"
|
|
614
|
-
class="mr-10"
|
|
615
|
-
@update:value="toggleSensitiveData"
|
|
616
|
-
/>
|
|
617
|
-
|
|
618
|
-
<!-- 视图切换按钮 -->
|
|
619
|
-
<ButtonGroup
|
|
620
|
-
v-if="viewOptions && isView"
|
|
621
|
-
v-model:value="currentView"
|
|
622
|
-
:options="viewOptions"
|
|
623
|
-
class="mr-10"
|
|
624
|
-
/>
|
|
625
|
-
|
|
626
|
-
<!-- 功能菜单:优先使用 ActionMenu 组件 -->
|
|
627
|
-
<template v-if="featureDropdownMenu">
|
|
628
|
-
<ActionMenu
|
|
629
|
-
v-if="isView"
|
|
630
|
-
button-role="multiAction"
|
|
631
|
-
button-size="compact"
|
|
632
|
-
:resource="value"
|
|
633
|
-
data-testid="masthead-action-menu"
|
|
634
|
-
/>
|
|
635
|
-
</template>
|
|
636
|
-
|
|
637
|
-
<!-- 如果没有 featureDropdownMenu,则使用普通的多操作按钮 -->
|
|
638
|
-
<template v-else>
|
|
639
|
-
<button
|
|
640
|
-
v-if="isView"
|
|
641
|
-
ref="actions"
|
|
642
|
-
data-testid="masthead-action-menu"
|
|
643
|
-
aria-haspopup="true"
|
|
644
|
-
type="button"
|
|
645
|
-
class="btn role-multi-action actions"
|
|
646
|
-
@click="showActions"
|
|
647
|
-
>
|
|
648
|
-
<i class="icon icon-actions" />
|
|
649
|
-
</button>
|
|
650
|
-
</template>
|
|
651
|
-
</div>
|
|
706
|
+
</template>
|
|
652
707
|
</div>
|
|
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
|
-
<!-- 内容插槽 -->
|
|
680
|
-
<slot />
|
|
708
|
+
</div>
|
|
709
|
+
</slot>
|
|
710
|
+
</header>
|
|
711
|
+
|
|
712
|
+
<!-- Extension area -->
|
|
713
|
+
<ExtensionPanel
|
|
714
|
+
:resource="value"
|
|
715
|
+
:type="extensionType"
|
|
716
|
+
:location="extensionLocation"
|
|
717
|
+
/>
|
|
718
|
+
|
|
719
|
+
<Banner
|
|
720
|
+
v-if="banner && isView && !parent.hideBanner"
|
|
721
|
+
class="state-banner mb-10"
|
|
722
|
+
:color="banner.color"
|
|
723
|
+
:label="banner.message"
|
|
724
|
+
/>
|
|
725
|
+
<Banner
|
|
726
|
+
v-if="managedWarning.show"
|
|
727
|
+
color="warning"
|
|
728
|
+
class="mb-20"
|
|
729
|
+
:label="t('resourceDetail.masthead.managedWarning', managedWarning)"
|
|
730
|
+
/>
|
|
731
|
+
|
|
732
|
+
<slot />
|
|
681
733
|
</div>
|
|
682
734
|
</div>
|
|
683
735
|
</template>
|
|
@@ -457,13 +457,8 @@ export default {
|
|
|
457
457
|
</script>
|
|
458
458
|
|
|
459
459
|
<template>
|
|
460
|
-
|
|
461
|
-
<!-- 如果数据还在加载中,或者资源未找到,则显示 Loading 组件 -->
|
|
462
460
|
<Loading v-if="$fetchState.pending || notFound" />
|
|
463
|
-
|
|
464
|
-
<!-- 数据加载完成且资源存在时 -->
|
|
465
|
-
<div style="padding: 20px 0 20px 20px;height: 100%;" v-else>
|
|
466
|
-
<!-- 顶部 Masthead 区域 -->
|
|
461
|
+
<div v-else>
|
|
467
462
|
<Masthead
|
|
468
463
|
v-if="showMasthead"
|
|
469
464
|
:resource="resourceType"
|
|
@@ -474,25 +469,20 @@ export default {
|
|
|
474
469
|
:has-graph="hasGraph"
|
|
475
470
|
:has-detail="hasCustomDetail"
|
|
476
471
|
:has-edit="hasCustomEdit"
|
|
477
|
-
:can-view-yaml="canViewYaml"
|
|
478
472
|
:resource-subtype="resourceSubtype"
|
|
479
473
|
:parent-route-override="parentRouteOverride"
|
|
480
474
|
:store-override="storeOverride"
|
|
481
|
-
|
|
482
|
-
:isManuallyHide="false"
|
|
483
475
|
>
|
|
484
|
-
|
|
476
|
+
<!-- <DetailTop
|
|
477
|
+
v-if="isView && isDetail"
|
|
478
|
+
:value="liveModel"
|
|
479
|
+
/> -->
|
|
485
480
|
</Masthead>
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
<!-- 错误信息显示区域 -->
|
|
489
481
|
<div
|
|
490
482
|
v-if="hasErrors"
|
|
491
483
|
id="cru-errors"
|
|
492
484
|
class="cru__errors"
|
|
493
485
|
>
|
|
494
|
-
|
|
495
|
-
<!-- 循环渲染错误 Banner -->
|
|
496
486
|
<Banner
|
|
497
487
|
v-for="(err, i) in errors"
|
|
498
488
|
:key="i"
|
|
@@ -505,14 +495,12 @@ export default {
|
|
|
505
495
|
/>
|
|
506
496
|
</div>
|
|
507
497
|
|
|
508
|
-
<!-- 力导向图模式 -->
|
|
509
498
|
<ForceDirectedTreeChart
|
|
510
499
|
v-if="isGraph && canViewChart"
|
|
511
500
|
:data="chartData"
|
|
512
501
|
:fdc-config="getGraphConfig"
|
|
513
502
|
/>
|
|
514
503
|
|
|
515
|
-
<!-- YAML 查看/编辑模式 -->
|
|
516
504
|
<ResourceYaml
|
|
517
505
|
v-else-if="isYaml"
|
|
518
506
|
ref="resourceyaml"
|
|
@@ -526,7 +514,6 @@ export default {
|
|
|
526
514
|
@error="e=>errors.push(e)"
|
|
527
515
|
/>
|
|
528
516
|
|
|
529
|
-
<!-- 动态组件渲染,根据 showComponent 动态选择组件 -->
|
|
530
517
|
<component
|
|
531
518
|
:is="showComponent"
|
|
532
519
|
v-else
|
|
@@ -545,8 +532,6 @@ export default {
|
|
|
545
532
|
@set-subtype="setSubtype"
|
|
546
533
|
/>
|
|
547
534
|
|
|
548
|
-
|
|
549
|
-
<!-- 快捷键按钮(隐藏) -->
|
|
550
535
|
<button
|
|
551
536
|
v-if="isView"
|
|
552
537
|
v-shortkey.once="['shift','d']"
|