@rancher/shell 3.0.12-rc.5 → 3.0.12-rc.6

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 (89) hide show
  1. package/apis/intf/resources-api/resource-base.ts +42 -2
  2. package/apis/intf/resources-api/resource-instance.ts +101 -0
  3. package/apis/intf/resources-api/resources-api.ts +177 -23
  4. package/apis/intf/resources.ts +8 -6
  5. package/apis/resources/__tests__/resources-api-class.test.ts +309 -28
  6. package/apis/resources/resources-api-class.ts +232 -43
  7. package/assets/images/providers/traefik.png +0 -0
  8. package/assets/translations/en-us.yaml +10 -4
  9. package/chart/__tests__/rancher-monitoring-dashboards-index.test.ts +269 -0
  10. package/chart/rancher-monitoring-dashboards/index.vue +155 -0
  11. package/cloud-credential/__tests__/generic.test.ts +132 -0
  12. package/cloud-credential/generic.vue +33 -3
  13. package/components/EtcdInfoBanner.vue +2 -12
  14. package/components/GrafanaDashboard.vue +2 -8
  15. package/components/Resource/Detail/Masthead/__tests__/index.test.ts +68 -14
  16. package/components/Resource/Detail/Masthead/index.vue +8 -3
  17. package/components/form/Security.vue +1 -1
  18. package/components/formatter/Translate.vue +22 -1
  19. package/components/nav/Group.vue +5 -10
  20. package/components/nav/TopLevelMenu.vue +1 -30
  21. package/components/nav/__tests__/Group.test.ts +61 -0
  22. package/config/labels-annotations.js +1 -0
  23. package/config/table-headers.js +5 -2
  24. package/core/__tests__/plugin-products-apply.test.ts +787 -0
  25. package/core/__tests__/plugin-products-extend.test.ts +189 -0
  26. package/core/__tests__/plugin-products-helpers.test.ts +81 -78
  27. package/core/__tests__/plugin-products-new.test.ts +389 -0
  28. package/core/__tests__/plugin-products-scenarios.test.ts +980 -0
  29. package/core/__tests__/plugin-products-side-menu.test.ts +1935 -0
  30. package/core/plugin-products-base.ts +201 -93
  31. package/core/plugin-products-extending.ts +1 -1
  32. package/core/plugin-products-external.ts +380 -0
  33. package/core/plugin-products-helpers.ts +28 -24
  34. package/core/plugin-products-internal.ts +207 -0
  35. package/core/plugin-products-top-level.ts +10 -5
  36. package/core/plugin-products-type-guards.ts +17 -6
  37. package/core/plugin-products.ts +5 -7
  38. package/core/plugin-types.ts +1 -389
  39. package/core/plugin.ts +10 -11
  40. package/core/types.ts +6 -202
  41. package/detail/__tests__/provisioning.cattle.io.cluster.test.ts +52 -0
  42. package/detail/pod.vue +1 -1
  43. package/detail/provisioning.cattle.io.cluster.vue +0 -2
  44. package/edit/auth/AuthProviderWarningBanners.vue +12 -0
  45. package/edit/auth/__tests__/AuthProviderWarningBanners.test.ts +10 -1
  46. package/edit/auth/__tests__/azuread.test.ts +1 -0
  47. package/edit/auth/__tests__/github.test.ts +1 -0
  48. package/edit/auth/__tests__/oidc.test.ts +1 -0
  49. package/edit/auth/__tests__/saml.test.ts +1 -0
  50. package/edit/auth/ldap/__tests__/index.test.ts +1 -0
  51. package/edit/provisioning.cattle.io.cluster/index.vue +1 -1
  52. package/edit/provisioning.cattle.io.cluster/rke2.vue +1 -1
  53. package/edit/provisioning.cattle.io.cluster/tabs/networking/index.vue +2 -2
  54. package/list/management.cattle.io.user.vue +24 -5
  55. package/list/utils/management.cattle.io.cluster.utils.ts +1 -1
  56. package/machine-config/__tests__/generic.test.ts +163 -0
  57. package/machine-config/components/EC2Networking.vue +31 -7
  58. package/machine-config/components/__tests__/EC2Networking.test.ts +38 -15
  59. package/machine-config/generic.vue +32 -5
  60. package/mixins/resource-fetch.js +1 -1
  61. package/models/__tests__/rke-machine.cattle.io.vmwarevspheremachinetemplate.test.ts +22 -0
  62. package/models/pod.js +12 -10
  63. package/models/rke-machine.cattle.io.vmwarevspheremachinetemplate.js +9 -0
  64. package/package.json +1 -1
  65. package/pages/auth/login.vue +1 -1
  66. package/pages/c/_cluster/apps/charts/__tests__/install.test.ts +110 -0
  67. package/pages/c/_cluster/apps/charts/install.vue +29 -0
  68. package/pages/c/_cluster/auth/config/index.vue +11 -4
  69. package/pages/c/_cluster/monitoring/index.vue +6 -1
  70. package/plugins/dashboard-store/resource-class.js +10 -3
  71. package/plugins/steve/__tests__/steve-class-resource-api.test.ts +147 -0
  72. package/plugins/steve/steve-class.js +43 -0
  73. package/plugins/steve/subscribe.js +11 -0
  74. package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +115 -0
  75. package/rancher-components/Form/LabeledInput/LabeledInput.vue +83 -3
  76. package/store/__tests__/auth.test.ts +18 -0
  77. package/store/__tests__/notifications.test.ts +466 -1
  78. package/store/__tests__/ui-context.test.ts +255 -0
  79. package/store/auth.js +11 -1
  80. package/store/features.js +1 -0
  81. package/store/plugins.js +6 -0
  82. package/types/rancher/steve.api.ts +2 -2
  83. package/types/shell/index.d.ts +58 -0
  84. package/types/store/dashboard-store.types.ts +2 -2
  85. package/types/store/type-map.ts +262 -1
  86. package/utils/async.ts +2 -0
  87. package/utils/grafana.js +2 -17
  88. package/utils/monitoring.js +38 -1
  89. package/core/__tests__/plugin-products.test.ts +0 -4694
@@ -1,9 +1,11 @@
1
1
  import {
2
- ResourceType, FindMethodOptions, FindAllMethodOptions, FindFilteredPageOptions, FindFilteredLabelSelectorOptions,
3
- FindFilteredPageResponse, FindFilteredLabelSelectorResponse
2
+ ResourceType, CreateResourceData, FindMethodOptions, FindAllMethodOptions, FindFilteredPageOptions, FindFilteredLabelSelectorOptions,
3
+ FindFilteredPageResponse, FindFilteredLabelSelectorResponse, SteveResource,
4
+ FindFilteredPageOptionsTransient,
4
5
  } from '@shell/apis/intf/resources-api/resource-base';
6
+ import { ResourceInstance } from '@shell/apis/intf/resources-api/resource-instance';
5
7
  import { ResourcesApi } from '@shell/apis/intf/resources-api/resources-api';
6
- import { SteveListResponse, SteveGetResponse } from '@shell/types/rancher/steve.api';
8
+ import { ActionFindPageTransientResponse } from '@shell/types/store/dashboard-store.types';
7
9
  import { Store } from 'vuex';
8
10
 
9
11
  export class ResourcesApiClassImpl implements ResourcesApi {
@@ -11,11 +13,32 @@ export class ResourcesApiClassImpl implements ResourcesApi {
11
13
 
12
14
  private storeType: 'cluster' | 'management' | string;
13
15
 
16
+ private createLogMessage(message: string, level: 'error' | 'warning' = 'error') {
17
+ return `Resource API ${ level } - ${ this.storeType } - ${ message }`;
18
+ }
19
+
20
+ private surfaceWarning(message: string, e?: any): void {
21
+ console.warn(this.createLogMessage(message, 'warning'), e); // eslint-disable-line no-console
22
+ }
23
+
14
24
  private surfaceError(message: string, e?: any): never {
15
- console.error(`Resource API error - ${ this.storeType } - ${ message }`); // eslint-disable-line no-console
25
+ console.error(this.createLogMessage(message), e); // eslint-disable-line no-console
26
+
16
27
  throw new Error(`Resource API error - ${ this.storeType } - ${ message }`, { cause: e });
17
28
  }
18
29
 
30
+ private resourceUrl(resourceType: ResourceType, resourceId?: string): string {
31
+ if (this.isNamespaced(resourceType) && resourceId && !resourceId.includes('/')) {
32
+ if (!resourceId) {
33
+ this.surfaceError(`Resource "${ resourceType }" is namespaced`);
34
+ } else {
35
+ this.surfaceError(`Resource "${ resourceType }" is namespaced. The resourceId must be in "namespace/name" format, but received "${ resourceId }"`);
36
+ }
37
+ }
38
+
39
+ return this.store.getters[`${ this.storeType }/urlFor`](resourceType, resourceId);
40
+ }
41
+
19
42
  private isNamespaced(resourceType: ResourceType): boolean {
20
43
  const schema = this.store.getters[`${ this.storeType }/schemaFor`]?.(resourceType);
21
44
 
@@ -30,8 +53,9 @@ export class ResourcesApiClassImpl implements ResourcesApi {
30
53
  /**
31
54
  * Finds a specific resource by its type and ID.
32
55
  *
33
- * @template T - The type of the resource (defaults to SteveGetResponse)
34
- * @param resourceType - The type of the resource to find (use **{@link K8S}** constant). See also {@link ResourceType}.
56
+ * @template T - Your specific resource type. Rancher will supplement the response with additional properties and methods
57
+ * @template I - An override for the response type. By default this uses T and supplements the response, or by supplying a value ignores T
58
+ * @param resourceType - The type of the resource to find (examples in **{@link K8S}**). See also {@link ResourceType}.
35
59
  * @param resourceId - The unique identifier of the resource to find. If the resource is namespaced, this should be in the format `namespace/name`.
36
60
  * @param options - Optional find arguments
37
61
  * @returns The found resource item or null if not found.
@@ -49,11 +73,11 @@ export class ResourcesApiClassImpl implements ResourcesApi {
49
73
  * const node = await resources.cluster.find(K8S.NODE, 'worker-1');
50
74
  * ```
51
75
  */
52
- async find<T = SteveGetResponse>(
76
+ async find<T = Record<string, any>, I = ResourceInstance<T>>(
53
77
  resourceType: ResourceType,
54
78
  resourceId: string,
55
79
  options?: FindMethodOptions
56
- ): Promise<T | null> {
80
+ ): Promise<I | null> {
57
81
  if (this.isNamespaced(resourceType) && !resourceId.includes('/')) {
58
82
  this.surfaceError(`Resource "${ resourceType }" is namespaced. The resourceId must be in "namespace/name" format, but received "${ resourceId }"`);
59
83
  }
@@ -65,8 +89,14 @@ export class ResourcesApiClassImpl implements ResourcesApi {
65
89
  opt: options || {}
66
90
  });
67
91
 
68
- return (resource as T) ?? null;
92
+ return resource as I;
69
93
  } catch (e: unknown) {
94
+ if ((e as any)?.status === 404) {
95
+ this.surfaceWarning(`Failed to find resource ${ resourceType }/${ resourceId }: ${ (e as Error).message }`, e);
96
+
97
+ return null;
98
+ }
99
+
70
100
  this.surfaceError(`Failed to find resource ${ resourceType }/${ resourceId }: ${ (e as Error).message }`, e);
71
101
  }
72
102
  }
@@ -74,18 +104,40 @@ export class ResourcesApiClassImpl implements ResourcesApi {
74
104
  /**
75
105
  * Finds resources using pagination mode with server-side filtering, sorting, and pagination.
76
106
  *
107
+ * The response is not cached
108
+ *
109
+ * Requires `ui-sql-cache` to be enabled.
110
+ *
111
+ * @template T - Your specific resource type. Rancher will supplement the response with additional properties and methods
112
+ * @template I - An override for the response type. By default this uses T and supplements the response, or by supplying a value ignores T
113
+ * @param resourceType - The type of the resources to find (examples in **{@link K8S}**). See also {@link ResourceType}.
114
+ * @param options - Pagination options with server-side filtering and sorting via the Steve API's pagination cache. See {@link FindFilteredPageOptions}.
115
+ * @returns Response containing resource items
116
+ * @throws Error if pagination mode is requested but `ui-sql-cache` is not enabled.
117
+ */
118
+ findFiltered<T = Record<string, any>, I = ActionFindPageTransientResponse<ResourceInstance<T>>>(
119
+ resourceType: ResourceType,
120
+ options: FindFilteredPageOptionsTransient
121
+ ): Promise<I>;
122
+
123
+ /**
124
+ * Finds resources using pagination mode with server-side filtering, sorting, and pagination.
125
+ *
126
+ * The response is cached.
127
+ *
77
128
  * Requires `ui-sql-cache` to be enabled.
78
129
  *
79
- * @template T - The type of the resources (defaults to SteveListResponse)
80
- * @param resourceType - The type of the resources to find
81
- * @param options - Pagination options with server-side filtering and sorting
82
- * @returns Response containing resource items (may be transient if requested, otherwise cached array)
83
- * @throws If pagination mode is requested but `ui-sql-cache` is not enabled
130
+ * @template T - Your specific resource type. Rancher will supplement the response with additional properties and methods
131
+ * @template I - An override for the response type. By default this uses T and supplements the response, or by supplying a value ignores T
132
+ * @param resourceType - The type of the resources to find (examples in **{@link K8S}**). See also {@link ResourceType}.
133
+ * @param options - Pagination options with server-side filtering and sorting via the Steve API's pagination cache. See {@link FindFilteredPageOptions}.
134
+ * @returns Response containing resource items
135
+ * @throws Error if pagination mode is requested but `ui-sql-cache` is not enabled.
84
136
  */
85
- findFiltered<T = SteveListResponse>(
137
+ findFiltered<T = Record<string, any>, I = ResourceInstance<T>>(
86
138
  resourceType: ResourceType,
87
139
  options: FindFilteredPageOptions
88
- ): Promise<FindFilteredPageResponse<T>>;
140
+ ): Promise<I[]>;
89
141
 
90
142
  /**
91
143
  * Finds resources using label selector matching.
@@ -94,23 +146,25 @@ export class ResourcesApiClassImpl implements ResourcesApi {
94
146
  * - If `ui-sql-cache` is enabled: uses server-side pagination
95
147
  * - Otherwise: uses native Kubernetes API pagination
96
148
  *
97
- * @template T - The type of the resources (defaults to SteveListResponse)
98
- * @param resourceType - The type of the resources to find
99
- * @param options - Label selector options for filtering
100
- * @returns Response containing resource items (may be transient if requested, otherwise cached array)
149
+ * @template T - Your specific resource type. Rancher will supplement the response with additional properties and methods
150
+ * @template I - An override for the response type. By default this uses T and supplements the response, or by supplying a value ignores T
151
+ * @param resourceType - The type of the resources to find (examples in **{@link K8S}**). See also {@link ResourceType}.
152
+ * @param options - Label selector options for filtering. See {@link FindFilteredLabelSelectorOptions}.
153
+ * @returns Response containing resource items.
154
+ *
101
155
  */
102
- findFiltered<T = SteveListResponse>(
156
+ findFiltered<T = Record<string, any>, I = FindFilteredLabelSelectorResponse<ResourceInstance<T>>>(
103
157
  resourceType: ResourceType,
104
158
  options: FindFilteredLabelSelectorOptions
105
- ): Promise<FindFilteredLabelSelectorResponse<T>>;
159
+ ): Promise<I>;
106
160
 
107
161
  /**
108
162
  * @internal Implementation - use one of the overloads above
109
163
  */
110
- async findFiltered<T = SteveListResponse>(
164
+ async findFiltered<T = Record<string, any>, I = ResourceInstance<T>>(
111
165
  resourceType: ResourceType,
112
- options: FindFilteredPageOptions | FindFilteredLabelSelectorOptions
113
- ): Promise<FindFilteredPageResponse<T> | FindFilteredLabelSelectorResponse<T>> {
166
+ options: FindFilteredPageOptions | FindFilteredPageOptionsTransient | FindFilteredLabelSelectorOptions
167
+ ): Promise<I[] | ResourceInstance<T>[] | ActionFindPageTransientResponse<ResourceInstance<T>>> {
114
168
  try {
115
169
  if ('pagination' in options) { // pagination mode
116
170
  const canPaginate = this.store.getters[`${ this.storeType }/paginationEnabled`]?.(resourceType);
@@ -125,7 +179,11 @@ export class ResourcesApiClassImpl implements ResourcesApi {
125
179
  opt: safeOption
126
180
  });
127
181
 
128
- return response as FindFilteredPageResponse<T>;
182
+ if (options.transient) {
183
+ return response as ResourceInstance<T>[];
184
+ }
185
+
186
+ return response as FindFilteredPageResponse<ResourceInstance<T>>;
129
187
  } else if ('labelSelector' in options) { // label selector mode
130
188
  const safeOption = options as FindFilteredLabelSelectorOptions;
131
189
  const { labelSelector, namespaced, ...rest } = safeOption;
@@ -138,7 +196,7 @@ export class ResourcesApiClassImpl implements ResourcesApi {
138
196
  opt: rest
139
197
  });
140
198
 
141
- return resources as FindFilteredLabelSelectorResponse<T>;
199
+ return resources as FindFilteredLabelSelectorResponse<ResourceInstance<T>>;
142
200
  } else {
143
201
  return this.surfaceError('findFiltered request was made with unknown options');
144
202
  }
@@ -151,37 +209,168 @@ export class ResourcesApiClassImpl implements ResourcesApi {
151
209
  * Fetches all resources of a specific type with advanced options.
152
210
  * This method provides additional capabilities like incremental loading and namespace filtering.
153
211
  *
154
- * @template T - The type of the resources (defaults to SteveListResponse)
155
- * @param resourceType - The type of the resources to find (use **{@link K8S}** constant). See also {@link ResourceType}.
212
+ * @template T - Your specific resource type. Rancher will supplement the response with additional properties and methods
213
+ * @template I - An override for the response type. By default this uses T and supplements the response, or by supplying a value ignores T
214
+ * @param resourceType - The type of the resources to find (examples in **{@link K8S}**). See also {@link ResourceType}.
156
215
  * @param options - Optional advanced fetch options (incremental loading, namespace filtering, etc.)
157
216
  * @returns An array of resource items or an empty array if none are found.
217
+ */
218
+ async findAll<T = Record<string, any>, I = ResourceInstance<T>>(
219
+ resourceType: ResourceType,
220
+ options?: FindAllMethodOptions
221
+ ): Promise<I[]> {
222
+ try {
223
+ const resources = await this.store.dispatch(`${ this.storeType }/findAll`, {
224
+ type: resourceType,
225
+ opt: options || {}
226
+ });
227
+
228
+ return (resources || []) as I[];
229
+ } catch (e: unknown) {
230
+ this.surfaceError(`Failed to find all resources ${ resourceType }: ${ (e as Error).message }`, e);
231
+ }
232
+ }
233
+
234
+ /**
235
+ * Creates a new resource.
236
+ *
237
+ * The `data` object must include a `type` property identifying the resource type.
238
+ * This is a raw HTTP operation — it does not check permissions or update the store cache.
239
+ *
240
+ * @template T - Your specific resource type. Rancher will supplement the response with additional properties and methods
241
+ * @template I - An override for the response type. By default this uses T and supplements the response, or by supplying a value ignores T
242
+ * @param data - The resource data to create. Must include a `type` property (examples in **{@link K8S}**). See also {@link CreateResourceData}.
243
+ * @returns The created resource instance.
244
+ */
245
+ async create<T = Record<string, any>, I = SteveResource<T>>(
246
+ data: CreateResourceData
247
+ ): Promise<I> {
248
+ try {
249
+ if (!data.type) {
250
+ return this.surfaceError('Resource data must include a "type" property');
251
+ }
252
+
253
+ const url = this.resourceUrl(data.type);
254
+
255
+ const res = await this.store.dispatch(`${ this.storeType }/request`, {
256
+ opt: {
257
+ url,
258
+ method: 'POST',
259
+ headers: { 'content-type': 'application/json' },
260
+ data,
261
+ }
262
+ });
263
+
264
+ return res as I;
265
+ } catch (e: unknown) {
266
+ this.surfaceError(`Failed to create resource of type "${ data.type }": ${ (e as Error).message }`, e);
267
+ }
268
+ }
269
+
270
+ /**
271
+ * Applies a partial update to a resource using HTTP PATCH (merge-patch).
272
+ *
273
+ * Only the fields provided in `data` are sent to the server.
274
+ * This is a raw HTTP operation — it does not check permissions or update the store cache.
275
+ *
276
+ * @template T - Your specific resource type. Rancher will supplement the response with additional properties and methods
277
+ * @template I - An override for the response type. By default this uses T and supplements the response, or by supplying a value ignores T
278
+ * @param resourceType - The type of the resource (examples in **{@link K8S}**). See also {@link ResourceType}.
279
+ * @param resourceId - The unique identifier. If namespaced, use `namespace/name` format.
280
+ * @param data - An object containing only the fields to update.
281
+ * @returns The server response.
282
+ */
283
+ async update<T = Record<string, any>, I = SteveResource<T>>(
284
+ resourceType: ResourceType,
285
+ resourceId: string,
286
+ data: Record<string, any>
287
+ ): Promise<I> {
288
+ try {
289
+ const url = this.resourceUrl(resourceType, resourceId);
290
+ const res = await this.store.dispatch(`${ this.storeType }/request`, {
291
+ opt: {
292
+ url,
293
+ method: 'patch',
294
+ headers: { 'content-type': 'application/strategic-merge-patch+json' },
295
+ data,
296
+ }
297
+ });
298
+
299
+ return res as I;
300
+ } catch (e: unknown) {
301
+ this.surfaceError(`Failed to update resource ${ resourceType }/${ resourceId }: ${ (e as Error).message }`, e);
302
+ }
303
+ }
304
+
305
+ /**
306
+ * Performs a full replacement update of a resource using HTTP PUT.
307
+ *
308
+ * Runs `cleanForSave` on the data before sending.
309
+ * This is a raw HTTP operation — it does not check permissions or update the store cache.
310
+ *
311
+ * @template T - Your specific resource type. Rancher will supplement the response with additional properties and methods
312
+ * @template I - An override for the response type. By default this uses T and supplements the response, or by supplying a value ignores T
313
+ * @param resourceType - The type of the resource (examples in **{@link K8S}**). See also {@link ResourceType}.
314
+ * @param resourceId - The unique identifier. If namespaced, use `namespace/name` format.
315
+ * @param data - The complete resource data to send as the replacement.
316
+ * @returns The server response.
317
+ */
318
+ async replace<T = Record<string, any>, I = SteveResource<T>>(
319
+ resourceType: ResourceType,
320
+ resourceId: string,
321
+ data: Record<string, any>
322
+ ): Promise<I> {
323
+ try {
324
+ const url = this.resourceUrl(resourceType, resourceId);
325
+ const model = await this.store.dispatch(`${ this.storeType }/create`, data);
326
+ const cleanData = model.cleanForSave({ ...data });
327
+ const res = await this.store.dispatch(`${ this.storeType }/request`, {
328
+ opt: {
329
+ url,
330
+ method: 'put',
331
+ headers: { 'content-type': 'application/json' },
332
+ data: cleanData,
333
+ }
334
+ });
335
+
336
+ return res as I;
337
+ } catch (e: unknown) {
338
+ this.surfaceError(`Failed to update resource ${ resourceType }/${ resourceId }: ${ (e as Error).message }`, e);
339
+ }
340
+ }
341
+
342
+ /**
343
+ * Deletes a resource by type and ID using HTTP DELETE.
344
+ *
345
+ * This is a raw HTTP operation — it does not check permissions or update the store cache.
346
+ *
347
+ * @param resourceType - The type of the resource (examples in **{@link K8S}**). See also {@link ResourceType}.
348
+ * @param resourceId - The unique identifier. If namespaced, use `namespace/name` format.
158
349
  *
159
350
  * @example
160
351
  * ```ts
161
352
  * import { useResources, K8S } from '@shell/apis';
162
- * import type { Pod } from '@shell/types/resources';
163
353
  *
164
354
  * const resources = useResources();
165
355
  *
166
- * // Fetch all pods in specific namespaces
167
- * const pods = await resources.cluster.findAll<Pod>(K8S.POD, {
168
- * namespaced: ['default', 'kube-system']
169
- * });
356
+ * await resources.cluster.delete(K8S.CONFIG_MAP, 'default/my-config');
170
357
  * ```
171
358
  */
172
- async findAll<T = SteveListResponse>(
359
+ async delete(
173
360
  resourceType: ResourceType,
174
- options?: FindAllMethodOptions
175
- ): Promise<T[]> {
361
+ resourceId: string
362
+ ): Promise<void> {
176
363
  try {
177
- const resources = await this.store.dispatch(`${ this.storeType }/findAll`, {
178
- type: resourceType,
179
- opt: options || {}
180
- });
364
+ const url = this.resourceUrl(resourceType, resourceId);
181
365
 
182
- return resources as T[];
366
+ await this.store.dispatch(`${ this.storeType }/request`, {
367
+ opt: {
368
+ url,
369
+ method: 'delete',
370
+ }
371
+ });
183
372
  } catch (e: unknown) {
184
- this.surfaceError(`Failed to find all resources ${ resourceType }: ${ (e as Error).message }`, e);
373
+ this.surfaceError(`Failed to delete resource ${ resourceType }/${ resourceId }: ${ (e as Error).message }`, e);
185
374
  }
186
375
  }
187
376
  }
Binary file
@@ -504,6 +504,7 @@ authConfig:
504
504
  allowedPrincipalIds:
505
505
  title: Authorized Users & Groups
506
506
  associatedWarning: 'The {provider} account that is used to enable the external provider will be granted permissions equal to the currently logged in Rancher user. See <a href="{docsBase}/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/authentication-config#external-authentication-configuration-and-principal-users" target="_blank" rel="noopener noreferrer nofollow">External Authentication Configuration and Principal Users</a> to understand why.'
507
+ bannerEnableAuthProvider: "The \"Disable Local Authentication\" setting is enabled. Enabling an Authentication Provider will prevent users from logging in with local credentials. In the event of a Provider failure no user will be able to log in. Ensure you have continued API or CLI access to Rancher to disable the feature and regain access."
507
508
  githubapp:
508
509
  clientId:
509
510
  label: Client ID
@@ -1366,6 +1367,8 @@ catalog:
1366
1367
  generatedNewImagePullSecret: "A new Image Pull Secret <b>{ imagePullSecretName }</b> will be generated"
1367
1368
  generatedImagePullSecretBannerFromPreviousAuth: "A new Image Pull Secret <b>{ imagePullSecretName }</b> will be generated from the Repository secret <b>{ repoAuthenticationName }</b>."
1368
1369
  usePreviouslyGeneratedImagePullSecretBanner: "Image Pull Secret <b>{ imagePullSecretName }</b> was already created previously from the Repository secret <b>{ repoAuthenticationName }</b> and will be used."
1370
+ oldMonitoringChartWarning: "From v2.15.0 this chart is deprecated, instead please use the new Rancher Monitoring Dashboard chart."
1371
+ newMonitoringChartWarning: "Before installing the new Rancher Monitoring Dashboard chart please make sure any applications using the old Rancher Monitoring Chart have been uninstalled and dependencies such as Prometheus have been installed."
1369
1372
  clusterTplVersion:
1370
1373
  label: Version
1371
1374
  subtext: Select a version of the template
@@ -2172,7 +2175,8 @@ cluster:
2172
2175
  label: Enable IPv6
2173
2176
  httpProtocolIpv6:
2174
2177
  label: Enable IPv6 endpoint for instance metadata service
2175
- ipv6ValidationWarning: When one pool uses an IPv6 or dual-stack subnet/vpc, all pools must use an IPv6 or dual-stack subnet/vpc.
2178
+ dualStackValidationWarning: When one pool enables dual-stack subnet/vpc, all pools must use the same networking configuration.
2179
+ ipv6ValidationWarning: When one pool enables IPv6 subnet/vpc, all pools must use the same networking configuration.
2176
2180
  pnap:
2177
2181
  serverLocation:
2178
2182
  label: Location
@@ -2450,7 +2454,7 @@ cluster:
2450
2454
  aws: Amazon
2451
2455
  azure: Azure
2452
2456
  azureaks: Azure AKS
2453
- aks: Azure AKS
2457
+ aks: AKS
2454
2458
  azurekubernetesservice: Azure AKS (Unsupported Kev1)
2455
2459
  baiducloudcontainerengine: Baidu CCE
2456
2460
  baidu: Baidu CCE
@@ -2459,13 +2463,13 @@ cluster:
2459
2463
  custom: Custom
2460
2464
  digitalocean: DigitalOcean
2461
2465
  docker: Docker
2462
- eks: Amazon EKS
2466
+ eks: EKS
2463
2467
  exoscale: Exoscale
2464
2468
  sks: Exoscale SKS
2465
2469
  gcp: Google
2466
2470
  google: Google GCE
2467
2471
  googlegke: Google GKE
2468
- gke: Google GKE
2472
+ gke: GKE
2469
2473
  googlekubernetesengine: Google GKE (Unsupported Kev1)
2470
2474
  harvester: Harvester
2471
2475
  huaweicce: Huawei CCE
@@ -9044,6 +9048,8 @@ advancedSettings:
9044
9048
  header: Cluster Provisioning
9045
9049
 
9046
9050
  featureFlags:
9051
+ description:
9052
+ 'hide-local-auth-provider': Activating this feature and enabling an Authentication Provider will prevent users from logging in with local credentials. In the event of a Provider failure no user will be able to log in. Ensure you have continued API or CLI access to Rancher to disable the feature and regain access
9047
9053
  label: Feature Flags
9048
9054
  title: "Are you sure?"
9049
9055
  warning: |-