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
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { KUBERNETES, PROJECT } from '@shell/config/labels-annotations';
|
|
3
3
|
import { FLEET, NAMESPACE, MANAGEMENT, HELM } from '@shell/config/types';
|
|
4
4
|
import ButtonGroup from '@shell/components/ButtonGroup';
|
|
5
|
-
import { BadgeState } from '@components/BadgeState';
|
|
5
|
+
// import { BadgeState } from '@components/BadgeState';
|
|
6
|
+
import DotState from '@shell/components/DotState.vue';
|
|
6
7
|
import { Banner } from '@components/Banner';
|
|
7
8
|
import { get } from '@shell/utils/object';
|
|
8
9
|
import { NAME as FLEET_NAME } from '@shell/config/product/fleet';
|
|
@@ -29,7 +30,8 @@ export default {
|
|
|
29
30
|
name: 'MastheadResourceDetail',
|
|
30
31
|
|
|
31
32
|
components: {
|
|
32
|
-
BadgeState,
|
|
33
|
+
// BadgeState,
|
|
34
|
+
DotState,
|
|
33
35
|
Banner,
|
|
34
36
|
ButtonGroup,
|
|
35
37
|
ExtensionPanel,
|
|
@@ -44,6 +46,11 @@ export default {
|
|
|
44
46
|
}
|
|
45
47
|
},
|
|
46
48
|
|
|
49
|
+
isManuallyHide: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: true
|
|
52
|
+
},
|
|
53
|
+
|
|
47
54
|
mode: {
|
|
48
55
|
type: String,
|
|
49
56
|
default: 'create'
|
|
@@ -112,6 +119,7 @@ export default {
|
|
|
112
119
|
DETAIL_VIEW: _DETAIL,
|
|
113
120
|
extensionType: ExtensionPoint.PANEL,
|
|
114
121
|
extensionLocation: PanelLocation.DETAILS_MASTHEAD,
|
|
122
|
+
Svg: require('~shell/assets/images/API.svg')
|
|
115
123
|
};
|
|
116
124
|
},
|
|
117
125
|
|
|
@@ -246,7 +254,7 @@ export default {
|
|
|
246
254
|
},
|
|
247
255
|
|
|
248
256
|
parent() {
|
|
249
|
-
|
|
257
|
+
let displayName = this.value?.parentNameOverride || this.$store.getters['type-map/labelFor'](this.schema);
|
|
250
258
|
const product = this.$store.getters['currentProduct'].name;
|
|
251
259
|
|
|
252
260
|
const defaultLocation = {
|
|
@@ -264,6 +272,20 @@ export default {
|
|
|
264
272
|
}
|
|
265
273
|
|
|
266
274
|
const typeOptions = this.$store.getters[`type-map/optionsFor`]( this.resource );
|
|
275
|
+
|
|
276
|
+
// 转换为中文
|
|
277
|
+
const displayName_zh_hans = {
|
|
278
|
+
'GlobalRole': '全局角色',
|
|
279
|
+
'RoleTemplate': '集群角色',
|
|
280
|
+
}
|
|
281
|
+
if (displayName_zh_hans[displayName]) {
|
|
282
|
+
displayName = displayName_zh_hans[displayName]
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
if (displayName == '集群角色' && (this.$route.query?.roleContext == 'NAMESPACE' || location.hash == '#NAMESPACE')) {
|
|
286
|
+
displayName = '项目或资源组角色'
|
|
287
|
+
}
|
|
288
|
+
|
|
267
289
|
const out = {
|
|
268
290
|
displayName, location, ...typeOptions
|
|
269
291
|
};
|
|
@@ -314,12 +336,12 @@ export default {
|
|
|
314
336
|
});
|
|
315
337
|
}
|
|
316
338
|
|
|
317
|
-
if ( this.canViewYaml ) {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
}
|
|
339
|
+
// if ( this.canViewYaml ) {
|
|
340
|
+
// out.push({
|
|
341
|
+
// labelKey: 'resourceDetail.masthead.yaml',
|
|
342
|
+
// value: _YAML,
|
|
343
|
+
// });
|
|
344
|
+
// }
|
|
323
345
|
|
|
324
346
|
if ( out.length < 2 ) {
|
|
325
347
|
return null;
|
|
@@ -393,6 +415,38 @@ export default {
|
|
|
393
415
|
return this.shouldHifenize ? ` - ${ displayName }` : displayName;
|
|
394
416
|
},
|
|
395
417
|
|
|
418
|
+
demoDisplay() {
|
|
419
|
+
const product = this.$store.getters['productId'];
|
|
420
|
+
|
|
421
|
+
const resources = this.location?.params?.resource || this.$route.params?.resource || ''
|
|
422
|
+
|
|
423
|
+
const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], resources);
|
|
424
|
+
|
|
425
|
+
if (productId === undefined) {
|
|
426
|
+
return '';
|
|
427
|
+
}
|
|
428
|
+
const parts = productId?.split('::') || [];
|
|
429
|
+
const newString = 'root';
|
|
430
|
+
|
|
431
|
+
if (!parts?.includes(newString)) {
|
|
432
|
+
parts.unshift(newString); // 将字符串添加到数组第一位
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
const partsEn = parts.map((item) => {
|
|
436
|
+
return this.$store.getters['i18n/t'](`typeLabel."${ item.toLowerCase() }"`);
|
|
437
|
+
});
|
|
438
|
+
|
|
439
|
+
return partsEn;
|
|
440
|
+
},
|
|
441
|
+
menuIcon() {
|
|
442
|
+
const product = this.$store.getters['productId'];
|
|
443
|
+
|
|
444
|
+
const resources = this.location?.params?.resource || this.$route.params?.resource || ''
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
return this.$store.getters['type-map/groupsForVirTypes'](product, resources) || 'default menuIcon';
|
|
448
|
+
},
|
|
449
|
+
|
|
396
450
|
location() {
|
|
397
451
|
const { parent } = this;
|
|
398
452
|
|
|
@@ -439,10 +493,81 @@ export default {
|
|
|
439
493
|
|
|
440
494
|
<template>
|
|
441
495
|
<div class="masthead">
|
|
496
|
+
<div class="title">
|
|
497
|
+
<!-- 创建api密钥不需要面包屑 -->
|
|
498
|
+
<div
|
|
499
|
+
v-if="!(parentRouteOverride === 'account' && resource=== 'token')"
|
|
500
|
+
class="excram-list"
|
|
501
|
+
>
|
|
502
|
+
<span
|
|
503
|
+
v-for="(item,index) in demoDisplay"
|
|
504
|
+
:key="index"
|
|
505
|
+
>
|
|
506
|
+
<span>{{ item }}</span>
|
|
507
|
+
<span>/</span>
|
|
508
|
+
</span>
|
|
509
|
+
<span class="excram-last-name">
|
|
510
|
+
{{ (realMode === 'view'? '查看': realMode === 'edit' ? '编辑':'创建') + parent?.displayName }}
|
|
511
|
+
</span>
|
|
512
|
+
</div>
|
|
442
513
|
<header>
|
|
443
514
|
<div class="title">
|
|
444
515
|
<div class="primaryheader">
|
|
445
|
-
<
|
|
516
|
+
<span class="primary-title">
|
|
517
|
+
<!-- <nuxt-link
|
|
518
|
+
v-if="location"
|
|
519
|
+
:to="location"
|
|
520
|
+
>
|
|
521
|
+
{{ parent.displayName }}:
|
|
522
|
+
</nuxt-link> -->
|
|
523
|
+
<span class="detailIcon-span">
|
|
524
|
+
<img
|
|
525
|
+
v-if="parentRouteOverride === 'account' && resource=== 'token'"
|
|
526
|
+
:src="Svg"
|
|
527
|
+
style="margin-top: 4px; margin-left: 5px;"
|
|
528
|
+
>
|
|
529
|
+
<i
|
|
530
|
+
v-else
|
|
531
|
+
:class="'icon-'+ menuIcon + ' detailIcon'"
|
|
532
|
+
/>
|
|
533
|
+
</span>
|
|
534
|
+
<span class="detailIcon-span-title">{{ realMode=== 'create'? '创建': '' }}{{ parent?.displayName }}{{ realMode=== 'create'? '': '名称:' }}</span>
|
|
535
|
+
<span v-if="realMode !== 'create'">
|
|
536
|
+
<span v-if="value.detailPageHeaderActionOverride && value.detailPageHeaderActionOverride(realMode)">{{ value.detailPageHeaderActionOverride(realMode) }}</span>
|
|
537
|
+
<t
|
|
538
|
+
v-else
|
|
539
|
+
:k="'resourceDetail.header.' + realMode"
|
|
540
|
+
:subtype="resourceSubtype"
|
|
541
|
+
:name="displayName"
|
|
542
|
+
:escapehtml="false"
|
|
543
|
+
/>
|
|
544
|
+
</span>
|
|
545
|
+
<DotState
|
|
546
|
+
v-if="!isCreate && parent.showState"
|
|
547
|
+
class="masthead-state"
|
|
548
|
+
:value="value"
|
|
549
|
+
/>
|
|
550
|
+
<span
|
|
551
|
+
v-if="!isCreate && value.injectionEnabled"
|
|
552
|
+
class="masthead-istio"
|
|
553
|
+
>
|
|
554
|
+
<i
|
|
555
|
+
v-clean-tooltip="t('projectNamespaces.isIstioInjectionEnabled')"
|
|
556
|
+
class="icon icon-sm icon-istio"
|
|
557
|
+
/>
|
|
558
|
+
</span>
|
|
559
|
+
</span>
|
|
560
|
+
<span
|
|
561
|
+
v-if="location"
|
|
562
|
+
class="valid"
|
|
563
|
+
>|</span>
|
|
564
|
+
<router-link
|
|
565
|
+
v-if="location"
|
|
566
|
+
:to="location"
|
|
567
|
+
>
|
|
568
|
+
返回
|
|
569
|
+
</router-link>
|
|
570
|
+
<!-- <h1>
|
|
446
571
|
<TabTitle
|
|
447
572
|
v-if="isCreate"
|
|
448
573
|
:showChild="false"
|
|
@@ -498,9 +623,9 @@ export default {
|
|
|
498
623
|
>
|
|
499
624
|
<i class="icon icon-external-link" />
|
|
500
625
|
</a>
|
|
501
|
-
</h1>
|
|
626
|
+
</h1> -->
|
|
502
627
|
</div>
|
|
503
|
-
<div
|
|
628
|
+
<!-- <div
|
|
504
629
|
v-if="!isCreate"
|
|
505
630
|
class="subheader"
|
|
506
631
|
>
|
|
@@ -545,7 +670,8 @@ export default {
|
|
|
545
670
|
{{ value.createdBy.displayName }}
|
|
546
671
|
</span>
|
|
547
672
|
</span>
|
|
548
|
-
|
|
673
|
+
<span v-if="value.showPodRestarts">{{ t("resourceDetail.masthead.restartCount") }}:<span class="live-data"> {{ value.restartCount }}</span></span>
|
|
674
|
+
</div> -->
|
|
549
675
|
</div>
|
|
550
676
|
<slot name="right">
|
|
551
677
|
<div class="actions-container align-start">
|
|
@@ -623,42 +749,30 @@ export default {
|
|
|
623
749
|
/>
|
|
624
750
|
|
|
625
751
|
<slot />
|
|
752
|
+
</div>
|
|
626
753
|
</div>
|
|
627
754
|
</template>
|
|
628
755
|
|
|
629
756
|
<style lang='scss' scoped>
|
|
630
757
|
.masthead {
|
|
631
758
|
padding-bottom: 10px;
|
|
632
|
-
border-bottom: 1px solid var(--border);
|
|
759
|
+
/* border-bottom: 1px solid var(--border); */
|
|
633
760
|
margin-bottom: 10px;
|
|
634
761
|
}
|
|
635
762
|
|
|
636
763
|
HEADER {
|
|
637
764
|
margin: 0;
|
|
638
|
-
grid-template-columns: minmax(0, 1fr) auto;
|
|
639
765
|
}
|
|
640
766
|
|
|
641
767
|
.primaryheader {
|
|
642
768
|
display: flex;
|
|
643
769
|
flex-direction: row;
|
|
644
770
|
align-items: center;
|
|
771
|
+
font-size:14px;
|
|
772
|
+
height: 50px;
|
|
645
773
|
|
|
646
774
|
h1 {
|
|
647
|
-
margin: 0
|
|
648
|
-
display: flex;
|
|
649
|
-
flex-direction: row;
|
|
650
|
-
align-items: center;
|
|
651
|
-
overflow: hidden;
|
|
652
|
-
|
|
653
|
-
.masthead-resource-title {
|
|
654
|
-
text-overflow: ellipsis;
|
|
655
|
-
overflow: hidden;
|
|
656
|
-
white-space: nowrap;
|
|
657
|
-
}
|
|
658
|
-
|
|
659
|
-
.masthead-resource-list-link {
|
|
660
|
-
margin: 5px;
|
|
661
|
-
}
|
|
775
|
+
margin: 0;
|
|
662
776
|
}
|
|
663
777
|
}
|
|
664
778
|
|
|
@@ -671,8 +785,7 @@ export default {
|
|
|
671
785
|
}
|
|
672
786
|
|
|
673
787
|
.live-data {
|
|
674
|
-
color: var(--body-text)
|
|
675
|
-
margin-left: 3px;
|
|
788
|
+
color: var(--body-text)
|
|
676
789
|
}
|
|
677
790
|
}
|
|
678
791
|
|
|
@@ -681,8 +794,12 @@ export default {
|
|
|
681
794
|
}
|
|
682
795
|
|
|
683
796
|
.masthead-state {
|
|
684
|
-
margin-left: 8px;
|
|
685
797
|
font-size: initial;
|
|
798
|
+
display: inline-block;
|
|
799
|
+
position: relative;
|
|
800
|
+
/* top: -2px; */
|
|
801
|
+
font-size: 12px;
|
|
802
|
+
margin-left: 5px;
|
|
686
803
|
}
|
|
687
804
|
|
|
688
805
|
.masthead-istio {
|
|
@@ -705,13 +822,40 @@ export default {
|
|
|
705
822
|
}
|
|
706
823
|
}
|
|
707
824
|
|
|
708
|
-
div.actions-container > div.actions {
|
|
709
|
-
display: flex;
|
|
710
|
-
flex-direction: row;
|
|
711
|
-
justify-content: flex-end;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
825
|
.resource-external {
|
|
715
826
|
font-size: 18px;
|
|
716
827
|
}
|
|
828
|
+
.excram-list{
|
|
829
|
+
font-size: 14px;
|
|
830
|
+
margin-bottom: 20px;
|
|
831
|
+
}
|
|
832
|
+
.excram-last-name{
|
|
833
|
+
color: var(--link);
|
|
834
|
+
}
|
|
835
|
+
.valid{
|
|
836
|
+
color: #d7d7d7;
|
|
837
|
+
margin: 0px 10px;
|
|
838
|
+
}
|
|
839
|
+
.detailIcon-span{
|
|
840
|
+
width: 24px;
|
|
841
|
+
height: 24px;
|
|
842
|
+
display: inline-block;
|
|
843
|
+
position: relative;
|
|
844
|
+
background: var(--primary);
|
|
845
|
+
margin-right: 10px;
|
|
846
|
+
}
|
|
847
|
+
.detailIcon{
|
|
848
|
+
position: absolute;
|
|
849
|
+
color: #fff;
|
|
850
|
+
font-size: 38px;
|
|
851
|
+
left: 4px;
|
|
852
|
+
top: -2px;
|
|
853
|
+
}
|
|
854
|
+
.primary-title{
|
|
855
|
+
display: flex;
|
|
856
|
+
align-items: center;
|
|
857
|
+
}
|
|
858
|
+
.detailIcon-span-title{
|
|
859
|
+
font-weight: bold;
|
|
860
|
+
}
|
|
717
861
|
</style>
|
|
@@ -6,13 +6,14 @@ import {
|
|
|
6
6
|
_VIEW, _EDIT, _CLONE, _IMPORT, _STAGE, _CREATE,
|
|
7
7
|
AS, _YAML, _DETAIL, _CONFIG, _GRAPH, PREVIEW, MODE,
|
|
8
8
|
} from '@shell/config/query-params';
|
|
9
|
-
import { SCHEMA } from '@shell/config/types';
|
|
9
|
+
import { FLEET, SCHEMA } from '@shell/config/types';
|
|
10
10
|
import { createYaml } from '@shell/utils/create-yaml';
|
|
11
11
|
import Masthead from '@shell/components/ResourceDetail/Masthead';
|
|
12
12
|
import DetailTop from '@shell/components/DetailTop';
|
|
13
13
|
import { clone, diff } from '@shell/utils/object';
|
|
14
14
|
import IconMessage from '@shell/components/IconMessage';
|
|
15
15
|
import ForceDirectedTreeChart from '@shell/components/ForceDirectedTreeChart';
|
|
16
|
+
import { checkSchemasForFindAllHash } from '@shell/utils/auth';
|
|
16
17
|
import { stringify } from '@shell/utils/error';
|
|
17
18
|
import { Banner } from '@components/Banner';
|
|
18
19
|
|
|
@@ -171,6 +172,28 @@ export default {
|
|
|
171
172
|
yaml = createYaml(schemas, resourceType, data);
|
|
172
173
|
}
|
|
173
174
|
} else {
|
|
175
|
+
if ( as === _GRAPH ) {
|
|
176
|
+
const graphSchema = await checkSchemasForFindAllHash({
|
|
177
|
+
cluster: {
|
|
178
|
+
inStoreType: 'management',
|
|
179
|
+
type: FLEET.CLUSTER
|
|
180
|
+
},
|
|
181
|
+
bundle: {
|
|
182
|
+
inStoreType: 'management',
|
|
183
|
+
type: FLEET.BUNDLE,
|
|
184
|
+
opt: { excludeFields: ['metadata.managedFields', 'spec.resources'] },
|
|
185
|
+
},
|
|
186
|
+
|
|
187
|
+
bundleDeployment: {
|
|
188
|
+
inStoreType: 'management',
|
|
189
|
+
type: FLEET.BUNDLE_DEPLOYMENT
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
}, this.$store);
|
|
193
|
+
|
|
194
|
+
this.canViewChart = graphSchema.cluster && graphSchema.bundle && graphSchema.bundleDeployment;
|
|
195
|
+
}
|
|
196
|
+
|
|
174
197
|
let fqid = id;
|
|
175
198
|
|
|
176
199
|
if ( schema.attributes?.namespaced && namespace ) {
|
|
@@ -273,6 +296,7 @@ export default {
|
|
|
273
296
|
value: null,
|
|
274
297
|
model: null,
|
|
275
298
|
notFound: null,
|
|
299
|
+
canViewChart: true,
|
|
276
300
|
canViewYaml: null,
|
|
277
301
|
errors: []
|
|
278
302
|
};
|
|
@@ -440,7 +464,7 @@ export default {
|
|
|
440
464
|
|
|
441
465
|
<template>
|
|
442
466
|
<Loading v-if="$fetchState.pending || notFound" />
|
|
443
|
-
<div v-else>
|
|
467
|
+
<div style="padding: 20px;height: 100%;" v-else>
|
|
444
468
|
<Masthead
|
|
445
469
|
v-if="showMasthead"
|
|
446
470
|
:resource="resourceType"
|
|
@@ -451,15 +475,16 @@ export default {
|
|
|
451
475
|
:has-graph="hasGraph"
|
|
452
476
|
:has-detail="hasCustomDetail"
|
|
453
477
|
:has-edit="hasCustomEdit"
|
|
454
|
-
:can-view-yaml="canViewYaml"
|
|
455
478
|
:resource-subtype="resourceSubtype"
|
|
456
479
|
:parent-route-override="parentRouteOverride"
|
|
457
480
|
:store-override="storeOverride"
|
|
481
|
+
|
|
482
|
+
:isManuallyHide="false"
|
|
458
483
|
>
|
|
459
|
-
<DetailTop
|
|
484
|
+
<!-- <DetailTop
|
|
460
485
|
v-if="isView && isDetail"
|
|
461
486
|
:value="liveModel"
|
|
462
|
-
/>
|
|
487
|
+
/> -->
|
|
463
488
|
</Masthead>
|
|
464
489
|
<div
|
|
465
490
|
v-if="hasErrors"
|
|
@@ -479,7 +504,7 @@ export default {
|
|
|
479
504
|
</div>
|
|
480
505
|
|
|
481
506
|
<ForceDirectedTreeChart
|
|
482
|
-
v-if="isGraph"
|
|
507
|
+
v-if="isGraph && canViewChart"
|
|
483
508
|
:data="chartData"
|
|
484
509
|
:fdc-config="getGraphConfig"
|
|
485
510
|
/>
|
|
@@ -493,27 +518,26 @@ export default {
|
|
|
493
518
|
:offer-preview="offerPreview"
|
|
494
519
|
:done-route="doneRoute"
|
|
495
520
|
:done-override="value ? value.doneOverride : null"
|
|
496
|
-
:show-errors="false"
|
|
497
521
|
@update:value="$emit('input', $event)"
|
|
498
|
-
@error="
|
|
522
|
+
@error="e=>errors.push(e)"
|
|
499
523
|
/>
|
|
500
524
|
|
|
501
525
|
<component
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
526
|
+
:is="showComponent"
|
|
527
|
+
v-else
|
|
528
|
+
ref="comp"
|
|
529
|
+
v-model:value="value"
|
|
530
|
+
v-bind="$data"
|
|
531
|
+
:done-params="doneParams"
|
|
532
|
+
:done-route="doneRoute"
|
|
533
|
+
:mode="mode"
|
|
534
|
+
:initial-value="initialModel"
|
|
535
|
+
:live-value="liveModel"
|
|
536
|
+
:real-mode="realMode"
|
|
537
|
+
:class="{'flex-content': flexContent}"
|
|
538
|
+
@update:value="$emit('input', $event)"
|
|
539
|
+
@update:mode="setMode"
|
|
540
|
+
@set-subtype="setSubtype"
|
|
517
541
|
/>
|
|
518
542
|
|
|
519
543
|
<button
|
|
@@ -553,10 +577,4 @@ export default {
|
|
|
553
577
|
flex-direction: column;
|
|
554
578
|
flex-grow: 1;
|
|
555
579
|
}
|
|
556
|
-
.cru__errors {
|
|
557
|
-
position: sticky;
|
|
558
|
-
top: 0;
|
|
559
|
-
z-index: 1;
|
|
560
|
-
background-color: var(--header-bg);
|
|
561
|
-
}
|
|
562
580
|
</style>
|