@rancher/shell 0.5.2 → 1.2.0

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 (338) hide show
  1. package/.DS_Store +0 -0
  2. package/assets/images/providers/aks-black.svg +28 -0
  3. package/assets/images/providers/aks.svg +31 -0
  4. package/assets/styles/global/_labeled-input.scss +1 -0
  5. package/assets/styles/global/_layout.scss +0 -99
  6. package/assets/translations/en-us.yaml +77 -71
  7. package/assets/translations/zh-hans.yaml +25 -23
  8. package/babel.config.js +1 -7
  9. package/chart/gatekeeper.vue +11 -2
  10. package/chart/istio.vue +10 -1
  11. package/chart/logging/index.vue +11 -2
  12. package/chart/monitoring/alerting/index.vue +21 -7
  13. package/chart/monitoring/grafana/index.vue +2 -57
  14. package/chart/monitoring/index.vue +26 -52
  15. package/chart/monitoring/prometheus/index.vue +43 -37
  16. package/chart/rancher-backup/index.vue +10 -3
  17. package/cloud-credential/azure.vue +17 -4
  18. package/components/AsyncButton.vue +0 -9
  19. package/components/Carousel.vue +0 -1
  20. package/components/ChartPsp.vue +76 -0
  21. package/components/CodeMirror.vue +21 -19
  22. package/components/CopyCode.vue +2 -6
  23. package/components/CopyToClipboard.vue +1 -2
  24. package/components/CopyToClipboardText.vue +9 -14
  25. package/components/CruResource.vue +0 -1
  26. package/components/EtcdInfoBanner.vue +5 -5
  27. package/components/ExplorerProjectsNamespaces.vue +1 -25
  28. package/components/IconOrSvg.vue +1 -1
  29. package/components/Markdown.vue +12 -16
  30. package/components/Questions/index.vue +1 -1
  31. package/components/ResourceDetail/Masthead.vue +9 -25
  32. package/components/ResourceList/Masthead.vue +18 -1
  33. package/components/ResourceTable.vue +2 -14
  34. package/components/ResourceYaml.vue +0 -5
  35. package/components/SideNav.vue +1 -1
  36. package/components/SortableTable/THead.vue +9 -7
  37. package/components/SortableTable/index.vue +3 -2
  38. package/components/StatusTable.vue +1 -5
  39. package/components/TabTitle.vue +84 -0
  40. package/components/Tabbed/index.vue +0 -12
  41. package/components/__tests__/ChartPsp.test.ts +75 -0
  42. package/components/__tests__/CopyCode.test.ts +4 -5
  43. package/components/fleet/FleetBundles.vue +11 -5
  44. package/components/fleet/FleetRepos.vue +27 -62
  45. package/components/fleet/FleetResources.vue +1 -6
  46. package/components/fleet/FleetStatus.vue +3 -3
  47. package/components/fleet/FleetSummary.vue +30 -35
  48. package/components/form/ArrayList.vue +8 -1
  49. package/components/form/ArrayListSelect.vue +9 -9
  50. package/components/form/KeyValue.vue +0 -1
  51. package/components/form/LabeledSelect.vue +0 -4
  52. package/components/form/Password.vue +1 -3
  53. package/components/form/Select.vue +1 -1
  54. package/components/form/SelectOrCreateAuthSecret.vue +4 -4
  55. package/components/form/__tests__/KeyValue.test.ts +1 -1
  56. package/components/formatter/Checked.vue +3 -11
  57. package/components/formatter/ClusterProvider.vue +18 -1
  58. package/components/formatter/FleetSummaryGraph.vue +11 -23
  59. package/components/formatter/LiveDate.vue +16 -0
  60. package/components/formatter/LiveDuration.vue +1 -1
  61. package/components/formatter/PercentageBar.vue +1 -1
  62. package/components/formatter/__tests__/ClusterProvider.test.ts +28 -0
  63. package/components/nav/Group.vue +2 -2
  64. package/components/nav/Header.vue +2 -1
  65. package/components/nav/TopLevelMenu.vue +3 -29
  66. package/components/nav/Type.vue +3 -1
  67. package/components/nav/WindowManager/ContainerLogs.vue +19 -120
  68. package/components/nav/WindowManager/ContainerShell.vue +1 -6
  69. package/components/nav/WindowManager/index.vue +10 -11
  70. package/components/nav/__tests__/TopLevelMenu.test.ts +0 -33
  71. package/components/nav/__tests__/Type.test.ts +1 -1
  72. package/components/nuxt/nuxt-child.js +78 -14
  73. package/components/nuxt/nuxt.js +1 -1
  74. package/components/user.retention/user-retention-header.vue +34 -0
  75. package/composables/useI18n.ts +26 -0
  76. package/composables/useStore.ts +16 -0
  77. package/config/harvester-manager-types.js +0 -2
  78. package/config/home-links.js +32 -2
  79. package/config/private-label.js +0 -22
  80. package/config/product/explorer.js +4 -4
  81. package/config/product/fleet.js +1 -6
  82. package/config/product/legacy.js +1 -84
  83. package/config/product/manager.js +15 -8
  84. package/config/query-params.js +0 -1
  85. package/config/router.js +368 -385
  86. package/config/settings.ts +9 -2
  87. package/config/store.js +1 -1
  88. package/config/system-namespaces.js +0 -3
  89. package/config/table-headers.js +27 -47
  90. package/config/types.js +5 -0
  91. package/config/uiplugins.js +1 -1
  92. package/core/plugin-helpers.js +5 -3
  93. package/core/plugin-routes.ts +114 -56
  94. package/core/plugin.ts +10 -16
  95. package/core/plugins-loader.js +9 -7
  96. package/core/plugins.js +3 -0
  97. package/core/types-provisioning.ts +0 -7
  98. package/creators/app/init +0 -19
  99. package/detail/fleet.cattle.io.cluster.vue +1 -11
  100. package/detail/node.vue +0 -42
  101. package/detail/pod.vue +1 -68
  102. package/detail/provisioning.cattle.io.cluster.vue +4 -6
  103. package/detail/workload/index.vue +1 -15
  104. package/dialog/ScaleMachineDownDialog.vue +17 -34
  105. package/edit/auth/googleoauth.vue +5 -1
  106. package/edit/catalog.cattle.io.clusterrepo.vue +7 -20
  107. package/edit/cloudcredential.vue +0 -2
  108. package/edit/fleet.cattle.io.gitrepo.vue +4 -3
  109. package/edit/management.cattle.io.project.vue +52 -1
  110. package/edit/management.cattle.io.setting.vue +2 -31
  111. package/edit/monitoring.coreos.com.prometheusrule/AlertingRule.vue +3 -12
  112. package/edit/monitoring.coreos.com.prometheusrule/GroupRules.vue +1 -2
  113. package/edit/networking.k8s.io.networkpolicy/__tests__/PolicyRuleTarget.spec.ts +1 -1
  114. package/edit/provisioning.cattle.io.cluster/{tabs/Basics.vue → Basics.vue} +126 -109
  115. package/edit/provisioning.cattle.io.cluster/{tabs/MachinePool.vue → MachinePool.vue} +7 -1
  116. package/edit/provisioning.cattle.io.cluster/{tabs/registries/RegistryConfigs.vue → RegistryConfigs.vue} +3 -1
  117. package/edit/provisioning.cattle.io.cluster/SelectCredential.vue +7 -15
  118. package/edit/provisioning.cattle.io.cluster/__tests__/Basics.tests.ts +237 -0
  119. package/edit/provisioning.cattle.io.cluster/__tests__/{CustomCommand.test.ts → CustomCommand.tests.ts} +0 -6
  120. package/edit/provisioning.cattle.io.cluster/__tests__/DrainOptions.test.ts +1 -1
  121. package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +1 -7
  122. package/edit/provisioning.cattle.io.cluster/import.vue +2 -2
  123. package/edit/provisioning.cattle.io.cluster/index.vue +37 -99
  124. package/edit/provisioning.cattle.io.cluster/rke2.vue +690 -181
  125. package/edit/service.vue +0 -12
  126. package/edit/workload/Upgrading.vue +2 -3
  127. package/edit/workload/index.vue +1 -2
  128. package/edit/workload/mixins/workload.js +1 -1
  129. package/initialize/App.js +71 -25
  130. package/initialize/client.js +162 -21
  131. package/initialize/index.js +124 -47
  132. package/initialize/layouts.ts +26 -0
  133. package/{components/templates → layouts}/blank.vue +1 -1
  134. package/{components/templates → layouts}/default.vue +98 -8
  135. package/{components/templates → layouts}/error.vue +19 -10
  136. package/{components/templates → layouts}/home.vue +1 -4
  137. package/{components/templates → layouts}/plain.vue +1 -4
  138. package/{components/templates → layouts}/standalone.vue +1 -1
  139. package/{components/templates → layouts}/unauthenticated.vue +1 -1
  140. package/list/management.cattle.io.feature.vue +7 -1
  141. package/list/management.cattle.io.user.vue +25 -1
  142. package/list/node.vue +0 -1
  143. package/machine-config/__tests__/vmwarevsphere.test.ts +161 -56
  144. package/machine-config/amazonec2.vue +1 -0
  145. package/machine-config/azure.vue +37 -21
  146. package/machine-config/vmwarevsphere.vue +47 -42
  147. package/middleware/authenticated.js +19 -14
  148. package/mixins/auth-config.js +7 -2
  149. package/mixins/brand.js +41 -29
  150. package/mixins/fetch.server.js +73 -0
  151. package/mixins/labeled-form-element.ts +1 -6
  152. package/models/__tests__/management.cattle.io.node.ts +0 -85
  153. package/models/__tests__/namespace.test.ts +9 -49
  154. package/models/cluster/node.js +4 -4
  155. package/models/cluster.x-k8s.io.machine.js +1 -1
  156. package/models/cluster.x-k8s.io.machinedeployment.js +0 -14
  157. package/models/fleet.cattle.io.cluster.js +0 -4
  158. package/models/fleet.cattle.io.gitrepo.js +13 -56
  159. package/models/management.cattle.io.cluster.js +3 -11
  160. package/models/management.cattle.io.kontainerdriver.js +0 -1
  161. package/models/management.cattle.io.node.js +14 -18
  162. package/models/management.cattle.io.nodepool.js +0 -17
  163. package/models/management.cattle.io.project.js +36 -0
  164. package/models/management.cattle.io.setting.js +7 -11
  165. package/models/management.cattle.io.user.js +65 -0
  166. package/models/namespace.js +1 -1
  167. package/models/pod.js +0 -20
  168. package/models/provisioning.cattle.io.cluster.js +8 -55
  169. package/models/secret.js +18 -117
  170. package/models/workload.js +0 -16
  171. package/models/workload.service.js +0 -18
  172. package/package.json +10 -12
  173. package/pages/about.vue +1 -0
  174. package/pages/account/create-key.vue +1 -0
  175. package/pages/account/index.vue +1 -0
  176. package/pages/auth/login.vue +1 -0
  177. package/pages/auth/logout.vue +2 -0
  178. package/pages/auth/setup.vue +4 -37
  179. package/pages/auth/verify.vue +8 -14
  180. package/pages/c/_cluster/apps/charts/__tests__/install.helper.test.ts +17 -2
  181. package/pages/c/_cluster/apps/charts/index.vue +58 -64
  182. package/pages/c/_cluster/apps/charts/install.helpers.js +13 -2
  183. package/pages/c/_cluster/apps/charts/install.vue +5 -5
  184. package/pages/c/_cluster/apps/index.vue +2 -0
  185. package/pages/c/_cluster/auth/index.vue +2 -0
  186. package/pages/c/_cluster/auth/user.retention/index.vue +384 -0
  187. package/pages/c/_cluster/ecm/index.vue +2 -0
  188. package/pages/c/_cluster/explorer/index.vue +53 -56
  189. package/pages/c/_cluster/explorer/tools/index.vue +3 -171
  190. package/pages/c/_cluster/fleet/index.vue +1 -1
  191. package/pages/c/_cluster/index.vue +2 -0
  192. package/pages/c/_cluster/manager/pages/_page.vue +5 -4
  193. package/pages/c/_cluster/monitoring/index.vue +1 -17
  194. package/pages/c/_cluster/settings/DefaultLinksEditor.vue +1 -0
  195. package/pages/c/_cluster/settings/banners.vue +2 -0
  196. package/pages/c/_cluster/settings/brand.vue +2 -0
  197. package/pages/c/_cluster/settings/index.vue +2 -0
  198. package/pages/c/_cluster/settings/links.vue +3 -2
  199. package/pages/c/_cluster/settings/performance.vue +1 -0
  200. package/pages/c/_cluster/uiplugins/AddExtensionRepos.vue +4 -4
  201. package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +1 -2
  202. package/pages/c/_cluster/uiplugins/CatalogList/index.vue +46 -10
  203. package/pages/c/_cluster/uiplugins/SetupUIPlugins.vue +5 -2
  204. package/pages/c/_cluster/uiplugins/__tests__/AddExtensionRepos.test.ts +96 -0
  205. package/pages/c/_cluster/uiplugins/__tests__/SetupUIPlugins.test.ts +128 -0
  206. package/pages/c/_cluster/uiplugins/index.vue +2 -0
  207. package/pages/c/index.vue +9 -0
  208. package/pages/diagnostic.vue +2 -1
  209. package/pages/fail-whale.vue +1 -0
  210. package/pages/prefs.vue +1 -0
  211. package/pages/rio/mesh.vue +508 -0
  212. package/pages/support/index.vue +8 -2
  213. package/pkg/auto-import.js +1 -1
  214. package/plugins/axios.js +36 -0
  215. package/plugins/back-button.js +5 -3
  216. package/plugins/clean-html-directive.js +19 -1
  217. package/plugins/clean-tooltip-directive.js +1 -1
  218. package/plugins/codemirror-loader.js +1 -1
  219. package/plugins/codemirror.js +0 -41
  220. package/plugins/dashboard-store/__tests__/actions.spec.ts +250 -0
  221. package/plugins/dashboard-store/__tests__/{mutations.test.ts → mutations.spec.ts} +1 -1
  222. package/plugins/dashboard-store/actions.js +21 -22
  223. package/plugins/dashboard-store/classify.js +18 -1
  224. package/plugins/dashboard-store/getters.js +5 -10
  225. package/plugins/dashboard-store/index.js +12 -0
  226. package/plugins/dashboard-store/mutations.js +4 -0
  227. package/plugins/dashboard-store/resource-class.js +18 -59
  228. package/plugins/i18n.js +1 -1
  229. package/plugins/steve/__tests__/getters.spec.ts +56 -24
  230. package/plugins/steve/__tests__/subscribe.spec.ts +106 -0
  231. package/plugins/steve/getters.js +30 -7
  232. package/plugins/steve/mutations.js +5 -2
  233. package/plugins/steve/norman-class.js +0 -19
  234. package/plugins/steve/steve-class.js +0 -22
  235. package/plugins/steve/subscribe.js +34 -13
  236. package/plugins/transitions.js +4 -0
  237. package/plugins/vue-clipboard2.js +4 -0
  238. package/rancher-components/Accordion/Accordion.vue +3 -2
  239. package/rancher-components/BadgeState/BadgeState.vue +3 -3
  240. package/rancher-components/Banner/Banner.test.ts +1 -5
  241. package/rancher-components/Banner/Banner.vue +2 -2
  242. package/rancher-components/Card/Card.vue +4 -4
  243. package/rancher-components/Form/Checkbox/Checkbox.vue +4 -3
  244. package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +1 -1
  245. package/rancher-components/Form/LabeledInput/LabeledInput.vue +55 -24
  246. package/rancher-components/Form/Radio/RadioButton.test.ts +1 -3
  247. package/rancher-components/Form/Radio/RadioButton.vue +13 -7
  248. package/rancher-components/Form/Radio/RadioGroup.vue +4 -3
  249. package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +7 -5
  250. package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +7 -4
  251. package/rancher-components/LabeledTooltip/LabeledTooltip.vue +9 -4
  252. package/rancher-components/StringList/StringList.vue +8 -8
  253. package/rancher-components/components/Accordion/Accordion.vue +3 -2
  254. package/rancher-components/components/BadgeState/BadgeState.test.ts +12 -0
  255. package/rancher-components/components/Form/LabeledInput/LabeledInput.test.ts +2 -19
  256. package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +14 -11
  257. package/rancher-components/components/Form/TextArea/TextAreaAutoGrow.vue +1 -1
  258. package/rancher-components/components/StringList/StringList.test.ts +0 -270
  259. package/rancher-components/components/StringList/StringList.vue +18 -57
  260. package/scripts/extension/bundle +7 -19
  261. package/scripts/extension/helm/scripts/package +3 -11
  262. package/scripts/extension/parse-tag-name +4 -4
  263. package/scripts/extension/publish +9 -20
  264. package/scripts/publish-shell.sh +1 -11
  265. package/scripts/test-plugins-build.sh +9 -85
  266. package/store/catalog.js +1 -1
  267. package/store/features.js +0 -1
  268. package/store/i18n.js +0 -11
  269. package/store/index.js +11 -8
  270. package/store/prefs.js +38 -33
  271. package/store/type-map.js +8 -13
  272. package/tsconfig.default.json +46 -0
  273. package/tsconfig.json +9 -35
  274. package/types/shell/index.d.ts +404 -463
  275. package/utils/__tests__/create-yaml.test.ts +10 -0
  276. package/utils/axios.js +19 -0
  277. package/utils/create-yaml.js +6 -6
  278. package/utils/custom-validators.js +2 -0
  279. package/utils/error.js +1 -16
  280. package/utils/monitoring.js +2 -37
  281. package/utils/nuxt.js +39 -18
  282. package/utils/object.js +0 -14
  283. package/utils/router.scrollBehavior.js +14 -12
  284. package/utils/socket.js +1 -0
  285. package/utils/time.js +1 -1
  286. package/utils/title.ts +3 -0
  287. package/utils/url.ts +1 -1
  288. package/utils/validators/formRules/__tests__/index.test.ts +4 -49
  289. package/utils/validators/formRules/index.ts +9 -12
  290. package/utils/validators/setting.js +10 -6
  291. package/vue.config.js +3 -24
  292. package/chart/monitoring/steps/uninstall-v1.vue +0 -135
  293. package/components/Certificates.vue +0 -164
  294. package/components/fleet/__tests__/FleetSummary.test.ts +0 -316
  295. package/components/formatter/FleetClusterSummaryGraph.vue +0 -27
  296. package/components/formatter/__tests__/Checked.test.ts +0 -19
  297. package/components/nav/WindowManager/__tests__/ContainerLogs.test.ts +0 -186
  298. package/composables/useCompactInput.ts +0 -20
  299. package/composables/useLabeledFormElement.ts +0 -138
  300. package/creators/app/files/.gitlab-ci.yml +0 -14
  301. package/edit/__tests__/service.test.ts +0 -89
  302. package/edit/provisioning.cattle.io.cluster/__tests__/Advanced.test.ts +0 -112
  303. package/edit/provisioning.cattle.io.cluster/__tests__/Basics.test.ts +0 -473
  304. package/edit/provisioning.cattle.io.cluster/__tests__/index.test.ts +0 -73
  305. package/edit/provisioning.cattle.io.cluster/__tests__/utils/cluster.ts +0 -386
  306. package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +0 -137
  307. package/edit/provisioning.cattle.io.cluster/tabs/Advanced.vue +0 -157
  308. package/edit/provisioning.cattle.io.cluster/tabs/etcd/index.vue +0 -135
  309. package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +0 -189
  310. package/edit/provisioning.cattle.io.cluster/tabs/registries/index.vue +0 -144
  311. package/edit/provisioning.cattle.io.cluster/tabs/upgrade/index.vue +0 -76
  312. package/mixins/v1-workload-metrics.js +0 -43
  313. package/models/__tests__/management.cattle.io.cluster.test.ts +0 -23
  314. package/models/__tests__/management.cattle.io.nodepool.ts +0 -83
  315. package/models/__tests__/provisioning.cattle.io.cluster.test.ts +0 -90
  316. package/models/__tests__/workload.test.ts +0 -91
  317. package/plugins/clean-html.js +0 -53
  318. package/plugins/dashboard-store/__tests__/actions.test.ts +0 -165
  319. package/plugins/dashboard-store/__tests__/resource-class.test.ts +0 -49
  320. package/plugins/dashboard-store/__tests__/utils/store-mocks.ts +0 -7
  321. package/plugins/index.js +0 -11
  322. package/plugins/steve/__tests__/steve-class.spec.ts +0 -59
  323. package/plugins/steve/__tests__/utils/steve-mocks.ts +0 -31
  324. package/scripts/.gitlab/workflows/build-extension-catalog.gitlab-ci.yml +0 -50
  325. package/server/har-file.js +0 -183
  326. package/tsconfig.paths.json +0 -18
  327. package/utils/azure.js +0 -24
  328. package/utils/clipboard.js +0 -5
  329. /package/components/form/__tests__/{NameNsDescription.test.ts → NameNsDescription.ts} +0 -0
  330. /package/edit/networking.k8s.io.networkpolicy/__tests__/utils/{selectors.test.ts → selectors.ts} +0 -0
  331. /package/edit/provisioning.cattle.io.cluster/{tabs/networking/ACE.vue → ACE.vue} +0 -0
  332. /package/edit/provisioning.cattle.io.cluster/{tabs/AgentConfiguration.vue → AgentConfiguration.vue} +0 -0
  333. /package/edit/provisioning.cattle.io.cluster/{tabs/upgrade/DrainOptions.vue → DrainOptions.vue} +0 -0
  334. /package/edit/provisioning.cattle.io.cluster/{tabs/MemberRoles.vue → MemberRoles.vue} +0 -0
  335. /package/edit/provisioning.cattle.io.cluster/{tabs/registries/RegistryMirrors.vue → RegistryMirrors.vue} +0 -0
  336. /package/edit/provisioning.cattle.io.cluster/{tabs/etcd/S3Config.vue → S3Config.vue} +0 -0
  337. /package/plugins/dashboard-store/__tests__/{getters.test.ts → getters.spec.ts} +0 -0
  338. /package/rancher-components/BadgeState/{BadgeState.spec.ts → BadgeState.test.ts} +0 -0
@@ -0,0 +1,76 @@
1
+ <script>
2
+ import { Checkbox } from '@components/Form/Checkbox';
3
+ import { mapGetters } from 'vuex';
4
+
5
+ export default {
6
+ components: { Checkbox },
7
+ props: {
8
+ value: {
9
+ type: Object,
10
+ default: () => {
11
+ return {};
12
+ }
13
+ },
14
+ mode: {
15
+ type: String,
16
+ default: 'edit'
17
+ },
18
+
19
+ /**
20
+ * Optional title section prior checkbox
21
+ */
22
+ title: {
23
+ type: String,
24
+ default: null
25
+ },
26
+
27
+ /**
28
+ * Cluster information
29
+ */
30
+ cluster: {
31
+ type: Object,
32
+ default: null
33
+ }
34
+ },
35
+ created() {
36
+ if (!this.value.global.cattle) {
37
+ this.$set(this.value.global, 'cattle', { psp: { enabled: false } });
38
+ }
39
+ if (!this.value.global.cattle.psp) {
40
+ this.$set(this.value.global.cattle, 'psp', { enabled: false });
41
+ }
42
+ },
43
+ computed: {
44
+ ...mapGetters({ t: 'i18n/t' }),
45
+
46
+ /**
47
+ * Display checkbox only if contains PSP or K8S version is less than 1.25
48
+ */
49
+ hasCheckbox() {
50
+ const clusterVersion = this.cluster?.kubernetesVersion || '';
51
+ const version = clusterVersion.match(/\d+/g);
52
+ const isRequiredVersion = version?.length ? +version[0] === 1 && +version[1] < 25 : false;
53
+
54
+ return isRequiredVersion;
55
+ }
56
+ }
57
+ };
58
+ </script>
59
+
60
+ <template>
61
+ <div
62
+ v-if="hasCheckbox"
63
+ class="mt-10 mb-10"
64
+ >
65
+ <h3 v-if="title">
66
+ {{ title }}
67
+ </h3>
68
+
69
+ <Checkbox
70
+ v-model="value.global.cattle.psp.enabled"
71
+ data-testid="psp-checkbox"
72
+ :mode="mode"
73
+ :label="t('catalog.chart.enablePSP')"
74
+ />
75
+ </div>
76
+ </template>
@@ -130,26 +130,28 @@ export default {
130
130
  </script>
131
131
 
132
132
  <template>
133
- <div
134
- class="code-mirror"
135
- :class="{['as-text-area']: asTextArea}"
136
- >
137
- <codemirror
138
- v-if="loaded"
139
- ref="codeMirrorRef"
140
- :value="value"
141
- :options="combinedOptions"
142
- :disabled="isDisabled"
143
- @ready="onReady"
144
- @input="onInput"
145
- @changes="onChanges"
146
- @focus="onFocus"
147
- @blur="onBlur"
148
- />
149
- <div v-else>
150
- Loading...
133
+ <client-only placeholder=" Loading...">
134
+ <div
135
+ class="code-mirror"
136
+ :class="{['as-text-area']: asTextArea}"
137
+ >
138
+ <codemirror
139
+ v-if="loaded"
140
+ ref="codeMirrorRef"
141
+ :value="value"
142
+ :options="combinedOptions"
143
+ :disabled="isDisabled"
144
+ @ready="onReady"
145
+ @input="onInput"
146
+ @changes="onChanges"
147
+ @focus="onFocus"
148
+ @blur="onBlur"
149
+ />
150
+ <div v-else>
151
+ Loading...
152
+ </div>
151
153
  </div>
152
- </div>
154
+ </client-only>
153
155
  </template>
154
156
 
155
157
  <style lang="scss">
@@ -1,7 +1,5 @@
1
1
  <script>
2
2
  import { isArray } from '@shell/utils/array';
3
- import { copyTextToClipboard } from '@shell/utils/clipboard';
4
- import { exceptionToErrorsArray } from '@shell/utils/error';
5
3
 
6
4
  function flatten(node) {
7
5
  if ( node.text ) {
@@ -29,16 +27,14 @@ export default {
29
27
 
30
28
  const content = flatten(this.$slots.default).trim();
31
29
 
32
- copyTextToClipboard(content).then(() => {
30
+ this.$copyText(content).then(() => {
33
31
  this.copied = true;
34
32
 
35
33
  setTimeout(() => {
36
34
  this.copied = false;
37
35
  }, 2000);
38
- this.$emit('copied');
39
- }).catch((e) => {
40
- this.$emit('error', exceptionToErrorsArray(e));
41
36
  });
37
+ this.$emit('copied');
42
38
  },
43
39
  },
44
40
 
@@ -1,6 +1,5 @@
1
1
  <script>
2
2
  import AsyncButton from '@shell/components/AsyncButton';
3
- import { copyTextToClipboard } from '@shell/utils/clipboard';
4
3
 
5
4
  export default {
6
5
  components: { AsyncButton },
@@ -19,7 +18,7 @@ export default {
19
18
 
20
19
  methods: {
21
20
  clicked(buttonCb) {
22
- copyTextToClipboard(this.text).then(() => {
21
+ this.$copyText(this.text).then(() => {
23
22
  buttonCb(true);
24
23
  }).catch(() => {
25
24
  buttonCb(false);
@@ -1,6 +1,4 @@
1
1
  <script>
2
- import { copyTextToClipboard } from '@shell/utils/clipboard';
3
- import { exceptionToErrorsArray } from '@shell/utils/error';
4
2
  export default {
5
3
  props: {
6
4
  text: {
@@ -22,20 +20,17 @@ export default {
22
20
  clicked(event) {
23
21
  if (!this.copied) {
24
22
  event.preventDefault();
25
- copyTextToClipboard(this.text).then(() => {
26
- this.copied = true;
23
+ this.$copyText(this.text);
24
+ this.copied = true;
27
25
 
28
- let t = event.target;
26
+ let t = event.target;
29
27
 
30
- if (t.tagName === 'I') {
31
- t = t.parentElement || t;
32
- }
33
- setTimeout(() => {
34
- this.copied = false;
35
- }, 500);
36
- }).catch((e) => {
37
- this.$emit('error', exceptionToErrorsArray(e));
38
- });
28
+ if (t.tagName === 'I') {
29
+ t = t.parentElement || t;
30
+ }
31
+ setTimeout(() => {
32
+ this.copied = false;
33
+ }, 500);
39
34
  }
40
35
  },
41
36
  }
@@ -435,7 +435,6 @@ export default {
435
435
  v-for="(err, i) in errors"
436
436
  :key="i"
437
437
  color="error"
438
- :data-testid="`error-banner${i}`"
439
438
  :label="stringify(mappedErrors[err].message)"
440
439
  :icon="mappedErrors[err].icon"
441
440
  :closable="true"
@@ -11,7 +11,7 @@ export default {
11
11
  const inStore = this.$store.getters['currentProduct'].inStore;
12
12
  let monitoringVersion = '';
13
13
 
14
- if (this.$store.getters[`${ inStore }/canList`](CATALOG.APP)) {
14
+ if (this.$store.getters[`${ inStore }/canList}`](CATALOG.APP)) {
15
15
  try {
16
16
  const res = await this.$store.dispatch(`${ inStore }/find`, { type: CATALOG.APP, id: 'cattle-monitoring-system/rancher-monitoring' });
17
17
 
@@ -23,13 +23,13 @@ export default {
23
23
 
24
24
  const leader = await hasLeader(monitoringVersion, this.$store.dispatch, this.currentCluster.id);
25
25
 
26
- this.hasLeader = leader ? 'Yes' : 'No';
26
+ this.hasLeader = leader ? this.t('generic.yes') : this.t('generic.no');
27
27
  this.leaderChanges = await leaderChanges(monitoringVersion, this.$store.dispatch, this.currentCluster.id);
28
28
  this.failedProposals = await failedProposals(monitoringVersion, this.$store.dispatch, this.currentCluster.id);
29
29
  },
30
30
  data() {
31
31
  return {
32
- hasLeader: 'No',
32
+ hasLeader: this.t('generic.no'),
33
33
  leaderChanges: 0,
34
34
  failedProposals: 0
35
35
  };
@@ -46,10 +46,10 @@ export default {
46
46
  color="info"
47
47
  >
48
48
  <div class="datum">
49
- <label>{{ t('etcdInfoBanner.hasLeader') }}</label> {{ hasLeader }},
49
+ <label>{{ t('etcdInfoBanner.hasLeader') }}</label> {{ hasLeader }}
50
50
  </div>
51
51
  <div class="datum">
52
- <label>{{ t('etcdInfoBanner.leaderChanges') }}</label> {{ leaderChanges }},
52
+ <label>{{ t('etcdInfoBanner.leaderChanges') }}</label> {{ leaderChanges }}
53
53
  </div>
54
54
  <div class="datum">
55
55
  <label>{{ t('etcdInfoBanner.failedProposals') }}</label> {{ failedProposals }}
@@ -391,7 +391,7 @@ export default {
391
391
  />
392
392
  <ResourceTable
393
393
  ref="table"
394
- class="table project-namespaces-table"
394
+ class="table"
395
395
  v-bind="$attrs"
396
396
  :schema="schema"
397
397
  :headers="headers"
@@ -505,10 +505,6 @@ export default {
505
505
  <style lang="scss" scoped>
506
506
  .project-namespaces {
507
507
  & ::v-deep {
508
- .project-namespaces-table table {
509
- table-layout: fixed;
510
- }
511
-
512
508
  .project-name {
513
509
  line-height: 30px;
514
510
  }
@@ -518,26 +514,6 @@ export default {
518
514
  flex-direction: row;
519
515
  justify-content: space-between;
520
516
 
521
- .group-tab {
522
- max-width: calc(100% - 230px);
523
- }
524
-
525
- .project-name {
526
- display: flex;
527
- flex-direction: row;
528
- align-items: center;
529
-
530
- span:first-child {
531
- padding-right: 8px;
532
- }
533
-
534
- span:last-child {
535
- text-overflow: ellipsis;
536
- overflow: hidden;
537
- white-space: nowrap;
538
- }
539
- }
540
-
541
517
  &.has-description {
542
518
  .right {
543
519
  margin-top: 5px;
@@ -76,7 +76,7 @@ export default {
76
76
  for (let x = 0; x < Object.keys(stylesheet.cssRules).length; x++) {
77
77
  const cssRules = stylesheet.cssRules[x];
78
78
 
79
- if (cssRules.selectorText && ((currTheme === 'light' && (cssRules.selectorText.includes('body') || cssRules.selectorText.includes('BODY')) &&
79
+ if (cssRules.selectorText && ((currTheme === 'light' && cssRules.selectorText.includes('body') &&
80
80
  cssRules.selectorText.includes('.theme-light') && cssRules.style.cssText.includes('--link:')) ||
81
81
  (currTheme === 'dark' && cssRules.selectorText.includes('.theme-dark')))) {
82
82
  // grab the colors to be used on the icon from the css rules
@@ -13,8 +13,9 @@ export default {
13
13
 
14
14
  data() {
15
15
  return {
16
- loaded: false,
17
- marked: null,
16
+ loaded: false,
17
+ marked: null,
18
+ dompurify: null,
18
19
  };
19
20
  },
20
21
 
@@ -25,10 +26,15 @@ export default {
25
26
  breaks: true
26
27
  });
27
28
  },
29
+
30
+ sanitized() {
31
+ return this.dompurify.sanitize(this.html);
32
+ },
28
33
  },
29
34
 
30
35
  async mounted() {
31
36
  const marked = (await import(/* webpackChunkName: "markdown" */ 'marked'));
37
+ const dompurify = (await import(/* webpackChunkName: "markdown" */ 'dompurify')).default;
32
38
 
33
39
  const renderer = new marked.Renderer();
34
40
  const linkRenderer = renderer.link;
@@ -57,8 +63,11 @@ export default {
57
63
  return rendered;
58
64
  };
59
65
 
66
+ dompurify.setConfig({ ADD_ATTR: ['target'] });
67
+
60
68
  this.marked = marked;
61
69
  this.markedRenderer = renderer;
70
+ this.dompurify = dompurify;
62
71
  this.loaded = true;
63
72
  this.$emit('loaded', true);
64
73
  }
@@ -68,7 +77,7 @@ export default {
68
77
  <template>
69
78
  <div
70
79
  v-if="loaded"
71
- v-clean-html="html"
80
+ v-clean-html="sanitized"
72
81
  class="markdown"
73
82
  />
74
83
  <Loading v-else />
@@ -87,20 +96,8 @@ export default {
87
96
  }
88
97
 
89
98
  .markdown {
90
- blockquote {
91
- color: rgb(101, 109, 118);
92
- border-left: 0.25em solid rgb(208, 215, 222);
93
- padding: 0 1em;
94
- margin-bottom: 16px;
95
- }
96
-
97
- table {
98
- border-collapse: collapse;
99
- }
100
-
101
99
  TH {
102
100
  text-align: left;
103
- border: 1px solid #e3e7eb;
104
101
  }
105
102
 
106
103
  table tr th {
@@ -121,7 +118,6 @@ export default {
121
118
  text-align: left;
122
119
  margin: 0;
123
120
  padding: 6px 13px;
124
- border: 1px solid #e3e7eb;
125
121
  }
126
122
 
127
123
  table tr th :first-child, table tr td :first-child {
@@ -258,7 +258,7 @@ export default {
258
258
  }
259
259
 
260
260
  if ( this.tabbed === 'multiple' ) {
261
- return !!this.groups.length;
261
+ return this.groups.length > 1;
262
262
  }
263
263
 
264
264
  return true;
@@ -177,16 +177,13 @@ export default {
177
177
 
178
178
  project() {
179
179
  if (this.isNamespace) {
180
- const cluster = this.$store.getters['currentCluster'];
180
+ const id = (this.value?.metadata?.labels || {})[PROJECT];
181
+ const clusterId = this.$store.getters['currentCluster'].id;
181
182
 
182
- if (cluster) {
183
- const id = (this.value?.metadata?.labels || {})[PROJECT];
184
-
185
- return this.$store.getters['management/byId'](MANAGEMENT.PROJECT, `${ cluster.id }/${ id }`);
186
- }
183
+ return this.$store.getters['management/byId'](MANAGEMENT.PROJECT, `${ clusterId }/${ id }`);
184
+ } else {
185
+ return null;
187
186
  }
188
-
189
- return null;
190
187
  },
191
188
 
192
189
  banner() {
@@ -373,7 +370,7 @@ export default {
373
370
  },
374
371
 
375
372
  hideNamespaceLocation() {
376
- return this.$store.getters['currentProduct'].hideNamespaceLocation || this.value.namespaceLocation === null;
373
+ return this.$store.getters['currentProduct'].hideNamespaceLocation;
377
374
  },
378
375
  },
379
376
 
@@ -422,7 +419,6 @@ export default {
422
419
  <span v-if="value.detailPageHeaderActionOverride && value.detailPageHeaderActionOverride(realMode)">{{ value.detailPageHeaderActionOverride(realMode) }}</span>
423
420
  <t
424
421
  v-else
425
- class="mastehead-resource-title"
426
422
  :k="'resourceDetail.header.' + realMode"
427
423
  :subtype="resourceSubtype"
428
424
  :name="displayName"
@@ -545,10 +541,6 @@ export default {
545
541
 
546
542
  HEADER {
547
543
  margin: 0;
548
-
549
- .title {
550
- overflow: hidden;
551
- }
552
544
  }
553
545
 
554
546
  .primaryheader {
@@ -558,17 +550,6 @@ export default {
558
550
 
559
551
  h1 {
560
552
  margin: 0;
561
- overflow: hidden;
562
- display: flex;
563
- flex-direction: row;
564
- align-items: center;
565
-
566
- .mastehead-resource-title {
567
- padding: 0 8px;
568
- text-overflow: ellipsis;
569
- overflow: hidden;
570
- white-space: nowrap;
571
- }
572
553
  }
573
554
  }
574
555
 
@@ -591,6 +572,9 @@ export default {
591
572
 
592
573
  .masthead-state {
593
574
  font-size: initial;
575
+ display: inline-block;
576
+ position: relative;
577
+ top: -2px;
594
578
  }
595
579
 
596
580
  .masthead-istio {
@@ -163,7 +163,7 @@ export default {
163
163
  </script>
164
164
 
165
165
  <template>
166
- <header>
166
+ <header class="with-subheader">
167
167
  <slot name="typeDescription">
168
168
  <TypeDescription :resource="resource" />
169
169
  </slot>
@@ -180,6 +180,11 @@ export default {
180
180
  :indeterminate="loadIndeterminate"
181
181
  />
182
182
  </div>
183
+ <div class="sub-header">
184
+ <slot name="subHeader">
185
+ <!--Slot content-->
186
+ </slot>
187
+ </div>
183
188
  <div class="actions-container">
184
189
  <slot name="actions">
185
190
  <div class="actions">
@@ -221,4 +226,16 @@ export default {
221
226
  header {
222
227
  margin-bottom: 20px;
223
228
  }
229
+
230
+ header.with-subheader {
231
+ grid-template-areas:
232
+ 'type-banner type-banner'
233
+ 'title actions'
234
+ 'sub-header sub-header'
235
+ 'state-banner state-banner';
236
+ }
237
+
238
+ .sub-header {
239
+ grid-area: sub-header;
240
+ }
224
241
  </style>
@@ -97,14 +97,6 @@ export default {
97
97
  default: 'sortableTable.paging.resource',
98
98
  },
99
99
 
100
- /**
101
- * Additional params to pass to the pagingLabel translation
102
- */
103
- pagingParams: {
104
- type: Object,
105
- default: null,
106
- },
107
-
108
100
  rowActions: {
109
101
  type: Boolean,
110
102
  default: true,
@@ -400,11 +392,7 @@ export default {
400
392
  return standard.concat(this.listGroups);
401
393
  },
402
394
 
403
- parsedPagingParams() {
404
- if (this.pagingParams) {
405
- return this.pagingParams;
406
- }
407
-
395
+ pagingParams() {
408
396
  if ( !this.schema ) {
409
397
  return {
410
398
  singularLabel: '',
@@ -494,7 +482,7 @@ export default {
494
482
  :group-options="groupOptions"
495
483
  :search="search"
496
484
  :paging="true"
497
- :paging-params="parsedPagingParams"
485
+ :paging-params="pagingParams"
498
486
  :paging-label="pagingLabel"
499
487
  :row-actions="rowActions"
500
488
  :table-actions="_showBulkActions"
@@ -190,11 +190,6 @@ export default {
190
190
 
191
191
  cm.foldLinesMatching(/managedFields/);
192
192
 
193
- // Allow the model to supply an array of json paths to fold other sections in the YAML for the given resource type
194
- if (this.value?.yamlFolding) {
195
- this.value.yamlFolding.forEach((path) => cm.foldYaml(path));
196
- }
197
-
198
193
  // regardless of edit or create we should probably fold all the comments so they dont get out of hand.
199
194
  const saved = cm.getMode().fold;
200
195
 
@@ -583,7 +583,7 @@ export default {
583
583
  }
584
584
  }
585
585
 
586
- &.router-link-active:not(:hover) {
586
+ &.nuxt-link-active:not(:hover) {
587
587
  A {
588
588
  background-color: var(--nav-active);
589
589
  }
@@ -162,13 +162,15 @@ export default {
162
162
  const menu = document.querySelector('.table-options-container');
163
163
  const elem = document.querySelector('.table-options-btn');
164
164
 
165
- this.tableColsMenuPosition = fitOnScreen(menu, ev || elem, {
166
- overlapX: true,
167
- fudgeX: 326,
168
- fudgeY: -22,
169
- positionX: CENTER,
170
- positionY: AUTO,
171
- });
165
+ if (!this.tableColsMenuPosition) {
166
+ this.tableColsMenuPosition = fitOnScreen(menu, ev || elem, {
167
+ overlapX: true,
168
+ fudgeX: 26,
169
+ fudgeY: -22,
170
+ positionX: CENTER,
171
+ positionY: AUTO,
172
+ });
173
+ }
172
174
 
173
175
  // toggle visibility
174
176
  this.tableColsOptionsVisibility = !this.tableColsOptionsVisibility;
@@ -906,7 +906,7 @@ export default {
906
906
  <template>
907
907
  <div
908
908
  ref="container"
909
- data-testid="cluster-list-container"
909
+ :data-testid="componentTestid + '-list-container'"
910
910
  >
911
911
  <div
912
912
  :class="{'titled': $slots.title && $slots.title.length}"
@@ -1026,8 +1026,9 @@ export default {
1026
1026
  <slot name="header-right" />
1027
1027
  <AsyncButton
1028
1028
  v-if="isTooManyItemsToAutoUpdate"
1029
+ v-clean-tooltip="t('performance.manualRefresh.buttonTooltip')"
1029
1030
  class="manual-refresh"
1030
- mode="manual-refresh"
1031
+ mode="refresh"
1031
1032
  :current-phase="currentPhase"
1032
1033
  @click="debouncedRefreshTableData"
1033
1034
  />
@@ -3,8 +3,6 @@ import {
3
3
  LAST_UPDATED, TYPE, REASON, MESSAGE, STATUS
4
4
  } from '@shell/config/table-headers';
5
5
  import SortableTable from '@shell/components/SortableTable';
6
- import { copyTextToClipboard } from '@shell/utils/clipboard';
7
- import { exceptionToErrorsArray } from '@shell/utils/error';
8
6
  export default {
9
7
  components: { SortableTable },
10
8
  props: {
@@ -33,14 +31,12 @@ export default {
33
31
  $event.stopPropagation();
34
32
  $event.preventDefault();
35
33
 
36
- copyTextToClipboard(this.$slots.default[0].text).then(() => {
34
+ this.$copyText(this.$slots.default[0].text).then(() => {
37
35
  this.copied = true;
38
36
 
39
37
  setTimeout(() => {
40
38
  this.copied = false;
41
39
  }, 2000);
42
- }).catch((e) => {
43
- this.$emit('error', exceptionToErrorsArray(e));
44
40
  });
45
41
  },
46
42
  }