@rancher/shell 0.3.23 → 0.3.25
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/styles/base/_variables.scss +1 -0
- package/assets/styles/themes/_dark.scss +1 -0
- package/assets/styles/themes/_light.scss +6 -5
- package/assets/translations/en-us.yaml +44 -17
- package/assets/translations/zh-hans.yaml +2 -2
- package/components/ClusterIconMenu.vue +143 -0
- package/components/CruResource.vue +7 -1
- package/components/ExplorerProjectsNamespaces.vue +11 -1
- package/components/FixedBanner.vue +17 -1
- package/components/Loading.vue +1 -1
- package/components/Markdown.vue +1 -1
- package/components/Questions/__tests__/Yaml.test.ts +3 -2
- package/components/SideNav.vue +1 -1
- package/components/SortableTable/index.vue +3 -2
- package/components/auth/RoleDetailEdit.vue +15 -2
- package/components/auth/login/saml.vue +12 -1
- package/components/form/LabeledSelect.vue +12 -5
- package/components/form/Members/ClusterPermissionsEditor.vue +1 -1
- package/components/form/Members/MembershipEditor.vue +6 -1
- package/components/form/SelectOrCreateAuthSecret.vue +7 -0
- package/components/form/__tests__/KeyValue.test.ts +6 -3
- package/components/form/__tests__/LabeledSelect.test.ts +18 -0
- package/components/formatter/PodsUsage.vue +11 -36
- package/components/formatter/PrincipalGroupBindings.vue +8 -5
- package/components/formatter/__tests__/PodsUsage.test.ts +36 -19
- package/components/nav/Group.vue +62 -34
- package/components/nav/Header.vue +13 -6
- package/components/nav/Pinned.vue +47 -0
- package/components/nav/TopLevelMenu.vue +673 -325
- package/components/nav/Type.vue +88 -8
- package/config/home-links.js +1 -1
- package/config/product/istio.js +15 -5
- package/config/router.js +3 -9
- package/config/table-headers.js +5 -6
- package/config/uiplugins.js +1 -0
- package/core/plugin-helpers.js +3 -0
- package/core/types.ts +6 -1
- package/creators/app/files/.vscode/settings.json +0 -1
- package/creators/pkg/init +2 -2
- package/detail/__tests__/autoscaling.horizontalpodautoscaler.test.ts +118 -0
- package/detail/autoscaling.horizontalpodautoscaler/index.vue +4 -4
- package/detail/provisioning.cattle.io.cluster.vue +7 -5
- package/edit/__tests__/management.cattle.io.clusterroletemplatebinding.test.ts +58 -0
- package/edit/__tests__/namespace.test.ts +5 -3
- package/edit/fleet.cattle.io.gitrepo.vue +43 -15
- package/edit/logging.banzaicloud.io.output/index.vue +7 -0
- package/edit/management.cattle.io.clusterroletemplatebinding.vue +3 -11
- package/edit/namespace.vue +8 -4
- package/edit/provisioning.cattle.io.cluster/Basics.vue +662 -0
- package/edit/provisioning.cattle.io.cluster/CustomCommand.vue +9 -8
- package/edit/provisioning.cattle.io.cluster/DrainOptions.vue +13 -8
- package/edit/provisioning.cattle.io.cluster/MachinePool.vue +11 -2
- package/edit/provisioning.cattle.io.cluster/MemberRoles.vue +40 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/Basics.tests.ts +237 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/CustomCommand.tests.ts +71 -23
- package/edit/provisioning.cattle.io.cluster/__tests__/DrainOptions.test.ts +52 -0
- package/edit/provisioning.cattle.io.cluster/__tests__/rke2.test.ts +65 -142
- package/edit/provisioning.cattle.io.cluster/rke2.vue +253 -582
- package/edit/workload/storage/ContainerMountPaths.vue +7 -5
- package/edit/workload/storage/__tests__/Storage.test.ts +2 -2
- package/edit/workload/storage/persistentVolumeClaim/__tests__/persistentvolumeclaim.test.ts +36 -0
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +15 -7
- package/initialize/App.js +2 -0
- package/initialize/client.js +63 -51
- package/initialize/index.js +7 -5
- package/layouts/default.vue +10 -2
- package/layouts/home.vue +6 -2
- package/layouts/plain.vue +9 -2
- package/list/fleet.cattle.io.cluster.vue +2 -2
- package/list/management.cattle.io.feature.vue +1 -1
- package/machine-config/amazonec2.vue +1 -0
- package/machine-config/vmwarevsphere.vue +48 -7
- package/mixins/brand.js +0 -8
- package/mixins/child-hook.js +2 -2
- package/mixins/create-edit-view/impl.js +3 -3
- package/mixins/fetch.client.js +3 -3
- package/models/__tests__/management.cattle.io.node.ts +96 -0
- package/models/__tests__/node.ts +74 -0
- package/models/cluster/node.js +6 -5
- package/models/cluster.x-k8s.io.machinedeployment.js +2 -2
- package/models/management.cattle.io.cluster.js +22 -1
- package/models/management.cattle.io.clusterroletemplatebinding.js +3 -3
- package/models/management.cattle.io.globalrole.js +17 -2
- package/models/management.cattle.io.node.js +6 -4
- package/models/management.cattle.io.projectroletemplatebinding.js +3 -3
- package/models/management.cattle.io.roletemplate.js +17 -2
- package/package.json +2 -6
- package/pages/__tests__/prefs.test.ts +1 -1
- package/pages/about.vue +2 -0
- package/pages/auth/setup.vue +5 -4
- package/pages/c/_cluster/explorer/ConfigBadge.vue +1 -0
- package/pages/c/_cluster/monitoring/index.vue +8 -3
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogLoadDialog.vue +9 -66
- package/pages/c/_cluster/uiplugins/CatalogList/CatalogUninstallDialog.vue +182 -0
- package/pages/c/_cluster/uiplugins/CatalogList/index.vue +15 -32
- package/pages/c/_cluster/uiplugins/UninstallDialog.vue +8 -46
- package/pages/c/_cluster/uiplugins/index.vue +64 -64
- package/pages/diagnostic.vue +0 -39
- package/pages/home.vue +1 -1
- package/pages/prefs.vue +3 -13
- package/plugins/dashboard-store/normalize.js +4 -4
- package/plugins/dashboard-store/resource-class.js +1 -1
- package/plugins/int-number.js +5 -2
- package/plugins/positive-int-number.js +19 -0
- package/plugins/steve/__tests__/getters.spec.ts +15 -0
- package/plugins/steve/getters.js +22 -10
- package/public/index.html +4 -2
- package/rancher-components/BadgeState/BadgeState.vue +5 -1
- package/rancher-components/Banner/Banner.test.ts +51 -1
- package/rancher-components/Banner/Banner.vue +134 -53
- package/rancher-components/Card/Card.test.ts +37 -0
- package/rancher-components/Card/Card.vue +24 -7
- package/rancher-components/Form/Checkbox/Checkbox.test.ts +20 -29
- package/rancher-components/Form/Checkbox/Checkbox.vue +45 -20
- package/rancher-components/Form/LabeledInput/LabeledInput.test.ts +2 -8
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +22 -10
- package/rancher-components/Form/Radio/RadioButton.test.ts +31 -0
- package/rancher-components/Form/Radio/RadioButton.vue +30 -13
- package/rancher-components/Form/Radio/RadioGroup.vue +26 -7
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +7 -6
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.test.ts +25 -38
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +23 -11
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +19 -5
- package/rancher-components/StringList/StringList.test.ts +453 -49
- package/rancher-components/StringList/StringList.vue +92 -58
- package/scripts/extension/parse-tag-name +0 -0
- package/store/index.js +4 -0
- package/store/prefs.js +4 -4
- package/store/type-map.js +2 -16
- package/types/shell/index.d.ts +26 -14
- package/utils/__tests__/cluster.test.ts +55 -0
- package/utils/__tests__/object.test.ts +21 -2
- package/utils/__tests__/sort.test.ts +61 -0
- package/utils/cluster.js +47 -1
- package/utils/object.js +12 -5
- package/utils/string.js +12 -0
- package/utils/validators/formRules/__tests__/index.test.ts +13 -1
- package/utils/validators/formRules/index.ts +4 -0
- package/utils/validators/role-template.js +9 -1
- package/utils/version.js +1 -1
- package/vue.config.js +1 -4
- package/yarn-error.log +200 -0
- package/content/docs/en-us/getting-started.md +0 -224
- package/content/docs/en-us/whats-new.md +0 -29
- package/content/docs/zh-hans/getting-started.md +0 -224
- package/content/docs/zh-hans/whats-new.md +0 -28
- package/pages/docs/_doc.vue +0 -345
- package/pages/docs/toc.js +0 -27
- package/plugins/console.js +0 -34
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { sortBy } from '@shell/utils/sort';
|
|
2
|
+
|
|
3
|
+
describe('fx: sort', () => {
|
|
4
|
+
describe('sortBy', () => {
|
|
5
|
+
const testSortBy = <T = object[]>(ary: T[], key: string[], expected: T[], desc?: boolean) => {
|
|
6
|
+
const result = sortBy(ary, key, desc);
|
|
7
|
+
|
|
8
|
+
expect(result).toStrictEqual(expected);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
it.each([
|
|
12
|
+
[[{ a: 1 }, { a: 9 }], ['a'], [{ a: 1 }, { a: 9 }]],
|
|
13
|
+
[[{ a: 2 }, { a: 1 }], ['a'], [{ a: 1 }, { a: 2 }]],
|
|
14
|
+
])('should sort by single property', (ary, key, expected) => {
|
|
15
|
+
testSortBy(ary, key, expected);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it.each([
|
|
19
|
+
[[{ a: 1, b: 1 }, { a: 9, b: 9 }], ['a', 'b'], [{ a: 1, b: 1 }, { a: 9, b: 9 }]],
|
|
20
|
+
[[{ a: 2, b: 2 }, { a: 1, b: 1 }], ['a', 'b'], [{ a: 1, b: 1 }, { a: 2, b: 2 }]],
|
|
21
|
+
[[{ a: 2, b: 1 }, { a: 1, b: 9 }], ['a', 'b'], [{ a: 1, b: 9 }, { a: 2, b: 1 }]],
|
|
22
|
+
[[{ a: 1, b: 2 }, { a: 9, b: 1 }], ['a', 'b'], [{ a: 1, b: 2 }, { a: 9, b: 1 }]],
|
|
23
|
+
[[{ a: 1, b: 1 }, { a: 9, b: 9 }], ['a', 'b'], [{ a: 1, b: 1 }, { a: 9, b: 9 }]],
|
|
24
|
+
])('should sort by two properties (primary property always first)', (ary, key, expected) => {
|
|
25
|
+
testSortBy(ary, key, expected);
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it.each([
|
|
29
|
+
[[{ a: 1, b: 1 }, { a: 1, b: 9 }], ['a', 'b'], [{ a: 1, b: 1 }, { a: 1, b: 9 }]],
|
|
30
|
+
[[{ a: 1, b: 2 }, { a: 1, b: 1 }], ['a', 'b'], [{ a: 1, b: 1 }, { a: 1, b: 2 }]],
|
|
31
|
+
])('should sort by two properties (primary property the same)', (ary, key, expected) => {
|
|
32
|
+
testSortBy(ary, key, expected);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
describe('descending', () => {
|
|
36
|
+
it.each([
|
|
37
|
+
[[{ a: 1 }, { a: 9 }], ['a'], [{ a: 9 }, { a: 1 }]],
|
|
38
|
+
[[{ a: 2 }, { a: 1 }], ['a'], [{ a: 2 }, { a: 1 }]],
|
|
39
|
+
])('should sort by single property', (ary, key, expected) => {
|
|
40
|
+
testSortBy(ary, key, expected, true);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it.each([
|
|
44
|
+
[[{ a: 1, b: 1 }, { a: 9, b: 9 }], ['a', 'b'], [{ a: 9, b: 9 }, { a: 1, b: 1 }]],
|
|
45
|
+
[[{ a: 2, b: 2 }, { a: 1, b: 1 }], ['a', 'b'], [{ a: 2, b: 2 }, { a: 1, b: 1 }]],
|
|
46
|
+
[[{ a: 2, b: 1 }, { a: 1, b: 9 }], ['a', 'b'], [{ a: 2, b: 1 }, { a: 1, b: 9 }]],
|
|
47
|
+
[[{ a: 1, b: 2 }, { a: 9, b: 1 }], ['a', 'b'], [{ a: 9, b: 1 }, { a: 1, b: 2 }]],
|
|
48
|
+
[[{ a: 1, b: 1 }, { a: 9, b: 9 }], ['a', 'b'], [{ a: 9, b: 9 }, { a: 1, b: 1 }]],
|
|
49
|
+
])('should sort by two properties', (ary, key, expected) => {
|
|
50
|
+
testSortBy(ary, key, expected, true);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it.each([
|
|
54
|
+
[[{ a: 1, b: 1 }, { a: 1, b: 9 }], ['a', 'b'], [{ a: 1, b: 9 }, { a: 1, b: 1 }]],
|
|
55
|
+
[[{ a: 1, b: 2 }, { a: 1, b: 1 }], ['a', 'b'], [{ a: 1, b: 2 }, { a: 1, b: 1 }]],
|
|
56
|
+
])('should sort by two properties (primary property the same)', (ary, key, expected) => {
|
|
57
|
+
testSortBy(ary, key, expected, true);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
});
|
package/utils/cluster.js
CHANGED
|
@@ -8,7 +8,7 @@ export function filterOnlyKubernetesClusters(mgmtClusters, store) {
|
|
|
8
8
|
const openHarvesterContainerWorkload = store.getters['features/get']('harvester-baremetal-container-workload');
|
|
9
9
|
|
|
10
10
|
return mgmtClusters.filter((c) => {
|
|
11
|
-
return openHarvesterContainerWorkload ? true : !c
|
|
11
|
+
return openHarvesterContainerWorkload ? true : !isHarvesterCluster(c);
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -44,3 +44,49 @@ export function filterHiddenLocalCluster(mgmtClusters, store) {
|
|
|
44
44
|
return !target.isLocal;
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
const clusterNameSegments = /([A-Za-z]+|\d+)/g;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Shortens an input string based on the number of segments it contains.
|
|
52
|
+
* @param {string} input - The input string to be shortened.
|
|
53
|
+
* @returns {string} - The shortened string.
|
|
54
|
+
* @example smallIdentifier('local') => 'lcl'
|
|
55
|
+
* @example smallIdentifier('word-wide-web') => 'www'
|
|
56
|
+
*/
|
|
57
|
+
export function abbreviateClusterName(input) {
|
|
58
|
+
if (!input) {
|
|
59
|
+
return '';
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (input.length <= 3) {
|
|
63
|
+
return input;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const segments = input.match(clusterNameSegments);
|
|
67
|
+
|
|
68
|
+
if (!segments) return ''; // In case no valid segments are found
|
|
69
|
+
|
|
70
|
+
let result = '';
|
|
71
|
+
|
|
72
|
+
switch (segments.length) {
|
|
73
|
+
case 1: {
|
|
74
|
+
const word = segments[0];
|
|
75
|
+
|
|
76
|
+
result = `${ word[0] }${ word[Math.floor(word.length / 2)] }${ word[word.length - 1] }`;
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
case 2: {
|
|
80
|
+
const w1 = `${ segments[0][0] }`;
|
|
81
|
+
const w2 = `${ segments[0].length >= 2 ? segments[0][segments[0].length - 1] : segments[1][0] }`;
|
|
82
|
+
const w3 = `${ segments[1][segments[1].length - 1] }`;
|
|
83
|
+
|
|
84
|
+
result = w1 + w2 + w3;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
default:
|
|
88
|
+
result = segments.slice(0, 3).map((segment) => segment[0]).join('');
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return result;
|
|
92
|
+
}
|
package/utils/object.js
CHANGED
|
@@ -91,13 +91,20 @@ export function get(obj, path) {
|
|
|
91
91
|
|
|
92
92
|
export function remove(obj, path) {
|
|
93
93
|
const parentAry = splitObjectPath(path);
|
|
94
|
-
const leafKey = parentAry.pop();
|
|
95
94
|
|
|
96
|
-
|
|
95
|
+
// Remove the very last part of the path
|
|
97
96
|
|
|
98
|
-
if (
|
|
99
|
-
Vue.set(
|
|
100
|
-
delete
|
|
97
|
+
if (parentAry.length === 1) {
|
|
98
|
+
Vue.set(obj, path, undefined);
|
|
99
|
+
delete obj[path];
|
|
100
|
+
} else {
|
|
101
|
+
const leafKey = parentAry.pop();
|
|
102
|
+
const parent = get(obj, joinObjectPath(parentAry));
|
|
103
|
+
|
|
104
|
+
if ( parent ) {
|
|
105
|
+
Vue.set(parent, leafKey, undefined);
|
|
106
|
+
delete parent[leafKey];
|
|
107
|
+
}
|
|
101
108
|
}
|
|
102
109
|
|
|
103
110
|
return obj;
|
package/utils/string.js
CHANGED
|
@@ -309,3 +309,15 @@ export function isIpv4(ip) {
|
|
|
309
309
|
|
|
310
310
|
return reg.test(ip);
|
|
311
311
|
}
|
|
312
|
+
|
|
313
|
+
export function sanitizeKey(k) {
|
|
314
|
+
return (k || '').replace(/[^a-z0-9./_-]/ig, '');
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
export function sanitizeValue(v) {
|
|
318
|
+
return (v || '').replace(/[^a-z0-9._-]/ig, '');
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export function sanitizeIP(v) {
|
|
322
|
+
return (v || '').replace(/[^a-z0-9.:_-]/ig, '');
|
|
323
|
+
}
|
|
@@ -393,6 +393,18 @@ describe('formRules', () => {
|
|
|
393
393
|
expect(formRuleResult).toStrictEqual(expectedResult);
|
|
394
394
|
});
|
|
395
395
|
|
|
396
|
+
it('"roleTemplateRules" : returns correct message when type is RBAC role rule defines both resources and nonResourceURLs', () => {
|
|
397
|
+
const testValue: [{}] = [
|
|
398
|
+
{
|
|
399
|
+
verbs: ['verb1'], resources: ['resource1'], apiGroups: ['apiGroup1'], nonResourceURLs: ['nonResourceUrl1']
|
|
400
|
+
}
|
|
401
|
+
];
|
|
402
|
+
const formRuleResult = formRules.roleTemplateRules('rbac.authorization.k8s.io.role')(testValue);
|
|
403
|
+
const expectedResult = JSON.stringify({ message: 'validation.roleTemplate.roleTemplateRules.noResourceAndNonResource' });
|
|
404
|
+
|
|
405
|
+
expect(formRuleResult).toStrictEqual(expectedResult);
|
|
406
|
+
});
|
|
407
|
+
|
|
396
408
|
it('"roleTemplateRules" : returns correct message when type is RBAC role and value is missing apiGroups', () => {
|
|
397
409
|
const testValue: [{}] = [
|
|
398
410
|
{
|
|
@@ -408,7 +420,7 @@ describe('formRules', () => {
|
|
|
408
420
|
it('"roleTemplateRules" : returns undefined when type is not RBAC role and value contains valid rules', () => {
|
|
409
421
|
const testValue: [{}] = [
|
|
410
422
|
{
|
|
411
|
-
verbs: ['verb1'],
|
|
423
|
+
verbs: ['verb1'], resources: ['resource1'], apiGroups: ['apiGroup1']
|
|
412
424
|
}
|
|
413
425
|
];
|
|
414
426
|
const formRuleResult = formRules.roleTemplateRules('nonrbactype')(testValue);
|
|
@@ -370,6 +370,10 @@ export default function(t: Translation, { key = 'Value' }: ValidationOptions): {
|
|
|
370
370
|
return t('validation.roleTemplate.roleTemplateRules.missingVerb');
|
|
371
371
|
}
|
|
372
372
|
|
|
373
|
+
if (val.some((rule: any) => rule.resources?.length && rule.nonResourceURLs?.length)) {
|
|
374
|
+
return t('validation.roleTemplate.roleTemplateRules.noResourceAndNonResource');
|
|
375
|
+
}
|
|
376
|
+
|
|
373
377
|
if (type === RBAC.ROLE) {
|
|
374
378
|
if (val.some((rule: any) => isEmpty(rule.resources))) {
|
|
375
379
|
return t('validation.roleTemplate.roleTemplateRules.missingResource');
|
|
@@ -6,6 +6,10 @@ export function roleTemplateRules(rules = [], getters, errors, validatorArgs = [
|
|
|
6
6
|
errors.push(getters['i18n/t']('validation.roleTemplate.roleTemplateRules.missingVerb'));
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
if (rules.some((rule) => rule.resources?.length && rule.nonResourceURLs?.length)) {
|
|
10
|
+
errors.push(getters['i18n/t']('validation.roleTemplate.roleTemplateRules.noResourceAndNonResource'));
|
|
11
|
+
}
|
|
12
|
+
|
|
9
13
|
if (validatorArgs[0] === RBAC.ROLE) {
|
|
10
14
|
if (rules.some((rule) => isEmpty(rule.resources))) {
|
|
11
15
|
errors.push(getters['i18n/t']('validation.roleTemplate.roleTemplateRules.missingResource'));
|
|
@@ -13,7 +17,11 @@ export function roleTemplateRules(rules = [], getters, errors, validatorArgs = [
|
|
|
13
17
|
if (rules.some((rule) => isEmpty(rule.apiGroups))) {
|
|
14
18
|
errors.push(getters['i18n/t']('validation.roleTemplate.roleTemplateRules.missingApiGroup'));
|
|
15
19
|
}
|
|
16
|
-
} else if (rules.some((rule) =>
|
|
20
|
+
} else if (rules.some((rule) => rule.resources?.length && rule.nonResourceUrls?.length)) {
|
|
21
|
+
errors.push(getters['i18n/t']('validation.roleTemplate.roleTemplateRules.noResourceAndNonResource'));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (rules.some((rule) => isEmpty(rule.resources) && isEmpty(rule.nonResourceURLs) && isEmpty(rule.apiGroups))) {
|
|
17
25
|
errors.push(getters['i18n/t']('validation.roleTemplate.roleTemplateRules.missingOneResource'));
|
|
18
26
|
}
|
|
19
27
|
}
|
package/utils/version.js
CHANGED
|
@@ -74,7 +74,7 @@ export function isPrerelease(version) {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
export function isDevBuild(version) {
|
|
77
|
-
if ( ['dev', 'master', 'head'].includes(version) || version.endsWith('-head') || version.match(/-rc\d+$/) ) {
|
|
77
|
+
if ( ['dev', 'master', 'head'].includes(version) || version.endsWith('-head') || version.match(/-rc\d+$/) || version.match(/-alpha\d+$/) ) {
|
|
78
78
|
return true;
|
|
79
79
|
}
|
|
80
80
|
|
package/vue.config.js
CHANGED
|
@@ -250,10 +250,6 @@ module.exports = function(dir, _appConfig) {
|
|
|
250
250
|
console.log(`Version: ${ dashboardVersion }`); // eslint-disable-line no-console
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
if ( !dev ) {
|
|
254
|
-
console.log(`Version: ${ dashboardVersion }`); // eslint-disable-line no-console
|
|
255
|
-
}
|
|
256
|
-
|
|
257
253
|
if ( resourceBase ) {
|
|
258
254
|
console.log(`Resource Base URL: ${ resourceBase }`); // eslint-disable-line no-console
|
|
259
255
|
}
|
|
@@ -410,6 +406,7 @@ module.exports = function(dir, _appConfig) {
|
|
|
410
406
|
rancherEnv,
|
|
411
407
|
dashboardVersion
|
|
412
408
|
}),
|
|
409
|
+
|
|
413
410
|
}));
|
|
414
411
|
|
|
415
412
|
// The static assets need to be in the built assets directory in order to get served (primarily the favicon)
|
package/yarn-error.log
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
Arguments:
|
|
2
|
+
/Users/aalves/.nvm/versions/node/v16.19.1/bin/node /Users/aalves/.nvm/versions/node/v16.19.1/bin/yarn publish . --new-version 0.3.22 --no-git-tag-version --access public
|
|
3
|
+
|
|
4
|
+
PATH:
|
|
5
|
+
/Users/aalves/.rd/bin:/Users/aalves/.nvm/versions/node/v16.19.1/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/aalves/.rd/bin:/Users/aalves/.nvm/versions/node/v16.19.1/bin:/opt/homebrew/bin:/opt/homebrew/sbin
|
|
6
|
+
|
|
7
|
+
Yarn version:
|
|
8
|
+
1.22.19
|
|
9
|
+
|
|
10
|
+
Node version:
|
|
11
|
+
16.19.1
|
|
12
|
+
|
|
13
|
+
Platform:
|
|
14
|
+
darwin arm64
|
|
15
|
+
|
|
16
|
+
Trace:
|
|
17
|
+
Error: https://registry.yarnpkg.com/-/user/org.couchdb.user:aalves08: failed to authenticate: Could not authenticate aalves08: bad password
|
|
18
|
+
at Request.params.callback [as _callback] (/Users/aalves/.nvm/versions/node/v16.19.1/lib/node_modules/yarn/lib/cli.js:66145:18)
|
|
19
|
+
at Request.self.callback (/Users/aalves/.nvm/versions/node/v16.19.1/lib/node_modules/yarn/lib/cli.js:140890:22)
|
|
20
|
+
at Request.emit (node:events:513:28)
|
|
21
|
+
at Request.<anonymous> (/Users/aalves/.nvm/versions/node/v16.19.1/lib/node_modules/yarn/lib/cli.js:141862:10)
|
|
22
|
+
at Request.emit (node:events:513:28)
|
|
23
|
+
at IncomingMessage.<anonymous> (/Users/aalves/.nvm/versions/node/v16.19.1/lib/node_modules/yarn/lib/cli.js:141784:12)
|
|
24
|
+
at Object.onceWrapper (node:events:627:28)
|
|
25
|
+
at IncomingMessage.emit (node:events:525:35)
|
|
26
|
+
at endReadableNT (node:internal/streams/readable:1358:12)
|
|
27
|
+
at processTicksAndRejections (node:internal/process/task_queues:83:21)
|
|
28
|
+
|
|
29
|
+
npm manifest:
|
|
30
|
+
{
|
|
31
|
+
"name": "@rancher/shell",
|
|
32
|
+
"version": "0.3.22",
|
|
33
|
+
"description": "Rancher Dashboard Shell",
|
|
34
|
+
"repository": "https://github.com/rancherlabs/dashboard",
|
|
35
|
+
"license": "Apache-2.0",
|
|
36
|
+
"author": "SUSE",
|
|
37
|
+
"private": false,
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=12"
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"**/*"
|
|
43
|
+
],
|
|
44
|
+
"scripts": {
|
|
45
|
+
"clean": "./scripts/clean",
|
|
46
|
+
"lint": "./node_modules/.bin/eslint --max-warnings 0 --ext .ts,.js,.vue .",
|
|
47
|
+
"test": "./node_modules/.bin/nyc ava --serial --verbose",
|
|
48
|
+
"dev": "./node_modules/.bin/vue-cli-service dev",
|
|
49
|
+
"docker-dev": "docker run --rm --name dashboard-dev -p 8005:8005 -e API=$API -v $(pwd):/src -v dashboard_node:/src/node_modules rancher/dashboard:dev",
|
|
50
|
+
"build": "./node_modules/.bin/vue-cli-service build",
|
|
51
|
+
"analyze": "./node_modules/.bin/vue-cli-service build --report",
|
|
52
|
+
"start": "./node_modules/.bin/vue-cli-service start",
|
|
53
|
+
"cy:run": "cypress run",
|
|
54
|
+
"cy:open": "cypress open",
|
|
55
|
+
"e2e:pre": "NODE_ENV=dev yarn build",
|
|
56
|
+
"e2e:run": "NODE_ENV=dev START_SERVER_AND_TEST_INSECURE=1 start-server-and-test start https://localhost:8005/ cy:run",
|
|
57
|
+
"e2e:dev": "start-server-and-test dev https://localhost:8005 cy:open"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@aws-sdk/client-ec2": "3.1.0",
|
|
61
|
+
"@aws-sdk/client-eks": "3.1.0",
|
|
62
|
+
"@aws-sdk/client-kms": "3.8.1",
|
|
63
|
+
"@babel/plugin-proposal-optional-chaining": "7.14.5",
|
|
64
|
+
"@babel/plugin-proposal-private-property-in-object": "7.14.5",
|
|
65
|
+
"@babel/preset-typescript": "7.16.7",
|
|
66
|
+
"@innologica/vue-dropdown-menu": "0.1.3",
|
|
67
|
+
"@novnc/novnc": "1.2.0",
|
|
68
|
+
"@nuxt/types": "2.14.6",
|
|
69
|
+
"@nuxt/typescript-build": "2.1.0",
|
|
70
|
+
"@nuxtjs/axios": "5.12.0",
|
|
71
|
+
"@nuxtjs/eslint-config-typescript": "6.0.1",
|
|
72
|
+
"@nuxtjs/webpack-profile": "0.1.0",
|
|
73
|
+
"@popperjs/core": "2.4.4",
|
|
74
|
+
"@types/node": "16.4.3",
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "4.33.0",
|
|
76
|
+
"@typescript-eslint/parser": "4.33.0",
|
|
77
|
+
"@vue/cli-plugin-babel": "4.5.18",
|
|
78
|
+
"@vue/cli-plugin-typescript": "4.5.18",
|
|
79
|
+
"@vue/cli-service": "4.5.18",
|
|
80
|
+
"@vue/test-utils": "1.2.1",
|
|
81
|
+
"@vue/vue2-jest": "27.0.0",
|
|
82
|
+
"add": "2.0.6",
|
|
83
|
+
"ansi_up": "5.0.0",
|
|
84
|
+
"babel-eslint": "10.1.0",
|
|
85
|
+
"babel-plugin-module-resolver": "4.0.0",
|
|
86
|
+
"babel-preset-vue": "2.0.2",
|
|
87
|
+
"browser-env": "3.3.0",
|
|
88
|
+
"cookie": "0.5.0",
|
|
89
|
+
"cookie-universal-nuxt": "2.1.4",
|
|
90
|
+
"core-js": "3.21.1",
|
|
91
|
+
"cron-validator": "1.2.0",
|
|
92
|
+
"cronstrue": "1.95.0",
|
|
93
|
+
"cross-env": "6.0.3",
|
|
94
|
+
"css-loader": "6.7.3",
|
|
95
|
+
"csv-loader": "3.0.3",
|
|
96
|
+
"cypress": "10.3.1",
|
|
97
|
+
"d3": "7.3.0",
|
|
98
|
+
"d3-selection": "1.4.1",
|
|
99
|
+
"dagre-d3": "0.6.4",
|
|
100
|
+
"dayjs": "1.8.29",
|
|
101
|
+
"diff2html": "3.4.24",
|
|
102
|
+
"dompurify": "2.4.5",
|
|
103
|
+
"eslint": "7.32.0",
|
|
104
|
+
"eslint-config-standard": "16.0.3",
|
|
105
|
+
"eslint-import-resolver-node": "0.3.4",
|
|
106
|
+
"eslint-module-utils": "2.6.1",
|
|
107
|
+
"eslint-plugin-cypress": "2.12.1",
|
|
108
|
+
"eslint-plugin-import": "2.23.4",
|
|
109
|
+
"eslint-plugin-jest": "24.4.0",
|
|
110
|
+
"eslint-plugin-n": "15.2.0",
|
|
111
|
+
"eslint-plugin-vue": "9.10.0",
|
|
112
|
+
"event-target-shim": "5.0.1",
|
|
113
|
+
"express": "4.17.1",
|
|
114
|
+
"file-saver": "2.0.2",
|
|
115
|
+
"frontmatter-markdown-loader": "3.7.0",
|
|
116
|
+
"identicon.js": "2.3.3",
|
|
117
|
+
"intl-messageformat": "7.8.4",
|
|
118
|
+
"is-url": "1.2.4",
|
|
119
|
+
"jest": "27.5.1",
|
|
120
|
+
"jest-serializer-vue": "2.0.2",
|
|
121
|
+
"jexl": "2.2.2",
|
|
122
|
+
"jquery": "3.5.1",
|
|
123
|
+
"js-cookie": "2.2.1",
|
|
124
|
+
"js-yaml": "4.1.0",
|
|
125
|
+
"js-yaml-loader": "1.2.2",
|
|
126
|
+
"jsdiff": "1.1.1",
|
|
127
|
+
"jsdom-global": "3.0.2",
|
|
128
|
+
"jsonpath-plus": "6.0.1",
|
|
129
|
+
"jsrsasign": "10.5.25",
|
|
130
|
+
"jszip": "3.8.0",
|
|
131
|
+
"lodash": "4.17.21",
|
|
132
|
+
"marked": "4.0.17",
|
|
133
|
+
"nodemon": "2.0.22",
|
|
134
|
+
"nuxt": "2.15.8",
|
|
135
|
+
"nyc": "15.1.0",
|
|
136
|
+
"papaparse": "5.3.0",
|
|
137
|
+
"portal-vue": "2.1.7",
|
|
138
|
+
"rancher-icons": "rancher/icons#v2.0.16",
|
|
139
|
+
"require-extension-hooks": "0.3.3",
|
|
140
|
+
"require-extension-hooks-babel": "1.0.0",
|
|
141
|
+
"require-extension-hooks-vue": "3.0.0",
|
|
142
|
+
"sass": "1.51.0",
|
|
143
|
+
"sass-loader": "10.2.1",
|
|
144
|
+
"serve-static": "1.14.1",
|
|
145
|
+
"set-cookie-parser": "2.4.6",
|
|
146
|
+
"shell-quote": "1.7.3",
|
|
147
|
+
"sinon": "8.1.1",
|
|
148
|
+
"start-server-and-test": "1.13.1",
|
|
149
|
+
"style-loader": "1.2.1",
|
|
150
|
+
"ts-node": "8.10.2",
|
|
151
|
+
"typescript": "4.1.6",
|
|
152
|
+
"url-parse": "1.5.10",
|
|
153
|
+
"v-tooltip": "2.0.3",
|
|
154
|
+
"vue": "2.7.14",
|
|
155
|
+
"vue-clipboard2": "0.3.1",
|
|
156
|
+
"vue-codemirror": "4.0.6",
|
|
157
|
+
"vue-js-modal": "1.3.35",
|
|
158
|
+
"vue-resize": "0.4.5",
|
|
159
|
+
"vue-select": "3.18.3",
|
|
160
|
+
"vue-server-renderer": "2.7.14",
|
|
161
|
+
"vue-shortkey": "3.1.7",
|
|
162
|
+
"vue-template-compiler": "2.7.14",
|
|
163
|
+
"vue-virtual-scroll-list": "^2.3.4",
|
|
164
|
+
"vue2-transitions": "0.3.0",
|
|
165
|
+
"vuedraggable": "2.24.3",
|
|
166
|
+
"vuex": "3.6.2",
|
|
167
|
+
"webpack-bundle-analyzer": "4.5.0",
|
|
168
|
+
"webpack-virtual-modules": "0.4.3",
|
|
169
|
+
"xterm": "5.0.0",
|
|
170
|
+
"xterm-addon-fit": "0.6.0",
|
|
171
|
+
"xterm-addon-search": "0.10.0",
|
|
172
|
+
"xterm-addon-web-links": "0.7.0",
|
|
173
|
+
"xterm-addon-webgl": "0.13.0",
|
|
174
|
+
"worker-loader": "3.0.8",
|
|
175
|
+
"yarn": "1.22.18"
|
|
176
|
+
},
|
|
177
|
+
"resolutions": {
|
|
178
|
+
"ejs": "^3.1.7",
|
|
179
|
+
"json5": ">=2.2.2",
|
|
180
|
+
"d3-color": ">=3.1.0",
|
|
181
|
+
"glob-parent": ">=5.1.2",
|
|
182
|
+
"node-forge": ">=1.3.0",
|
|
183
|
+
"qs": ">=6.7.3",
|
|
184
|
+
"nth-check": ">=2.0.1",
|
|
185
|
+
"follow-redirects": ">=1.14.7",
|
|
186
|
+
"merge": ">=2.1.1"
|
|
187
|
+
},
|
|
188
|
+
"nyc": {
|
|
189
|
+
"extension": [
|
|
190
|
+
".js",
|
|
191
|
+
".vue"
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
yarn manifest:
|
|
197
|
+
No manifest
|
|
198
|
+
|
|
199
|
+
Lockfile:
|
|
200
|
+
No lockfile
|