@rancher/shell 0.3.19 → 0.3.21
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.
- package/assets/translations/en-us.yaml +4 -1
- package/components/PromptModal.vue +4 -0
- package/components/Questions/Array.vue +2 -2
- package/components/Questions/Boolean.vue +7 -1
- package/components/Questions/CloudCredential.vue +1 -0
- package/components/Questions/Enum.vue +21 -2
- package/components/Questions/Float.vue +8 -3
- package/components/Questions/Int.vue +8 -3
- package/components/Questions/Question.js +72 -0
- package/components/Questions/QuestionMap.vue +2 -1
- package/components/Questions/Radio.vue +33 -0
- package/components/Questions/Reference.vue +2 -0
- package/components/Questions/String.vue +8 -3
- package/components/Questions/Yaml.vue +46 -0
- package/components/Questions/__tests__/Boolean.test.ts +123 -0
- package/components/Questions/__tests__/Float.test.ts +123 -0
- package/components/Questions/__tests__/Int.test.ts +123 -0
- package/components/Questions/__tests__/String.test.ts +123 -0
- package/components/Questions/__tests__/Yaml.test.ts +123 -0
- package/components/Questions/index.vue +8 -1
- package/components/ResourceTable.vue +10 -13
- package/components/SideNav.vue +634 -0
- package/components/__tests__/NamespaceFilter.test.ts +3 -4
- package/components/form/UnitInput.vue +1 -0
- package/components/form/__tests__/KeyValue.test.ts +2 -1
- package/components/form/__tests__/UnitInput.test.ts +2 -2
- package/components/formatter/LinkName.vue +12 -1
- package/components/nav/WorkspaceSwitcher.vue +4 -1
- package/core/plugin-helpers.js +4 -1
- package/core/types.ts +25 -1
- package/detail/node.vue +2 -2
- package/edit/fleet.cattle.io.gitrepo.vue +7 -0
- package/layouts/default.vue +11 -597
- package/middleware/authenticated.js +2 -14
- package/models/fleet.cattle.io.gitrepo.js +3 -1
- package/package.json +1 -1
- package/pages/auth/login.vue +1 -1
- package/pages/c/_cluster/fleet/index.vue +4 -0
- package/pages/c/_cluster/uiplugins/index.vue +3 -3
- package/rancher-components/components/Form/LabeledInput/LabeledInput.vue +8 -0
- package/rancher-components/components/Form/Radio/RadioButton.test.ts +7 -3
- package/store/auth.js +2 -0
- package/types/shell/index.d.ts +2 -0
- package/utils/auth.js +17 -0
- package/utils/object.js +0 -1
- package/utils/validators/__tests__/cidr.test.ts +33 -0
- package/utils/validators/cidr.js +5 -0
package/core/plugin-helpers.js
CHANGED
|
@@ -58,6 +58,7 @@ function checkExtensionRouteBinding($route, locationConfig, context) {
|
|
|
58
58
|
'id',
|
|
59
59
|
'mode',
|
|
60
60
|
'path',
|
|
61
|
+
'hash',
|
|
61
62
|
// url query params
|
|
62
63
|
'queryParam',
|
|
63
64
|
// Custom context specific params provided by the extension, not to be confused with location params
|
|
@@ -76,8 +77,10 @@ function checkExtensionRouteBinding($route, locationConfig, context) {
|
|
|
76
77
|
const locationConfigParam = asArray[x];
|
|
77
78
|
|
|
78
79
|
if (locationConfigParam) {
|
|
80
|
+
if (param === 'hash') {
|
|
81
|
+
res = $route.hash ? $route.hash.includes(locationConfigParam) : false;
|
|
79
82
|
// handle "product" in a separate way...
|
|
80
|
-
if (param === 'product') {
|
|
83
|
+
} else if (param === 'product') {
|
|
81
84
|
res = checkRouteProduct($route, locationConfigParam);
|
|
82
85
|
// also handle "mode" in a separate way because it mainly depends on query params
|
|
83
86
|
} else if (param === 'mode') {
|
package/core/types.ts
CHANGED
|
@@ -139,6 +139,7 @@ export type LocationConfig = {
|
|
|
139
139
|
cluster?: string[],
|
|
140
140
|
id?: string[],
|
|
141
141
|
mode?: string[],
|
|
142
|
+
hash?: string[],
|
|
142
143
|
/**
|
|
143
144
|
* path match from URL (excludes host address)
|
|
144
145
|
*/
|
|
@@ -364,6 +365,23 @@ export interface ConfigureTypeOptions {
|
|
|
364
365
|
// showConfigView
|
|
365
366
|
}
|
|
366
367
|
|
|
368
|
+
export interface ConfigureVirtualTypeOptions extends ConfigureTypeOptions {
|
|
369
|
+
/**
|
|
370
|
+
* The translation key displayed anywhere this type is referenced
|
|
371
|
+
*/
|
|
372
|
+
labelKey: string;
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* An identifier that should be unique across all types
|
|
376
|
+
*/
|
|
377
|
+
name: string;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* The route that this type should correspond to {@link PluginRouteConfig} {@link RouteConfig}
|
|
381
|
+
*/
|
|
382
|
+
route: PluginRouteConfig | RouteConfig;
|
|
383
|
+
}
|
|
384
|
+
|
|
367
385
|
export interface DSLReturnType {
|
|
368
386
|
/**
|
|
369
387
|
* 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 +422,13 @@ export interface DSLReturnType {
|
|
|
404
422
|
*/
|
|
405
423
|
mapGroup: (groupName: string, label: string) => void;
|
|
406
424
|
|
|
425
|
+
/**
|
|
426
|
+
* Create and configure a myriad of options for a type
|
|
427
|
+
* @param options {@link ConfigureVirtualTypeOptions}
|
|
428
|
+
* @returns {@link void}
|
|
429
|
+
*/
|
|
430
|
+
virtualType: (options: ConfigureVirtualTypeOptions) => void;
|
|
431
|
+
|
|
407
432
|
/**
|
|
408
433
|
* Leaving these here for completeness but I don't think these should be advertised as useable to plugin creators.
|
|
409
434
|
*/
|
|
@@ -417,7 +442,6 @@ export interface DSLReturnType {
|
|
|
417
442
|
// moveType: (match, group)
|
|
418
443
|
// setGroupDefaultType: (input, defaultType)
|
|
419
444
|
// spoofedType: (obj)
|
|
420
|
-
// virtualType: (obj)
|
|
421
445
|
// weightGroup: (input, weight, forBasic)
|
|
422
446
|
// weightType: (input, weight, forBasic)
|
|
423
447
|
}
|
package/detail/node.vue
CHANGED
|
@@ -82,8 +82,8 @@ export default {
|
|
|
82
82
|
}
|
|
83
83
|
],
|
|
84
84
|
imageTableHeaders: [
|
|
85
|
-
{ ...SIMPLE_NAME, width:
|
|
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,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
|
+
import Vue from 'vue';
|
|
2
3
|
import { exceptionToErrorsArray } from '@shell/utils/error';
|
|
3
4
|
import { mapGetters } from 'vuex';
|
|
4
5
|
import {
|
|
@@ -81,6 +82,10 @@ export default {
|
|
|
81
82
|
|
|
82
83
|
this.tlsMode = tls;
|
|
83
84
|
|
|
85
|
+
if (this.value.spec.correctDrift === undefined) {
|
|
86
|
+
Vue.set(this.value.spec, 'correctDrift', { enabled: false });
|
|
87
|
+
}
|
|
88
|
+
|
|
84
89
|
this.updateTargets();
|
|
85
90
|
},
|
|
86
91
|
|
|
@@ -536,6 +541,7 @@ export default {
|
|
|
536
541
|
</div>
|
|
537
542
|
<div class="col span-6">
|
|
538
543
|
<InputWithSelect
|
|
544
|
+
:data-testid="`gitrepo-${ref}`"
|
|
539
545
|
:mode="mode"
|
|
540
546
|
:select-label="t('fleet.gitRepo.ref.label')"
|
|
541
547
|
:select-value="ref"
|
|
@@ -637,6 +643,7 @@ export default {
|
|
|
637
643
|
<h2 v-t="'fleet.gitRepo.paths.label'" />
|
|
638
644
|
<ArrayList
|
|
639
645
|
v-model="value.spec.paths"
|
|
646
|
+
data-testid="gitRepo-paths"
|
|
640
647
|
:mode="mode"
|
|
641
648
|
:initial-empty-row="false"
|
|
642
649
|
:value-placeholder="t('fleet.gitRepo.paths.placeholder')"
|