@rancher/shell 2.0.2-rc.1 → 2.0.2

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 (37) hide show
  1. package/assets/translations/en-us.yaml +44 -30
  2. package/components/PromptRemove.vue +8 -3
  3. package/components/ResourceDetail/Masthead.vue +1 -0
  4. package/components/fleet/FleetClusters.vue +0 -3
  5. package/components/formatter/CloudCredExpired.vue +69 -0
  6. package/components/formatter/Date.vue +1 -1
  7. package/components/nav/Header.vue +9 -5
  8. package/components/nav/TopLevelMenu.vue +115 -51
  9. package/components/nav/__tests__/TopLevelMenu.test.ts +53 -27
  10. package/config/labels-annotations.js +2 -0
  11. package/detail/catalog.cattle.io.app.vue +17 -4
  12. package/detail/fleet.cattle.io.cluster.vue +11 -9
  13. package/detail/fleet.cattle.io.gitrepo.vue +1 -1
  14. package/edit/provisioning.cattle.io.cluster/rke2.vue +13 -0
  15. package/list/provisioning.cattle.io.cluster.vue +56 -5
  16. package/mixins/chart.js +6 -2
  17. package/models/catalog.cattle.io.app.js +108 -21
  18. package/models/cloudcredential.js +159 -2
  19. package/models/fleet.cattle.io.gitrepo.js +4 -13
  20. package/models/management.cattle.io.cluster.js +13 -2
  21. package/models/provisioning.cattle.io.cluster.js +37 -3
  22. package/package.json +1 -1
  23. package/pages/c/_cluster/apps/charts/install.vue +2 -1
  24. package/pages/c/_cluster/explorer/__tests__/index.test.ts +1 -1
  25. package/pages/c/_cluster/explorer/index.vue +1 -2
  26. package/pages/c/_cluster/fleet/index.vue +11 -5
  27. package/pages/c/_cluster/manager/cloudCredential/index.vue +68 -4
  28. package/pages/c/_cluster/uiplugins/index.vue +4 -2
  29. package/pages/home.vue +1 -0
  30. package/scripts/extension/bundle +1 -1
  31. package/scripts/publish-shell.sh +3 -4
  32. package/scripts/typegen.sh +26 -23
  33. package/types/shell/index.d.ts +4595 -0
  34. package/utils/cluster.js +1 -1
  35. package/utils/string.js +9 -0
  36. package/utils/v-sphere.ts +251 -0
  37. package/shell/types/shell/index.d.ts +0 -2
@@ -153,7 +153,8 @@ export default {
153
153
  },
154
154
 
155
155
  showAddReposBanner() {
156
- const hasExtensionReposBannerSetting = this.addExtensionReposBannerSetting?.value === 'true';
156
+ // because of https://github.com/rancher/rancher/pull/45894 we need to consider other start values
157
+ const hasExtensionReposBannerSetting = this.addExtensionReposBannerSetting?.value === 'true' || this.addExtensionReposBannerSetting?.value === '' || this.addExtensionReposBannerSetting?.value === undefined;
157
158
  const uiPluginsRepoNotFound = isRancherPrime() && !this.repos?.find((r) => r.urlDisplay === UI_PLUGINS_REPO_URL);
158
159
  const uiPluginsPartnersRepoNotFound = !this.repos?.find((r) => r.urlDisplay === UI_PLUGINS_PARTNERS_REPO_URL);
159
160
 
@@ -623,7 +624,8 @@ export default {
623
624
  },
624
625
 
625
626
  updateAddReposSetting() {
626
- if (this.addExtensionReposBannerSetting?.value === 'true') {
627
+ // because of https://github.com/rancher/rancher/pull/45894 we need to consider other start values
628
+ if (this.addExtensionReposBannerSetting?.value === 'true' || this.addExtensionReposBannerSetting?.value === '' || this.addExtensionReposBannerSetting?.value === undefined) {
627
629
  this.addExtensionReposBannerSetting.value = 'false';
628
630
  this.addExtensionReposBannerSetting.save();
629
631
  }
package/pages/home.vue CHANGED
@@ -373,6 +373,7 @@ export default {
373
373
  :rows="kubeClusters"
374
374
  :headers="clusterHeaders"
375
375
  :loading="!kubeClusters"
376
+ :paging="true"
376
377
  >
377
378
  <template #header-left>
378
379
  <div class="row table-heading">
@@ -43,7 +43,7 @@ for d in ${BASE_DIR}/dist-pkg/*; do
43
43
  mkdir plugin && mv ./${pkg}/* ./plugin
44
44
  rm -rf ./${pkg}/* && mv ./plugin ./${pkg}
45
45
 
46
- find ${pkg} -type f -printf '%P\n' | sort > ./${pkg}/files.txt
46
+ find ${pkg} -type f | sed "s|^${pkg}/||" | sort > ./${pkg}/files.txt
47
47
  popd > /dev/null
48
48
 
49
49
  cp -R ${BASE_DIR}/dist-pkg/${pkg} ${TMP}/container/plugin
@@ -1,10 +1,9 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
+ set -eo pipefail
4
+
3
5
  SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
4
- BASE_DIR="$(
5
- cd $SCRIPT_DIR && cd ../.. &
6
- pwd
7
- )"
6
+ BASE_DIR="$(cd $SCRIPT_DIR && cd ../.. && pwd)"
8
7
  SHELL_DIR=$BASE_DIR/shell/
9
8
  CREATORS_DIR=$BASE_DIR/creators/extension
10
9
  FORCE_PUBLISH_TO_NPM="false"
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
4
- BASE_DIR="$( cd $SCRIPT_DIR && cd ../.. & pwd)"
4
+ BASE_DIR="$(git rev-parse --show-toplevel)"
5
5
  SHELL_DIR=$BASE_DIR/shell
6
6
 
7
7
  echo "Generating typescript definitions"
@@ -12,37 +12,40 @@ mkdir -p ${SHELL_DIR}/tmp
12
12
  echo "Generating ..."
13
13
 
14
14
  # utils
15
- ${BASE_DIR}/node_modules/.bin/tsc shell/utils/*.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/utils > /dev/null
16
- ${BASE_DIR}/node_modules/.bin/tsc shell/utils/validators/*.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/utils/validators > /dev/null
17
- ${BASE_DIR}/node_modules/.bin/tsc shell/utils/crypto/*.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/utils/crypto > /dev/null
15
+ ${BASE_DIR}/node_modules/.bin/tsc ${SHELL_DIR}/utils/*.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/utils > /dev/null
16
+ ${BASE_DIR}/node_modules/.bin/tsc ${SHELL_DIR}/utils/validators/*.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/utils/validators > /dev/null
17
+ ${BASE_DIR}/node_modules/.bin/tsc ${SHELL_DIR}/utils/crypto/*.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/utils/crypto > /dev/null
18
18
 
19
19
  # config
20
- ${BASE_DIR}/node_modules/.bin/tsc shell/config/query-params.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/config > /dev/null
21
- ${BASE_DIR}/node_modules/.bin/tsc shell/config/table-headers.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/config > /dev/null
22
- ${BASE_DIR}/node_modules/.bin/tsc shell/config/types.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/config > /dev/null
23
- ${BASE_DIR}/node_modules/.bin/tsc shell/config/labels-annotations.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/config > /dev/null
20
+ ${BASE_DIR}/node_modules/.bin/tsc ${SHELL_DIR}/config/query-params.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/config > /dev/null
21
+ ${BASE_DIR}/node_modules/.bin/tsc ${SHELL_DIR}/config/table-headers.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/config > /dev/null
22
+ ${BASE_DIR}/node_modules/.bin/tsc ${SHELL_DIR}/config/types.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/config > /dev/null
23
+ ${BASE_DIR}/node_modules/.bin/tsc ${SHELL_DIR}/config/labels-annotations.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/config > /dev/null
24
24
 
25
- # store
26
- ${BASE_DIR}/node_modules/.bin/tsc shell/store/features.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/store > /dev/null
27
- ${BASE_DIR}/node_modules/.bin/tsc shell/store/prefs.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/store > /dev/null
25
+ # # store
26
+ ${BASE_DIR}/node_modules/.bin/tsc ${SHELL_DIR}/store/features.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/store > /dev/null
27
+ ${BASE_DIR}/node_modules/.bin/tsc ${SHELL_DIR}/store/prefs.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/store > /dev/null
28
28
 
29
- # plugins
30
- ${BASE_DIR}/node_modules/.bin/tsc shell/plugins/dashboard-store/normalize.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/plugins/dashboard-store/ > /dev/null
31
- ${BASE_DIR}/node_modules/.bin/tsc shell/plugins/dashboard-store/resource-class.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/plugins/dashboard-store/ > /dev/null
32
- ${BASE_DIR}/node_modules/.bin/tsc shell/plugins/dashboard-store/classify.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/plugins/dashboard-store/ > /dev/null
33
- ${BASE_DIR}/node_modules/.bin/tsc shell/plugins/dashboard-store/actions.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/plugins/dashboard-store/ > /dev/null
29
+ # # plugins
30
+ ${BASE_DIR}/node_modules/.bin/tsc ${SHELL_DIR}/plugins/dashboard-store/normalize.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/plugins/dashboard-store/ > /dev/null
31
+ ${BASE_DIR}/node_modules/.bin/tsc ${SHELL_DIR}/plugins/dashboard-store/resource-class.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/plugins/dashboard-store/ > /dev/null
32
+ ${BASE_DIR}/node_modules/.bin/tsc ${SHELL_DIR}/plugins/dashboard-store/classify.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/plugins/dashboard-store/ > /dev/null
33
+ ${BASE_DIR}/node_modules/.bin/tsc ${SHELL_DIR}/plugins/dashboard-store/actions.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/plugins/dashboard-store/ > /dev/null
34
34
 
35
- # mixins
36
- ${BASE_DIR}/node_modules/.bin/tsc shell/mixins/create-edit-view/index.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/mixins/create-edit-view > /dev/null
35
+ # # mixins
36
+ ${BASE_DIR}/node_modules/.bin/tsc ${SHELL_DIR}/mixins/create-edit-view/index.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/mixins/create-edit-view > /dev/null
37
37
 
38
- # models
39
- ${BASE_DIR}/node_modules/.bin/tsc shell/models/namespace.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/models/ > /dev/null
40
- ${BASE_DIR}/node_modules/.bin/tsc shell/models/networking.k8s.io.ingress.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/models/ > /dev/null
38
+ # # models
39
+ ${BASE_DIR}/node_modules/.bin/tsc ${SHELL_DIR}/models/namespace.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/models/ > /dev/null
40
+ ${BASE_DIR}/node_modules/.bin/tsc ${SHELL_DIR}/models/networking.k8s.io.ingress.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/models/ > /dev/null
41
41
 
42
- #./node_modules/.bin/tsc shell/plugins/dashboard-store/*.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/plugins/dashboard-store > /dev/null
42
+ #./node_modules/.bin/tsc ${SHELL_DIR}/plugins/dashboard-store/*.js --declaration --allowJs --emitDeclarationOnly --outDir ${SHELL_DIR}/tmp/plugins/dashboard-store
43
43
 
44
44
  # Go through all of the folders and combine by wrapping with 'declare module'
45
45
 
46
+ echo "Contents of ${SHELL_DIR}/tmp after tsc commands:"
47
+ find ${SHELL_DIR}/tmp
48
+
46
49
  echo "Combining type definitions ..."
47
50
 
48
51
  DEST=${SHELL_DIR}/types/shell
@@ -90,4 +93,4 @@ function processDir() {
90
93
 
91
94
  processDir ${SHELL_DIR}/tmp @shell
92
95
 
93
- rm -rf ${SHELL_DIR}/tmp
96
+ rm -rf ${SHELL_DIR}/tmp