@rancher/shell 3.0.5-rc.6 → 3.0.5-rc.8

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 (243) hide show
  1. package/assets/brand/classic/metadata.json +3 -0
  2. package/assets/styles/app.scss +1 -0
  3. package/assets/styles/base/_color.scss +16 -0
  4. package/assets/styles/base/_helpers.scss +10 -0
  5. package/assets/styles/base/_variables.scss +18 -12
  6. package/assets/styles/fonts/_icons.scss +1 -32
  7. package/assets/styles/global/_layout.scss +1 -1
  8. package/assets/styles/themes/_dark.scss +262 -258
  9. package/assets/styles/themes/_light.scss +538 -509
  10. package/assets/styles/themes/_modern.scss +914 -0
  11. package/assets/translations/en-us.yaml +110 -29
  12. package/chart/__tests__/S3.test.ts +2 -1
  13. package/cloud-credential/generic.vue +18 -10
  14. package/cloud-credential/harvester.vue +1 -9
  15. package/components/AdvancedSection.vue +8 -0
  16. package/components/ChartReadme.vue +17 -7
  17. package/components/CodeMirror.vue +1 -1
  18. package/components/Drawer/Chrome.vue +0 -1
  19. package/components/Drawer/ResourceDetailDrawer/__tests__/composables.test.ts +27 -28
  20. package/components/Drawer/ResourceDetailDrawer/composables.ts +4 -24
  21. package/components/Drawer/ResourceDetailDrawer/index.vue +18 -4
  22. package/components/InstallHelmCharts.vue +656 -0
  23. package/components/LazyImage.vue +60 -4
  24. package/components/Loading.vue +1 -1
  25. package/components/LocaleSelector.vue +7 -2
  26. package/components/Markdown.vue +4 -0
  27. package/components/PaginatedResourceTable.vue +46 -1
  28. package/components/PromptRestore.vue +22 -44
  29. package/components/Resource/Detail/Masthead/composable.ts +16 -0
  30. package/components/Resource/Detail/Masthead/index.vue +37 -0
  31. package/components/Resource/Detail/Metadata/IdentifyingInformation/composable.ts +10 -2
  32. package/components/Resource/Detail/Metadata/IdentifyingInformation/identifying-fields.ts +26 -7
  33. package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +8 -1
  34. package/components/Resource/Detail/Metadata/KeyValue.vue +12 -10
  35. package/components/Resource/Detail/Metadata/Rectangle.vue +3 -1
  36. package/components/Resource/Detail/Metadata/__tests__/composables.test.ts +10 -17
  37. package/components/Resource/Detail/Metadata/composables.ts +9 -7
  38. package/components/Resource/Detail/Metadata/index.vue +17 -2
  39. package/components/Resource/Detail/Page.vue +35 -21
  40. package/components/Resource/Detail/SpacedRow.vue +1 -1
  41. package/components/Resource/Detail/TitleBar/__tests__/composables.test.ts +8 -9
  42. package/components/Resource/Detail/TitleBar/composables.ts +5 -5
  43. package/components/Resource/Detail/TitleBar/index.vue +12 -3
  44. package/components/ResourceDetail/Masthead/legacy.vue +1 -1
  45. package/components/ResourceDetail/index.vue +569 -72
  46. package/components/ResourceList/index.vue +1 -0
  47. package/components/ResourceTable.vue +6 -1
  48. package/components/ResourceYaml.vue +1 -1
  49. package/components/RichTranslation.vue +106 -0
  50. package/components/SlideInPanelManager.vue +13 -10
  51. package/components/SortableTable/index.vue +5 -5
  52. package/components/SortableTable/selection.js +0 -1
  53. package/components/Tabbed/index.vue +35 -4
  54. package/components/__tests__/LazyImage.spec.ts +121 -0
  55. package/components/__tests__/PromptRestore.test.ts +1 -65
  56. package/components/__tests__/RichTranslation.test.ts +115 -0
  57. package/components/fleet/FleetStatus.vue +4 -0
  58. package/components/fleet/dashboard/ResourcePanel.vue +2 -1
  59. package/components/form/ClusterAppearance.vue +5 -0
  60. package/components/form/FileImageSelector.vue +1 -1
  61. package/components/form/Members/ClusterPermissionsEditor.vue +1 -1
  62. package/components/form/NameNsDescription.vue +1 -0
  63. package/components/form/Networking.vue +24 -19
  64. package/components/form/ProjectMemberEditor.vue +1 -1
  65. package/components/form/ResourceLabeledSelect.vue +22 -8
  66. package/components/form/ResourceTabs/index.vue +20 -0
  67. package/components/form/SecretSelector.vue +9 -0
  68. package/components/form/SelectOrCreateAuthSecret.vue +6 -3
  69. package/components/form/__tests__/Networking.test.ts +116 -0
  70. package/components/form/labeled-select-utils/labeled-select-pagination.ts +3 -38
  71. package/components/formatter/FleetApplicationSource.vue +25 -17
  72. package/components/formatter/PodImages.vue +1 -1
  73. package/components/formatter/__tests__/LiveDate.test.ts +10 -2
  74. package/components/google/AccountAccess.vue +44 -46
  75. package/components/nav/Favorite.vue +4 -0
  76. package/components/nav/Group.vue +4 -1
  77. package/components/nav/NotificationCenter/Notification.vue +1 -27
  78. package/components/nav/WindowManager/index.vue +3 -3
  79. package/composables/resources.ts +2 -2
  80. package/config/labels-annotations.js +3 -2
  81. package/config/pagination-table-headers.js +8 -1
  82. package/config/product/explorer.js +27 -2
  83. package/config/product/manager.js +0 -1
  84. package/config/query-params.js +10 -0
  85. package/config/router/routes.js +21 -1
  86. package/config/system-namespaces.js +1 -1
  87. package/config/table-headers.js +30 -1
  88. package/config/types.js +1 -1
  89. package/config/version.js +1 -1
  90. package/detail/__tests__/provisioning.cattle.io.cluster.test.ts +11 -0
  91. package/detail/__tests__/workload.test.ts +164 -0
  92. package/detail/configmap.vue +33 -75
  93. package/detail/projectsecret.vue +11 -0
  94. package/detail/provisioning.cattle.io.cluster.vue +351 -369
  95. package/detail/secret.vue +49 -308
  96. package/detail/workload/index.vue +38 -21
  97. package/dialog/InstallExtensionDialog.vue +8 -5
  98. package/dialog/RotateEncryptionKeyDialog.vue +10 -30
  99. package/edit/__tests__/fleet.cattle.io.helmop.test.ts +224 -0
  100. package/edit/auth/ldap/__tests__/config.test.ts +14 -0
  101. package/edit/auth/ldap/config.vue +24 -0
  102. package/edit/compliance.cattle.io.clusterscan.vue +1 -1
  103. package/edit/configmap.vue +4 -1
  104. package/edit/fleet.cattle.io.gitrepo.vue +5 -6
  105. package/edit/fleet.cattle.io.helmop.vue +78 -56
  106. package/edit/logging.banzaicloud.io.output/index.vue +1 -1
  107. package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +5 -6
  108. package/edit/networking.k8s.io.ingress/Certificate.vue +20 -22
  109. package/edit/networking.k8s.io.ingress/DefaultBackend.vue +8 -3
  110. package/edit/networking.k8s.io.ingress/Rule.vue +2 -5
  111. package/edit/networking.k8s.io.ingress/RulePath.vue +17 -11
  112. package/edit/networking.k8s.io.ingress/__tests__/Certificate.test.ts +165 -0
  113. package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +11 -10
  114. package/edit/networking.k8s.io.networkpolicy/PolicyRules.vue +1 -3
  115. package/edit/networking.k8s.io.networkpolicy/index.vue +17 -17
  116. package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +3 -2
  117. package/edit/provisioning.cattle.io.cluster/rke2.vue +123 -61
  118. package/edit/provisioning.cattle.io.cluster/tabs/AgentConfiguration.vue +9 -7
  119. package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +22 -13
  120. package/edit/provisioning.cattle.io.cluster/tabs/DirectoryConfig.vue +10 -12
  121. package/edit/provisioning.cattle.io.cluster/tabs/MachinePool.vue +39 -38
  122. package/edit/provisioning.cattle.io.cluster/tabs/etcd/S3Config.vue +41 -19
  123. package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +16 -3
  124. package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +32 -33
  125. package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryMirrors.vue +9 -10
  126. package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +1 -3
  127. package/edit/provisioning.cattle.io.cluster/tabs/upgrade/DrainOptions.vue +16 -9
  128. package/edit/secret/basic.vue +1 -0
  129. package/edit/secret/index.vue +126 -15
  130. package/edit/workload/index.vue +5 -14
  131. package/list/projectsecret.vue +345 -0
  132. package/list/provisioning.cattle.io.cluster.vue +1 -69
  133. package/list/secret.vue +109 -0
  134. package/machine-config/__tests__/vmwarevsphere.test.ts +5 -7
  135. package/machine-config/google.vue +9 -1
  136. package/machine-config/vmwarevsphere.vue +7 -17
  137. package/mixins/__tests__/brand.spec.ts +2 -2
  138. package/mixins/chart.js +0 -2
  139. package/mixins/create-edit-view/impl.js +10 -1
  140. package/mixins/resource-fetch-api-pagination.js +11 -12
  141. package/mixins/resource-fetch.js +3 -1
  142. package/models/__tests__/chart.test.ts +111 -80
  143. package/models/__tests__/fleet.cattle.io.helmop.test.ts +224 -0
  144. package/models/__tests__/node.test.ts +7 -63
  145. package/models/catalog.cattle.io.app.js +1 -1
  146. package/models/catalog.cattle.io.operation.js +1 -1
  147. package/models/chart.js +36 -20
  148. package/models/cloudcredential.js +2 -163
  149. package/models/cluster/node.js +7 -7
  150. package/models/cluster.x-k8s.io.machine.js +3 -3
  151. package/models/cluster.x-k8s.io.machinedeployment.js +11 -2
  152. package/models/compliance.cattle.io.clusterscan.js +2 -2
  153. package/models/configmap.js +4 -0
  154. package/models/constraints.gatekeeper.sh.constraint.js +1 -1
  155. package/models/fleet-application.js +0 -17
  156. package/models/fleet.cattle.io.cluster.js +2 -2
  157. package/models/fleet.cattle.io.gitrepo.js +15 -1
  158. package/models/fleet.cattle.io.helmop.js +26 -22
  159. package/models/management.cattle.io.setting.js +4 -0
  160. package/models/persistentvolumeclaim.js +1 -1
  161. package/models/pod.js +2 -2
  162. package/models/provisioning.cattle.io.cluster.js +39 -67
  163. package/models/rke.cattle.io.etcdsnapshot.js +1 -1
  164. package/models/secret.js +161 -2
  165. package/models/storage.k8s.io.storageclass.js +2 -2
  166. package/models/workload.js +3 -3
  167. package/package.json +11 -10
  168. package/pages/c/_cluster/apps/charts/AppChartCardFooter.vue +1 -0
  169. package/pages/c/_cluster/apps/charts/AppChartCardSubHeader.vue +4 -1
  170. package/pages/c/_cluster/apps/charts/__tests__/AppChartCardFooter.spec.js +41 -0
  171. package/pages/c/_cluster/apps/charts/chart.vue +422 -174
  172. package/pages/c/_cluster/apps/charts/index.vue +46 -35
  173. package/pages/c/_cluster/apps/charts/install.vue +1 -1
  174. package/pages/c/_cluster/explorer/projectsecret.vue +24 -0
  175. package/pages/c/_cluster/fleet/__tests__/index.test.ts +608 -314
  176. package/pages/c/_cluster/fleet/index.vue +103 -45
  177. package/pages/c/_cluster/manager/cloudCredential/index.vue +2 -59
  178. package/pages/c/_cluster/uiplugins/PluginInfoPanel.vue +10 -3
  179. package/pages/c/_cluster/uiplugins/index.vue +36 -25
  180. package/plugins/dashboard-store/__tests__/normalize.test.ts +223 -0
  181. package/plugins/dashboard-store/__tests__/resource-class.test.ts +191 -0
  182. package/plugins/dashboard-store/__tests__/utils/normalize-usecases.ts +1526 -0
  183. package/plugins/dashboard-store/actions.js +42 -22
  184. package/plugins/dashboard-store/normalize.js +29 -17
  185. package/plugins/dashboard-store/resource-class.js +83 -17
  186. package/plugins/steve/__tests__/getters.test.ts +1 -1
  187. package/plugins/steve/__tests__/subscribe.spec.ts +259 -1
  188. package/plugins/steve/getters.js +8 -2
  189. package/plugins/steve/resourceWatcher.js +10 -3
  190. package/plugins/steve/steve-pagination-utils.ts +14 -3
  191. package/plugins/steve/subscribe.js +192 -19
  192. package/plugins/steve/worker/web-worker.advanced.js +2 -0
  193. package/rancher-components/Card/Card.vue +0 -18
  194. package/rancher-components/Pill/RcStatusBadge/RcStatusBadge.test.ts +15 -0
  195. package/rancher-components/Pill/RcStatusBadge/RcStatusBadge.vue +65 -0
  196. package/rancher-components/Pill/RcStatusBadge/index.ts +2 -0
  197. package/rancher-components/Pill/RcStatusBadge/types.ts +5 -0
  198. package/rancher-components/Pill/RcStatusIndicator/RcStatusIndicator.test.ts +33 -0
  199. package/rancher-components/Pill/RcStatusIndicator/RcStatusIndicator.vue +75 -0
  200. package/rancher-components/Pill/RcStatusIndicator/index.ts +2 -0
  201. package/rancher-components/Pill/RcStatusIndicator/types.ts +7 -0
  202. package/rancher-components/Pill/types.ts +2 -0
  203. package/rancher-components/RcButton/RcButton.vue +1 -1
  204. package/rancher-components/RcDropdown/RcDropdown.test.ts +98 -0
  205. package/rancher-components/RcDropdown/RcDropdown.vue +5 -0
  206. package/rancher-components/RcDropdown/RcDropdownItem.vue +7 -1
  207. package/rancher-components/RcDropdown/RcDropdownItemCheckbox.vue +2 -1
  208. package/rancher-components/RcDropdown/RcDropdownItemSelect.vue +2 -1
  209. package/rancher-components/RcDropdown/useDropdownContext.ts +21 -0
  210. package/rancher-components/RcDropdown/useDropdownItem.ts +30 -1
  211. package/rancher-components/RcItemCard/RcItemCard.test.ts +20 -0
  212. package/rancher-components/RcItemCard/RcItemCard.vue +40 -6
  213. package/store/__tests__/catalog.test.ts +93 -1
  214. package/store/aws.js +19 -8
  215. package/store/catalog.js +8 -3
  216. package/types/kube/kube-api.ts +12 -0
  217. package/types/resources/settings.d.ts +1 -1
  218. package/types/shell/index.d.ts +643 -585
  219. package/types/store/pagination.types.ts +16 -6
  220. package/types/uiplugins.ts +73 -0
  221. package/utils/__tests__/back-off.test.ts +354 -0
  222. package/utils/__tests__/create-yaml.test.ts +235 -0
  223. package/utils/__tests__/kontainer.test.ts +19 -0
  224. package/utils/__tests__/uiplugins.test.ts +84 -0
  225. package/utils/back-off.ts +176 -0
  226. package/utils/create-yaml.js +103 -9
  227. package/utils/dynamic-importer.js +8 -0
  228. package/utils/kontainer.ts +3 -5
  229. package/utils/pagination-utils.ts +18 -0
  230. package/utils/style.ts +3 -0
  231. package/utils/uiplugins.ts +29 -2
  232. package/utils/validators/__tests__/setting.test.js +92 -0
  233. package/utils/validators/formRules/__tests__/index.test.ts +88 -7
  234. package/utils/validators/formRules/index.ts +83 -8
  235. package/utils/validators/setting.js +17 -0
  236. package/cloud-credential/__tests__/harvester.test.ts +0 -18
  237. package/components/ResourceDetail/__tests__/index.test.ts +0 -135
  238. package/components/ResourceDetail/legacy.vue +0 -562
  239. package/components/formatter/CloudCredExpired.vue +0 -69
  240. package/models/etcdbackup.js +0 -45
  241. package/pages/explorer/resource/detail/configmap.vue +0 -42
  242. package/pages/explorer/resource/detail/secret.vue +0 -50
  243. package/utils/aws.js +0 -0
@@ -1,5 +1,4 @@
1
1
  <script>
2
- import Loading from '@shell/components/Loading';
3
2
  import { Banner } from '@components/Banner';
4
3
  import ResourceTable, { defaultTableSortGenerationFn } from '@shell/components/ResourceTable';
5
4
  import ResourceTabs from '@shell/components/form/ResourceTabs';
@@ -9,7 +8,7 @@ import Tab from '@shell/components/Tabbed/Tab';
9
8
  import { allHash } from '@shell/utils/promise';
10
9
  import { CAPI, MANAGEMENT, NORMAN, SNAPSHOT } from '@shell/config/types';
11
10
  import {
12
- STATE, NAME as NAME_COL, AGE, AGE_NORMAN, INTERNAL_EXTERNAL_IP, STATE_NORMAN, ROLES, MACHINE_NODE_OS, MANAGEMENT_NODE_OS, NAME,
11
+ STATE, NAME as NAME_COL, AGE, INTERNAL_EXTERNAL_IP, STATE_NORMAN, ROLES, MACHINE_NODE_OS, MANAGEMENT_NODE_OS, NAME,
13
12
  } from '@shell/config/table-headers';
14
13
  import { STATES_ENUM } from '@shell/plugins/dashboard-store/resource-class';
15
14
  import CustomCommand from '@shell/edit/provisioning.cattle.io.cluster/CustomCommand';
@@ -31,6 +30,9 @@ import Socket, {
31
30
  import { get } from '@shell/utils/object';
32
31
  import CapiMachineDeployment from '@shell/models/cluster.x-k8s.io.machinedeployment';
33
32
  import { isAlternate } from '@shell/utils/platform';
33
+ import DetailPage from '@shell/components/Resource/Detail/Page.vue';
34
+ import Masthead from '@shell/components/Resource/Detail/Masthead/index.vue';
35
+ import { useDefaultMastheadProps } from '@shell/components/Resource/Detail/Masthead/composable';
34
36
 
35
37
  let lastId = 1;
36
38
  const ansiup = new AnsiUp();
@@ -60,7 +62,6 @@ export default {
60
62
  emits: ['input'],
61
63
 
62
64
  components: {
63
- Loading,
64
65
  Banner,
65
66
  ResourceTable,
66
67
  ResourceTabs,
@@ -70,6 +71,8 @@ export default {
70
71
  CustomCommand,
71
72
  AsyncButton,
72
73
  MachineSummaryGraph,
74
+ DetailPage,
75
+ Masthead,
73
76
  },
74
77
 
75
78
  props: {
@@ -81,6 +84,10 @@ export default {
81
84
  }
82
85
  },
83
86
 
87
+ setup(props) {
88
+ return { defaultMastheadProps: useDefaultMastheadProps(props.value) };
89
+ },
90
+
84
91
  async fetch() {
85
92
  await this.value.waitForProvisioner();
86
93
 
@@ -137,8 +144,6 @@ export default {
137
144
  }
138
145
 
139
146
  if ( this.value.isRke1 && this.$store.getters['isRancher'] ) {
140
- fetchOne.etcdBackups = this.$store.dispatch('rancher/findAll', { type: NORMAN.ETCD_BACKUP });
141
-
142
147
  fetchOne.normanNodePools = this.$store.dispatch('rancher/findAll', { type: NORMAN.NODE_POOL });
143
148
  }
144
149
 
@@ -149,7 +154,6 @@ export default {
149
154
  this.haveMachines = !!fetchOneRes.machines;
150
155
  this.haveDeployments = !!fetchOneRes.machineDeployments;
151
156
  this.clusterToken = fetchOneRes.clusterToken;
152
- this.etcdBackups = fetchOneRes.etcdBackups;
153
157
 
154
158
  if (fetchOneRes.normanClusters) {
155
159
  // Does the user have access to the local cluster? Need to in order to be able to show the 'Related Resources' tab
@@ -267,7 +271,6 @@ export default {
267
271
  machineSchema: this.$store.getters[`management/schemaFor`](CAPI.MACHINE),
268
272
 
269
273
  clusterToken: null,
270
- etcdBackups: null,
271
274
 
272
275
  logOpen: false,
273
276
  logSocket: null,
@@ -529,50 +532,10 @@ export default {
529
532
  return headers;
530
533
  },
531
534
 
532
- rke1Snapshots() {
533
- const mgmtId = this.value.mgmt?.id;
534
-
535
- if ( !mgmtId ) {
536
- return [];
537
- }
538
-
539
- return (this.etcdBackups || []).filter((x) => x.clusterId === mgmtId);
540
- },
541
-
542
535
  rke2Snapshots() {
543
536
  return this.value.etcdSnapshots;
544
537
  },
545
538
 
546
- rke1SnapshotHeaders() {
547
- return [
548
- STATE_NORMAN,
549
- {
550
- name: 'name',
551
- labelKey: 'tableHeaders.name',
552
- value: 'nameDisplay',
553
- sort: ['nameSort'],
554
- canBeVariable: true,
555
- },
556
- {
557
- name: 'version',
558
- labelKey: 'tableHeaders.version',
559
- value: 'status.kubernetesVersion',
560
- sort: 'status.kubernetesVersion',
561
- width: 150,
562
- },
563
- { ...AGE_NORMAN, canBeVariable: true },
564
- {
565
- name: 'manual',
566
- labelKey: 'tableHeaders.manual',
567
- value: 'manual',
568
- formatter: 'Checked',
569
- sort: ['manual'],
570
- align: 'center',
571
- width: 50,
572
- },
573
- ];
574
- },
575
-
576
539
  rke2SnapshotHeaders() {
577
540
  return [
578
541
  {
@@ -799,347 +762,366 @@ export default {
799
762
  },
800
763
  }
801
764
  };
765
+
802
766
  </script>
803
767
 
804
768
  <template>
805
- <Loading v-if="$fetchState.pending" />
806
- <div v-else>
807
- <Banner
808
- v-if="showWindowsWarning"
809
- color="error"
810
- :label="t('cluster.banner.os', { newOS: 'Windows', existingOS: 'Linux' })"
811
- />
812
- <Banner
813
- v-if="showEksNodeGroupWarning"
814
- color="error"
815
- :label="t('cluster.banner.desiredNodeGroupWarning')"
816
- />
817
-
818
- <Banner
819
- v-if="$fetchState.error"
820
- color="error"
821
- :label="$fetchState.error"
822
- />
823
-
824
- <Banner
825
- v-if="value.isRke1"
826
- color="warning"
827
- label-key="cluster.banner.rke1DeprecationMessage"
828
- />
829
- <ResourceTabs
830
- :value="value"
831
- :default-tab="defaultTab"
832
- :need-related="hasLocalAccess"
833
- :extension-params="extCustomParams"
834
- :needRelated="extDetailTabsRelated"
835
- :needEvents="extDetailTabsEvents"
836
- :needConditions="extDetailTabsConditions"
837
- @update:value="$emit('input', $event)"
838
- >
839
- <Tab
840
- v-if="showMachines"
841
- name="machine-pools"
842
- :label-key="value.isCustom ? 'cluster.tabs.machines' : 'cluster.tabs.machinePools'"
843
- :weight="4"
844
- >
845
- <ResourceTable
846
- :rows="machines"
847
- :schema="machineSchema"
848
- :headers="machineHeaders"
849
- default-sort-by="name"
850
- group-ref="pool"
851
- :group-default="machineGroupOption.value"
852
- :group-sort="['pool.nameDisplay']"
853
- :group-options="value.isCustom ? [noneGroupOption] : machineGroupOptions"
854
- :sort-generation-fn="machineSortGenerationFn"
769
+ <DetailPage :loading="$fetchState.pending">
770
+ <template #top-area>
771
+ <Masthead v-bind="defaultMastheadProps">
772
+ <template #additional-actions>
773
+ <button
774
+ data-testid="detail-explore-button"
775
+ type="button"
776
+ class="btn role-primary actions"
777
+ :disabled="!value.canExplore"
778
+ @click="value.explore()"
779
+ >
780
+ {{ t('cluster.explore') }}
781
+ </button>
782
+ </template>
783
+ </Masthead>
784
+ </template>
785
+ <template #bottom-area>
786
+ <div>
787
+ <Banner
788
+ v-if="showWindowsWarning"
789
+ color="error"
790
+ :label="t('cluster.banner.os', { newOS: 'Windows', existingOS: 'Linux' })"
791
+ />
792
+ <Banner
793
+ v-if="showEksNodeGroupWarning"
794
+ color="error"
795
+ :label="t('cluster.banner.desiredNodeGroupWarning')"
796
+ />
797
+
798
+ <Banner
799
+ v-if="$fetchState.error"
800
+ color="error"
801
+ :label="$fetchState.error"
802
+ />
803
+
804
+ <Banner
805
+ v-if="value.isRke1"
806
+ color="warning"
807
+ label-key="cluster.banner.rke1DeprecationMessage"
808
+ />
809
+ <ResourceTabs
810
+ :value="value"
811
+ :default-tab="defaultTab"
812
+ :need-related="hasLocalAccess"
813
+ :extension-params="extCustomParams"
814
+ :needRelated="extDetailTabsRelated"
815
+ :needEvents="extDetailTabsEvents"
816
+ :needConditions="extDetailTabsConditions"
817
+ @update:value="$emit('input', $event)"
855
818
  >
856
- <template #main-row:isFake="{fullColspan}">
857
- <tr class="main-row">
858
- <td
859
- :colspan="fullColspan"
860
- class="no-entries"
861
- >
862
- {{ t('node.list.noNodes') }}
863
- </td>
864
- </tr>
865
- </template>
866
-
867
- <template #group-by="{group}">
868
- <div
869
- class="pool-row"
870
- :class="{'has-description':group.ref && group.ref.template}"
819
+ <Tab
820
+ v-if="showMachines"
821
+ name="machine-pools"
822
+ :label-key="value.isCustom ? 'cluster.tabs.machines' : 'cluster.tabs.machinePools'"
823
+ :weight="4"
824
+ >
825
+ <ResourceTable
826
+ :rows="machines"
827
+ :schema="machineSchema"
828
+ :headers="machineHeaders"
829
+ default-sort-by="name"
830
+ group-ref="pool"
831
+ :group-default="machineGroupOption.value"
832
+ :group-sort="['pool.nameDisplay']"
833
+ :group-options="value.isCustom ? [noneGroupOption] : machineGroupOptions"
834
+ :sort-generation-fn="machineSortGenerationFn"
871
835
  >
872
- <div
873
- v-trim-whitespace
874
- class="group-tab"
875
- >
876
- <div
877
- v-if="group && group.ref"
878
- v-clean-html="group.ref.groupByPoolShortLabel"
879
- />
880
- <div
881
- v-else
882
- v-clean-html="t('resourceTable.groupLabel.notInANodePool')"
883
- />
836
+ <template #main-row:isFake="{fullColspan}">
837
+ <tr class="main-row">
838
+ <td
839
+ :colspan="fullColspan"
840
+ class="no-entries"
841
+ >
842
+ {{ t('node.list.noNodes') }}
843
+ </td>
844
+ </tr>
845
+ </template>
846
+
847
+ <template #group-by="{group}">
884
848
  <div
885
- v-if="group.ref && group.ref.providerSummary"
886
- class="description text-muted text-small"
849
+ class="pool-row"
850
+ :class="{'has-description':group.ref && group.ref.template}"
887
851
  >
888
- {{ group.ref.providerSummary }}
889
- </div>
890
- </div>
891
- <div
892
- v-if="group.ref"
893
- class="right group-header-buttons mr-20"
894
- >
895
- <MachineSummaryGraph
896
- v-if="poolSummaryInfo[group.ref]"
897
- :row="poolSummaryInfo[group.ref]"
898
- :horizontal="true"
899
- class="mr-20"
900
- />
901
- <template v-if="value.hasLink('update') && group.ref.showScalePool">
902
- <button
903
- v-clean-tooltip="t('node.list.scaleDown')"
904
- :disabled="!group.ref.canScaleDownPool()"
905
- type="button"
906
- class="btn btn-sm role-secondary"
907
- @click="toggleScaleDownModal($event, group.ref)"
852
+ <div
853
+ v-trim-whitespace
854
+ class="group-tab"
908
855
  >
909
- <i class="icon icon-sm icon-minus" />
910
- </button>
911
- <button
912
- v-clean-tooltip="t('node.list.scaleUp')"
913
- :disabled="!group.ref.canScaleUpPool()"
914
- type="button"
915
- class="btn btn-sm role-secondary ml-10"
916
- @click="group.ref.scalePool(1)"
856
+ <div
857
+ v-if="group && group.ref"
858
+ v-clean-html="group.ref.groupByPoolShortLabel"
859
+ />
860
+ <div
861
+ v-else
862
+ v-clean-html="t('resourceTable.groupLabel.notInANodePool')"
863
+ />
864
+ <div
865
+ v-if="group.ref && group.ref.providerSummary"
866
+ class="description text-muted text-small"
867
+ >
868
+ {{ group.ref.providerSummary }}
869
+ </div>
870
+ </div>
871
+ <div
872
+ v-if="group.ref"
873
+ class="right group-header-buttons mr-20"
917
874
  >
918
- <i class="icon icon-sm icon-plus" />
919
- </button>
920
- </template>
921
- </div>
922
- </div>
923
- </template>
924
- </ResourceTable>
925
- </Tab>
926
-
927
- <Tab
928
- v-else-if="showNodes"
929
- name="node-pools"
930
- :label-key="value.isCustom ? 'cluster.tabs.machines' : 'cluster.tabs.machinePools'"
931
- :weight="4"
932
- >
933
- <ResourceTable
934
- :schema="mgmtNodeSchema"
935
- :headers="mgmtNodeSchemaHeaders"
936
- :rows="nodes"
937
- group-ref="pool"
938
- :group-default="poolGroupOption.value"
939
- :group-sort="['pool.nameDisplay']"
940
- :group-options="value.isCustom ? [noneGroupOption] : poolGroupOptions"
941
- :sort-generation-fn="nodeSortGenerationFn"
942
- :hide-grouping-controls="true"
943
- >
944
- <template #main-row:isFake="{fullColspan}">
945
- <tr class="main-row">
946
- <td
947
- :colspan="fullColspan"
948
- class="no-entries"
949
- >
950
- {{ t('node.list.noNodes') }}
951
- </td>
952
- </tr>
953
- </template>
954
-
955
- <template #group-by="{group}">
956
- <div
957
- class="pool-row"
958
- :class="{'has-description':group.ref && group.ref.nodeTemplate}"
875
+ <MachineSummaryGraph
876
+ v-if="poolSummaryInfo[group.ref]"
877
+ :row="poolSummaryInfo[group.ref]"
878
+ :horizontal="true"
879
+ class="mr-20"
880
+ />
881
+ <template v-if="value.hasLink('update') && group.ref.showScalePool">
882
+ <button
883
+ v-clean-tooltip="t('node.list.scaleDown')"
884
+ :disabled="!group.ref.canScaleDownPool()"
885
+ type="button"
886
+ class="btn btn-sm role-secondary"
887
+ @click="toggleScaleDownModal($event, group.ref)"
888
+ >
889
+ <i class="icon icon-sm icon-minus" />
890
+ </button>
891
+ <button
892
+ v-clean-tooltip="t('node.list.scaleUp')"
893
+ :disabled="!group.ref.canScaleUpPool()"
894
+ type="button"
895
+ class="btn btn-sm role-secondary ml-10"
896
+ @click="group.ref.scalePool(1)"
897
+ >
898
+ <i class="icon icon-sm icon-plus" />
899
+ </button>
900
+ </template>
901
+ </div>
902
+ </div>
903
+ </template>
904
+ </ResourceTable>
905
+ </Tab>
906
+
907
+ <Tab
908
+ v-else-if="showNodes"
909
+ name="node-pools"
910
+ :label-key="value.isCustom ? 'cluster.tabs.machines' : 'cluster.tabs.machinePools'"
911
+ :weight="4"
912
+ >
913
+ <ResourceTable
914
+ :schema="mgmtNodeSchema"
915
+ :headers="mgmtNodeSchemaHeaders"
916
+ :rows="nodes"
917
+ group-ref="pool"
918
+ :group-default="poolGroupOption.value"
919
+ :group-sort="['pool.nameDisplay']"
920
+ :group-options="value.isCustom ? [noneGroupOption] : poolGroupOptions"
921
+ :sort-generation-fn="nodeSortGenerationFn"
922
+ :hide-grouping-controls="true"
959
923
  >
960
- <div
961
- v-trim-whitespace
962
- class="group-tab"
963
- >
964
- <div
965
- v-if="group.ref"
966
- v-clean-html="t('resourceTable.groupLabel.nodePool', { name: group.ref.spec.hostnamePrefix}, true)"
967
- />
968
- <div
969
- v-else
970
- v-clean-html="t('resourceTable.groupLabel.notInANodePool')"
971
- />
924
+ <template #main-row:isFake="{fullColspan}">
925
+ <tr class="main-row">
926
+ <td
927
+ :colspan="fullColspan"
928
+ class="no-entries"
929
+ >
930
+ {{ t('node.list.noNodes') }}
931
+ </td>
932
+ </tr>
933
+ </template>
934
+
935
+ <template #group-by="{group}">
972
936
  <div
973
- v-if="group.ref && group.ref.nodeTemplate"
974
- class="description text-muted text-small"
937
+ class="pool-row"
938
+ :class="{'has-description':group.ref && group.ref.nodeTemplate}"
975
939
  >
976
- {{ group.ref.providerDisplay }} &ndash; {{ group.ref.providerLocation }} / {{ group.ref.providerSize }} ({{ group.ref.providerName }})
977
- </div>
978
- </div>
979
- <div
980
- v-if="group.ref && !isRke1"
981
- class="right group-header-buttons"
982
- >
983
- <MachineSummaryGraph
984
- :row="poolSummaryInfo[group.ref]"
985
- :horizontal="true"
986
- class="mr-20"
987
- />
988
- <template v-if="group.ref.hasLink('update')">
989
- <button
990
- v-clean-tooltip="t('node.list.scaleDown')"
991
- :disabled="!group.ref.canScaleDownPool()"
992
- type="button"
993
- class="btn btn-sm role-secondary"
994
- @click="toggleScaleDownModal($event, group.ref)"
940
+ <div
941
+ v-trim-whitespace
942
+ class="group-tab"
995
943
  >
996
- <i class="icon icon-sm icon-minus" />
997
- </button>
998
- <button
999
- v-clean-tooltip="t('node.list.scaleUp')"
1000
- type="button"
1001
- class="btn btn-sm role-secondary ml-10"
1002
- @click="group.ref.scalePool(1)"
944
+ <div
945
+ v-if="group.ref"
946
+ v-clean-html="t('resourceTable.groupLabel.nodePool', { name: group.ref.spec.hostnamePrefix}, true)"
947
+ />
948
+ <div
949
+ v-else
950
+ v-clean-html="t('resourceTable.groupLabel.notInANodePool')"
951
+ />
952
+ <div
953
+ v-if="group.ref && group.ref.nodeTemplate"
954
+ class="description text-muted text-small"
955
+ >
956
+ {{ group.ref.providerDisplay }} &ndash; {{ group.ref.providerLocation }} / {{ group.ref.providerSize }} ({{ group.ref.providerName }})
957
+ </div>
958
+ </div>
959
+ <div
960
+ v-if="group.ref && !isRke1"
961
+ class="right group-header-buttons"
1003
962
  >
1004
- <i class="icon icon-sm icon-plus" />
1005
- </button>
963
+ <MachineSummaryGraph
964
+ :row="poolSummaryInfo[group.ref]"
965
+ :horizontal="true"
966
+ class="mr-20"
967
+ />
968
+ <template v-if="group.ref.hasLink('update')">
969
+ <button
970
+ v-clean-tooltip="t('node.list.scaleDown')"
971
+ :disabled="!group.ref.canScaleDownPool()"
972
+ type="button"
973
+ class="btn btn-sm role-secondary"
974
+ @click="toggleScaleDownModal($event, group.ref)"
975
+ >
976
+ <i class="icon icon-sm icon-minus" />
977
+ </button>
978
+ <button
979
+ v-clean-tooltip="t('node.list.scaleUp')"
980
+ type="button"
981
+ class="btn btn-sm role-secondary ml-10"
982
+ @click="group.ref.scalePool(1)"
983
+ >
984
+ <i class="icon icon-sm icon-plus" />
985
+ </button>
986
+ </template>
987
+
988
+ <button
989
+ type="button"
990
+ class="project-action btn btn-sm role-multi-action actions mr-5 ml-15"
991
+ :class="{invisible: !showPoolActionButton(group.ref)}"
992
+ @click="showPoolAction($event, group.ref)"
993
+ >
994
+ <i class="icon icon-actions" />
995
+ </button>
996
+ </div>
997
+ </div>
998
+ </template>
999
+ </ResourceTable>
1000
+ </Tab>
1001
+
1002
+ <Tab
1003
+ v-if="showLog"
1004
+ name="log"
1005
+ :label="t('cluster.tabs.log')"
1006
+ :weight="3"
1007
+ class="logs-container"
1008
+ >
1009
+ <table
1010
+ class="fixed"
1011
+ cellpadding="0"
1012
+ cellspacing="0"
1013
+ >
1014
+ <tbody class="logs-body">
1015
+ <template v-if="logs.length">
1016
+ <tr
1017
+ v-for="(line, i) in logs"
1018
+ :key="i"
1019
+ >
1020
+ <td
1021
+ v-clean-html="format(line.time)"
1022
+ class="time"
1023
+ />
1024
+ <td
1025
+ v-clean-html="line.msg"
1026
+ class="msg"
1027
+ />
1028
+ </tr>
1006
1029
  </template>
1007
-
1008
- <button
1009
- type="button"
1010
- class="project-action btn btn-sm role-multi-action actions mr-5 ml-15"
1011
- :class="{invisible: !showPoolActionButton(group.ref)}"
1012
- @click="showPoolAction($event, group.ref)"
1013
- >
1014
- <i class="icon icon-actions" />
1015
- </button>
1016
- </div>
1017
- </div>
1018
- </template>
1019
- </ResourceTable>
1020
- </Tab>
1021
-
1022
- <Tab
1023
- v-if="showLog"
1024
- name="log"
1025
- :label="t('cluster.tabs.log')"
1026
- :weight="3"
1027
- class="logs-container"
1028
- >
1029
- <table
1030
- class="fixed"
1031
- cellpadding="0"
1032
- cellspacing="0"
1033
- >
1034
- <tbody class="logs-body">
1035
- <template v-if="logs.length">
1036
- <tr
1037
- v-for="(line, i) in logs"
1038
- :key="i"
1039
- >
1040
- <td
1041
- v-clean-html="format(line.time)"
1042
- class="time"
1030
+ <tr
1031
+ v-else-if="!logOpen"
1032
+ v-t="'cluster.log.connecting'"
1033
+ colspan="2"
1034
+ class="msg text-muted"
1043
1035
  />
1044
- <td
1045
- v-clean-html="line.msg"
1046
- class="msg"
1036
+ <tr
1037
+ v-else
1038
+ v-t="'cluster.log.noData'"
1039
+ colspan="2"
1040
+ class="msg text-muted"
1047
1041
  />
1048
- </tr>
1049
- </template>
1050
- <tr
1051
- v-else-if="!logOpen"
1052
- v-t="'cluster.log.connecting'"
1053
- colspan="2"
1054
- class="msg text-muted"
1042
+ </tbody>
1043
+ </table>
1044
+ </Tab>
1045
+
1046
+ <Tab
1047
+ v-if="showRegistration"
1048
+ name="registration"
1049
+ :label="t('cluster.tabs.registration')"
1050
+ :weight="2"
1051
+ >
1052
+ <Banner
1053
+ v-if="!value.isCustom"
1054
+ color="warning"
1055
+ :label="t('cluster.import.warningBanner')"
1055
1056
  />
1056
- <tr
1057
- v-else
1058
- v-t="'cluster.log.noData'"
1059
- colspan="2"
1060
- class="msg text-muted"
1057
+ <CustomCommand
1058
+ v-if="value.isCustom"
1059
+ :cluster-token="clusterToken"
1060
+ :cluster="value"
1061
+ @copied-windows="hasWindowsMachine ? null : showWindowsWarning = true"
1061
1062
  />
1062
- </tbody>
1063
- </table>
1064
- </Tab>
1065
-
1066
- <Tab
1067
- v-if="showRegistration"
1068
- name="registration"
1069
- :label="t('cluster.tabs.registration')"
1070
- :weight="2"
1071
- >
1072
- <Banner
1073
- v-if="!value.isCustom"
1074
- color="warning"
1075
- :label="t('cluster.import.warningBanner')"
1076
- />
1077
- <CustomCommand
1078
- v-if="value.isCustom"
1079
- :cluster-token="clusterToken"
1080
- :cluster="value"
1081
- @copied-windows="hasWindowsMachine ? null : showWindowsWarning = true"
1082
- />
1083
- <template v-else>
1084
- <h4 v-clean-html="t('cluster.import.commandInstructions', null, true)" />
1085
- <CopyCode class="m-10 p-10">
1086
- {{ clusterToken.command }}
1087
- </CopyCode>
1088
-
1089
- <h4
1090
- v-clean-html="t('cluster.import.commandInstructionsInsecure', null, true)"
1091
- class="mt-10"
1092
- />
1093
- <CopyCode class="m-10 p-10">
1094
- {{ clusterToken.insecureCommand }}
1095
- </CopyCode>
1096
-
1097
- <h4
1098
- v-clean-html="t('cluster.import.clusterRoleBindingInstructions', null, true)"
1099
- class="mt-10"
1100
- />
1101
- <CopyCode class="m-10 p-10">
1102
- {{ t('cluster.import.clusterRoleBindingCommand', null, true) }}
1103
- </CopyCode>
1104
- </template>
1105
- </Tab>
1106
-
1107
- <Tab
1108
- v-if="showSnapshots"
1109
- name="snapshots"
1110
- label="Snapshots"
1111
- :weight="1"
1112
- >
1113
- <SortableTable
1114
- class="snapshots"
1115
- :data-testid="'cluster-snapshots-list'"
1116
- :headers="value.isRke1 ? rke1SnapshotHeaders : rke2SnapshotHeaders"
1117
- default-sort-by="age"
1118
- :table-actions="value.isRke1"
1119
- :rows="value.isRke1 ? rke1Snapshots : rke2Snapshots"
1120
- :search="false"
1121
- :groupable="true"
1122
- :group-by="snapshotsGroupBy"
1123
- >
1124
- <template #header-right>
1125
- <AsyncButton
1126
- mode="snapshot"
1127
- class="btn role-primary"
1128
- :disabled="!isClusterReady"
1129
- @click="takeSnapshot"
1130
- />
1131
- </template>
1132
- <template #group-by="{group}">
1133
- <div class="group-bar">
1134
- <div class="group-tab">
1135
- {{ t('cluster.snapshot.groupLabel') }}: {{ group.key }}
1136
- </div>
1137
- </div>
1138
- </template>
1139
- </SortableTable>
1140
- </Tab>
1141
- </ResourceTabs>
1142
- </div>
1063
+ <template v-else>
1064
+ <h4 v-clean-html="t('cluster.import.commandInstructions', null, true)" />
1065
+ <CopyCode class="m-10 p-10">
1066
+ {{ clusterToken.command }}
1067
+ </CopyCode>
1068
+
1069
+ <h4
1070
+ v-clean-html="t('cluster.import.commandInstructionsInsecure', null, true)"
1071
+ class="mt-10"
1072
+ />
1073
+ <CopyCode class="m-10 p-10">
1074
+ {{ clusterToken.insecureCommand }}
1075
+ </CopyCode>
1076
+
1077
+ <h4
1078
+ v-clean-html="t('cluster.import.clusterRoleBindingInstructions', null, true)"
1079
+ class="mt-10"
1080
+ />
1081
+ <CopyCode class="m-10 p-10">
1082
+ {{ t('cluster.import.clusterRoleBindingCommand', null, true) }}
1083
+ </CopyCode>
1084
+ </template>
1085
+ </Tab>
1086
+
1087
+ <Tab
1088
+ v-if="showSnapshots"
1089
+ name="snapshots"
1090
+ label="Snapshots"
1091
+ :weight="1"
1092
+ >
1093
+ <SortableTable
1094
+ class="snapshots"
1095
+ :data-testid="'cluster-snapshots-list'"
1096
+ :headers="rke2SnapshotHeaders"
1097
+ default-sort-by="age"
1098
+ :table-actions="value.isRke1"
1099
+ :rows="rke2Snapshots"
1100
+ :search="false"
1101
+ :groupable="true"
1102
+ :group-by="snapshotsGroupBy"
1103
+ >
1104
+ <template #header-right>
1105
+ <AsyncButton
1106
+ mode="snapshot"
1107
+ class="btn role-primary"
1108
+ :disabled="!isClusterReady"
1109
+ @click="takeSnapshot"
1110
+ />
1111
+ </template>
1112
+ <template #group-by="{group}">
1113
+ <div class="group-bar">
1114
+ <div class="group-tab">
1115
+ {{ t('cluster.snapshot.groupLabel') }}: {{ group.key }}
1116
+ </div>
1117
+ </div>
1118
+ </template>
1119
+ </SortableTable>
1120
+ </Tab>
1121
+ </ResourceTabs>
1122
+ </div>
1123
+ </template>
1124
+ </DetailPage>
1143
1125
  </template>
1144
1126
 
1145
1127
  <style lang='scss' scoped>