@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
@@ -7,9 +7,6 @@ echo "Checking plugin build"
7
7
  SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
8
8
  BASE_DIR="$( cd $SCRIPT_DIR && cd ../.. & pwd)"
9
9
  SHELL_DIR=$BASE_DIR/shell/
10
- SHELL_VERSION="99.99.99"
11
- DEFAULT_YARN_REGISTRY="https://registry.npmjs.org"
12
- VERDACCIO_YARN_REGISTRY="http://localhost:4873"
13
10
 
14
11
  echo ${SCRIPT_DIR}
15
12
 
@@ -69,24 +66,21 @@ else
69
66
  rm -rf ~/.config/verdaccio/storage/@rancher/*
70
67
  fi
71
68
 
72
- export YARN_REGISTRY=$VERDACCIO_YARN_REGISTRY
69
+ export YARN_REGISTRY=http://localhost:4873
73
70
  export NUXT_TELEMETRY_DISABLED=1
74
71
 
75
72
  # Remove test package from previous run, if present
76
- if [ $TEST_PERSIST_BUILD != "true" ]; then
77
- echo "Removing folder ${BASE_DIR}/pkg/test-pkg"
78
- rm -rf ${BASE_DIR}/pkg/test-pkg
79
- fi
73
+ rm -rf ${BASE_DIR}/pkg/test-pkg
80
74
 
81
75
  # We need to patch the version number of the shell, otherwise if we are running
82
76
  # with the currently published version, things will fail as those versions
83
77
  # are already published and Verdaccio will check, since it is a read-through cache
84
- sed -i.bak -e "s/\"version\": \"[0-9]*.[0-9]*.[0-9]*\(-alpha\.[0-9]*\|-release[0-9]*.[0-9]*.[0-9]*\|-rc\.[0-9]*\)\{0,1\}\",/\"version\": \"${SHELL_VERSION}\",/g" ${SHELL_DIR}/package.json
78
+ sed -i.bak -e "s/\"version\": \"[0-9]*.[0-9]*.[0-9]*\",/\"version\": \"7.7.7\",/g" ${SHELL_DIR}/package.json
85
79
  rm ${SHELL_DIR}/package.json.bak
86
80
 
87
81
  # Same as above for Rancher Components
88
82
  # We might have bumped the version number but its not published yet, so this will fail
89
- sed -i.bak -e "s/\"version\": \"[0-9]*.[0-9]*.[0-9]*\(-alpha\.[0-9]*\|-release[0-9]*.[0-9]*.[0-9]*\|-rc\.[0-9]*\)\{0,1\}\",/\"version\": \"${SHELL_VERSION}\",/g" ${BASE_DIR}/pkg/rancher-components/package.json
83
+ sed -i.bak -e "s/\"version\": \"[0-9]*.[0-9]*.[0-9]*\",/\"version\": \"7.7.7\",/g" ${BASE_DIR}/pkg/rancher-components/package.json
90
84
 
91
85
  # Publish shell
92
86
  echo "Publishing shell packages to local registry"
@@ -114,7 +108,6 @@ if [ "${SKIP_STANDALONE}" == "false" ]; then
114
108
  yarn install
115
109
 
116
110
  echo "Building skeleton app"
117
-
118
111
  FORCE_COLOR=true yarn build | cat
119
112
 
120
113
  # Package creator
@@ -134,91 +127,22 @@ if [ "${SKIP_STANDALONE}" == "false" ]; then
134
127
  echo "Cleaning temporary dir"
135
128
  popd > /dev/null
136
129
 
137
- if [ $TEST_PERSIST_BUILD != "true" ]; then
138
- echo "Removing folder ${DIR}"
139
- rm -rf ${DIR}
140
- fi
130
+ rm -rf ${DIR}
141
131
  fi
142
132
 
143
133
  pushd $BASE_DIR
134
+ pwd
135
+ ls
144
136
 
145
137
  # Now try a plugin within the dashboard codebase
146
138
  echo "Validating in-tree package"
147
139
 
148
140
  yarn install
149
141
 
150
- if [ $TEST_PERSIST_BUILD != "true" ]; then
151
- echo "Removing folder ./pkg/test-pkg"
152
- rm -rf ./pkg/test-pkg
153
- fi
154
-
142
+ rm -rf ./pkg/test-pkg
155
143
  yarn create @rancher/pkg test-pkg -t
156
144
  cp ${SHELL_DIR}/list/catalog.cattle.io.clusterrepo.vue ./pkg/test-pkg/list
157
145
  FORCE_COLOR=true yarn build-pkg test-pkg | cat
158
- if [ $TEST_PERSIST_BUILD != "true" ]; then
159
- echo "Removing folder ./pkg/test-pkg"
160
- rm -rf ./pkg/test-pkg
161
- fi
162
-
163
- # function to clone repos and install dependencies (including the newly published shell version)
164
- function clone_repo_test_extension_build() {
165
- REPO_NAME=$1
166
- PKG_NAME=$2
167
-
168
- echo -e "\nSetting up $REPO_NAME repository locally\n"
169
-
170
- # set registry to default (to install all of the other dependencies)
171
- yarn config set registry ${DEFAULT_YARN_REGISTRY}
172
-
173
- if [ $TEST_PERSIST_BUILD != "true" ]; then
174
- echo "Removing folder ${BASE_DIR}/$REPO_NAME"
175
- rm -rf ${BASE_DIR}/$REPO_NAME
176
- fi
177
-
178
- # cloning repo
179
- git clone https://github.com/rancher/$REPO_NAME.git
180
- pushd ${BASE_DIR}/$REPO_NAME
181
-
182
- echo -e "\nInstalling dependencies for $REPO_NAME\n"
183
- yarn install
184
-
185
- # set registry to local verdaccio (to install new shell)
186
- yarn config set registry ${VERDACCIO_YARN_REGISTRY}
187
-
188
- # update package.json to use a specific version of shell
189
- sed -i.bak -e "s/\"\@rancher\/shell\": \"[0-9]*.[0-9]*.[0-9]*\",/\"\@rancher\/shell\": \"${SHELL_VERSION}\",/g" package.json
190
- rm package.json.bak
191
-
192
- # we need to remove yarn.lock, otherwise it would install a version that we don't want
193
- rm yarn.lock
194
-
195
- echo -e "\nInstalling newly built shell version\n"
196
-
197
- # installing new version of shell
198
- yarn add @rancher/shell@${SHELL_VERSION}
199
-
200
- # test build-pkg
201
- FORCE_COLOR=true yarn build-pkg $PKG_NAME | cat
202
-
203
- # kubewarden has some unit tests and they should be quick to run... Let's check them as well
204
- if [ "${REPO_NAME}" == "kubewarden-ui" ]; then
205
- yarn test:ci
206
- fi
207
-
208
- # return back to the base path
209
- popd
210
-
211
- # delete folder
212
- if [ $TEST_PERSIST_BUILD != "true" ]; then
213
- echo "Removing folder ${BASE_DIR}/$REPO_NAME"
214
- rm -rf ${BASE_DIR}/$REPO_NAME
215
- fi
216
- yarn config set registry ${DEFAULT_YARN_REGISTRY}
217
- }
218
-
219
- # Here we just add the extension that we want to include as a check (all our official extensions should be included here)
220
- # Don't forget to add the unit tests exception to clone_repo_test_extension_build function if a new extension has those
221
- clone_repo_test_extension_build "kubewarden-ui" "kubewarden"
222
- clone_repo_test_extension_build "elemental-ui" "elemental"
146
+ rm -rf ./pkg/test-pkg
223
147
 
224
148
  echo "All done"
package/store/catalog.js CHANGED
@@ -354,7 +354,7 @@ export const actions = {
354
354
 
355
355
  // As per comment above, when there are no clusters this will be management. Store it such that it can be used for those cases
356
356
  commit('setInStore', inStore);
357
- hash.cluster = hash.cluster?.filter((repo) => !(repo?.metadata?.annotations?.[CATALOG_ANNOTATIONS.HIDDEN_REPO] === 'true'));
357
+ hash.cluster = hash.cluster.filter((repo) => !(repo?.metadata?.annotations?.[CATALOG_ANNOTATIONS.HIDDEN_REPO] === 'true'));
358
358
 
359
359
  commit('setRepos', hash);
360
360
 
package/store/features.js CHANGED
@@ -27,7 +27,6 @@ export const mapFeature = function(name) {
27
27
  export const MULTI_CLUSTER = create('multi-cluster-management', true);
28
28
  export const LEGACY = create('legacy', false);
29
29
  export const RKE2 = create('rke2', true);
30
- export const RKE1_UI = create('rke1-ui', true);
31
30
  export const UNSUPPORTED_STORAGE_DRIVERS = create('unsupported-storage-drivers', false);
32
31
  export const FLEET = create('continuous-delivery', true);
33
32
  export const HARVESTER = create('harvester', true);
package/store/i18n.js CHANGED
@@ -308,17 +308,6 @@ export const actions = {
308
308
  p.push(dispatch('mergeLoad', { locale, module: fn }));
309
309
  });
310
310
 
311
- // load all of the default locales from the plugins for fallback
312
- if (locale !== DEFAULT_LOCALE) {
313
- const defaultI18nExt = rootState.$plugin?.getDynamic('l10n', DEFAULT_LOCALE);
314
-
315
- if (defaultI18nExt && defaultI18nExt.length) {
316
- defaultI18nExt.forEach((fn) => {
317
- p.push(dispatch('mergeLoad', { locale: DEFAULT_LOCALE, module: fn }));
318
- });
319
- }
320
- }
321
-
322
311
  try {
323
312
  await Promise.all(p);
324
313
  } catch (e) {
package/store/index.js CHANGED
@@ -801,14 +801,14 @@ export const actions = {
801
801
  commit('targetRoute', targetRoute);
802
802
  const sameCluster = state.clusterId && state.clusterId === id;
803
803
  const samePackage = oldPkg?.name === newPkg?.name;
804
- const sameProduct = oldProduct === product;
805
804
  const isMultiCluster = getters['isMultiCluster'];
806
805
 
807
- // Are we in the same cluster and package or product?
808
- if ( sameCluster && (samePackage || sameProduct)) {
806
+ // Are we in the same cluster and package?
807
+ if ( sameCluster && samePackage) {
809
808
  // Do nothing, we're already connected/connecting to this cluster
810
809
  return;
811
810
  }
811
+
812
812
  const oldPkgClusterStore = oldPkg?.stores.find(
813
813
  (s) => getters[`${ s.storeName }/isClusterStore`]
814
814
  )?.storeName;
@@ -829,6 +829,7 @@ export const actions = {
829
829
  // so that the nav and header stay the same when going to things like prefs
830
830
  commit('clusterReady', false);
831
831
  commit('clusterId', undefined);
832
+
832
833
  await dispatch('cluster/unsubscribe');
833
834
  commit('cluster/reset');
834
835
 
@@ -1047,13 +1048,15 @@ export const actions = {
1047
1048
  if ( route.name === 'index' ) {
1048
1049
  router.replace('/auth/login');
1049
1050
  } else {
1050
- const backTo = window.localStorage.getItem(BACK_TO);
1051
+ if (!process.server) {
1052
+ const backTo = window.localStorage.getItem(BACK_TO);
1051
1053
 
1052
- const isLogin = route.name === 'auth-login' || route.path === '/login'; // Cover dashboard and case of log out from ember;
1053
- const isLogout = route.name === 'auth-logout';
1054
+ const isLogin = route.name === 'auth-login' || route.path === '/login'; // Cover dashboard and case of log out from ember;
1055
+ const isLogout = route.name === 'auth-logout';
1054
1056
 
1055
- if (!backTo && !isLogin && !isLogout) {
1056
- window.localStorage.setItem(BACK_TO, window.location.href);
1057
+ if (!backTo && !isLogin && !isLogout) {
1058
+ window.localStorage.setItem(BACK_TO, window.location.href);
1059
+ }
1057
1060
  }
1058
1061
 
1059
1062
  const QUERY = (LOGGED_OUT in route.query) ? LOGGED_OUT : TIMED_OUT;
package/store/prefs.js CHANGED
@@ -112,6 +112,9 @@ export const _RKE1 = 'rke1';
112
112
  export const _RKE2 = 'rke2';
113
113
  export const PROVISIONER = create('provisioner', _RKE2, { options: [_RKE1, _RKE2] });
114
114
 
115
+ // Promo for Pod Security Policies (PSPs) being deprecated on kube version 1.25 on Cluster Dashboard page
116
+ export const PSP_DEPRECATION_BANNER = create('hide-psp-deprecation-banner', false, { parseJSON });
117
+
115
118
  // Maximum number of clusters to show in the slide-in menu
116
119
  export const MENU_MAX_CLUSTERS = 10;
117
120
  // Prompt for confirm when scaling down node pool in GUI and save the pref
@@ -345,44 +348,46 @@ export const actions = {
345
348
  commit('cookiesLoaded');
346
349
  },
347
350
 
348
- loadTheme({ dispatch }) {
349
- const watchDark = window.matchMedia('(prefers-color-scheme: dark)');
350
- const watchLight = window.matchMedia('(prefers-color-scheme: light)');
351
- const watchNone = window.matchMedia('(prefers-color-scheme: no-preference)');
352
-
353
- const interval = 30 * 60 * 1000;
354
- const nextHalfHour = interval - Math.round(new Date().getTime()) % interval;
355
-
356
- setTimeout(() => {
357
- dispatch('loadTheme');
358
- }, nextHalfHour);
359
- // console.log('Update theme in', nextHalfHour, 'ms');
360
-
361
- if ( watchDark.matches ) {
362
- changed('dark');
363
- } else if ( watchLight.matches ) {
364
- changed('light');
365
- } else {
366
- changed(fromClock());
367
- }
351
+ loadTheme({ state, dispatch }) {
352
+ if ( process.client ) {
353
+ const watchDark = window.matchMedia('(prefers-color-scheme: dark)');
354
+ const watchLight = window.matchMedia('(prefers-color-scheme: light)');
355
+ const watchNone = window.matchMedia('(prefers-color-scheme: no-preference)');
368
356
 
369
- watchDark.addListener((e) => {
370
- if ( e.matches ) {
371
- changed('dark');
372
- }
373
- });
357
+ const interval = 30 * 60 * 1000;
358
+ const nextHalfHour = interval - Math.round(new Date().getTime()) % interval;
374
359
 
375
- watchLight.addListener((e) => {
376
- if ( e.matches ) {
377
- changed('light');
378
- }
379
- });
360
+ setTimeout(() => {
361
+ dispatch('loadTheme');
362
+ }, nextHalfHour);
363
+ // console.log('Update theme in', nextHalfHour, 'ms');
380
364
 
381
- watchNone.addListener((e) => {
382
- if ( e.matches ) {
365
+ if ( watchDark.matches ) {
366
+ changed('dark');
367
+ } else if ( watchLight.matches ) {
368
+ changed('light');
369
+ } else {
383
370
  changed(fromClock());
384
371
  }
385
- });
372
+
373
+ watchDark.addListener((e) => {
374
+ if ( e.matches ) {
375
+ changed('dark');
376
+ }
377
+ });
378
+
379
+ watchLight.addListener((e) => {
380
+ if ( e.matches ) {
381
+ changed('light');
382
+ }
383
+ });
384
+
385
+ watchNone.addListener((e) => {
386
+ if ( e.matches ) {
387
+ changed(fromClock());
388
+ }
389
+ });
390
+ }
386
391
 
387
392
  function changed(value) {
388
393
  // console.log('Prefers Theme:', value);
package/store/type-map.js CHANGED
@@ -148,7 +148,7 @@ import isObject from 'lodash/isObject';
148
148
  import { normalizeType } from '@shell/plugins/dashboard-store/normalize';
149
149
  import { sortBy } from '@shell/utils/sort';
150
150
 
151
- import { haveV1Monitoring, haveV2Monitoring } from '@shell/utils/monitoring';
151
+ import { haveV2Monitoring } from '@shell/utils/monitoring';
152
152
  import { NEU_VECTOR_NAMESPACE } from '@shell/config/product/neuvector';
153
153
 
154
154
  export const NAMESPACED = 'namespaced';
@@ -171,7 +171,6 @@ const graphConfigMap = {};
171
171
  const FIELD_REGEX = /^\$\.metadata\.fields\[([0-9]*)\]/;
172
172
 
173
173
  export const IF_HAVE = {
174
- V1_MONITORING: 'v1-monitoring',
175
174
  V2_MONITORING: 'v2-monitoring',
176
175
  PROJECT: 'project',
177
176
  NO_PROJECT: 'no-project',
@@ -912,10 +911,6 @@ export const getters = {
912
911
  continue;
913
912
  }
914
913
 
915
- if (item.ifFeature && !rootGetters['features/get'](item.ifFeature)) {
916
- continue;
917
- }
918
-
919
914
  if ( isBasic && !getters.groupForBasicType(product, id) ) {
920
915
  continue;
921
916
  } else if ( mode === FAVORITE && !getters.isFavorite(id) ) {
@@ -1793,9 +1788,6 @@ function ifHave(getters, option) {
1793
1788
  case IF_HAVE.V2_MONITORING: {
1794
1789
  return haveV2Monitoring(getters);
1795
1790
  }
1796
- case IF_HAVE.V1_MONITORING: {
1797
- return haveV1Monitoring(getters);
1798
- }
1799
1791
  case IF_HAVE.PROJECT: {
1800
1792
  return !!project(getters);
1801
1793
  }
@@ -1848,12 +1840,15 @@ function _rowValueGetter(col) {
1848
1840
  // We will use JsonPath to look up this value, which is costly - so if we can detect this format
1849
1841
  // Use a more efficient function to get the value
1850
1842
  const value = col.field.startsWith('.') ? `$${ col.field }` : col.field;
1851
- const found = value.match(FIELD_REGEX);
1852
1843
 
1853
- if (found && found.length === 2) {
1854
- const fieldIndex = parseInt(found[1], 10);
1844
+ if (process.client) {
1845
+ const found = value.match(FIELD_REGEX);
1846
+
1847
+ if (found && found.length === 2) {
1848
+ const fieldIndex = parseInt(found[1], 10);
1855
1849
 
1856
- return (row) => row.metadata?.fields?.[fieldIndex];
1850
+ return (row) => row.metadata?.fields?.[fieldIndex];
1851
+ }
1857
1852
  }
1858
1853
 
1859
1854
  return value;
@@ -0,0 +1,46 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2018",
4
+ "module": "ESNext",
5
+ "moduleResolution": "Node",
6
+ "lib": [
7
+ "ESNext",
8
+ "ESNext.AsyncIterable",
9
+ "DOM"
10
+ ],
11
+ "esModuleInterop": true,
12
+ "allowJs": true,
13
+ "sourceMap": true,
14
+ "strict": true,
15
+ "noEmit": false,
16
+ "baseUrl": ".",
17
+ "rootDir": ".",
18
+ "paths": {
19
+ "~/*": [
20
+ "../*"
21
+ ],
22
+ "@/*": [
23
+ "../*"
24
+ ],
25
+ "@shell/*": [
26
+ "../shell/*"
27
+ ],
28
+ "@pkg/*": [
29
+ "../shell/pkg/*"
30
+ ]
31
+ },
32
+ "typeRoots": [
33
+ "./node_modules/@types"
34
+ ],
35
+ },
36
+ "exclude": [
37
+ "node_modules",
38
+ ".nuxt",
39
+ "dist",
40
+ "dist-pkg",
41
+ "shell/creators",
42
+ "shell/scripts",
43
+ "script/standalone",
44
+ "docusaurus"
45
+ ]
46
+ }
package/tsconfig.json CHANGED
@@ -1,42 +1,16 @@
1
1
  {
2
- "extends": "./tsconfig.paths.json",
2
+ "extends": "./tsconfig.default.json",
3
3
  "compilerOptions": {
4
- "target": "ES2018",
5
- "module": "ESNext",
6
- "moduleResolution": "Node",
7
- "lib": [
8
- "ESNext",
9
- "ESNext.AsyncIterable",
10
- "DOM"
11
- ],
12
- "allowJs": true,
13
- "sourceMap": true,
14
- "strict": true,
15
- "noEmit": false,
16
- "esModuleInterop": true,
17
- "baseUrl": ".",
18
- "rootDir": ".",
19
4
  "types": [
20
- "node",
21
- "jest",
22
- ],
23
- "typeRoots": [
24
- "./node_modules/@types",
25
- "../node_modules/@types"
26
- ],
5
+ "@types/node",
6
+ "@types/jest",
7
+ "@nuxt/types",
8
+ ]
27
9
  },
28
10
  "exclude": [
29
- "node_modules",
30
- ".nuxt",
31
- "dist",
32
- "dist-pkg",
33
- "../dist",
34
- "../dist-pkg",
35
- "../creators",
36
- "../scripts",
37
- "../cypress",
38
- "../cypress.config.ts",
39
- "../docusaurus",
40
- "../**/*.spec.ts"
11
+ "cypress",
12
+ "./cypress.config.ts",
13
+ "**/*.test.ts",
14
+ "**/*.spec.ts"
41
15
  ]
42
16
  }