dashboard-shell-shell 3.0.5-test.6 → 3.0.5-test.61
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/csp/favicon.png +0 -0
- package/assets/brand/harvester/favicon.png +0 -0
- package/assets/brand/suse/favicon.png +0 -0
- package/assets/icons/demo.css +539 -0
- package/assets/icons/demo.css:Zone.Identifier +0 -0
- package/assets/icons/demo_index.html +1131 -0
- package/assets/icons/demo_index.html:Zone.Identifier +0 -0
- package/assets/icons/iconfont.css +219 -0
- package/assets/icons/iconfont.css:Zone.Identifier +0 -0
- package/assets/icons/iconfont.js +1 -0
- package/assets/icons/iconfont.js:Zone.Identifier +0 -0
- package/assets/icons/iconfont.json +324 -0
- 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/iconsNew/demo.css +539 -0
- package/assets/iconsNew/demo.css:Zone.Identifier +0 -0
- package/assets/iconsNew/demo_index.html +303 -0
- package/assets/iconsNew/demo_index.html:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.css +43 -0
- package/assets/iconsNew/iconfont.css:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.js +1 -0
- package/assets/iconsNew/iconfont.js:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.json +44 -0
- package/assets/iconsNew/iconfont.json:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.ttf +0 -0
- package/assets/iconsNew/iconfont.ttf:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.woff +0 -0
- package/assets/iconsNew/iconfont.woff2 +0 -0
- package/assets/iconsNew/iconfont.woff2:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.woff:Zone.Identifier +0 -0
- package/assets/images/API.svg +3 -0
- package/assets/images/action.svg +6 -0
- package/assets/images/login/password.svg +20 -0
- package/assets/images/login/user.svg +6 -0
- package/assets/images/login-bg.png +0 -0
- package/assets/images/login-left.png +0 -0
- package/assets/images/login-logo.svg +44 -0
- package/assets/images/logo.png +0 -0
- package/assets/images/logo.svg +47 -0
- package/assets/images/pl/dark/logo.png +0 -0
- package/assets/images/pl/half-logo.svg +2 -23
- package/assets/images/pl/harvester.png +0 -0
- package/assets/images/pl/logo.png +0 -0
- package/assets/images/promp-yellow.svg +5 -0
- package/assets/images/user.png +0 -0
- package/assets/styles/all.scss +83 -0
- package/assets/styles/app.scss +5 -0
- package/assets/styles/base/_basic.scss +2 -2
- package/assets/styles/base/_helpers.scss +1 -1
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/base/_typography.scss +2 -1
- package/assets/styles/base/_variables.scss +14 -7
- package/assets/styles/fonts/_icons.scss +3 -2
- package/assets/styles/global/_button.scss +44 -26
- package/assets/styles/global/_columns.scss +3 -1
- package/assets/styles/global/_form.scss +46 -13
- package/assets/styles/global/_labeled-input.scss +54 -26
- package/assets/styles/global/_layout.scss +8 -3
- package/assets/styles/global/_select.scss +25 -17
- package/assets/styles/global/_table.scss +7 -1
- package/assets/styles/global/_tooltip.scss +60 -8
- package/assets/styles/themes/_dark.scss +3 -0
- package/assets/styles/themes/_light.scss +69 -46
- package/assets/styles/vendor/vue-select.scss +24 -10
- package/assets/translations/en-us.yaml +92 -4
- package/assets/translations/zh-hans.yaml +668 -206
- package/components/ActionDropdown.vue +2 -1
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +2 -0
- package/components/AppModal.vue +46 -5
- package/components/BrandImage.vue +1 -0
- package/components/ButtonDropdown.vue +28 -4
- package/components/ButtonMultiAction.vue +1 -0
- package/components/ClusterIconMenu.vue +2 -2
- package/components/CodeMirror.vue +26 -10
- package/components/ConsumptionGauge.vue +24 -5
- package/components/ContainerResourceLimit.vue +2 -2
- package/components/CopyToClipboard.vue +15 -0
- package/components/CruResource.vue +12 -10
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +29 -17
- package/components/DotState.vue +84 -0
- package/components/Drawer/Chrome.vue +2 -2
- package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +30 -27
- package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +1 -1
- package/components/Drawer/ResourceDetailDrawer/index.vue +5 -4
- package/components/ExplorerMembers.vue +28 -4
- package/components/ExplorerProjectsNamespaces.vue +19 -5
- package/components/GlobalRoleBindings.vue +23 -4
- package/components/GrafanaDashboard.vue +4 -4
- package/components/GrowlManager.vue +3 -1
- package/components/HardwareResourceGauge.vue +39 -3
- package/components/IndentedPanel.vue +4 -10
- package/components/InfoBox.vue +3 -3
- package/components/InputOrDisplay.vue +28 -2
- package/components/LabelValue.vue +20 -1
- package/components/ModalWithCard.vue +12 -3
- package/components/PodSecurityAdmission.vue +2 -2
- package/components/PromptModal.vue +1 -1
- package/components/PromptRemove.vue +53 -12
- package/components/RelatedResources.vue +3 -0
- package/components/Resource/Detail/Metadata/IdentifyingInformation/index.vue +1 -3
- package/components/Resource/Detail/Metadata/KeyValue.vue +8 -4
- package/components/Resource/Detail/Metadata/index.vue +3 -1
- package/components/Resource/Detail/TitleBar/Title.vue +4 -3
- package/components/Resource/Detail/TitleBar/Top.vue +2 -0
- package/components/Resource/Detail/TitleBar/composables.ts +16 -1
- package/components/Resource/Detail/TitleBar/index.vue +125 -27
- package/components/ResourceDetail/Masthead/index.vue +1 -1
- package/components/ResourceDetail/Masthead/latest.vue +1 -1
- package/components/ResourceDetail/Masthead/legacy.vue +183 -39
- package/components/ResourceDetail/legacy.vue +47 -29
- package/components/ResourceList/Masthead.vue +222 -54
- package/components/ResourceList/ResourceLoadingIndicator.vue +5 -2
- package/components/ResourceTable.vue +40 -2
- package/components/SideNav.vue +74 -20
- package/components/SingleClusterInfo.vue +2 -1
- package/components/SortableTable/THead.vue +79 -4
- package/components/SortableTable/index.vue +1053 -464
- package/components/SortableTable/paging.js +26 -16
- package/components/SortableTable/selection.js +2 -2
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +53 -30
- package/components/YamlEditor.vue +0 -1
- package/components/auth/Principal.vue +51 -19
- package/components/auth/RoleDetailEdit.vue +69 -14
- package/components/auth/SelectPrincipal.vue +1 -0
- package/components/breadcrumb/index.vue +119 -0
- package/components/form/ArrayList.vue +177 -152
- package/components/form/ArrayListGrouped.vue +13 -3
- package/components/form/ArrayListSelect.vue +1 -1
- package/components/form/BannerSettings.vue +64 -59
- package/components/form/ChangePassword.vue +5 -5
- package/components/form/ClusterAppearance.vue +4 -3
- package/components/form/ColorInput.vue +32 -8
- package/components/form/Command.vue +4 -5
- package/components/form/Conditions.vue +15 -1
- package/components/form/Footer.vue +12 -8
- package/components/form/HealthCheck.vue +0 -2
- package/components/form/HookOption.vue +87 -58
- package/components/form/InputWithSelect.vue +8 -4
- package/components/form/KeyValue.vue +66 -8
- package/components/form/LabeledSelect.vue +216 -242
- package/components/form/Labels.vue +4 -4
- package/components/form/MatchExpressions.vue +28 -11
- package/components/form/Members/ClusterMembershipEditor.vue +1 -1
- package/components/form/Members/ClusterPermissionsEditor.vue +61 -43
- package/components/form/Members/MembershipEditor.vue +4 -4
- package/components/form/Members/ProjectMembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +62 -22
- package/components/form/Networking.vue +6 -9
- package/components/form/NodeAffinity.vue +29 -28
- package/components/form/Password.vue +16 -7
- package/components/form/PodAffinity.vue +24 -25
- package/components/form/Probe.vue +15 -11
- package/components/form/ProjectMemberEditor.vue +66 -48
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +26 -23
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +38 -35
- package/components/form/ResourceSelector.vue +1 -1
- package/components/form/SecretSelector.vue +24 -23
- package/components/form/Security.vue +1 -3
- package/components/form/Select.vue +12 -3
- package/components/form/ServiceNameSelect.vue +2 -5
- package/components/form/ServicePorts.vue +149 -75
- package/components/form/SimpleSecretSelector.vue +29 -9
- package/components/form/Taints.vue +2 -1
- package/components/form/Tolerations.vue +13 -9
- package/components/form/UnitInput.vue +8 -3
- package/components/form/ValueFromResource.vue +110 -96
- package/components/form/WorkloadPorts.vue +143 -123
- package/components/formatter/BadgeStateFormatter.vue +8 -5
- package/components/formatter/LiveDate.vue +3 -3
- package/components/formatter/WorkloadHealthScale.vue +4 -3
- package/components/nav/Favorite.vue +5 -1
- package/components/nav/Group.vue +139 -99
- package/components/nav/Header.vue +138 -164
- package/components/nav/HeaderPageActionMenu.vue +1 -0
- package/components/nav/NamespaceFilter.vue +34 -36
- package/components/nav/TopLevelMenu.vue +62 -25
- package/components/nav/Type.vue +73 -43
- package/composables/useClickOutside.ts +1 -1
- package/config/menuRouteMap.js +10 -0
- package/config/private-label.js +14 -11
- package/config/product/auth.js +17 -7
- package/config/product/explorer.js +32 -10
- package/config/product/manager.js +28 -17
- package/config/product/settings.js +19 -9
- package/config/product/uiplugins.js +13 -10
- package/config/router/navigation-guards/index.js +61 -3
- package/config/settings.ts +28 -0
- package/config/table-headers.js +3 -2
- package/detail/node.vue +28 -23
- package/dialog/AddCustomBadgeDialog.vue +17 -9
- package/dialog/ForceMachineRemoveDialog.vue +2 -2
- package/dialog/RollbackWorkloadDialog.vue +1 -1
- package/dialog/ScalePoolDownDialog.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +1 -1
- package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +9 -6
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +3 -1
- package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +7 -5
- package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +5 -3
- package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +1 -1
- package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +2 -2
- package/edit/configmap.vue +4 -0
- package/edit/logging-flow/index.vue +1 -2
- package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +3 -3
- package/edit/logging.banzaicloud.io.output/providers/azurestorage.vue +19 -19
- package/edit/logging.banzaicloud.io.output/providers/cloudwatch.vue +23 -23
- package/edit/logging.banzaicloud.io.output/providers/datadog.vue +19 -19
- package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +14 -14
- package/edit/logging.banzaicloud.io.output/providers/forward.vue +12 -12
- package/edit/logging.banzaicloud.io.output/providers/gcs.vue +23 -23
- package/edit/logging.banzaicloud.io.output/providers/gelf.vue +6 -6
- package/edit/logging.banzaicloud.io.output/providers/kafka.vue +10 -10
- package/edit/logging.banzaicloud.io.output/providers/kinesisStream.vue +8 -8
- package/edit/logging.banzaicloud.io.output/providers/logdna.vue +17 -17
- package/edit/logging.banzaicloud.io.output/providers/logz.vue +7 -7
- package/edit/logging.banzaicloud.io.output/providers/loki.vue +12 -12
- package/edit/logging.banzaicloud.io.output/providers/newrelic.vue +3 -3
- package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +14 -14
- package/edit/logging.banzaicloud.io.output/providers/redis.vue +6 -6
- package/edit/logging.banzaicloud.io.output/providers/s3.vue +23 -23
- package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +13 -13
- package/edit/logging.banzaicloud.io.output/providers/sumologic.vue +2 -2
- package/edit/logging.banzaicloud.io.output/providers/syslog.vue +54 -54
- package/edit/management.cattle.io.user.vue +17 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/auth.vue +19 -19
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +50 -26
- package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +36 -12
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/dingding.vue +32 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/message.vue +52 -0
- 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/snmp.vue +45 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/work.vue +31 -0
- 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 +1 -2
- package/edit/networking.k8s.io.ingress/Certificate.vue +14 -5
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -2
- package/edit/networking.k8s.io.ingress/Rule.vue +5 -11
- package/edit/networking.k8s.io.ingress/RulePath.vue +105 -96
- package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +3 -3
- package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +4 -2
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +12 -11
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
- package/edit/persistentvolume/index.vue +3 -1
- package/edit/persistentvolumeclaim.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +1 -1
- package/edit/secret/index.vue +2 -2
- package/edit/service.vue +4 -1
- package/edit/storage.k8s.io.storageclass/index.vue +10 -8
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +34 -27
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +15 -13
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +41 -39
- package/edit/token.vue +31 -12
- package/edit/workload/Job.vue +31 -34
- package/edit/workload/Upgrading.vue +5 -5
- package/edit/workload/index.vue +22 -18
- package/edit/workload/storage/Mount.vue +1 -0
- package/edit/workload/storage/awsElasticBlockStore.vue +9 -7
- package/edit/workload/storage/azureDisk.vue +14 -10
- package/edit/workload/storage/azureFile.vue +9 -7
- package/edit/workload/storage/csi/index.vue +6 -9
- package/edit/workload/storage/emptyDir.vue +7 -5
- package/edit/workload/storage/gcePersistentDisk.vue +9 -7
- package/edit/workload/storage/hostPath.vue +7 -5
- package/edit/workload/storage/nfs.vue +8 -6
- package/edit/workload/storage/persistentVolumeClaim/index.vue +12 -10
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +20 -15
- package/edit/workload/storage/secret.vue +9 -6
- package/edit/workload/storage/vsphereVolume.vue +11 -7
- package/initialize/app-extended.js +7 -1
- package/list/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +8 -6
- package/list/management.cattle.io.setting.vue +22 -13
- package/list/management.cattle.io.user.vue +7 -3
- package/list/namespace.vue +3 -0
- package/list/provisioning.cattle.io.cluster.vue +6 -7
- package/mixins/brand.js +17 -0
- package/mixins/create-edit-view/impl.js +10 -0
- package/models/provisioning.cattle.io.cluster.js +19 -18
- package/models/workload.js +2 -2
- package/package.json +1 -1
- package/pages/account/index.vue +93 -58
- package/pages/account/pri.vue +229 -0
- package/pages/auth/login.vue +216 -51
- package/pages/auth/setup.vue +175 -33
- package/pages/c/_cluster/_product/namespaces.vue +5 -5
- package/pages/c/_cluster/auth/roles/index.vue +83 -8
- package/pages/c/_cluster/explorer/ConfigBadge.vue +1 -1
- package/pages/c/_cluster/explorer/index.vue +2 -1
- package/pages/c/_cluster/explorer/tools/index.vue +6 -6
- package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
- package/pages/c/_cluster/settings/banners.vue +174 -102
- package/pages/c/_cluster/settings/brand.vue +350 -302
- package/pages/c/_cluster/settings/performance.vue +61 -38
- package/pages/home.vue +119 -37
- package/pages/prefs.vue +27 -25
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.js +1 -1
- package/plugins/dashboard-store/actions.js +1 -1
- package/plugins/dashboard-store/resource-class.js +28 -27
- package/promptRemove/mixin/roleDeletionCheck.js +2 -2
- package/public/index.html +4 -4
- package/rancher-components/BadgeState/BadgeState.vue +38 -55
- package/rancher-components/Banner/Banner.vue +25 -9
- package/rancher-components/Card/Card.vue +7 -8
- package/rancher-components/Form/Checkbox/Checkbox.vue +4 -0
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +42 -3
- package/rancher-components/Form/Radio/RadioButton.vue +35 -11
- package/rancher-components/Form/Radio/RadioGroup.vue +22 -6
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +1 -0
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +41 -4
- package/rancher-components/RcDropdown/RcDropdown.vue +35 -7
- package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +12 -6
- package/rancher-components/RcDropdown/types.ts +1 -0
- package/rancher-components/StringList/StringList.vue +1 -1
- package/scripts/build-pkg.sh +18 -23
- package/scripts/publish-shell.sh +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 +6 -2
- package/store/modal.ts +3 -3
- package/store/prefs.js +11 -4
- package/store/type-map.js +30 -2
- package/types/shell/index.d.ts +86 -97
- package/utils/error.js +109 -8
- package/utils/errorTranslate.json +1740 -0
- package/utils/errorTranslateNew.json +39 -0
- package/utils/roleFiltering.js +33 -0
- package/utils/router.js +21 -0
- package/utils/select.js +26 -3
- package/utils/string.js +8 -5
- package/utils/title.ts +1 -1
- package/vue.config.js +1 -1
package/types/shell/index.d.ts
CHANGED
|
@@ -305,6 +305,8 @@ 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 };
|
|
308
310
|
let canBeVariable_1: boolean;
|
|
309
311
|
export { canBeVariable_1 as canBeVariable };
|
|
310
312
|
}
|
|
@@ -329,8 +331,8 @@ export namespace SIMPLE_NAME {
|
|
|
329
331
|
export { value_5 as value };
|
|
330
332
|
let sort_5: string[];
|
|
331
333
|
export { sort_5 as sort };
|
|
332
|
-
let
|
|
333
|
-
export {
|
|
334
|
+
let width_3: number;
|
|
335
|
+
export { width_3 as width };
|
|
334
336
|
let canBeVariable_2: boolean;
|
|
335
337
|
export { canBeVariable_2 as canBeVariable };
|
|
336
338
|
}
|
|
@@ -535,8 +537,8 @@ export namespace CPU {
|
|
|
535
537
|
export { value_21 as value };
|
|
536
538
|
let formatter_11: string;
|
|
537
539
|
export { formatter_11 as formatter };
|
|
538
|
-
let
|
|
539
|
-
export {
|
|
540
|
+
let width_4: number;
|
|
541
|
+
export { width_4 as width };
|
|
540
542
|
}
|
|
541
543
|
export namespace RAM {
|
|
542
544
|
let name_23: string;
|
|
@@ -551,8 +553,8 @@ export namespace RAM {
|
|
|
551
553
|
export { value_22 as value };
|
|
552
554
|
let formatter_12: string;
|
|
553
555
|
export { formatter_12 as formatter };
|
|
554
|
-
let
|
|
555
|
-
export {
|
|
556
|
+
let width_5: number;
|
|
557
|
+
export { width_5 as width };
|
|
556
558
|
}
|
|
557
559
|
export namespace PRINCIPAL {
|
|
558
560
|
let name_24: string;
|
|
@@ -579,8 +581,8 @@ export namespace PODS {
|
|
|
579
581
|
export { value_24 as value };
|
|
580
582
|
let formatter_14: string;
|
|
581
583
|
export { formatter_14 as formatter };
|
|
582
|
-
let
|
|
583
|
-
export {
|
|
584
|
+
let width_6: number;
|
|
585
|
+
export { width_6 as width };
|
|
584
586
|
}
|
|
585
587
|
export namespace AGE {
|
|
586
588
|
let name_26: string;
|
|
@@ -597,8 +599,8 @@ export namespace AGE {
|
|
|
597
599
|
export { search_4 as search };
|
|
598
600
|
let formatter_15: string;
|
|
599
601
|
export { formatter_15 as formatter };
|
|
600
|
-
let
|
|
601
|
-
export {
|
|
602
|
+
let width_7: number;
|
|
603
|
+
export { width_7 as width };
|
|
602
604
|
let align_1: string;
|
|
603
605
|
export { align_1 as align };
|
|
604
606
|
}
|
|
@@ -635,8 +637,8 @@ export namespace DESCRIPTION {
|
|
|
635
637
|
export { sort_28 as sort };
|
|
636
638
|
let formatter_17: string;
|
|
637
639
|
export { formatter_17 as formatter };
|
|
638
|
-
let
|
|
639
|
-
export {
|
|
640
|
+
let width_8: number;
|
|
641
|
+
export { width_8 as width };
|
|
640
642
|
}
|
|
641
643
|
export namespace NS_SNAPSHOT_QUOTA {
|
|
642
644
|
let name_29: string;
|
|
@@ -726,8 +728,8 @@ export namespace SCALE {
|
|
|
726
728
|
export { sort_33 as sort };
|
|
727
729
|
let formatter_23: string;
|
|
728
730
|
export { formatter_23 as formatter };
|
|
729
|
-
let
|
|
730
|
-
export {
|
|
731
|
+
let width_9: number;
|
|
732
|
+
export { width_9 as width };
|
|
731
733
|
let align_4: string;
|
|
732
734
|
export { align_4 as align };
|
|
733
735
|
}
|
|
@@ -748,8 +750,8 @@ export namespace SUCCESS {
|
|
|
748
750
|
export { labelKey_36 as labelKey };
|
|
749
751
|
let value_36: string;
|
|
750
752
|
export { value_36 as value };
|
|
751
|
-
let
|
|
752
|
-
export {
|
|
753
|
+
let width_10: number;
|
|
754
|
+
export { width_10 as width };
|
|
753
755
|
let align_5: string;
|
|
754
756
|
export { align_5 as align };
|
|
755
757
|
}
|
|
@@ -760,8 +762,8 @@ export namespace REQ_RATE {
|
|
|
760
762
|
export { labelKey_37 as labelKey };
|
|
761
763
|
let value_37: string;
|
|
762
764
|
export { value_37 as value };
|
|
763
|
-
let
|
|
764
|
-
export {
|
|
765
|
+
let width_11: number;
|
|
766
|
+
export { width_11 as width };
|
|
765
767
|
let align_6: string;
|
|
766
768
|
export { align_6 as align };
|
|
767
769
|
}
|
|
@@ -772,8 +774,8 @@ export namespace P95 {
|
|
|
772
774
|
export { labelKey_38 as labelKey };
|
|
773
775
|
let value_38: string;
|
|
774
776
|
export { value_38 as value };
|
|
775
|
-
let
|
|
776
|
-
export {
|
|
777
|
+
let width_12: number;
|
|
778
|
+
export { width_12 as width };
|
|
777
779
|
let align_7: string;
|
|
778
780
|
export { align_7 as align };
|
|
779
781
|
}
|
|
@@ -831,8 +833,8 @@ export namespace TARGET_KIND {
|
|
|
831
833
|
export { labelKey_43 as labelKey };
|
|
832
834
|
let value_43: string;
|
|
833
835
|
export { value_43 as value };
|
|
834
|
-
let
|
|
835
|
-
export {
|
|
836
|
+
let width_13: number;
|
|
837
|
+
export { width_13 as width };
|
|
836
838
|
}
|
|
837
839
|
export namespace TARGET {
|
|
838
840
|
let name_44: string;
|
|
@@ -961,8 +963,8 @@ export namespace SIMPLE_TYPE {
|
|
|
961
963
|
export { value_53 as value };
|
|
962
964
|
let sort_45: string[];
|
|
963
965
|
export { sort_45 as sort };
|
|
964
|
-
let
|
|
965
|
-
export {
|
|
966
|
+
let width_14: number;
|
|
967
|
+
export { width_14 as width };
|
|
966
968
|
}
|
|
967
969
|
export namespace IMAGE_SIZE {
|
|
968
970
|
let name_54: string;
|
|
@@ -987,8 +989,8 @@ export namespace TYPE {
|
|
|
987
989
|
export { getValue_11 as getValue };
|
|
988
990
|
let sort_47: string[];
|
|
989
991
|
export { sort_47 as sort };
|
|
990
|
-
let
|
|
991
|
-
export {
|
|
992
|
+
let width_15: number;
|
|
993
|
+
export { width_15 as width };
|
|
992
994
|
}
|
|
993
995
|
export namespace SUB_TYPE {
|
|
994
996
|
let name_56: string;
|
|
@@ -999,8 +1001,8 @@ export namespace SUB_TYPE {
|
|
|
999
1001
|
export { value_56 as value };
|
|
1000
1002
|
let sort_48: string[];
|
|
1001
1003
|
export { sort_48 as sort };
|
|
1002
|
-
let
|
|
1003
|
-
export {
|
|
1004
|
+
let width_16: number;
|
|
1005
|
+
export { width_16 as width };
|
|
1004
1006
|
}
|
|
1005
1007
|
export namespace EVENT_TYPE {
|
|
1006
1008
|
let name_57: string;
|
|
@@ -1021,8 +1023,8 @@ export namespace STATUS {
|
|
|
1021
1023
|
export { value_58 as value };
|
|
1022
1024
|
let sort_50: string[];
|
|
1023
1025
|
export { sort_50 as sort };
|
|
1024
|
-
let
|
|
1025
|
-
export {
|
|
1026
|
+
let width_17: number;
|
|
1027
|
+
export { width_17 as width };
|
|
1026
1028
|
}
|
|
1027
1029
|
export namespace LAST_SEEN_TIME {
|
|
1028
1030
|
let name_59: string;
|
|
@@ -1050,8 +1052,8 @@ export namespace LAST_HEARTBEAT_TIME {
|
|
|
1050
1052
|
export { sort_52 as sort };
|
|
1051
1053
|
let formatter_31: string;
|
|
1052
1054
|
export { formatter_31 as formatter };
|
|
1053
|
-
let
|
|
1054
|
-
export {
|
|
1055
|
+
let width_18: number;
|
|
1056
|
+
export { width_18 as width };
|
|
1055
1057
|
}
|
|
1056
1058
|
export namespace REASON {
|
|
1057
1059
|
let name_61: string;
|
|
@@ -1220,8 +1222,8 @@ export namespace INGRESS_DEFAULT_BACKEND {
|
|
|
1220
1222
|
export { sort_67 as sort };
|
|
1221
1223
|
let formatter_37: string;
|
|
1222
1224
|
export { formatter_37 as formatter };
|
|
1223
|
-
let
|
|
1224
|
-
export {
|
|
1225
|
+
let width_19: number;
|
|
1226
|
+
export { width_19 as width };
|
|
1225
1227
|
let align_10: string;
|
|
1226
1228
|
export { align_10 as align };
|
|
1227
1229
|
}
|
|
@@ -1304,8 +1306,8 @@ export namespace RESOURCES {
|
|
|
1304
1306
|
export { value_82 as value };
|
|
1305
1307
|
let sort_74: string;
|
|
1306
1308
|
export { sort_74 as sort };
|
|
1307
|
-
let
|
|
1308
|
-
export {
|
|
1309
|
+
let width_20: number;
|
|
1310
|
+
export { width_20 as width };
|
|
1309
1311
|
}
|
|
1310
1312
|
export namespace URL {
|
|
1311
1313
|
let name_83: string;
|
|
@@ -1374,8 +1376,8 @@ export namespace WORKLOAD_HEALTH_SCALE {
|
|
|
1374
1376
|
export { formatter_44 as formatter };
|
|
1375
1377
|
export function getValue_13(): any;
|
|
1376
1378
|
export { getValue_13 as getValue };
|
|
1377
|
-
let
|
|
1378
|
-
export {
|
|
1379
|
+
let width_21: number;
|
|
1380
|
+
export { width_21 as width };
|
|
1379
1381
|
export let skipSelect: boolean;
|
|
1380
1382
|
let delayLoading_1: boolean;
|
|
1381
1383
|
export { delayLoading_1 as delayLoading };
|
|
@@ -1399,8 +1401,8 @@ export namespace FLEET_SUMMARY {
|
|
|
1399
1401
|
export { formatter_45 as formatter };
|
|
1400
1402
|
let align_11: string;
|
|
1401
1403
|
export { align_11 as align };
|
|
1402
|
-
let
|
|
1403
|
-
export {
|
|
1404
|
+
let width_22: number;
|
|
1405
|
+
export { width_22 as width };
|
|
1404
1406
|
}
|
|
1405
1407
|
export namespace FLEET_APPLICATION_TYPE {
|
|
1406
1408
|
let name_89: string;
|
|
@@ -1415,8 +1417,8 @@ export namespace FLEET_APPLICATION_TYPE {
|
|
|
1415
1417
|
export { search_10 as search };
|
|
1416
1418
|
let align_12: string;
|
|
1417
1419
|
export { align_12 as align };
|
|
1418
|
-
let
|
|
1419
|
-
export {
|
|
1420
|
+
let width_23: number;
|
|
1421
|
+
export { width_23 as width };
|
|
1420
1422
|
}
|
|
1421
1423
|
export namespace FLEET_APPLICATION_SOURCE {
|
|
1422
1424
|
let name_90: string;
|
|
@@ -1471,8 +1473,8 @@ export namespace FLEET_APPLICATION_RESOURCES_SUMMARY {
|
|
|
1471
1473
|
export { formatter_48 as formatter };
|
|
1472
1474
|
let align_13: string;
|
|
1473
1475
|
export { align_13 as align };
|
|
1474
|
-
let
|
|
1475
|
-
export {
|
|
1476
|
+
let width_24: number;
|
|
1477
|
+
export { width_24 as width };
|
|
1476
1478
|
}
|
|
1477
1479
|
export namespace FLEET_REPO_CLUSTER_SUMMARY {
|
|
1478
1480
|
let name_94: string;
|
|
@@ -1489,8 +1491,8 @@ export namespace FLEET_REPO_CLUSTER_SUMMARY {
|
|
|
1489
1491
|
export { formatter_49 as formatter };
|
|
1490
1492
|
let align_14: string;
|
|
1491
1493
|
export { align_14 as align };
|
|
1492
|
-
let
|
|
1493
|
-
export {
|
|
1494
|
+
let width_25: number;
|
|
1495
|
+
export { width_25 as width };
|
|
1494
1496
|
}
|
|
1495
1497
|
export namespace FLEET_REPO_PER_CLUSTER_STATE {
|
|
1496
1498
|
let name_95: string;
|
|
@@ -1501,8 +1503,8 @@ export namespace FLEET_REPO_PER_CLUSTER_STATE {
|
|
|
1501
1503
|
export { tooltip_3 as tooltip };
|
|
1502
1504
|
let sort_85: string[];
|
|
1503
1505
|
export { sort_85 as sort };
|
|
1504
|
-
let
|
|
1505
|
-
export {
|
|
1506
|
+
let width_26: number;
|
|
1507
|
+
export { width_26 as width };
|
|
1506
1508
|
let _default_2: string;
|
|
1507
1509
|
export { _default_2 as default };
|
|
1508
1510
|
let formatter_50: string;
|
|
@@ -1527,8 +1529,8 @@ export namespace APP_SUMMARY {
|
|
|
1527
1529
|
export { formatter_51 as formatter };
|
|
1528
1530
|
let align_15: string;
|
|
1529
1531
|
export { align_15 as align };
|
|
1530
|
-
let
|
|
1531
|
-
export {
|
|
1532
|
+
let width_27: number;
|
|
1533
|
+
export { width_27 as width };
|
|
1532
1534
|
}
|
|
1533
1535
|
export namespace CONSTRAINT_VIOLATION_CONSTRAINT_LINK {
|
|
1534
1536
|
let name_97: string;
|
|
@@ -1685,8 +1687,8 @@ export namespace GROUP_NAME {
|
|
|
1685
1687
|
export { search_18 as search };
|
|
1686
1688
|
let formatter_58: string;
|
|
1687
1689
|
export { formatter_58 as formatter };
|
|
1688
|
-
let
|
|
1689
|
-
export {
|
|
1690
|
+
let width_28: number;
|
|
1691
|
+
export { width_28 as width };
|
|
1690
1692
|
}
|
|
1691
1693
|
export namespace GROUP_ROLE_NAME {
|
|
1692
1694
|
let name_107: string;
|
|
@@ -1753,8 +1755,8 @@ export namespace ACCESS_KEY {
|
|
|
1753
1755
|
export { align_16 as align };
|
|
1754
1756
|
let sort_101: string[];
|
|
1755
1757
|
export { sort_101 as sort };
|
|
1756
|
-
let
|
|
1757
|
-
export {
|
|
1758
|
+
let width_29: number;
|
|
1759
|
+
export { width_29 as width };
|
|
1758
1760
|
}
|
|
1759
1761
|
export namespace SCOPE {
|
|
1760
1762
|
let name_113: string;
|
|
@@ -1769,8 +1771,8 @@ export namespace SCOPE {
|
|
|
1769
1771
|
export { align_17 as align };
|
|
1770
1772
|
let sort_102: string[];
|
|
1771
1773
|
export { sort_102 as sort };
|
|
1772
|
-
let
|
|
1773
|
-
export {
|
|
1774
|
+
let width_30: number;
|
|
1775
|
+
export { width_30 as width };
|
|
1774
1776
|
}
|
|
1775
1777
|
export namespace SCOPE_NORMAN {
|
|
1776
1778
|
let value_113: string;
|
|
@@ -1789,8 +1791,8 @@ export namespace EXPIRES {
|
|
|
1789
1791
|
export { align_18 as align };
|
|
1790
1792
|
let sort_104: string[];
|
|
1791
1793
|
export { sort_104 as sort };
|
|
1792
|
-
let
|
|
1793
|
-
export {
|
|
1794
|
+
let width_31: number;
|
|
1795
|
+
export { width_31 as width };
|
|
1794
1796
|
let formatter_61: string;
|
|
1795
1797
|
export { formatter_61 as formatter };
|
|
1796
1798
|
}
|
|
@@ -1805,8 +1807,8 @@ export namespace LAST_USED {
|
|
|
1805
1807
|
export { align_19 as align };
|
|
1806
1808
|
let sort_105: string[];
|
|
1807
1809
|
export { sort_105 as sort };
|
|
1808
|
-
let
|
|
1809
|
-
export {
|
|
1810
|
+
let width_32: number;
|
|
1811
|
+
export { width_32 as width };
|
|
1810
1812
|
let formatter_62: string;
|
|
1811
1813
|
export { formatter_62 as formatter };
|
|
1812
1814
|
export namespace formatterOpts_14 {
|
|
@@ -1825,8 +1827,8 @@ export namespace RESTART {
|
|
|
1825
1827
|
export { sort_106 as sort };
|
|
1826
1828
|
let formatter_63: string;
|
|
1827
1829
|
export { formatter_63 as formatter };
|
|
1828
|
-
let
|
|
1829
|
-
export {
|
|
1830
|
+
let width_33: number;
|
|
1831
|
+
export { width_33 as width };
|
|
1830
1832
|
let align_20: string;
|
|
1831
1833
|
export { align_20 as align };
|
|
1832
1834
|
}
|
|
@@ -1865,8 +1867,8 @@ export namespace STATE_NORMAN {
|
|
|
1865
1867
|
export { sort_108 as sort };
|
|
1866
1868
|
let value_119: string;
|
|
1867
1869
|
export { value_119 as value };
|
|
1868
|
-
let
|
|
1869
|
-
export {
|
|
1870
|
+
let width_34: number;
|
|
1871
|
+
export { width_34 as width };
|
|
1870
1872
|
let _default_3: string;
|
|
1871
1873
|
export { _default_3 as default };
|
|
1872
1874
|
let formatter_65: string;
|
|
@@ -3051,37 +3053,24 @@ export default class Resource {
|
|
|
3051
3053
|
divider: boolean;
|
|
3052
3054
|
action?: undefined;
|
|
3053
3055
|
label?: undefined;
|
|
3054
|
-
icon?: undefined;
|
|
3055
3056
|
enabled?: undefined;
|
|
3057
|
+
altAction?: undefined;
|
|
3056
3058
|
bulkable?: undefined;
|
|
3057
3059
|
bulkAction?: undefined;
|
|
3058
3060
|
weight?: undefined;
|
|
3059
|
-
altAction?: undefined;
|
|
3060
3061
|
} | {
|
|
3061
3062
|
action: string;
|
|
3062
3063
|
label: any;
|
|
3063
|
-
icon: string;
|
|
3064
3064
|
enabled: any;
|
|
3065
3065
|
divider?: undefined;
|
|
3066
|
+
altAction?: undefined;
|
|
3066
3067
|
bulkable?: undefined;
|
|
3067
3068
|
bulkAction?: undefined;
|
|
3068
3069
|
weight?: undefined;
|
|
3069
|
-
altAction?: undefined;
|
|
3070
|
-
} | {
|
|
3071
|
-
action: string;
|
|
3072
|
-
label: any;
|
|
3073
|
-
icon: string;
|
|
3074
|
-
bulkable: boolean;
|
|
3075
|
-
bulkAction: string;
|
|
3076
|
-
enabled: boolean;
|
|
3077
|
-
weight: number;
|
|
3078
|
-
divider?: undefined;
|
|
3079
|
-
altAction?: undefined;
|
|
3080
3070
|
} | {
|
|
3081
3071
|
action: string;
|
|
3082
3072
|
altAction: string;
|
|
3083
3073
|
label: any;
|
|
3084
|
-
icon: string;
|
|
3085
3074
|
bulkable: boolean;
|
|
3086
3075
|
enabled: any;
|
|
3087
3076
|
bulkAction: string;
|
|
@@ -3093,37 +3082,24 @@ export default class Resource {
|
|
|
3093
3082
|
divider: boolean;
|
|
3094
3083
|
action?: undefined;
|
|
3095
3084
|
label?: undefined;
|
|
3096
|
-
icon?: undefined;
|
|
3097
3085
|
enabled?: undefined;
|
|
3086
|
+
altAction?: undefined;
|
|
3098
3087
|
bulkable?: undefined;
|
|
3099
3088
|
bulkAction?: undefined;
|
|
3100
3089
|
weight?: undefined;
|
|
3101
|
-
altAction?: undefined;
|
|
3102
3090
|
} | {
|
|
3103
3091
|
action: string;
|
|
3104
3092
|
label: any;
|
|
3105
|
-
icon: string;
|
|
3106
3093
|
enabled: any;
|
|
3107
3094
|
divider?: undefined;
|
|
3095
|
+
altAction?: undefined;
|
|
3108
3096
|
bulkable?: undefined;
|
|
3109
3097
|
bulkAction?: undefined;
|
|
3110
3098
|
weight?: undefined;
|
|
3111
|
-
altAction?: undefined;
|
|
3112
|
-
} | {
|
|
3113
|
-
action: string;
|
|
3114
|
-
label: any;
|
|
3115
|
-
icon: string;
|
|
3116
|
-
bulkable: boolean;
|
|
3117
|
-
bulkAction: string;
|
|
3118
|
-
enabled: boolean;
|
|
3119
|
-
weight: number;
|
|
3120
|
-
divider?: undefined;
|
|
3121
|
-
altAction?: undefined;
|
|
3122
3099
|
} | {
|
|
3123
3100
|
action: string;
|
|
3124
3101
|
altAction: string;
|
|
3125
3102
|
label: any;
|
|
3126
|
-
icon: string;
|
|
3127
3103
|
bulkable: boolean;
|
|
3128
3104
|
enabled: any;
|
|
3129
3105
|
bulkAction: string;
|
|
@@ -4020,7 +3996,8 @@ export const EMBER_FRAME: "ember-iframe";
|
|
|
4020
3996
|
|
|
4021
3997
|
declare module '@shell/utils/error' {
|
|
4022
3998
|
export function stringify(err: any): any;
|
|
4023
|
-
export function exceptionToErrorsArray(err: any): any;
|
|
3999
|
+
export function exceptionToErrorsArray(err: any): any[];
|
|
4000
|
+
export function translateError(error: any): any;
|
|
4024
4001
|
export class ClusterNotFoundError extends Error {
|
|
4025
4002
|
static NAME: string;
|
|
4026
4003
|
constructor(message: any);
|
|
@@ -4377,9 +4354,21 @@ export function deferred(name: any): {
|
|
|
4377
4354
|
export function setPromiseResult(promise: any, obj: any, key: any, label: any): void;
|
|
4378
4355
|
}
|
|
4379
4356
|
|
|
4357
|
+
// @shell/utils/roleFiltering
|
|
4358
|
+
|
|
4359
|
+
declare module '@shell/utils/roleFiltering' {
|
|
4360
|
+
export function globalRoleFilteringfn(ary: any): any;
|
|
4361
|
+
export function clusterRoleFilteringfn(ary: any): any;
|
|
4362
|
+
export function projectRoleFilteringfn(ary: any): any;
|
|
4363
|
+
}
|
|
4364
|
+
|
|
4380
4365
|
// @shell/utils/router
|
|
4381
4366
|
|
|
4382
4367
|
declare module '@shell/utils/router' {
|
|
4368
|
+
export function harvesterhci2cloud(str: any): any;
|
|
4369
|
+
export function cloud2harvesterhci(str: any): any;
|
|
4370
|
+
export function harvester2cloud(str: any): any;
|
|
4371
|
+
export function cloud2harvester(str: any): any;
|
|
4383
4372
|
export function queryParamsFor(current: any, qp: any, defaults?: {}): any;
|
|
4384
4373
|
export function getClusterFromRoute(to: any): any;
|
|
4385
4374
|
export function getProductFromRoute(to: any): any;
|
|
@@ -4395,7 +4384,7 @@ export function routeRequiresInstallRedirect(to: any): boolean;
|
|
|
4395
4384
|
|
|
4396
4385
|
declare module '@shell/utils/select' {
|
|
4397
4386
|
export function onClickOption(option: any, e: any): void;
|
|
4398
|
-
export function calculatePosition(dropdownList: any, component: any, width: any, placement: any): void;
|
|
4387
|
+
export function calculatePosition(dropdownList: any, component: any, width: any, placement: any, type: any, isLabel: any, leftWidth: any): void;
|
|
4399
4388
|
}
|
|
4400
4389
|
|
|
4401
4390
|
// @shell/utils/selector
|
|
@@ -4609,7 +4598,7 @@ export function asciiLike(str: any): boolean;
|
|
|
4609
4598
|
export function coerceStringTypeToScalarType(val: any, type: any): any;
|
|
4610
4599
|
export function matchesSomeRegex(stringRaw: any, regexes?: any[]): boolean;
|
|
4611
4600
|
export function ensureRegex(strOrRegex: any, exact?: boolean): any;
|
|
4612
|
-
export function nlToBr(value: any):
|
|
4601
|
+
export function nlToBr(value: any): any;
|
|
4613
4602
|
export function splitObjectPath(path: any): any;
|
|
4614
4603
|
export function joinObjectPath(ary: any): string;
|
|
4615
4604
|
export function shortenedImage(image: any): any;
|
package/utils/error.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { isArray } from '@shell/utils/array';
|
|
2
2
|
|
|
3
|
+
import translations from './errorTranslate.json';
|
|
4
|
+
import errorTranslateNew from './errorTranslateNew.json';
|
|
5
|
+
|
|
3
6
|
export class ClusterNotFoundError extends Error {
|
|
4
7
|
static NAME = 'ClusterNotFoundError'
|
|
5
8
|
|
|
@@ -47,8 +50,8 @@ export class ApiError extends Error {
|
|
|
47
50
|
}
|
|
48
51
|
|
|
49
52
|
export function stringify(err) {
|
|
53
|
+
|
|
50
54
|
let str;
|
|
51
|
-
|
|
52
55
|
if ( typeof err === 'string' ) {
|
|
53
56
|
str = err;
|
|
54
57
|
} else if ( err && typeof err === 'object' ) {
|
|
@@ -60,7 +63,7 @@ export function stringify(err) {
|
|
|
60
63
|
const data = JSON.parse(str).data;
|
|
61
64
|
|
|
62
65
|
if (data) {
|
|
63
|
-
return data;
|
|
66
|
+
return translateError(data);
|
|
64
67
|
}
|
|
65
68
|
} catch {}
|
|
66
69
|
}
|
|
@@ -84,7 +87,7 @@ export function stringify(err) {
|
|
|
84
87
|
str = JSON.stringify(err);
|
|
85
88
|
}
|
|
86
89
|
|
|
87
|
-
return str;
|
|
90
|
+
return translateError(str);
|
|
88
91
|
}
|
|
89
92
|
|
|
90
93
|
export function exceptionToErrorsArray(err) {
|
|
@@ -92,16 +95,21 @@ export function exceptionToErrorsArray(err) {
|
|
|
92
95
|
const body = err.response.data;
|
|
93
96
|
|
|
94
97
|
if ( body && body.message ) {
|
|
95
|
-
return [body.message];
|
|
98
|
+
return [translateError(body.message)];
|
|
96
99
|
} else {
|
|
97
|
-
return [err];
|
|
100
|
+
return [translateError(err)];
|
|
98
101
|
}
|
|
99
102
|
} else if (err.status && err.message) {
|
|
100
|
-
return [err.message];
|
|
103
|
+
return [translateError(err.message)];
|
|
101
104
|
} else if ( isArray(err) ) {
|
|
102
|
-
|
|
105
|
+
let arr = []
|
|
106
|
+
for (let index = 0; index < err.length; index++) {
|
|
107
|
+
arr[index] = translateError(err[index])
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return [...new Set(arr)];
|
|
103
111
|
} else {
|
|
104
|
-
return [err];
|
|
112
|
+
return [translateError(err)];
|
|
105
113
|
}
|
|
106
114
|
}
|
|
107
115
|
|
|
@@ -129,3 +137,96 @@ export const normalizeError = (err) => {
|
|
|
129
137
|
statusCode: (err.statusCode || err.status || (err.response && err.response.status) || 500)
|
|
130
138
|
};
|
|
131
139
|
};
|
|
140
|
+
export function translateError(error) {
|
|
141
|
+
error = typeof error === 'string'
|
|
142
|
+
? error
|
|
143
|
+
: error?.message || error?.toString() || '';
|
|
144
|
+
|
|
145
|
+
const originError = error;
|
|
146
|
+
error = error?.toLowerCase().replace(/admission webhook(.*?)denied the request:/g, (match, p1) => {
|
|
147
|
+
return '';
|
|
148
|
+
}).replace('internal error occurred: ', "");
|
|
149
|
+
console.log('00044', error);
|
|
150
|
+
|
|
151
|
+
// 1. 资源配额错误(最高优先级)
|
|
152
|
+
if (originError.includes('exceeded quota')) {
|
|
153
|
+
return '资源配额超限:请求的资源超过了命名空间的配额限制';
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// 2. 权限不足错误
|
|
157
|
+
const permissionDeniedPatterns = [
|
|
158
|
+
/"\S+" is forbidden:.*cannot.*(patch|update|create|delete|get|list|watch).*resource/i,
|
|
159
|
+
/is forbidden:.*user.*cannot.*(patch|update|create|delete|get|list|watch)/i
|
|
160
|
+
];
|
|
161
|
+
|
|
162
|
+
if (permissionDeniedPatterns.some(pattern => pattern.test(originError))) {
|
|
163
|
+
return "权限不足";
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
if (error.includes("a lowercase rfc 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character")) {
|
|
168
|
+
error = "无效的名称不符合 RFC 1123 命名规则。名称只能包含小写字母、数字或 '-',并且必须以字母或数字开头和结尾(例如 'my-name' 或 '123-abc')。"
|
|
169
|
+
} else if (error.includes('spec and status of disks on node') && error.includes('are being syncing and please retry later')) {
|
|
170
|
+
error = error.replace('spec and status of disks on node','').replace('are being syncing and please retry later','')
|
|
171
|
+
error = '节点' + error + '上的硬盘规格和状态正在同步,请稍后重试'
|
|
172
|
+
} else if (error.includes('same granularity as schedule') && error.includes('and offset less than')) {
|
|
173
|
+
error = error.replace('same granularity as schedule','').replace('and offset less than 10m0s','')
|
|
174
|
+
error = '与' + error + '的时间间隔应大于10分钟'
|
|
175
|
+
} else if (error.includes('should be greater than or equal to') && error.includes('but got')) {
|
|
176
|
+
error.replace('should be greater than or equal to','应该大于等于').replace('but got','但是填写的是')
|
|
177
|
+
}else if(error.includes('e.g')){
|
|
178
|
+
error = error.replace(/\s*(\(\s*)?e\.g\..*$/, '')
|
|
179
|
+
} else if(error.includes("because it's still used by vm(s)")) {
|
|
180
|
+
error = error.replace(/because it's still used by vm\(s\)/i, "因为正在被虚拟机使用:");
|
|
181
|
+
} else if (
|
|
182
|
+
error.includes('subnet.kubeovn.io') &&
|
|
183
|
+
error.includes('metadata.name in body should match') &&
|
|
184
|
+
error.includes('spec.excludeips[') &&
|
|
185
|
+
error.includes('in body should match')
|
|
186
|
+
) {
|
|
187
|
+
// 提取子网名与索引
|
|
188
|
+
const subnetMatch = error.match(/subnet\.kubeovn\.io\s+['"]([^'"]+)['"]/);
|
|
189
|
+
const ipMatch = error.match(/spec\.excludeips\[(\d+)\]/);
|
|
190
|
+
|
|
191
|
+
const subnetName = subnetMatch ? subnetMatch[1] : '';
|
|
192
|
+
const idx = ipMatch ? ipMatch[1] : '0';
|
|
193
|
+
|
|
194
|
+
error = `子网 '${subnetName}' 配置无效:1) 名称禁止以数字开头;2) 排除IP[${idx}] 不能为空且必须是合法 IPv4/IPv6 地址或地址段`;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// error = error.replace(/admission webhook(.*?)denied the request:/g, (match, p1) => {
|
|
198
|
+
// return '';
|
|
199
|
+
// })
|
|
200
|
+
// .replace(/cannot unmarshal number into(.*?)of type string/g, (match, p1) => {
|
|
201
|
+
// return '不能数字开头和纯数字';
|
|
202
|
+
// })
|
|
203
|
+
// Apply translations from JSON
|
|
204
|
+
if(error.indexOf('err:') !== -1){
|
|
205
|
+
const errorIndex = error.indexOf('err:')
|
|
206
|
+
error = error.substring(errorIndex + 4);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const translationsList = [...errorTranslateNew.translations, ...translations.translations]
|
|
210
|
+
|
|
211
|
+
for (const translation of translationsList) {
|
|
212
|
+
|
|
213
|
+
// if (error.includes(translation.pattern)) {
|
|
214
|
+
// error = error.replace(translation.pattern, translation.replacement);
|
|
215
|
+
// }
|
|
216
|
+
const regex = new RegExp(translation.pattern, translation.flags || 'g');
|
|
217
|
+
// error = error.replace(regex, translation.replacement);
|
|
218
|
+
const matches = error.match(regex);
|
|
219
|
+
|
|
220
|
+
if (matches) {
|
|
221
|
+
if (matches.length == 1) {
|
|
222
|
+
console.log('00045', error);
|
|
223
|
+
error = error.replace(regex, translation.replacement);
|
|
224
|
+
} else {
|
|
225
|
+
error = error.replace(regex, (...args) => translation.replacement.replace(/\$([1-9]\d*)/g, (_, idx) => args[Number(idx)] || ''))
|
|
226
|
+
console.log('00046', error);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
return error;
|
|
232
|
+
}
|