dashboard-shell-shell 3.0.5-test.6 → 3.0.5-test.9

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.
Files changed (218) hide show
  1. package/assets/brand/harvester/favicon.png +0 -0
  2. package/assets/brand/suse/favicon.png +0 -0
  3. package/assets/icons/demo.css +539 -0
  4. package/assets/icons/demo.css:Zone.Identifier +0 -0
  5. package/assets/icons/demo_index.html +1131 -0
  6. package/assets/icons/demo_index.html:Zone.Identifier +0 -0
  7. package/assets/icons/iconfont.css +216 -0
  8. package/assets/icons/iconfont.css:Zone.Identifier +0 -0
  9. package/assets/icons/iconfont.js +1 -0
  10. package/assets/icons/iconfont.js:Zone.Identifier +0 -0
  11. package/assets/icons/iconfont.json +324 -0
  12. package/assets/icons/iconfont.json:Zone.Identifier +0 -0
  13. package/assets/icons/iconfont.ttf +0 -0
  14. package/assets/icons/iconfont.ttf:Zone.Identifier +0 -0
  15. package/assets/icons/iconfont.woff +0 -0
  16. package/assets/icons/iconfont.woff2 +0 -0
  17. package/assets/icons/iconfont.woff2:Zone.Identifier +0 -0
  18. package/assets/icons/iconfont.woff:Zone.Identifier +0 -0
  19. package/assets/images/API.svg +3 -0
  20. package/assets/images/action.svg +6 -0
  21. package/assets/images/login/password.svg +20 -0
  22. package/assets/images/login/user.svg +6 -0
  23. package/assets/images/login-bg.png +0 -0
  24. package/assets/images/login-left.png +0 -0
  25. package/assets/images/login-logo.svg +19 -0
  26. package/assets/images/logo.png +0 -0
  27. package/assets/images/pl/half-logo.svg +2 -23
  28. package/assets/images/pl/harvester.png +0 -0
  29. package/assets/images/pl/logo.png +0 -0
  30. package/assets/images/promp-yellow.svg +5 -0
  31. package/assets/images/user.png +0 -0
  32. package/assets/styles/all.scss +63 -0
  33. package/assets/styles/app.scss +4 -0
  34. package/assets/styles/base/_basic.scss +2 -2
  35. package/assets/styles/base/_mixins.scss +1 -1
  36. package/assets/styles/base/_typography.scss +2 -1
  37. package/assets/styles/base/_variables.scss +14 -7
  38. package/assets/styles/global/_button.scss +43 -25
  39. package/assets/styles/global/_columns.scss +3 -1
  40. package/assets/styles/global/_form.scss +45 -13
  41. package/assets/styles/global/_labeled-input.scss +54 -26
  42. package/assets/styles/global/_layout.scss +8 -3
  43. package/assets/styles/global/_select.scss +25 -17
  44. package/assets/styles/global/_table.scss +7 -1
  45. package/assets/styles/global/_tooltip.scss +56 -8
  46. package/assets/styles/themes/_dark.scss +3 -0
  47. package/assets/styles/themes/_light.scss +66 -43
  48. package/assets/styles/vendor/vue-select.scss +22 -9
  49. package/assets/translations/en-us.yaml +28 -4
  50. package/assets/translations/zh-hans.yaml +452 -189
  51. package/components/ActionDropdown.vue +2 -1
  52. package/components/ActionMenu.vue +2 -2
  53. package/components/ActionMenuShell.vue +2 -0
  54. package/components/AppModal.vue +46 -5
  55. package/components/BrandImage.vue +1 -0
  56. package/components/ButtonDropdown.vue +26 -4
  57. package/components/ButtonMultiAction.vue +1 -0
  58. package/components/ClusterIconMenu.vue +1 -1
  59. package/components/CodeMirror.vue +20 -6
  60. package/components/ConsumptionGauge.vue +24 -5
  61. package/components/CopyToClipboard.vue +15 -0
  62. package/components/CruResource.vue +9 -8
  63. package/components/CruResourceFooter.vue +2 -2
  64. package/components/DashboardOptions.vue +29 -17
  65. package/components/DotState.vue +84 -0
  66. package/components/Drawer/Chrome.vue +2 -2
  67. package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +22 -22
  68. package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +1 -1
  69. package/components/Drawer/ResourceDetailDrawer/index.vue +2 -1
  70. package/components/ExplorerMembers.vue +18 -3
  71. package/components/ExplorerProjectsNamespaces.vue +19 -5
  72. package/components/GlobalRoleBindings.vue +112 -48
  73. package/components/GrafanaDashboard.vue +4 -4
  74. package/components/GrowlManager.vue +3 -1
  75. package/components/HardwareResourceGauge.vue +39 -3
  76. package/components/IndentedPanel.vue +4 -10
  77. package/components/InfoBox.vue +3 -3
  78. package/components/InputOrDisplay.vue +28 -2
  79. package/components/LabelValue.vue +20 -1
  80. package/components/ModalWithCard.vue +12 -3
  81. package/components/PodSecurityAdmission.vue +1 -1
  82. package/components/PromptModal.vue +1 -1
  83. package/components/PromptRemove.vue +30 -11
  84. package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +1 -3
  85. package/components/Resource/Detail/Metadata/KeyValue.vue +8 -4
  86. package/components/Resource/Detail/Metadata/index.vue +3 -1
  87. package/components/Resource/Detail/TitleBar/Title.vue +4 -3
  88. package/components/Resource/Detail/TitleBar/Top.vue +2 -0
  89. package/components/Resource/Detail/TitleBar/index.vue +109 -24
  90. package/components/ResourceDetail/Masthead/legacy.vue +181 -38
  91. package/components/ResourceDetail/legacy.vue +32 -14
  92. package/components/ResourceList/Masthead.vue +226 -54
  93. package/components/ResourceList/ResourceLoadingIndicator.vue +5 -2
  94. package/components/ResourceTable.vue +24 -2
  95. package/components/SideNav.vue +74 -20
  96. package/components/SortableTable/THead.vue +33 -3
  97. package/components/SortableTable/index.vue +1016 -463
  98. package/components/SortableTable/paging.js +26 -16
  99. package/components/SortableTable/selection.js +2 -2
  100. package/components/Tabbed/Tab.vue +3 -3
  101. package/components/Tabbed/index.vue +47 -29
  102. package/components/YamlEditor.vue +0 -1
  103. package/components/auth/Principal.vue +37 -13
  104. package/components/auth/RoleDetailEdit.vue +58 -7
  105. package/components/auth/SelectPrincipal.vue +1 -0
  106. package/components/breadcrumb/index.vue +316 -0
  107. package/components/form/ArrayList.vue +41 -33
  108. package/components/form/ArrayListGrouped.vue +10 -2
  109. package/components/form/ArrayListSelect.vue +1 -1
  110. package/components/form/BannerSettings.vue +64 -59
  111. package/components/form/ChangePassword.vue +4 -4
  112. package/components/form/ColorInput.vue +32 -8
  113. package/components/form/Footer.vue +11 -8
  114. package/components/form/InputWithSelect.vue +8 -5
  115. package/components/form/KeyValue.vue +47 -7
  116. package/components/form/LabeledSelect.vue +214 -242
  117. package/components/form/Labels.vue +3 -3
  118. package/components/form/MatchExpressions.vue +24 -7
  119. package/components/form/Members/ClusterPermissionsEditor.vue +1 -2
  120. package/components/form/Members/MembershipEditor.vue +1 -1
  121. package/components/form/NameNsDescription.vue +59 -20
  122. package/components/form/Password.vue +16 -7
  123. package/components/form/PodAffinity.vue +4 -5
  124. package/components/form/ResourceQuota/Namespace.vue +4 -4
  125. package/components/form/ResourceQuota/NamespaceRow.vue +18 -17
  126. package/components/form/ResourceQuota/Project.vue +4 -4
  127. package/components/form/ResourceQuota/ProjectRow.vue +3 -6
  128. package/components/form/Select.vue +5 -2
  129. package/components/form/SimpleSecretSelector.vue +29 -9
  130. package/components/form/Taints.vue +2 -1
  131. package/components/form/UnitInput.vue +8 -3
  132. package/components/form/WorkloadPorts.vue +143 -123
  133. package/components/formatter/BadgeStateFormatter.vue +8 -5
  134. package/components/formatter/LiveDate.vue +3 -3
  135. package/components/nav/Favorite.vue +5 -1
  136. package/components/nav/Group.vue +132 -99
  137. package/components/nav/Header.vue +124 -27
  138. package/components/nav/HeaderPageActionMenu.vue +1 -0
  139. package/components/nav/NamespaceFilter.vue +20 -17
  140. package/components/nav/TopLevelMenu.vue +182 -119
  141. package/components/nav/Type.vue +63 -41
  142. package/composables/useClickOutside.ts +1 -1
  143. package/config/private-label.js +15 -11
  144. package/config/product/auth.js +17 -7
  145. package/config/product/settings.js +19 -9
  146. package/config/settings.ts +28 -0
  147. package/config/table-headers.js +3 -2
  148. package/dialog/ForceMachineRemoveDialog.vue +2 -2
  149. package/dialog/ScalePoolDownDialog.vue +2 -2
  150. package/edit/management.cattle.io.user.vue +17 -4
  151. package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +19 -19
  152. package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +31 -31
  153. package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +36 -12
  154. package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
  155. package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
  156. package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +4 -4
  157. package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +4 -4
  158. package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
  159. package/edit/monitoring.coreos.com.receiver/types/email.vue +6 -6
  160. package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +10 -10
  161. package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +5 -5
  162. package/edit/monitoring.coreos.com.receiver/types/slack.vue +4 -4
  163. package/edit/namespace.vue +1 -2
  164. package/edit/token.vue +31 -12
  165. package/edit/workload/index.vue +4 -4
  166. package/list/management.cattle.io.setting.vue +22 -13
  167. package/list/management.cattle.io.user.vue +7 -3
  168. package/list/namespace.vue +3 -0
  169. package/list/provisioning.cattle.io.cluster.vue +6 -7
  170. package/mixins/brand.js +17 -0
  171. package/package.json +1 -1
  172. package/pages/account/pri.vue +229 -0
  173. package/pages/auth/login.vue +220 -52
  174. package/pages/auth/setup.vue +142 -19
  175. package/pages/c/_cluster/_product/namespaces.vue +5 -5
  176. package/pages/c/_cluster/auth/roles/index.vue +56 -5
  177. package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
  178. package/pages/c/_cluster/settings/banners.vue +174 -102
  179. package/pages/c/_cluster/settings/brand.vue +350 -302
  180. package/pages/c/_cluster/settings/performance.vue +61 -38
  181. package/pages/home.vue +70 -30
  182. package/pages/prefs.vue +27 -25
  183. package/pkg/tsconfig.json +9 -9
  184. package/pkg/vue.config.js +1 -1
  185. package/plugins/dashboard-store/resource-class.js +28 -27
  186. package/promptRemove/mixin/roleDeletionCheck.js +2 -2
  187. package/public/index.html +4 -4
  188. package/rancher-components/BadgeState/BadgeState.vue +38 -55
  189. package/rancher-components/Banner/Banner.vue +12 -8
  190. package/rancher-components/Card/Card.vue +7 -8
  191. package/rancher-components/Form/Checkbox/Checkbox.vue +4 -0
  192. package/rancher-components/Form/LabeledInput/LabeledInput.vue +42 -3
  193. package/rancher-components/Form/Radio/RadioButton.vue +35 -11
  194. package/rancher-components/Form/Radio/RadioGroup.vue +13 -5
  195. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
  196. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +1 -0
  197. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +12 -4
  198. package/rancher-components/RcDropdown/RcDropdown.vue +35 -7
  199. package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
  200. package/rancher-components/RcDropdown/RcDropdownMenu.vue +12 -6
  201. package/rancher-components/RcDropdown/types.ts +1 -0
  202. package/rancher-components/StringList/StringList.vue +1 -1
  203. package/scripts/publish-shell.sh +1 -1
  204. package/static/favicon.ico +0 -0
  205. package/static/favicon.png +0 -0
  206. package/static/loading-indicator.html +3 -3
  207. package/store/i18n.js +5 -2
  208. package/store/modal.ts +3 -3
  209. package/store/prefs.js +11 -4
  210. package/store/type-map.js +32 -2
  211. package/types/shell/index.d.ts +78 -97
  212. package/utils/error.js +89 -8
  213. package/utils/errorTranslate.json +1351 -0
  214. package/utils/router.js +21 -0
  215. package/utils/select.js +26 -3
  216. package/utils/string.js +8 -5
  217. package/utils/title.ts +1 -1
  218. package/vue.config.js +1 -1
@@ -2,7 +2,8 @@
2
2
  import { KUBERNETES, PROJECT } from '@shell/config/labels-annotations';
3
3
  import { FLEET, NAMESPACE, MANAGEMENT, HELM } from '@shell/config/types';
4
4
  import ButtonGroup from '@shell/components/ButtonGroup';
5
- import { BadgeState } from '@components/BadgeState';
5
+ // import { BadgeState } from '@components/BadgeState';
6
+ import DotState from '@shell/components/DotState.vue';
6
7
  import { Banner } from '@components/Banner';
7
8
  import { get } from '@shell/utils/object';
8
9
  import { NAME as FLEET_NAME } from '@shell/config/product/fleet';
@@ -29,7 +30,8 @@ export default {
29
30
  name: 'MastheadResourceDetail',
30
31
 
31
32
  components: {
32
- BadgeState,
33
+ // BadgeState,
34
+ DotState,
33
35
  Banner,
34
36
  ButtonGroup,
35
37
  ExtensionPanel,
@@ -44,6 +46,11 @@ export default {
44
46
  }
45
47
  },
46
48
 
49
+ isManuallyHide: {
50
+ type: Boolean,
51
+ default: true
52
+ },
53
+
47
54
  mode: {
48
55
  type: String,
49
56
  default: 'create'
@@ -112,6 +119,7 @@ export default {
112
119
  DETAIL_VIEW: _DETAIL,
113
120
  extensionType: ExtensionPoint.PANEL,
114
121
  extensionLocation: PanelLocation.DETAILS_MASTHEAD,
122
+ Svg: require('~shell/assets/images/API.svg')
115
123
  };
116
124
  },
117
125
 
@@ -264,6 +272,20 @@ export default {
264
272
  }
265
273
 
266
274
  const typeOptions = this.$store.getters[`type-map/optionsFor`]( this.resource );
275
+
276
+ // 转换为中文
277
+ const displayName_zh_hans = {
278
+ 'GlobalRole': '全局角色',
279
+ 'RoleTemplate': '集群角色',
280
+ }
281
+ if (displayName_zh_hans[displayName]) {
282
+ displayName = displayName_zh_hans[displayName]
283
+ }
284
+
285
+ if (displayName == '集群角色' && (this.$route.query?.roleContext == 'NAMESPACE' || location.hash == '#NAMESPACE')) {
286
+ displayName = '项目或资源组角色'
287
+ }
288
+
267
289
  const out = {
268
290
  displayName, location, ...typeOptions
269
291
  };
@@ -314,12 +336,12 @@ export default {
314
336
  });
315
337
  }
316
338
 
317
- if ( this.canViewYaml ) {
318
- out.push({
319
- labelKey: 'resourceDetail.masthead.yaml',
320
- value: _YAML,
321
- });
322
- }
339
+ // if ( this.canViewYaml ) {
340
+ // out.push({
341
+ // labelKey: 'resourceDetail.masthead.yaml',
342
+ // value: _YAML,
343
+ // });
344
+ // }
323
345
 
324
346
  if ( out.length < 2 ) {
325
347
  return null;
@@ -393,6 +415,37 @@ export default {
393
415
  return this.shouldHifenize ? ` - ${ displayName }` : displayName;
394
416
  },
395
417
 
418
+ demoDisplay() {
419
+ const product = this.$store.getters['productId'];
420
+
421
+ const resources = this.location?.params?.resource || ''
422
+
423
+ const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], resources);
424
+
425
+ if (productId === undefined) {
426
+ return '';
427
+ }
428
+ const parts = productId.split('::');
429
+ const newString = 'root';
430
+
431
+ if (!parts?.includes(newString)) {
432
+ parts.unshift(newString); // 将字符串添加到数组第一位
433
+ }
434
+
435
+ const partsEn = parts.map((item) => {
436
+ return this.$store.getters['i18n/t'](`typeLabel."${ item.toLowerCase() }"`);
437
+ });
438
+
439
+ return partsEn;
440
+ },
441
+ menuIcon() {
442
+ const product = this.$store.getters['productId'];
443
+
444
+ const resources = this.location?.params?.resource || ''
445
+
446
+ return this.$store.getters['type-map/groupsForVirTypes'](product, resources);
447
+ },
448
+
396
449
  location() {
397
450
  const { parent } = this;
398
451
 
@@ -439,10 +492,81 @@ export default {
439
492
 
440
493
  <template>
441
494
  <div class="masthead">
495
+ <div class="title">
496
+ <!-- 创建api密钥不需要面包屑 -->
497
+ <div
498
+ v-if="!(parentRouteOverride === 'account' && resource=== 'token')"
499
+ class="excram-list"
500
+ >
501
+ <span
502
+ v-for="(item,index) in demoDisplay"
503
+ :key="index"
504
+ >
505
+ <span>{{ item }}</span>
506
+ <span>/</span>
507
+ </span>
508
+ <span class="excram-last-name">
509
+ {{ (realMode === 'view'? '查看': realMode === 'edit' ? '编辑':'创建') + parent.displayName }}
510
+ </span>
511
+ </div>
442
512
  <header>
443
513
  <div class="title">
444
514
  <div class="primaryheader">
445
- <h1>
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;"
527
+ >
528
+ <i
529
+ v-else
530
+ :class="'icon-'+ menuIcon + ' detailIcon'"
531
+ />
532
+ </span>
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
+ />
549
+ <span
550
+ v-if="!isCreate && value.injectionEnabled"
551
+ class="masthead-istio"
552
+ >
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>
446
570
  <TabTitle
447
571
  v-if="isCreate"
448
572
  :showChild="false"
@@ -498,9 +622,9 @@ export default {
498
622
  >
499
623
  <i class="icon icon-external-link" />
500
624
  </a>
501
- </h1>
625
+ </h1> -->
502
626
  </div>
503
- <div
627
+ <!-- <div
504
628
  v-if="!isCreate"
505
629
  class="subheader"
506
630
  >
@@ -545,7 +669,8 @@ export default {
545
669
  {{ value.createdBy.displayName }}
546
670
  </span>
547
671
  </span>
548
- </div>
672
+ <span v-if="value.showPodRestarts">{{ t("resourceDetail.masthead.restartCount") }}:<span class="live-data"> {{ value.restartCount }}</span></span>
673
+ </div> -->
549
674
  </div>
550
675
  <slot name="right">
551
676
  <div class="actions-container align-start">
@@ -623,42 +748,30 @@ export default {
623
748
  />
624
749
 
625
750
  <slot />
751
+ </div>
626
752
  </div>
627
753
  </template>
628
754
 
629
755
  <style lang='scss' scoped>
630
756
  .masthead {
631
757
  padding-bottom: 10px;
632
- border-bottom: 1px solid var(--border);
758
+ /* border-bottom: 1px solid var(--border); */
633
759
  margin-bottom: 10px;
634
760
  }
635
761
 
636
762
  HEADER {
637
763
  margin: 0;
638
- grid-template-columns: minmax(0, 1fr) auto;
639
764
  }
640
765
 
641
766
  .primaryheader {
642
767
  display: flex;
643
768
  flex-direction: row;
644
769
  align-items: center;
770
+ font-size:14px;
771
+ height: 50px;
645
772
 
646
773
  h1 {
647
- margin: 0 0 0 -5px;
648
- display: flex;
649
- flex-direction: row;
650
- align-items: center;
651
- overflow: hidden;
652
-
653
- .masthead-resource-title {
654
- text-overflow: ellipsis;
655
- overflow: hidden;
656
- white-space: nowrap;
657
- }
658
-
659
- .masthead-resource-list-link {
660
- margin: 5px;
661
- }
774
+ margin: 0;
662
775
  }
663
776
  }
664
777
 
@@ -671,8 +784,7 @@ export default {
671
784
  }
672
785
 
673
786
  .live-data {
674
- color: var(--body-text);
675
- margin-left: 3px;
787
+ color: var(--body-text)
676
788
  }
677
789
  }
678
790
 
@@ -681,8 +793,12 @@ export default {
681
793
  }
682
794
 
683
795
  .masthead-state {
684
- margin-left: 8px;
685
796
  font-size: initial;
797
+ display: inline-block;
798
+ position: relative;
799
+ /* top: -2px; */
800
+ font-size: 12px;
801
+ margin-left: 5px;
686
802
  }
687
803
 
688
804
  .masthead-istio {
@@ -705,13 +821,40 @@ export default {
705
821
  }
706
822
  }
707
823
 
708
- div.actions-container > div.actions {
709
- display: flex;
710
- flex-direction: row;
711
- justify-content: flex-end;
712
- }
713
-
714
824
  .resource-external {
715
825
  font-size: 18px;
716
826
  }
827
+ .excram-list{
828
+ font-size: 14px;
829
+ margin-bottom: 20px;
830
+ }
831
+ .excram-last-name{
832
+ color: var(--link);
833
+ }
834
+ .valid{
835
+ color: #d7d7d7;
836
+ margin: 0px 10px;
837
+ }
838
+ .detailIcon-span{
839
+ width: 24px;
840
+ height: 24px;
841
+ display: inline-block;
842
+ position: relative;
843
+ background: var(--primary);
844
+ margin-right: 10px;
845
+ }
846
+ .detailIcon{
847
+ position: absolute;
848
+ color: #fff;
849
+ font-size: 38px;
850
+ left: 4px;
851
+ top: -2px;
852
+ }
853
+ .primary-title{
854
+ display: flex;
855
+ align-items: center;
856
+ }
857
+ .detailIcon-span-title{
858
+ font-weight: bold;
859
+ }
717
860
  </style>
@@ -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
  };
@@ -440,7 +464,7 @@ export default {
440
464
 
441
465
  <template>
442
466
  <Loading v-if="$fetchState.pending || notFound" />
443
- <div v-else>
467
+ <div style="padding: 20px;height: 100%;" v-else>
444
468
  <Masthead
445
469
  v-if="showMasthead"
446
470
  :resource="resourceType"
@@ -451,15 +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"
481
+
482
+ :isManuallyHide="false"
458
483
  >
459
- <DetailTop
484
+ <!-- <DetailTop
460
485
  v-if="isView && isDetail"
461
486
  :value="liveModel"
462
- />
487
+ /> -->
463
488
  </Masthead>
464
489
  <div
465
490
  v-if="hasErrors"
@@ -479,7 +504,7 @@ export default {
479
504
  </div>
480
505
 
481
506
  <ForceDirectedTreeChart
482
- v-if="isGraph"
507
+ v-if="isGraph && canViewChart"
483
508
  :data="chartData"
484
509
  :fdc-config="getGraphConfig"
485
510
  />
@@ -493,9 +518,8 @@ export default {
493
518
  :offer-preview="offerPreview"
494
519
  :done-route="doneRoute"
495
520
  :done-override="value ? value.doneOverride : null"
496
- :show-errors="false"
497
521
  @update:value="$emit('input', $event)"
498
- @error="onYamlError"
522
+ @error="e=>errors.push(e)"
499
523
  />
500
524
 
501
525
  <component
@@ -553,10 +577,4 @@ export default {
553
577
  flex-direction: column;
554
578
  flex-grow: 1;
555
579
  }
556
- .cru__errors {
557
- position: sticky;
558
- top: 0;
559
- z-index: 1;
560
- background-color: var(--header-bg);
561
- }
562
580
  </style>