@rancher/shell 0.3.19 → 0.3.20

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.
@@ -3041,6 +3041,7 @@ login:
3041
3041
  noResponse: "No response received"
3042
3042
  error: An error occurred logging in. Please try again.
3043
3043
  clientError: Invalid username or password. Please try again.
3044
+ specificError: 'An error occured logging in: {msg}'
3044
3045
  useLocal: Use a local user
3045
3046
  loginWithProvider: Log in with {provider}
3046
3047
  username: Username
@@ -42,6 +42,9 @@ export default {
42
42
  const isSticky = !!this.modalData?.modalSticky;
43
43
 
44
44
  return !isSticky ? '' : 'display: flex; flex-direction: column; ';
45
+ },
46
+ closeOnClickOutside() {
47
+ return this.modalData?.closeOnClickOutside;
45
48
  }
46
49
  },
47
50
 
@@ -85,6 +88,7 @@ export default {
85
88
  :styles="`background-color: var(--nav-bg); border-radius: var(--border-radius); ${stickyProps} max-height: 95vh; ${cssProps}`"
86
89
  height="auto"
87
90
  :scrollable="true"
91
+ :click-to-close="closeOnClickOutside"
88
92
  @closed="close()"
89
93
  >
90
94
  <component
@@ -400,7 +400,10 @@ export default {
400
400
 
401
401
  pagingParams() {
402
402
  if ( !this.schema ) {
403
- return {};
403
+ return {
404
+ singularLabel: '',
405
+ pluralLabel: ''
406
+ };
404
407
  }
405
408
 
406
409
  return {
package/core/types.ts CHANGED
@@ -364,6 +364,23 @@ export interface ConfigureTypeOptions {
364
364
  // showConfigView
365
365
  }
366
366
 
367
+ export interface ConfigureVirtualTypeOptions extends ConfigureTypeOptions {
368
+ /**
369
+ * The translation key displayed anywhere this type is referenced
370
+ */
371
+ labelKey: string;
372
+
373
+ /**
374
+ * An identifier that should be unique across all types
375
+ */
376
+ name: string;
377
+
378
+ /**
379
+ * The route that this type should correspond to {@link PluginRouteConfig} {@link RouteConfig}
380
+ */
381
+ route: PluginRouteConfig | RouteConfig;
382
+ }
383
+
367
384
  export interface DSLReturnType {
368
385
  /**
369
386
  * Register multiple types by name and place them all in a group if desired. Primarily used for grouping things in the cluster explorer navigation.
@@ -404,6 +421,13 @@ export interface DSLReturnType {
404
421
  */
405
422
  mapGroup: (groupName: string, label: string) => void;
406
423
 
424
+ /**
425
+ * Create and configure a myriad of options for a type
426
+ * @param options {@link ConfigureVirtualTypeOptions}
427
+ * @returns {@link void}
428
+ */
429
+ virtualType: (options: ConfigureVirtualTypeOptions) => void;
430
+
407
431
  /**
408
432
  * Leaving these here for completeness but I don't think these should be advertised as useable to plugin creators.
409
433
  */
@@ -417,7 +441,6 @@ export interface DSLReturnType {
417
441
  // moveType: (match, group)
418
442
  // setGroupDefaultType: (input, defaultType)
419
443
  // spoofedType: (obj)
420
- // virtualType: (obj)
421
444
  // weightGroup: (input, weight, forBasic)
422
445
  // weightType: (input, weight, forBasic)
423
446
  }
package/detail/node.vue CHANGED
@@ -82,8 +82,8 @@ export default {
82
82
  }
83
83
  ],
84
84
  imageTableHeaders: [
85
- { ...SIMPLE_NAME, width: 400 },
86
- IMAGE_SIZE
85
+ { ...SIMPLE_NAME, width: null },
86
+ { ...IMAGE_SIZE, width: 100 } // Ensure one header has a size, all other columns will scale
87
87
  ],
88
88
  taintTableHeaders: [
89
89
  KEY,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rancher/shell",
3
- "version": "0.3.19",
3
+ "version": "0.3.20",
4
4
  "description": "Rancher Dashboard Shell",
5
5
  "repository": "https://github.com/rancherlabs/dashboard",
6
6
  "license": "Apache-2.0",
@@ -149,7 +149,7 @@ export default {
149
149
  return this.t('login.error');
150
150
  }
151
151
 
152
- return this.err;
152
+ return this.err?.length ? this.t('login.specificError', { msg: this.err }) : '';
153
153
  },
154
154
 
155
155
  errorToDisplay() {
package/store/auth.js CHANGED
@@ -334,6 +334,8 @@ export const actions = {
334
334
  } catch (err) {
335
335
  if (err._status === 401) {
336
336
  return Promise.reject(LOGIN_ERRORS.CLIENT_UNAUTHORIZED);
337
+ } else if (err.message) {
338
+ return Promise.reject(err.message);
337
339
  } else if ( err._status >= 400 && err._status <= 499 ) {
338
340
  return Promise.reject(LOGIN_ERRORS.CLIENT);
339
341
  }