@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
@@ -1,4 +1,4 @@
1
- import { SchemaAttribute, SchemaAttributeColumn } from '@shell/plugins/steve/schema';
1
+ import { Schema, SchemaAttribute, SchemaAttributeColumn } from '@shell/plugins/steve/schema';
2
2
  import { TableColumn } from '@shell/types/store/type-map';
3
3
  import { VuexStoreGetters } from '@shell/types/store/vuex';
4
4
  import { findBy, insertAt, removeObject } from '@shell/utils/array';
@@ -119,6 +119,19 @@ export function createHeaders(
119
119
  return out;
120
120
  }
121
121
 
122
+ /**
123
+ * Given a schema's attribute.column value create a header
124
+ */
125
+ export function headerFromSchemaColString(colName: string, schema: Schema, rootGetters: VuexStoreGetters, pagination: boolean, ageColumn: TableColumn): TableColumn {
126
+ const col = schema.attributes.columns.find((c) => c.name === colName);
127
+
128
+ if (!col) {
129
+ throw new Error(`Unable to find column '${ colName }' in schema '${ schema.id }'`);
130
+ }
131
+
132
+ return headerFromSchemaCol(col, rootGetters, pagination, ageColumn);
133
+ }
134
+
122
135
  /**
123
136
  * Given a schema's attribute.column value create a header
124
137
  */