dashboard-shell-shell 1.0.1000000116 → 1.0.1000000117

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 (124) hide show
  1. package/assets/images/action.svg +6 -0
  2. package/assets/images/pl/logo.png +0 -0
  3. package/assets/styles/base/_functions.scss +0 -0
  4. package/assets/styles/base/_mixins.scss +1 -1
  5. package/assets/styles/global/_button.scss +17 -10
  6. package/assets/styles/global/_form.scss +2 -2
  7. package/assets/styles/global/_labeled-input.scss +6 -2
  8. package/assets/styles/global/_select.scss +6 -7
  9. package/assets/styles/global/_table.scss +3 -2
  10. package/assets/styles/global/_tooltip.scss +8 -1
  11. package/assets/styles/themes/_dark.scss +2 -0
  12. package/assets/styles/themes/_light.scss +5 -2
  13. package/assets/styles/vendor/vue-select.scss +2 -1
  14. package/assets/translations/en-us.yaml +1 -3
  15. package/assets/translations/zh-hans.yaml +51 -28
  16. package/components/ActionDropdown.vue +1 -0
  17. package/components/ActionMenuShell.vue +6 -3
  18. package/components/BrandImage.vue +22 -0
  19. package/components/ClusterIconMenu.vue +1 -1
  20. package/components/CodeMirror.vue +1 -0
  21. package/components/CruResource.vue +1 -1
  22. package/components/CruResourceFooter.vue +1 -1
  23. package/components/ExplorerProjectsNamespaces.vue +4 -24
  24. package/components/GlobalRoleBindings.vue +112 -48
  25. package/components/IndentedPanel.vue +4 -10
  26. package/components/PromptRemove.vue +3 -3
  27. package/components/ResourceDetail/Masthead.vue +190 -242
  28. package/components/ResourceDetail/index.vue +20 -5
  29. package/components/ResourceList/Masthead.vue +146 -84
  30. package/components/ResourceList/ResourceLoadingIndicator.vue +5 -2
  31. package/components/ResourceTable.vue +76 -1
  32. package/components/SideNav.vue +66 -29
  33. package/components/SortableTable/THead.vue +6 -0
  34. package/components/SortableTable/index.vue +481 -388
  35. package/components/Tabbed/index.vue +4 -5
  36. package/components/auth/Principal.vue +3 -2
  37. package/components/auth/RoleDetailEdit.vue +58 -5
  38. package/components/auth/SelectPrincipal.vue +1 -0
  39. package/components/form/BannerSettings.vue +18 -16
  40. package/components/form/ChangePassword.vue +4 -4
  41. package/components/form/ColorInput.vue +32 -8
  42. package/components/form/Footer.vue +1 -1
  43. package/components/form/InputWithSelect.vue +2 -0
  44. package/components/form/KeyValue.vue +31 -7
  45. package/components/form/LabeledSelect.vue +178 -178
  46. package/components/form/Members/ClusterPermissionsEditor.vue +1 -2
  47. package/components/form/Members/MembershipEditor.vue +1 -1
  48. package/components/form/NameNsDescription.vue +24 -11
  49. package/components/form/Password.vue +6 -2
  50. package/components/form/ResourceQuota/Namespace.vue +1 -1
  51. package/components/form/ResourceQuota/NamespaceRow.vue +13 -10
  52. package/components/form/ResourceQuota/ProjectRow.vue +0 -1
  53. package/components/form/Select.vue +2 -2
  54. package/components/nav/Favorite.vue +5 -1
  55. package/components/nav/Group.vue +69 -23
  56. package/components/nav/Header.vue +82 -17
  57. package/components/nav/HeaderPageActionMenu.vue +1 -0
  58. package/components/nav/NamespaceFilter.vue +0 -3
  59. package/components/nav/TopLevelMenu.vue +182 -119
  60. package/components/nav/Type.vue +48 -11
  61. package/composables/useClickOutside.ts +1 -1
  62. package/config/product/auth.js +16 -7
  63. package/config/product/explorer.js +1 -1
  64. package/config/product/settings.js +17 -8
  65. package/config/settings.ts +28 -0
  66. package/edit/management.cattle.io.user.vue +17 -4
  67. package/edit/networking.k8s.io.ingress/RulePath.vue +1 -1
  68. package/edit/token.vue +1 -1
  69. package/list/harvesterhci.io.management.cluster.vue +17 -0
  70. package/list/management.cattle.io.setting.vue +22 -13
  71. package/list/management.cattle.io.user.vue +25 -14
  72. package/list/provisioning.cattle.io.cluster.vue +6 -7
  73. package/mixins/brand.js +17 -0
  74. package/package.json +1 -1
  75. package/pages/auth/login.vue +84 -29
  76. package/pages/c/_cluster/auth/roles/index.vue +61 -14
  77. package/pages/c/_cluster/settings/banners.vue +174 -101
  78. package/pages/c/_cluster/settings/brand.vue +348 -301
  79. package/pages/c/_cluster/settings/performance.vue +61 -38
  80. package/pages/home.vue +70 -21
  81. package/pages/prefs.vue +25 -23
  82. package/pkg/tsconfig.json +9 -9
  83. package/pkg/vue.config.js +1 -1
  84. package/promptRemove/mixin/roleDeletionCheck.js +2 -2
  85. package/scripts/clean +0 -0
  86. package/scripts/extension/bundle +0 -0
  87. package/scripts/extension/helm/scripts/package +0 -0
  88. package/scripts/extension/helm/scripts/patch +0 -0
  89. package/scripts/extension/helm/scripts/version +0 -0
  90. package/scripts/extension/helmpatch +0 -0
  91. package/scripts/extension/parse-tag-name +0 -0
  92. package/scripts/extension/publish +0 -0
  93. package/scripts/publish-shell.sh +86 -60
  94. package/scripts/serve-pkgs +0 -0
  95. package/scripts/sync-shell-deps +0 -0
  96. package/scripts/typegen.sh +44 -28
  97. package/store/i18n.js +5 -5
  98. package/store/prefs.js +17 -5
  99. package/store/type-map.js +2 -1
  100. package/types/shell/index.d.ts +1 -1
  101. package/utils/error.js +4 -0
  102. package/utils/router.js +3 -3
  103. package/vue.config.js +1 -6
  104. package/components/rancherResourceDetail/Masthead.vue +0 -769
  105. package/components/rancherResourceDetail/__tests__/Masthead.test.ts +0 -65
  106. package/components/rancherResourceDetail/index.vue +0 -591
  107. package/components/rancherResourceList/Masthead.vue +0 -375
  108. package/components/rancherResourceList/ResourceLoadingIndicator.vue +0 -140
  109. package/components/rancherResourceList/index.vue +0 -307
  110. package/components/rancherResourceList/resource-list.config.js +0 -7
  111. package/components/rancherResourceTable.vue +0 -783
  112. package/components/rancherSortableTable/THead.vue +0 -561
  113. package/components/rancherSortableTable/actions.js +0 -153
  114. package/components/rancherSortableTable/advanced-filtering.js +0 -272
  115. package/components/rancherSortableTable/debug.js +0 -117
  116. package/components/rancherSortableTable/filtering.js +0 -290
  117. package/components/rancherSortableTable/grouping.js +0 -48
  118. package/components/rancherSortableTable/index.vue +0 -2712
  119. package/components/rancherSortableTable/paging.js +0 -155
  120. package/components/rancherSortableTable/selection.js +0 -629
  121. package/components/rancherSortableTable/sortable-config.ts +0 -4
  122. package/components/rancherSortableTable/sorting.js +0 -129
  123. package/types/cloud-shell/index.d.ts +0 -11014
  124. /package/components/{rancherResourceList → ResourceList}/Masthead-btn.vue +0 -0
@@ -1,307 +0,0 @@
1
- <script>
2
- import ResourceTable from '@shell/components/ResourceTable';
3
- import Loading from '@shell/components/Loading';
4
- import Masthead from './Masthead';
5
- import ResourceLoadingIndicator from './ResourceLoadingIndicator';
6
- import ResourceFetch from '@shell/mixins/resource-fetch';
7
- import IconMessage from '@shell/components/IconMessage.vue';
8
- import { ResourceListComponentName } from './resource-list.config';
9
- import { PanelLocation, ExtensionPoint } from '@shell/core/types';
10
- import ExtensionPanel from '@shell/components/ExtensionPanel';
11
- import { sameContents } from '@shell/utils/array';
12
- import { cloud2harvesterhci } from '@shell/utils/router'
13
-
14
- export default {
15
- name: ResourceListComponentName,
16
-
17
- components: {
18
- Loading,
19
- ResourceTable,
20
- Masthead,
21
- ResourceLoadingIndicator,
22
- IconMessage,
23
- ExtensionPanel
24
- },
25
- mixins: [ResourceFetch],
26
-
27
- props: {
28
- hasAdvancedFiltering: {
29
- type: Boolean,
30
- default: false
31
- },
32
- advFilterHideLabelsAsCols: {
33
- type: Boolean,
34
- default: false
35
- },
36
- advFilterPreventFilteringLabels: {
37
- type: Boolean,
38
- default: false
39
- },
40
- },
41
-
42
- async fetch() {
43
- const store = this.$store;
44
- const resource = this.resource;
45
-
46
- const schema = this.schema;
47
-
48
- if ( this.hasListComponent ) {
49
- // If you provide your own list then call its fetch
50
- const importer = this.listComponent;
51
-
52
- const component = await importer.__asyncLoader();
53
-
54
- if ( component?.typeDisplay ) {
55
- this.customTypeDisplay = component.typeDisplay.apply(this);
56
- }
57
-
58
- // Is the custom component responsible fetching the resources?
59
- // - Component has a fetch method - legacy method. fetch will handle the requests
60
- // - Component contains the PaginatedResourceTable component - go forward method. PaginatedResourceTable owns fetching the resources
61
- if ( component?.fetch || component?.components?.['PaginatedResourceTable']) {
62
- this.componentWillFetch = true;
63
- }
64
-
65
- // If the custom component supports it, ask it what resources it loads, so we can
66
- // use the incremental loading indicator when enabled
67
- if (component?.$loadingResources) {
68
- const { loadResources, loadIndeterminate } = component?.$loadingResources(this.$route, this.$store);
69
-
70
- this.loadResources = loadResources || [resource];
71
- this.loadIndeterminate = loadIndeterminate || false;
72
- }
73
- }
74
-
75
- if ( !this.componentWillFetch ) {
76
- if ( !schema ) {
77
- store.dispatch('loadingError', new Error(this.t('nav.failWhale.resourceListNotFound', { resource }, true)));
78
-
79
- return;
80
- }
81
-
82
- // See comment for `namespaceFilter` and `pagination` watchers, skip fetch if we're not ready yet... and something is going to call fetch later on
83
- if (!this.namespaceFilterRequired && (!this.canPaginate || this.refreshFlag)) {
84
- await this.$fetchType(resource);
85
- }
86
- }
87
- },
88
-
89
- data() {
90
- const getters = this.$store.getters;
91
- const params = { ...this.$route.params };
92
- const resource = params.resource;
93
-
94
- const hasListComponent = getters['type-map/hasCustomList'](resource);
95
-
96
- const inStore = getters['currentStore'](resource);
97
- const schema = getters[`${ inStore }/schemaFor`](resource);
98
-
99
- const showMasthead = getters[`type-map/optionsFor`](resource).showListMasthead;
100
-
101
- return {
102
- schema,
103
- hasListComponent,
104
- showMasthead: showMasthead === undefined ? true : showMasthead,
105
- resource,
106
- extensionType: ExtensionPoint.PANEL,
107
- extensionLocation: PanelLocation.RESOURCE_LIST,
108
- loadResources: [resource], // List of resources that will be loaded, this could be many (`Workloads`)
109
- /**
110
- * Will the custom component handle the fetch of resources....
111
- * or will this instance fetch resources
112
- */
113
- componentWillFetch: false,
114
- // manual refresh
115
- manualRefreshInit: false,
116
- watch: false,
117
- force: false,
118
- // Provided by fetch later
119
- customTypeDisplay: null,
120
- // incremental loading
121
- loadIndeterminate: false,
122
- // query param for simple filtering
123
- useQueryParamsForSimpleFiltering: true,
124
- };
125
- },
126
-
127
- computed: {
128
- headers() {
129
- if ( this.hasListComponent || !this.schema ) {
130
- // Custom lists figure out their own headers
131
- return [];
132
- }
133
-
134
- return this.$store.getters['type-map/headersFor'](this.schema, this.canPaginate);
135
- },
136
-
137
- groupBy() {
138
- return this.$store.getters['type-map/groupByFor'](this.schema);
139
- },
140
-
141
- showIncrementalLoadingIndicator() {
142
- return this.perfConfig?.incrementalLoading?.enabled;
143
- },
144
-
145
- },
146
-
147
- watch: {
148
-
149
- /**
150
- * When a NS filter is required and the user selects a different one, kick off a new set of API requests
151
- *
152
- * ResourceList has two modes
153
- * 1) ResourceList component handles API request to fetch resources
154
- * 2) Custom list component handles API request to fetch resources
155
- *
156
- * This covers case 1
157
- */
158
- namespaceFilter(neu, old) {
159
- if (neu && !this.componentWillFetch) {
160
- if (sameContents(neu, old)) {
161
- return;
162
- }
163
-
164
- this.$fetchType(this.resource);
165
- }
166
- },
167
-
168
- /**
169
- * When a pagination is required and the user changes page / sort / filter, kick off a new set of API requests
170
- *
171
- * ResourceList has two modes
172
- * 1) ResourceList component handles API request to fetch resources
173
- * 2) Custom list component handles API request to fetch resources
174
- *
175
- * This covers case 1
176
- */
177
- pagination(neu, old) {
178
- if (neu && !this.componentWillFetch && !this.paginationEqual(neu, old)) {
179
- this.$fetchType(this.resource);
180
- }
181
- },
182
-
183
- /**
184
- * Monitor the rows to ensure deleting the last entry in a server-side paginated page doesn't
185
- * result in an empty page
186
- */
187
- rows(neu) {
188
- if (!this.pagination) {
189
- return;
190
- }
191
-
192
- if (this.pagination.page > 1 && neu.length === 0) {
193
- this.setPagination({
194
- ...this.pagination,
195
- page: this.pagination.page - 1
196
- });
197
- }
198
- },
199
- },
200
-
201
- created() {
202
- let listComponent = false;
203
-
204
- const resource = this.$route.params.resource;
205
- const hasListComponent = this.$store.getters['type-map/hasCustomList'](resource);
206
-
207
- if ( hasListComponent ) {
208
- listComponent = this.$store.getters['type-map/importList'](resource);
209
- }
210
-
211
- this.listComponent = listComponent;
212
- },
213
- };
214
- </script>
215
-
216
- <template>
217
- <IconMessage
218
- v-if="namespaceFilterRequired"
219
- :vertical="true"
220
- :subtle="false"
221
- icon="icon-filter_alt"
222
- >
223
- <template #message>
224
- {{ t('resourceList.nsFiltering') }}
225
- </template>
226
- </IconMessage>
227
- <IconMessage
228
- v-else-if="paginationNsFilterRequired"
229
- :vertical="true"
230
- :subtle="false"
231
- icon="icon-filter_alt"
232
- >
233
- <template #message>
234
- {{ t('resourceList.nsFilteringGeneric') }}
235
- </template>
236
- </IconMessage>
237
- <div
238
- v-else
239
- class="outlet"
240
- >
241
- <Masthead
242
- v-if="showMasthead"
243
- :type-display="customTypeDisplay"
244
- :schema="schema"
245
- :resource="resource"
246
- :show-incremental-loading-indicator="showIncrementalLoadingIndicator"
247
- :load-resources="loadResources"
248
- :load-indeterminate="loadIndeterminate"
249
- >
250
- <template #extraActions>
251
- <slot name="extraActions" />
252
- </template>
253
- </Masthead>
254
- <!-- Extensions area -->
255
- <ExtensionPanel
256
- :resource="{}"
257
- :type="extensionType"
258
- :location="extensionLocation"
259
- />
260
-
261
- <div
262
- v-if="hasListComponent"
263
- >
264
- <component
265
- :is="listComponent"
266
- :incremental-loading-indicator="showIncrementalLoadingIndicator"
267
- :rows="rows"
268
- v-bind="$data"
269
- />
270
- </div>
271
- <ResourceTable
272
- v-else
273
- :schema="schema"
274
- :rows="rows"
275
- :alt-loading="canPaginate && !isFirstLoad"
276
- :loading="loading"
277
- :headers="headers"
278
- :group-by="groupBy"
279
- :has-advanced-filtering="hasAdvancedFiltering"
280
- :adv-filter-hide-labels-as-cols="advFilterHideLabelsAsCols"
281
- :adv-filter-prevent-filtering-labels="advFilterPreventFilteringLabels"
282
- :use-query-params-for-simple-filtering="useQueryParamsForSimpleFiltering"
283
- :force-update-live-and-delayed="forceUpdateLiveAndDelayed"
284
- :external-pagination-enabled="canPaginate"
285
- :external-pagination-result="paginationResult"
286
- @pagination-changed="paginationChanged"
287
- />
288
- </div>
289
- </template>
290
-
291
- <style lang="scss" scoped>
292
- .header {
293
- position: relative;
294
- }
295
- H2 {
296
- position: relative;
297
- margin: 0 0 20px 0;
298
- }
299
- .filter{
300
- line-height: 45px;
301
- }
302
- .right-action {
303
- position: absolute;
304
- top: 10px;
305
- right: 10px;
306
- }
307
- </style>
@@ -1,7 +0,0 @@
1
- /**
2
- * Component name of the `ResourceList`
3
- *
4
- * This needs to be a in separate file to avoid circular dependency of
5
- * index.vue --> resource-fetch mixin --> resource-fetch-namespaced mixin --> index.vue
6
- */
7
- export const ResourceListComponentName = 'ResourceList';