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

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