dashboard-shell-shell 3.0.5-test.4 → 3.0.5-test.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.
- package/assets/brand/harvester/favicon.png +0 -0
- package/assets/brand/suse/favicon.png +0 -0
- package/assets/images/pl/half-logo.svg +23 -2
- package/assets/images/pl/harvester.png +0 -0
- package/assets/styles/app.scss +0 -4
- package/assets/styles/base/_basic.scss +2 -2
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/base/_typography.scss +1 -2
- package/assets/styles/base/_variables.scss +4 -11
- package/assets/styles/global/_button.scss +27 -45
- package/assets/styles/global/_columns.scss +1 -3
- package/assets/styles/global/_form.scss +13 -45
- package/assets/styles/global/_labeled-input.scss +26 -54
- package/assets/styles/global/_layout.scss +3 -8
- package/assets/styles/global/_select.scss +17 -25
- package/assets/styles/global/_table.scss +1 -7
- package/assets/styles/global/_tooltip.scss +6 -54
- package/assets/styles/themes/_dark.scss +0 -3
- package/assets/styles/themes/_light.scss +42 -63
- package/assets/styles/vendor/vue-select.scss +9 -22
- package/assets/translations/en-us.yaml +4 -28
- package/assets/translations/zh-hans.yaml +189 -376
- package/components/ActionDropdown.vue +1 -2
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +0 -2
- package/components/AppModal.vue +5 -46
- package/components/BrandImage.vue +0 -1
- package/components/ButtonDropdown.vue +4 -26
- package/components/ButtonMultiAction.vue +0 -1
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +6 -20
- package/components/ConsumptionGauge.vue +5 -24
- package/components/CruResource.vue +8 -9
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +17 -29
- package/components/ExplorerProjectsNamespaces.vue +5 -19
- package/components/GlobalRoleBindings.vue +48 -112
- package/components/GrafanaDashboard.vue +4 -4
- package/components/GrowlManager.vue +1 -3
- package/components/HardwareResourceGauge.vue +3 -39
- package/components/IndentedPanel.vue +10 -4
- package/components/InfoBox.vue +3 -3
- package/components/InputOrDisplay.vue +2 -28
- package/components/LabelValue.vue +1 -20
- package/components/ModalWithCard.vue +3 -12
- package/components/PodSecurityAdmission.vue +1 -1
- package/components/PromptModal.vue +1 -1
- package/components/PromptRemove.vue +11 -30
- package/components/ResourceDetail/Masthead/legacy.vue +38 -181
- package/components/ResourceDetail/legacy.vue +13 -29
- package/components/ResourceList/Masthead.vue +54 -226
- package/components/ResourceList/ResourceLoadingIndicator.vue +2 -5
- package/components/ResourceTable.vue +2 -24
- package/components/SideNav.vue +20 -74
- package/components/SortableTable/THead.vue +3 -33
- package/components/SortableTable/index.vue +464 -1017
- package/components/SortableTable/paging.js +16 -26
- package/components/SortableTable/selection.js +2 -2
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +29 -47
- package/components/YamlEditor.vue +1 -0
- package/components/auth/Principal.vue +12 -36
- package/components/auth/RoleDetailEdit.vue +7 -58
- package/components/auth/SelectPrincipal.vue +0 -1
- package/components/form/ArrayList.vue +33 -41
- package/components/form/ArrayListGrouped.vue +2 -10
- package/components/form/ArrayListSelect.vue +1 -1
- package/components/form/BannerSettings.vue +59 -64
- package/components/form/ChangePassword.vue +4 -4
- package/components/form/ColorInput.vue +8 -32
- package/components/form/Footer.vue +8 -11
- package/components/form/InputWithSelect.vue +5 -8
- package/components/form/KeyValue.vue +7 -47
- package/components/form/LabeledSelect.vue +241 -212
- package/components/form/Labels.vue +3 -3
- package/components/form/MatchExpressions.vue +7 -24
- package/components/form/Members/ClusterPermissionsEditor.vue +2 -1
- package/components/form/Members/MembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +20 -59
- package/components/form/Password.vue +7 -16
- package/components/form/PodAffinity.vue +5 -4
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +17 -18
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +6 -3
- package/components/form/Select.vue +2 -5
- package/components/form/SimpleSecretSelector.vue +9 -29
- package/components/form/UnitInput.vue +3 -8
- package/components/formatter/BadgeStateFormatter.vue +5 -8
- package/components/formatter/LiveDate.vue +3 -3
- package/components/nav/Favorite.vue +1 -5
- package/components/nav/Group.vue +99 -132
- package/components/nav/Header.vue +27 -124
- package/components/nav/HeaderPageActionMenu.vue +0 -1
- package/components/nav/NamespaceFilter.vue +15 -19
- package/components/nav/TopLevelMenu.vue +119 -182
- package/components/nav/Type.vue +41 -63
- package/composables/useClickOutside.ts +1 -1
- package/config/private-label.js +11 -15
- package/config/product/auth.js +7 -17
- package/config/product/settings.js +9 -19
- package/config/settings.ts +0 -28
- package/config/table-headers.js +2 -3
- package/dialog/ForceMachineRemoveDialog.vue +2 -2
- package/dialog/ScalePoolDownDialog.vue +2 -2
- package/edit/management.cattle.io.user.vue +4 -17
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +19 -19
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +31 -31
- package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +12 -36
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
- package/edit/monitoring.coreos.com.receiver/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +5 -5
- package/edit/monitoring.coreos.com.receiver/types/slack.vue +4 -4
- package/edit/namespace.vue +2 -1
- package/edit/token.vue +12 -31
- package/edit/workload/index.vue +1 -1
- package/list/management.cattle.io.setting.vue +13 -22
- package/list/management.cattle.io.user.vue +3 -7
- package/list/namespace.vue +0 -3
- package/list/provisioning.cattle.io.cluster.vue +7 -6
- package/mixins/brand.js +0 -17
- package/package.json +1 -1
- package/pages/account/index.vue +12 -74
- package/pages/auth/login.vue +51 -214
- package/pages/auth/setup.vue +19 -142
- package/pages/c/_cluster/_product/namespaces.vue +4 -4
- package/pages/c/_cluster/auth/roles/index.vue +1 -19
- package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
- package/pages/c/_cluster/settings/banners.vue +102 -174
- package/pages/c/_cluster/settings/brand.vue +302 -350
- package/pages/c/_cluster/settings/performance.vue +38 -61
- package/pages/home.vue +30 -70
- package/pages/prefs.vue +25 -27
- package/promptRemove/mixin/roleDeletionCheck.js +2 -2
- package/public/index.html +4 -4
- package/rancher-components/BadgeState/BadgeState.vue +4 -6
- package/rancher-components/Banner/Banner.vue +8 -12
- package/rancher-components/Card/Card.vue +8 -7
- package/rancher-components/Form/Checkbox/Checkbox.vue +0 -4
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +3 -42
- package/rancher-components/Form/Radio/RadioButton.vue +11 -35
- package/rancher-components/Form/Radio/RadioGroup.vue +5 -13
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +0 -1
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +4 -12
- package/rancher-components/RcDropdown/RcDropdown.vue +7 -35
- package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +4 -9
- package/rancher-components/RcDropdown/types.ts +0 -1
- package/rancher-components/StringList/StringList.vue +1 -1
- package/static/favicon.ico +0 -0
- package/static/favicon.png +0 -0
- package/static/loading-indicator.html +3 -3
- package/store/i18n.js +2 -2
- package/store/modal.ts +3 -3
- package/store/prefs.js +4 -11
- package/store/type-map.js +2 -32
- package/types/shell/index.d.ts +67 -74
- package/utils/error.js +8 -87
- package/utils/router.js +0 -21
- package/utils/select.js +3 -26
- package/utils/string.js +5 -8
- package/utils/title.ts +1 -1
- package/assets/icons/demo.css +0 -539
- package/assets/icons/demo.css:Zone.Identifier +0 -0
- package/assets/icons/demo_index.html +0 -1131
- package/assets/icons/demo_index.html:Zone.Identifier +0 -0
- package/assets/icons/iconfont.css +0 -216
- package/assets/icons/iconfont.css:Zone.Identifier +0 -0
- package/assets/icons/iconfont.js +0 -1
- package/assets/icons/iconfont.js:Zone.Identifier +0 -0
- package/assets/icons/iconfont.json +0 -324
- package/assets/icons/iconfont.json:Zone.Identifier +0 -0
- package/assets/icons/iconfont.ttf +0 -0
- package/assets/icons/iconfont.ttf:Zone.Identifier +0 -0
- package/assets/icons/iconfont.woff +0 -0
- package/assets/icons/iconfont.woff2 +0 -0
- package/assets/icons/iconfont.woff2:Zone.Identifier +0 -0
- package/assets/icons/iconfont.woff:Zone.Identifier +0 -0
- package/assets/images/API.svg +0 -3
- package/assets/images/action.svg +0 -6
- package/assets/images/login/password.svg +0 -20
- package/assets/images/login/user.svg +0 -6
- package/assets/images/login-bg.png +0 -0
- package/assets/images/login-left.png +0 -0
- package/assets/images/login-logo.svg +0 -19
- package/assets/images/logo.png +0 -0
- package/assets/images/pl/logo.png +0 -0
- package/assets/images/promp-yellow.svg +0 -5
- package/assets/images/user.png +0 -0
- package/assets/styles/all.scss +0 -63
- package/components/DotState.vue +0 -84
- package/utils/errorTranslate.json +0 -1336
package/store/prefs.js
CHANGED
|
@@ -57,14 +57,14 @@ export const PINNED_CLUSTERS = create('pinned-clusters', [], { parseJSON });
|
|
|
57
57
|
export const GROUP_RESOURCES = create('group-by', 'namespace');
|
|
58
58
|
export const DIFF = create('diff', 'unified', { options: ['unified', 'split'] });
|
|
59
59
|
export const THEME = create('theme', 'auto', {
|
|
60
|
-
options: ['light'],
|
|
60
|
+
options: ['light', 'auto', 'dark'],
|
|
61
61
|
asCookie,
|
|
62
62
|
parseJSON,
|
|
63
63
|
mangleRead: (x) => x.replace(/^ui-/, ''),
|
|
64
|
-
mangleWrite: (x) => `ui
|
|
64
|
+
mangleWrite: (x) => `ui-${ x }`,
|
|
65
65
|
});
|
|
66
66
|
export const PREFERS_SCHEME = create('pcs', '', { asCookie, asUserPreference: false });
|
|
67
|
-
export const LOCALE = create('locale', '
|
|
67
|
+
export const LOCALE = create('locale', 'en-us', { asCookie });
|
|
68
68
|
export const KEYMAP = create('keymap', 'sublime', { options: ['sublime', 'emacs', 'vim'] });
|
|
69
69
|
export const ROWS_PER_PAGE = create('per-page', 100, { options: [10, 25, 50, 100], parseJSON });
|
|
70
70
|
export const LOGS_WRAP = create('logs-wrap', true, { parseJSON });
|
|
@@ -149,11 +149,6 @@ export const getters = {
|
|
|
149
149
|
|
|
150
150
|
const def = clone(definition.def);
|
|
151
151
|
|
|
152
|
-
if (key === THEME) {
|
|
153
|
-
// 无论 state 里存的是什么,都强制返回 light
|
|
154
|
-
return 'light';
|
|
155
|
-
}
|
|
156
|
-
|
|
157
152
|
return def;
|
|
158
153
|
},
|
|
159
154
|
|
|
@@ -475,9 +470,7 @@ export const actions = {
|
|
|
475
470
|
try {
|
|
476
471
|
value = JSON.parse(value);
|
|
477
472
|
} catch (err) {
|
|
478
|
-
//
|
|
479
|
-
console.warn(`Pref ${ key } has invalid JSON, resetting`, value);
|
|
480
|
-
value = definition.defaultValue || null;
|
|
473
|
+
console.error('Error parsing server pref', key, value, err); // eslint-disable-line no-console
|
|
481
474
|
continue;
|
|
482
475
|
}
|
|
483
476
|
}
|
package/store/type-map.js
CHANGED
|
@@ -395,7 +395,6 @@ export function productsLoaded() {
|
|
|
395
395
|
|
|
396
396
|
export const state = function() {
|
|
397
397
|
return {
|
|
398
|
-
actionsWidth: 0,
|
|
399
398
|
products: [],
|
|
400
399
|
virtualTypes: {},
|
|
401
400
|
spoofedTypes: {},
|
|
@@ -465,8 +464,6 @@ export const getters = {
|
|
|
465
464
|
};
|
|
466
465
|
},
|
|
467
466
|
|
|
468
|
-
actionsWidth: (state) => state.actionsWidth,
|
|
469
|
-
|
|
470
467
|
// Turns a group name into a display label (e.g. management.cattle.io.v3.cluster -> Cluster)
|
|
471
468
|
groupLabelFor(state) {
|
|
472
469
|
return (schemaOrName) => {
|
|
@@ -512,12 +509,6 @@ export const getters = {
|
|
|
512
509
|
return state.basicTypes?.[product]?.[schemaId];
|
|
513
510
|
};
|
|
514
511
|
},
|
|
515
|
-
|
|
516
|
-
groupsForVirTypes(state) {
|
|
517
|
-
return (product, name) => {
|
|
518
|
-
return state.virtualTypes?.[product].find(item => item.name === name)?.icon;
|
|
519
|
-
};
|
|
520
|
-
},
|
|
521
512
|
|
|
522
513
|
optionsFor(state, getters, rootState, rootGetters) {
|
|
523
514
|
const def = {
|
|
@@ -670,18 +661,7 @@ export const getters = {
|
|
|
670
661
|
|
|
671
662
|
const label = typeObj.labelKey ? rootGetters['i18n/t'](typeObj.labelKey) || typeObj.label : typeObj.label;
|
|
672
663
|
|
|
673
|
-
|
|
674
|
-
let icon = typeObj.icon;
|
|
675
|
-
|
|
676
|
-
if ( (!virtual || typeObj.isSpoofed ) && !icon ) {
|
|
677
|
-
if ( namespaced ) {
|
|
678
|
-
icon = 'folder';
|
|
679
|
-
} else {
|
|
680
|
-
icon = 'globe';
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
let labelDisplay = highlightLabel(label, icon, count, typeObj.schema);
|
|
664
|
+
let labelDisplay = highlightLabel(label, count, typeObj.schema);
|
|
685
665
|
|
|
686
666
|
// If we did not match on just the label, add the schema name and see if that matches
|
|
687
667
|
if (!labelDisplay && typeObj.schema?.attributes) {
|
|
@@ -798,7 +778,7 @@ export const getters = {
|
|
|
798
778
|
return group;
|
|
799
779
|
}
|
|
800
780
|
|
|
801
|
-
function highlightLabel(original,
|
|
781
|
+
function highlightLabel(original, count, schema) {
|
|
802
782
|
let label = escapeHtml(original);
|
|
803
783
|
|
|
804
784
|
if ( searchRegex ) {
|
|
@@ -822,12 +802,6 @@ export const getters = {
|
|
|
822
802
|
}
|
|
823
803
|
}
|
|
824
804
|
|
|
825
|
-
if ( icon ) {
|
|
826
|
-
console.log(icon)
|
|
827
|
-
label = `<i class="icon icon-fw icon-${ icon }"></i>${ label }`;
|
|
828
|
-
console.log(label)
|
|
829
|
-
}
|
|
830
|
-
|
|
831
805
|
return label;
|
|
832
806
|
}
|
|
833
807
|
};
|
|
@@ -1497,10 +1471,6 @@ export const getters = {
|
|
|
1497
1471
|
};
|
|
1498
1472
|
|
|
1499
1473
|
export const mutations = {
|
|
1500
|
-
setActionsWidth(state, width) {
|
|
1501
|
-
state.actionsWidth = width
|
|
1502
|
-
},
|
|
1503
|
-
|
|
1504
1474
|
schemaChanged(state) {
|
|
1505
1475
|
state.schemaGeneration = state.schemaGeneration + 1;
|
|
1506
1476
|
},
|
package/types/shell/index.d.ts
CHANGED
|
@@ -305,8 +305,6 @@ export namespace NAME {
|
|
|
305
305
|
export { sort_3 as sort };
|
|
306
306
|
let formatter_3: string;
|
|
307
307
|
export { formatter_3 as formatter };
|
|
308
|
-
let width_2: number;
|
|
309
|
-
export { width_2 as width };
|
|
310
308
|
let canBeVariable_1: boolean;
|
|
311
309
|
export { canBeVariable_1 as canBeVariable };
|
|
312
310
|
}
|
|
@@ -331,8 +329,8 @@ export namespace SIMPLE_NAME {
|
|
|
331
329
|
export { value_5 as value };
|
|
332
330
|
let sort_5: string[];
|
|
333
331
|
export { sort_5 as sort };
|
|
334
|
-
let
|
|
335
|
-
export {
|
|
332
|
+
let width_2: number;
|
|
333
|
+
export { width_2 as width };
|
|
336
334
|
let canBeVariable_2: boolean;
|
|
337
335
|
export { canBeVariable_2 as canBeVariable };
|
|
338
336
|
}
|
|
@@ -537,8 +535,8 @@ export namespace CPU {
|
|
|
537
535
|
export { value_21 as value };
|
|
538
536
|
let formatter_11: string;
|
|
539
537
|
export { formatter_11 as formatter };
|
|
540
|
-
let
|
|
541
|
-
export {
|
|
538
|
+
let width_3: number;
|
|
539
|
+
export { width_3 as width };
|
|
542
540
|
}
|
|
543
541
|
export namespace RAM {
|
|
544
542
|
let name_23: string;
|
|
@@ -553,8 +551,8 @@ export namespace RAM {
|
|
|
553
551
|
export { value_22 as value };
|
|
554
552
|
let formatter_12: string;
|
|
555
553
|
export { formatter_12 as formatter };
|
|
556
|
-
let
|
|
557
|
-
export {
|
|
554
|
+
let width_4: number;
|
|
555
|
+
export { width_4 as width };
|
|
558
556
|
}
|
|
559
557
|
export namespace PRINCIPAL {
|
|
560
558
|
let name_24: string;
|
|
@@ -581,8 +579,8 @@ export namespace PODS {
|
|
|
581
579
|
export { value_24 as value };
|
|
582
580
|
let formatter_14: string;
|
|
583
581
|
export { formatter_14 as formatter };
|
|
584
|
-
let
|
|
585
|
-
export {
|
|
582
|
+
let width_5: number;
|
|
583
|
+
export { width_5 as width };
|
|
586
584
|
}
|
|
587
585
|
export namespace AGE {
|
|
588
586
|
let name_26: string;
|
|
@@ -599,8 +597,8 @@ export namespace AGE {
|
|
|
599
597
|
export { search_4 as search };
|
|
600
598
|
let formatter_15: string;
|
|
601
599
|
export { formatter_15 as formatter };
|
|
602
|
-
let
|
|
603
|
-
export {
|
|
600
|
+
let width_6: number;
|
|
601
|
+
export { width_6 as width };
|
|
604
602
|
let align_1: string;
|
|
605
603
|
export { align_1 as align };
|
|
606
604
|
}
|
|
@@ -637,8 +635,8 @@ export namespace DESCRIPTION {
|
|
|
637
635
|
export { sort_28 as sort };
|
|
638
636
|
let formatter_17: string;
|
|
639
637
|
export { formatter_17 as formatter };
|
|
640
|
-
let
|
|
641
|
-
export {
|
|
638
|
+
let width_7: number;
|
|
639
|
+
export { width_7 as width };
|
|
642
640
|
}
|
|
643
641
|
export namespace NS_SNAPSHOT_QUOTA {
|
|
644
642
|
let name_29: string;
|
|
@@ -728,8 +726,8 @@ export namespace SCALE {
|
|
|
728
726
|
export { sort_33 as sort };
|
|
729
727
|
let formatter_23: string;
|
|
730
728
|
export { formatter_23 as formatter };
|
|
731
|
-
let
|
|
732
|
-
export {
|
|
729
|
+
let width_8: number;
|
|
730
|
+
export { width_8 as width };
|
|
733
731
|
let align_4: string;
|
|
734
732
|
export { align_4 as align };
|
|
735
733
|
}
|
|
@@ -750,8 +748,8 @@ export namespace SUCCESS {
|
|
|
750
748
|
export { labelKey_36 as labelKey };
|
|
751
749
|
let value_36: string;
|
|
752
750
|
export { value_36 as value };
|
|
753
|
-
let
|
|
754
|
-
export {
|
|
751
|
+
let width_9: number;
|
|
752
|
+
export { width_9 as width };
|
|
755
753
|
let align_5: string;
|
|
756
754
|
export { align_5 as align };
|
|
757
755
|
}
|
|
@@ -762,8 +760,8 @@ export namespace REQ_RATE {
|
|
|
762
760
|
export { labelKey_37 as labelKey };
|
|
763
761
|
let value_37: string;
|
|
764
762
|
export { value_37 as value };
|
|
765
|
-
let
|
|
766
|
-
export {
|
|
763
|
+
let width_10: number;
|
|
764
|
+
export { width_10 as width };
|
|
767
765
|
let align_6: string;
|
|
768
766
|
export { align_6 as align };
|
|
769
767
|
}
|
|
@@ -774,8 +772,8 @@ export namespace P95 {
|
|
|
774
772
|
export { labelKey_38 as labelKey };
|
|
775
773
|
let value_38: string;
|
|
776
774
|
export { value_38 as value };
|
|
777
|
-
let
|
|
778
|
-
export {
|
|
775
|
+
let width_11: number;
|
|
776
|
+
export { width_11 as width };
|
|
779
777
|
let align_7: string;
|
|
780
778
|
export { align_7 as align };
|
|
781
779
|
}
|
|
@@ -833,8 +831,8 @@ export namespace TARGET_KIND {
|
|
|
833
831
|
export { labelKey_43 as labelKey };
|
|
834
832
|
let value_43: string;
|
|
835
833
|
export { value_43 as value };
|
|
836
|
-
let
|
|
837
|
-
export {
|
|
834
|
+
let width_12: number;
|
|
835
|
+
export { width_12 as width };
|
|
838
836
|
}
|
|
839
837
|
export namespace TARGET {
|
|
840
838
|
let name_44: string;
|
|
@@ -963,8 +961,8 @@ export namespace SIMPLE_TYPE {
|
|
|
963
961
|
export { value_53 as value };
|
|
964
962
|
let sort_45: string[];
|
|
965
963
|
export { sort_45 as sort };
|
|
966
|
-
let
|
|
967
|
-
export {
|
|
964
|
+
let width_13: number;
|
|
965
|
+
export { width_13 as width };
|
|
968
966
|
}
|
|
969
967
|
export namespace IMAGE_SIZE {
|
|
970
968
|
let name_54: string;
|
|
@@ -989,8 +987,8 @@ export namespace TYPE {
|
|
|
989
987
|
export { getValue_11 as getValue };
|
|
990
988
|
let sort_47: string[];
|
|
991
989
|
export { sort_47 as sort };
|
|
992
|
-
let
|
|
993
|
-
export {
|
|
990
|
+
let width_14: number;
|
|
991
|
+
export { width_14 as width };
|
|
994
992
|
}
|
|
995
993
|
export namespace SUB_TYPE {
|
|
996
994
|
let name_56: string;
|
|
@@ -1001,8 +999,8 @@ export namespace SUB_TYPE {
|
|
|
1001
999
|
export { value_56 as value };
|
|
1002
1000
|
let sort_48: string[];
|
|
1003
1001
|
export { sort_48 as sort };
|
|
1004
|
-
let
|
|
1005
|
-
export {
|
|
1002
|
+
let width_15: number;
|
|
1003
|
+
export { width_15 as width };
|
|
1006
1004
|
}
|
|
1007
1005
|
export namespace EVENT_TYPE {
|
|
1008
1006
|
let name_57: string;
|
|
@@ -1023,8 +1021,8 @@ export namespace STATUS {
|
|
|
1023
1021
|
export { value_58 as value };
|
|
1024
1022
|
let sort_50: string[];
|
|
1025
1023
|
export { sort_50 as sort };
|
|
1026
|
-
let
|
|
1027
|
-
export {
|
|
1024
|
+
let width_16: number;
|
|
1025
|
+
export { width_16 as width };
|
|
1028
1026
|
}
|
|
1029
1027
|
export namespace LAST_SEEN_TIME {
|
|
1030
1028
|
let name_59: string;
|
|
@@ -1052,8 +1050,8 @@ export namespace LAST_HEARTBEAT_TIME {
|
|
|
1052
1050
|
export { sort_52 as sort };
|
|
1053
1051
|
let formatter_31: string;
|
|
1054
1052
|
export { formatter_31 as formatter };
|
|
1055
|
-
let
|
|
1056
|
-
export {
|
|
1053
|
+
let width_17: number;
|
|
1054
|
+
export { width_17 as width };
|
|
1057
1055
|
}
|
|
1058
1056
|
export namespace REASON {
|
|
1059
1057
|
let name_61: string;
|
|
@@ -1222,8 +1220,8 @@ export namespace INGRESS_DEFAULT_BACKEND {
|
|
|
1222
1220
|
export { sort_67 as sort };
|
|
1223
1221
|
let formatter_37: string;
|
|
1224
1222
|
export { formatter_37 as formatter };
|
|
1225
|
-
let
|
|
1226
|
-
export {
|
|
1223
|
+
let width_18: number;
|
|
1224
|
+
export { width_18 as width };
|
|
1227
1225
|
let align_10: string;
|
|
1228
1226
|
export { align_10 as align };
|
|
1229
1227
|
}
|
|
@@ -1306,8 +1304,8 @@ export namespace RESOURCES {
|
|
|
1306
1304
|
export { value_82 as value };
|
|
1307
1305
|
let sort_74: string;
|
|
1308
1306
|
export { sort_74 as sort };
|
|
1309
|
-
let
|
|
1310
|
-
export {
|
|
1307
|
+
let width_19: number;
|
|
1308
|
+
export { width_19 as width };
|
|
1311
1309
|
}
|
|
1312
1310
|
export namespace URL {
|
|
1313
1311
|
let name_83: string;
|
|
@@ -1376,8 +1374,8 @@ export namespace WORKLOAD_HEALTH_SCALE {
|
|
|
1376
1374
|
export { formatter_44 as formatter };
|
|
1377
1375
|
export function getValue_13(): any;
|
|
1378
1376
|
export { getValue_13 as getValue };
|
|
1379
|
-
let
|
|
1380
|
-
export {
|
|
1377
|
+
let width_20: number;
|
|
1378
|
+
export { width_20 as width };
|
|
1381
1379
|
export let skipSelect: boolean;
|
|
1382
1380
|
let delayLoading_1: boolean;
|
|
1383
1381
|
export { delayLoading_1 as delayLoading };
|
|
@@ -1401,8 +1399,8 @@ export namespace FLEET_SUMMARY {
|
|
|
1401
1399
|
export { formatter_45 as formatter };
|
|
1402
1400
|
let align_11: string;
|
|
1403
1401
|
export { align_11 as align };
|
|
1404
|
-
let
|
|
1405
|
-
export {
|
|
1402
|
+
let width_21: number;
|
|
1403
|
+
export { width_21 as width };
|
|
1406
1404
|
}
|
|
1407
1405
|
export namespace FLEET_APPLICATION_TYPE {
|
|
1408
1406
|
let name_89: string;
|
|
@@ -1417,8 +1415,8 @@ export namespace FLEET_APPLICATION_TYPE {
|
|
|
1417
1415
|
export { search_10 as search };
|
|
1418
1416
|
let align_12: string;
|
|
1419
1417
|
export { align_12 as align };
|
|
1420
|
-
let
|
|
1421
|
-
export {
|
|
1418
|
+
let width_22: number;
|
|
1419
|
+
export { width_22 as width };
|
|
1422
1420
|
}
|
|
1423
1421
|
export namespace FLEET_APPLICATION_SOURCE {
|
|
1424
1422
|
let name_90: string;
|
|
@@ -1473,8 +1471,8 @@ export namespace FLEET_APPLICATION_RESOURCES_SUMMARY {
|
|
|
1473
1471
|
export { formatter_48 as formatter };
|
|
1474
1472
|
let align_13: string;
|
|
1475
1473
|
export { align_13 as align };
|
|
1476
|
-
let
|
|
1477
|
-
export {
|
|
1474
|
+
let width_23: number;
|
|
1475
|
+
export { width_23 as width };
|
|
1478
1476
|
}
|
|
1479
1477
|
export namespace FLEET_REPO_CLUSTER_SUMMARY {
|
|
1480
1478
|
let name_94: string;
|
|
@@ -1491,8 +1489,8 @@ export namespace FLEET_REPO_CLUSTER_SUMMARY {
|
|
|
1491
1489
|
export { formatter_49 as formatter };
|
|
1492
1490
|
let align_14: string;
|
|
1493
1491
|
export { align_14 as align };
|
|
1494
|
-
let
|
|
1495
|
-
export {
|
|
1492
|
+
let width_24: number;
|
|
1493
|
+
export { width_24 as width };
|
|
1496
1494
|
}
|
|
1497
1495
|
export namespace FLEET_REPO_PER_CLUSTER_STATE {
|
|
1498
1496
|
let name_95: string;
|
|
@@ -1503,8 +1501,8 @@ export namespace FLEET_REPO_PER_CLUSTER_STATE {
|
|
|
1503
1501
|
export { tooltip_3 as tooltip };
|
|
1504
1502
|
let sort_85: string[];
|
|
1505
1503
|
export { sort_85 as sort };
|
|
1506
|
-
let
|
|
1507
|
-
export {
|
|
1504
|
+
let width_25: number;
|
|
1505
|
+
export { width_25 as width };
|
|
1508
1506
|
let _default_2: string;
|
|
1509
1507
|
export { _default_2 as default };
|
|
1510
1508
|
let formatter_50: string;
|
|
@@ -1529,8 +1527,8 @@ export namespace APP_SUMMARY {
|
|
|
1529
1527
|
export { formatter_51 as formatter };
|
|
1530
1528
|
let align_15: string;
|
|
1531
1529
|
export { align_15 as align };
|
|
1532
|
-
let
|
|
1533
|
-
export {
|
|
1530
|
+
let width_26: number;
|
|
1531
|
+
export { width_26 as width };
|
|
1534
1532
|
}
|
|
1535
1533
|
export namespace CONSTRAINT_VIOLATION_CONSTRAINT_LINK {
|
|
1536
1534
|
let name_97: string;
|
|
@@ -1687,8 +1685,8 @@ export namespace GROUP_NAME {
|
|
|
1687
1685
|
export { search_18 as search };
|
|
1688
1686
|
let formatter_58: string;
|
|
1689
1687
|
export { formatter_58 as formatter };
|
|
1690
|
-
let
|
|
1691
|
-
export {
|
|
1688
|
+
let width_27: number;
|
|
1689
|
+
export { width_27 as width };
|
|
1692
1690
|
}
|
|
1693
1691
|
export namespace GROUP_ROLE_NAME {
|
|
1694
1692
|
let name_107: string;
|
|
@@ -1755,8 +1753,8 @@ export namespace ACCESS_KEY {
|
|
|
1755
1753
|
export { align_16 as align };
|
|
1756
1754
|
let sort_101: string[];
|
|
1757
1755
|
export { sort_101 as sort };
|
|
1758
|
-
let
|
|
1759
|
-
export {
|
|
1756
|
+
let width_28: number;
|
|
1757
|
+
export { width_28 as width };
|
|
1760
1758
|
}
|
|
1761
1759
|
export namespace SCOPE {
|
|
1762
1760
|
let name_113: string;
|
|
@@ -1771,8 +1769,8 @@ export namespace SCOPE {
|
|
|
1771
1769
|
export { align_17 as align };
|
|
1772
1770
|
let sort_102: string[];
|
|
1773
1771
|
export { sort_102 as sort };
|
|
1774
|
-
let
|
|
1775
|
-
export {
|
|
1772
|
+
let width_29: number;
|
|
1773
|
+
export { width_29 as width };
|
|
1776
1774
|
}
|
|
1777
1775
|
export namespace SCOPE_NORMAN {
|
|
1778
1776
|
let value_113: string;
|
|
@@ -1791,8 +1789,8 @@ export namespace EXPIRES {
|
|
|
1791
1789
|
export { align_18 as align };
|
|
1792
1790
|
let sort_104: string[];
|
|
1793
1791
|
export { sort_104 as sort };
|
|
1794
|
-
let
|
|
1795
|
-
export {
|
|
1792
|
+
let width_30: number;
|
|
1793
|
+
export { width_30 as width };
|
|
1796
1794
|
let formatter_61: string;
|
|
1797
1795
|
export { formatter_61 as formatter };
|
|
1798
1796
|
}
|
|
@@ -1807,8 +1805,8 @@ export namespace LAST_USED {
|
|
|
1807
1805
|
export { align_19 as align };
|
|
1808
1806
|
let sort_105: string[];
|
|
1809
1807
|
export { sort_105 as sort };
|
|
1810
|
-
let
|
|
1811
|
-
export {
|
|
1808
|
+
let width_31: number;
|
|
1809
|
+
export { width_31 as width };
|
|
1812
1810
|
let formatter_62: string;
|
|
1813
1811
|
export { formatter_62 as formatter };
|
|
1814
1812
|
export namespace formatterOpts_14 {
|
|
@@ -1827,8 +1825,8 @@ export namespace RESTART {
|
|
|
1827
1825
|
export { sort_106 as sort };
|
|
1828
1826
|
let formatter_63: string;
|
|
1829
1827
|
export { formatter_63 as formatter };
|
|
1830
|
-
let
|
|
1831
|
-
export {
|
|
1828
|
+
let width_32: number;
|
|
1829
|
+
export { width_32 as width };
|
|
1832
1830
|
let align_20: string;
|
|
1833
1831
|
export { align_20 as align };
|
|
1834
1832
|
}
|
|
@@ -1867,8 +1865,8 @@ export namespace STATE_NORMAN {
|
|
|
1867
1865
|
export { sort_108 as sort };
|
|
1868
1866
|
let value_119: string;
|
|
1869
1867
|
export { value_119 as value };
|
|
1870
|
-
let
|
|
1871
|
-
export {
|
|
1868
|
+
let width_33: number;
|
|
1869
|
+
export { width_33 as width };
|
|
1872
1870
|
let _default_3: string;
|
|
1873
1871
|
export { _default_3 as default };
|
|
1874
1872
|
let formatter_65: string;
|
|
@@ -4022,8 +4020,7 @@ export const EMBER_FRAME: "ember-iframe";
|
|
|
4022
4020
|
|
|
4023
4021
|
declare module '@shell/utils/error' {
|
|
4024
4022
|
export function stringify(err: any): any;
|
|
4025
|
-
export function exceptionToErrorsArray(err: any): any
|
|
4026
|
-
export function translateError(error: any): any;
|
|
4023
|
+
export function exceptionToErrorsArray(err: any): any;
|
|
4027
4024
|
export class ClusterNotFoundError extends Error {
|
|
4028
4025
|
static NAME: string;
|
|
4029
4026
|
constructor(message: any);
|
|
@@ -4383,10 +4380,6 @@ export function setPromiseResult(promise: any, obj: any, key: any, label: any):
|
|
|
4383
4380
|
// @shell/utils/router
|
|
4384
4381
|
|
|
4385
4382
|
declare module '@shell/utils/router' {
|
|
4386
|
-
export function harvesterhci2cloud(str: any): any;
|
|
4387
|
-
export function cloud2harvesterhci(str: any): any;
|
|
4388
|
-
export function harvester2cloud(str: any): any;
|
|
4389
|
-
export function cloud2harvester(str: any): any;
|
|
4390
4383
|
export function queryParamsFor(current: any, qp: any, defaults?: {}): any;
|
|
4391
4384
|
export function getClusterFromRoute(to: any): any;
|
|
4392
4385
|
export function getProductFromRoute(to: any): any;
|
|
@@ -4402,7 +4395,7 @@ export function routeRequiresInstallRedirect(to: any): boolean;
|
|
|
4402
4395
|
|
|
4403
4396
|
declare module '@shell/utils/select' {
|
|
4404
4397
|
export function onClickOption(option: any, e: any): void;
|
|
4405
|
-
export function calculatePosition(dropdownList: any, component: any, width: any, placement: any
|
|
4398
|
+
export function calculatePosition(dropdownList: any, component: any, width: any, placement: any): void;
|
|
4406
4399
|
}
|
|
4407
4400
|
|
|
4408
4401
|
// @shell/utils/selector
|
|
@@ -4616,7 +4609,7 @@ export function asciiLike(str: any): boolean;
|
|
|
4616
4609
|
export function coerceStringTypeToScalarType(val: any, type: any): any;
|
|
4617
4610
|
export function matchesSomeRegex(stringRaw: any, regexes?: any[]): boolean;
|
|
4618
4611
|
export function ensureRegex(strOrRegex: any, exact?: boolean): any;
|
|
4619
|
-
export function nlToBr(value: any):
|
|
4612
|
+
export function nlToBr(value: any): string;
|
|
4620
4613
|
export function splitObjectPath(path: any): any;
|
|
4621
4614
|
export function joinObjectPath(ary: any): string;
|
|
4622
4615
|
export function shortenedImage(image: any): any;
|
package/utils/error.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { isArray } from '@shell/utils/array';
|
|
2
2
|
|
|
3
|
-
import translations from './errorTranslate.json';
|
|
4
|
-
|
|
5
3
|
export class ClusterNotFoundError extends Error {
|
|
6
4
|
static NAME = 'ClusterNotFoundError'
|
|
7
5
|
|
|
@@ -50,6 +48,7 @@ export class ApiError extends Error {
|
|
|
50
48
|
|
|
51
49
|
export function stringify(err) {
|
|
52
50
|
let str;
|
|
51
|
+
|
|
53
52
|
if ( typeof err === 'string' ) {
|
|
54
53
|
str = err;
|
|
55
54
|
} else if ( err && typeof err === 'object' ) {
|
|
@@ -61,7 +60,7 @@ export function stringify(err) {
|
|
|
61
60
|
const data = JSON.parse(str).data;
|
|
62
61
|
|
|
63
62
|
if (data) {
|
|
64
|
-
return
|
|
63
|
+
return data;
|
|
65
64
|
}
|
|
66
65
|
} catch {}
|
|
67
66
|
}
|
|
@@ -85,7 +84,7 @@ export function stringify(err) {
|
|
|
85
84
|
str = JSON.stringify(err);
|
|
86
85
|
}
|
|
87
86
|
|
|
88
|
-
return
|
|
87
|
+
return str;
|
|
89
88
|
}
|
|
90
89
|
|
|
91
90
|
export function exceptionToErrorsArray(err) {
|
|
@@ -93,21 +92,16 @@ export function exceptionToErrorsArray(err) {
|
|
|
93
92
|
const body = err.response.data;
|
|
94
93
|
|
|
95
94
|
if ( body && body.message ) {
|
|
96
|
-
return [
|
|
95
|
+
return [body.message];
|
|
97
96
|
} else {
|
|
98
|
-
return [
|
|
97
|
+
return [err];
|
|
99
98
|
}
|
|
100
99
|
} else if (err.status && err.message) {
|
|
101
|
-
return [
|
|
100
|
+
return [err.message];
|
|
102
101
|
} else if ( isArray(err) ) {
|
|
103
|
-
|
|
104
|
-
for (let index = 0; index < err.length; index++) {
|
|
105
|
-
arr[index] = translateError(err[index])
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
return [...new Set(arr)];
|
|
102
|
+
return err;
|
|
109
103
|
} else {
|
|
110
|
-
return [
|
|
104
|
+
return [err];
|
|
111
105
|
}
|
|
112
106
|
}
|
|
113
107
|
|
|
@@ -135,76 +129,3 @@ export const normalizeError = (err) => {
|
|
|
135
129
|
statusCode: (err.statusCode || err.status || (err.response && err.response.status) || 500)
|
|
136
130
|
};
|
|
137
131
|
};
|
|
138
|
-
export function translateError(error) {
|
|
139
|
-
error = typeof error === 'string'
|
|
140
|
-
? error
|
|
141
|
-
: error?.message || error?.toString() || '';
|
|
142
|
-
|
|
143
|
-
const originError = error;
|
|
144
|
-
error = error?.toLowerCase().replace(/admission webhook(.*?)denied the request:/g, (match, p1) => {
|
|
145
|
-
return '';
|
|
146
|
-
}).replace('internal error occurred: ', "");
|
|
147
|
-
console.log('00044', error);
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
if (error.includes('spec and status of disks on node') && error.includes('are being syncing and please retry later')) {
|
|
151
|
-
error = error.replace('spec and status of disks on node','').replace('are being syncing and please retry later','')
|
|
152
|
-
error = '节点' + error + '上的硬盘规格和状态正在同步,请稍后重试'
|
|
153
|
-
} else if (error.includes('same granularity as schedule') && error.includes('and offset less than')) {
|
|
154
|
-
error = error.replace('same granularity as schedule','').replace('and offset less than 10m0s','')
|
|
155
|
-
error = '与' + error + '的时间间隔应大于10分钟'
|
|
156
|
-
} else if (error.includes('should be greater than or equal to') && error.includes('but got')) {
|
|
157
|
-
error.replace('should be greater than or equal to','应该大于等于').replace('but got','但是填写的是')
|
|
158
|
-
}else if(error.includes('e.g')){
|
|
159
|
-
error = error.replace(/\s*(\(\s*)?e\.g\..*$/, '')
|
|
160
|
-
} else if(error.includes("because it's still used by vm(s)")) {
|
|
161
|
-
error = error.replace(/because it's still used by vm\(s\)/i, "因为正在被虚拟机使用:");
|
|
162
|
-
} else if (
|
|
163
|
-
error.includes('subnet.kubeovn.io') &&
|
|
164
|
-
error.includes('metadata.name in body should match') &&
|
|
165
|
-
error.includes('spec.excludeips[') &&
|
|
166
|
-
error.includes('in body should match')
|
|
167
|
-
) {
|
|
168
|
-
// 提取子网名与索引
|
|
169
|
-
const subnetMatch = error.match(/subnet\.kubeovn\.io\s+['"]([^'"]+)['"]/);
|
|
170
|
-
const ipMatch = error.match(/spec\.excludeips\[(\d+)\]/);
|
|
171
|
-
|
|
172
|
-
const subnetName = subnetMatch ? subnetMatch[1] : '';
|
|
173
|
-
const idx = ipMatch ? ipMatch[1] : '0';
|
|
174
|
-
|
|
175
|
-
error = `子网 '${subnetName}' 配置无效:1) 名称禁止以数字开头;2) 排除IP[${idx}] 不能为空且必须是合法 IPv4/IPv6 地址或地址段`;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
// error = error.replace(/admission webhook(.*?)denied the request:/g, (match, p1) => {
|
|
179
|
-
// return '';
|
|
180
|
-
// })
|
|
181
|
-
// .replace(/cannot unmarshal number into(.*?)of type string/g, (match, p1) => {
|
|
182
|
-
// return '不能数字开头和纯数字';
|
|
183
|
-
// })
|
|
184
|
-
// Apply translations from JSON
|
|
185
|
-
if(error.indexOf('err:') !== -1){
|
|
186
|
-
const errorIndex = error.indexOf('err:')
|
|
187
|
-
error = error.substring(errorIndex + 4);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
for (const translation of translations.translations) {
|
|
192
|
-
|
|
193
|
-
// if (error.includes(translation.pattern)) {
|
|
194
|
-
// error = error.replace(translation.pattern, translation.replacement);
|
|
195
|
-
// }
|
|
196
|
-
const regex = new RegExp(translation.pattern, translation.flags || 'g');
|
|
197
|
-
// error = error.replace(regex, translation.replacement);
|
|
198
|
-
const matches = error.match(regex);
|
|
199
|
-
|
|
200
|
-
if (matches) {
|
|
201
|
-
if (matches.length == 1) {
|
|
202
|
-
error = error.replace(regex, translation.replacement);
|
|
203
|
-
} else {
|
|
204
|
-
error = translation.pattern.replace(/\$(.+)/g, (_, index) => matches[parseInt(index)]);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
return error;
|
|
210
|
-
}
|
package/utils/router.js
CHANGED
|
@@ -1,26 +1,5 @@
|
|
|
1
1
|
import { INSTALL_REDIRECT_META_KEY } from '@shell/config/router/navigation-guards/install-redirect';
|
|
2
2
|
|
|
3
|
-
export function harvesterhci2cloud(str) {
|
|
4
|
-
return str?.replace('harvesterhci.io', 'cloudhci.io')
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export function cloud2harvesterhci(str) {
|
|
8
|
-
// console.log('00099', str)
|
|
9
|
-
// const regex = /[a-z]+cloud.io.(.+)/;
|
|
10
|
-
// if (str?.match(regex)) {
|
|
11
|
-
// return str;
|
|
12
|
-
// }
|
|
13
|
-
return str?.replace('cloudhci.io', 'harvesterhci.io')
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export function harvester2cloud(str) {
|
|
17
|
-
return str?.replace('harvester', 'cloud')
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function cloud2harvester(str) {
|
|
21
|
-
return str?.replace('cloud', 'harvester')
|
|
22
|
-
}
|
|
23
|
-
|
|
24
3
|
export function queryParamsFor(current, qp, defaults = {}) {
|
|
25
4
|
const query = Object.assign({}, current || {});
|
|
26
5
|
|