@rancher/shell 3.0.1 → 3.0.2-rc.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 (98) hide show
  1. package/assets/styles/base/_basic.scss +17 -5
  2. package/assets/styles/base/_mixins.scss +2 -1
  3. package/assets/styles/global/_button.scss +10 -0
  4. package/assets/styles/global/_form.scss +2 -2
  5. package/assets/translations/en-us.yaml +33 -5
  6. package/assets/translations/zh-hans.yaml +1 -1
  7. package/components/ActionMenu.vue +8 -0
  8. package/components/AsyncButton.vue +9 -3
  9. package/components/BannerGraphic.vue +10 -0
  10. package/components/ButtonGroup.vue +2 -0
  11. package/components/ButtonMultiAction.vue +6 -0
  12. package/components/ClusterIconMenu.vue +1 -1
  13. package/components/CodeMirror.vue +28 -1
  14. package/components/CommunityLinks.vue +13 -0
  15. package/components/CruResource.vue +6 -0
  16. package/components/GrowlManager.vue +14 -4
  17. package/components/LocaleSelector.vue +49 -5
  18. package/components/PaginatedResourceTable.vue +4 -3
  19. package/components/ResourceDetail/Masthead.vue +11 -4
  20. package/components/ResourceList/index.vue +5 -3
  21. package/components/ResourceTable.vue +1 -1
  22. package/components/SortableTable/THead.vue +19 -4
  23. package/components/SortableTable/index.vue +13 -9
  24. package/components/SortableTable/selection.js +19 -5
  25. package/components/YamlEditor.vue +2 -1
  26. package/components/auth/SelectPrincipal.vue +1 -1
  27. package/components/fleet/FleetBundles.vue +2 -1
  28. package/components/form/LabeledSelect.vue +20 -7
  29. package/components/form/NodeScheduling.vue +5 -1
  30. package/components/form/Password.vue +23 -13
  31. package/components/form/ResourceLabeledSelect.vue +1 -1
  32. package/components/form/Select.vue +28 -6
  33. package/components/form/SelectOrCreateAuthSecret.vue +39 -11
  34. package/components/form/__tests__/NodeScheduling.test.ts +44 -0
  35. package/components/formatter/Endpoints.vue +1 -1
  36. package/components/formatter/LiveExpiryDate.vue +5 -1
  37. package/components/formatter/ServiceTargets.vue +1 -1
  38. package/components/formatter/ServiceType.vue +19 -17
  39. package/components/nav/Pinned.vue +6 -1
  40. package/components/nav/TopLevelMenu.helper.ts +17 -1
  41. package/components/nav/TopLevelMenu.vue +154 -19
  42. package/config/pagination-table-headers.js +9 -1
  43. package/config/product/apps.js +63 -30
  44. package/config/product/explorer.js +182 -17
  45. package/config/product/settings.js +9 -1
  46. package/config/router/routes.js +0 -1
  47. package/config/settings.ts +20 -2
  48. package/config/table-headers.js +23 -15
  49. package/config/types.js +2 -1
  50. package/edit/__tests__/fleet.cattle.io.gitrepo.test.ts +12 -3
  51. package/edit/__tests__/management.cattle.io.setting.test.ts +37 -18
  52. package/edit/fleet.cattle.io.gitrepo.vue +40 -33
  53. package/edit/management.cattle.io.setting.vue +2 -0
  54. package/edit/provisioning.cattle.io.cluster/rke2.vue +13 -2
  55. package/edit/provisioning.cattle.io.cluster/tabs/AddOnConfig.vue +10 -2
  56. package/edit/provisioning.cattle.io.cluster/tabs/registries/RegistryConfigs.vue +8 -2
  57. package/edit/provisioning.cattle.io.cluster/tabs/registries/__tests__/RegistryConfigs.test.ts +6 -3
  58. package/edit/workload/mixins/workload.js +15 -7
  59. package/list/catalog.cattle.io.app.vue +4 -11
  60. package/list/catalog.cattle.io.clusterrepo.vue +59 -25
  61. package/list/fleet.cattle.io.bundle.vue +2 -2
  62. package/list/management.cattle.io.feature.vue +12 -5
  63. package/list/management.cattle.io.setting.vue +30 -19
  64. package/list/namespace.vue +4 -1
  65. package/list/networking.k8s.io.ingress.vue +14 -11
  66. package/list/node.vue +65 -63
  67. package/list/persistentvolume.vue +55 -20
  68. package/list/persistentvolumeclaim.vue +3 -15
  69. package/list/service.vue +16 -21
  70. package/list/workload.vue +35 -49
  71. package/mixins/resource-fetch.js +8 -1
  72. package/mixins/vue-select-overrides.js +10 -16
  73. package/models/management.cattle.io.cluster.js +6 -1
  74. package/models/persistentvolume.js +1 -3
  75. package/models/storage.k8s.io.storageclass.js +4 -0
  76. package/package.json +29 -29
  77. package/pages/c/_cluster/explorer/EventsTable.vue +58 -16
  78. package/pages/c/_cluster/explorer/index.vue +3 -16
  79. package/pages/c/_cluster/settings/performance.vue +49 -23
  80. package/pages/home.vue +24 -3
  81. package/pages/support/index.vue +1 -1
  82. package/plugins/floating-vue.js +1 -1
  83. package/plugins/steve/steve-pagination-utils.ts +85 -15
  84. package/rancher-components/Banner/Banner.vue +12 -0
  85. package/rancher-components/Form/Checkbox/Checkbox.vue +27 -5
  86. package/rancher-components/Form/Radio/RadioButton.vue +0 -6
  87. package/rancher-components/Form/Radio/RadioGroup.vue +5 -1
  88. package/scripts/.gitlab/workflows/build-extension-catalog.gitlab-ci.yml +2 -2
  89. package/scripts/test-plugins-build.sh +21 -6
  90. package/scripts/typegen.sh +1 -0
  91. package/store/index.js +16 -0
  92. package/store/type-map.utils.ts +14 -1
  93. package/types/shell/index.d.ts +467 -418
  94. package/types/store/vuex.d.ts +1 -1
  95. package/types/vue-shim.d.ts +2 -8
  96. package/utils/cluster.js +2 -2
  97. package/utils/string.js +6 -0
  98. package/vue.config.js +3 -4
@@ -5,7 +5,7 @@
5
5
  * Generic interface for Vuex getters
6
6
  */
7
7
  export interface VuexStoreGetters {
8
- [name:string]: Function
8
+ [name:string]: Function | any
9
9
  }
10
10
 
11
11
  export interface VuexStore {
@@ -1,13 +1,7 @@
1
1
  /* eslint-disable */
2
- import type { DefineComponent } from 'vue'
3
- import { ComponentCustomProperties } from 'vue';
2
+ export {};
4
3
 
5
- declare module '*.vue' {
6
- const component: DefineComponent<{}, {}, any>
7
- export default component
8
- }
9
-
10
- declare module '@vue/runtime-core' {
4
+ declare module 'vue' {
11
5
  interface ComponentCustomProperties {
12
6
  t: {
13
7
  (key: string, args?: Record<string, any>, raw?: boolean): string;
package/utils/cluster.js CHANGED
@@ -79,13 +79,13 @@ export function paginationFilterOnlyKubernetesClusters(store) {
79
79
 
80
80
  return PaginationParamFilter.createMultipleFields([
81
81
  new PaginationFilterField({
82
- field: `metadata.labels."${ CAPI.PROVIDER }"`, // Pending API Support - https://github.com/rancher/rancher/issues/48256
82
+ field: `metadata.labels."${ CAPI.PROVIDER }"`,
83
83
  equals: false,
84
84
  value: VIRTUAL_HARVESTER_PROVIDER,
85
85
  exact: true
86
86
  }),
87
87
  new PaginationFilterField({
88
- field: `status.provider`, // Pending API Support - https://github.com/rancher/rancher/issues/48256
88
+ field: `status.provider`,
89
89
  equals: false,
90
90
  value: VIRTUAL_HARVESTER_PROVIDER,
91
91
  exact: true
package/utils/string.js CHANGED
@@ -330,3 +330,9 @@ export function sanitizeIP(v) {
330
330
  export function xOfy(x, y) {
331
331
  return `${ typeof x === 'number' ? x : '?' }/${ typeof y === 'number' ? y : '?' }`;
332
332
  }
333
+
334
+ export function isBase64(value) {
335
+ const base64regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
336
+
337
+ return base64regex.test(value);
338
+ }
package/vue.config.js CHANGED
@@ -456,7 +456,7 @@ const printLogs = (dev, dashboardVersion, resourceBase, routerBasePath, pl, ranc
456
456
  * - as list: [/.shell/, /dist-pkg/, /scripts\/standalone/, /\/pkg.test-pkg/, /\/pkg.harvester/]
457
457
  * - as chained regex rule: /.shell|dist-pkg|scripts\/standalone|\/pkg.test-pkg|\/pkg.harvester/
458
458
  */
459
- const getWatcherIgnored = (excludes) => {
459
+ const getWatcherIgnored = (excludes = []) => {
460
460
  const paths = [
461
461
  /node_modules/,
462
462
  /dist-pkg/,
@@ -474,12 +474,11 @@ const getWatcherIgnored = (excludes) => {
474
474
  * This takes the directory of the application as the first argument so that we can derive folder locations
475
475
  * from it, rather than from the location of this file
476
476
  */
477
- module.exports = function(dir, _appConfig) {
477
+ module.exports = function(dir, appConfig = {}) {
478
478
  require('events').EventEmitter.defaultMaxListeners = 20;
479
479
  require('dotenv').config();
480
480
 
481
481
  const { SHELL_ABS, COMPONENTS_DIR } = getShellPaths(dir);
482
- const appConfig = _appConfig || {};
483
482
  const excludes = appConfig.excludes || [];
484
483
 
485
484
  const includePkg = (name) => {
@@ -557,7 +556,7 @@ module.exports = function(dir, _appConfig) {
557
556
  config.resolve.extensions.push(...['.tsx', '.ts', '.js', '.vue', '.scss']);
558
557
  config.watchOptions = {
559
558
  ...(config.watchOptions || {}),
560
- ignored: getWatcherIgnored(excludes)
559
+ ignored: getWatcherIgnored()
561
560
  };
562
561
 
563
562
  if (dev) {