dashboard-shell-shell 3.0.5-test.3 → 3.0.5-test.31
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/icons/iconfont.css +4 -1
- package/assets/images/pl/dark/logo.png +0 -0
- package/assets/styles/all.scss +21 -1
- package/assets/styles/base/_variables.scss +5 -5
- package/assets/styles/fonts/_icons.scss +3 -2
- package/assets/styles/global/_button.scss +8 -8
- package/assets/styles/global/_select.scss +1 -1
- package/assets/styles/global/_tooltip.scss +9 -5
- package/assets/styles/themes/_light.scss +3 -1
- package/assets/styles/vendor/vue-select.scss +2 -1
- package/assets/translations/zh-hans.yaml +156 -13
- package/components/ActionDropdown.vue +1 -1
- package/components/ButtonDropdown.vue +3 -1
- package/components/CodeMirror.vue +6 -4
- package/components/ContainerResourceLimit.vue +2 -2
- package/components/CopyToClipboard.vue +15 -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/GlobalRoleBindings.vue +48 -112
- package/components/PodSecurityAdmission.vue +2 -2
- 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 +123 -25
- package/components/ResourceDetail/Masthead/index.vue +1 -1
- package/components/ResourceDetail/Masthead/latest.vue +1 -1
- package/components/ResourceDetail/Masthead/legacy.vue +239 -167
- package/components/ResourceDetail/legacy.vue +44 -28
- package/components/ResourceList/Masthead.vue +14 -15
- package/components/SideNav.vue +21 -21
- package/components/SortableTable/THead.vue +21 -1
- package/components/SortableTable/index.vue +23 -6
- package/components/Tabbed/index.vue +6 -1
- package/components/auth/Principal.vue +42 -13
- package/components/auth/RoleDetailEdit.vue +11 -7
- package/components/breadcrumb/index.vue +119 -0
- package/components/form/ArrayList.vue +164 -147
- package/components/form/ArrayListGrouped.vue +3 -1
- package/components/form/ChangePassword.vue +1 -1
- package/components/form/Command.vue +4 -5
- package/components/form/Conditions.vue +15 -1
- package/components/form/Footer.vue +1 -0
- package/components/form/HealthCheck.vue +0 -2
- package/components/form/HookOption.vue +87 -58
- package/components/form/InputWithSelect.vue +8 -7
- package/components/form/KeyValue.vue +20 -2
- package/components/form/LabeledSelect.vue +6 -3
- package/components/form/Labels.vue +2 -2
- package/components/form/MatchExpressions.vue +3 -4
- package/components/form/Members/ClusterMembershipEditor.vue +1 -1
- package/components/form/Members/ClusterPermissionsEditor.vue +5 -5
- package/components/form/Members/MembershipEditor.vue +2 -2
- package/components/form/NameNsDescription.vue +1 -1
- package/components/form/Networking.vue +6 -9
- package/components/form/NodeAffinity.vue +29 -28
- package/components/form/PodAffinity.vue +23 -23
- package/components/form/Probe.vue +15 -11
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +11 -9
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +36 -30
- package/components/form/ResourceSelector.vue +1 -1
- package/components/form/Security.vue +1 -3
- package/components/form/Select.vue +6 -1
- package/components/form/ServiceNameSelect.vue +2 -5
- package/components/form/ServicePorts.vue +149 -75
- package/components/form/Taints.vue +2 -1
- package/components/form/Tolerations.vue +12 -9
- package/components/form/ValueFromResource.vue +110 -96
- package/components/form/WorkloadPorts.vue +143 -123
- package/components/formatter/WorkloadHealthScale.vue +4 -3
- package/components/nav/Group.vue +6 -0
- package/components/nav/Header.vue +7 -4
- package/components/nav/NamespaceFilter.vue +15 -21
- package/components/nav/TopLevelMenu.vue +99 -125
- package/components/nav/Type.vue +15 -3
- package/config/menuRouteMap.js +10 -0
- package/config/product/explorer.js +5 -1
- package/config/router/navigation-guards/index.js +61 -3
- package/detail/node.vue +28 -23
- package/dialog/AddCustomBadgeDialog.vue +17 -9
- 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/networking.k8s.io.ingress/Certificate.vue +7 -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/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/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/models/provisioning.cattle.io.cluster.js +19 -18
- package/package.json +1 -1
- package/pages/account/index.vue +95 -115
- package/pages/auth/setup.vue +35 -16
- package/pages/c/_cluster/auth/roles/index.vue +38 -5
- package/pages/c/_cluster/explorer/ConfigBadge.vue +1 -1
- package/pages/c/_cluster/explorer/tools/index.vue +6 -6
- package/pages/home.vue +3 -4
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.js +1 -1
- package/plugins/dashboard-store/resource-class.js +28 -27
- package/rancher-components/BadgeState/BadgeState.vue +33 -52
- package/rancher-components/Banner/Banner.vue +4 -1
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +31 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +8 -7
- package/scripts/publish-shell.sh +1 -1
- package/store/i18n.js +4 -0
- package/store/type-map.js +1 -1
- package/types/shell/index.d.ts +4 -30
- package/utils/error.js +3 -1
- package/utils/errorTranslate.json +356 -2
- package/vue.config.js +1 -1
|
@@ -13,6 +13,8 @@ import { _CONFIG, _GRAPH, AS } from '@shell/config/query-params';
|
|
|
13
13
|
import ButtonGroup from '@shell/components/ButtonGroup';
|
|
14
14
|
import { ExtensionPoint, PanelLocation } from '@shell/core/types';
|
|
15
15
|
import ExtensionPanel from '@shell/components/ExtensionPanel.vue';
|
|
16
|
+
import breadcrumb from '@shell/components/breadcrumb/index.vue'
|
|
17
|
+
import { useDefaultConfigTabProps } from '@shell/components/Drawer/ResourceDetailDrawer/composables';
|
|
16
18
|
|
|
17
19
|
export interface Badge {
|
|
18
20
|
color: 'bg-success' | 'bg-error' | 'bg-warning' | 'bg-info';
|
|
@@ -36,6 +38,7 @@ export interface TitleBarProps {
|
|
|
36
38
|
showViewOptions?: boolean;
|
|
37
39
|
|
|
38
40
|
onShowConfiguration?: (returnFocusSelector: string) => void;
|
|
41
|
+
parentRouteOverride?: string;
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
const showConfigurationIcon = require(`@shell/assets/images/icons/document.svg`);
|
|
@@ -43,9 +46,10 @@ const showConfigurationIcon = require(`@shell/assets/images/icons/document.svg`)
|
|
|
43
46
|
|
|
44
47
|
<script setup lang="ts">
|
|
45
48
|
const {
|
|
46
|
-
resource, resourceTypeLabel, resourceTo, resourceName, description, badge, showViewOptions, onShowConfiguration,
|
|
49
|
+
parentRouteOverride, resource, resourceTypeLabel, resourceTo, resourceName, description, badge, showViewOptions, onShowConfiguration,
|
|
47
50
|
} = defineProps<TitleBarProps>();
|
|
48
51
|
|
|
52
|
+
|
|
49
53
|
const store = useStore();
|
|
50
54
|
const i18n = useI18n(store);
|
|
51
55
|
const router = useRouter();
|
|
@@ -54,6 +58,10 @@ const emit = defineEmits(['show-configuration']);
|
|
|
54
58
|
const showConfigurationDataTestId = 'show-configuration-cta';
|
|
55
59
|
const showConfigurationReturnFocusSelector = computed(() => `[data-testid="${ showConfigurationDataTestId }"]`);
|
|
56
60
|
|
|
61
|
+
|
|
62
|
+
const configTabProps = useDefaultConfigTabProps(resource);
|
|
63
|
+
|
|
64
|
+
|
|
57
65
|
const currentView = ref(router?.currentRoute?.value?.query?.as || _CONFIG);
|
|
58
66
|
const viewOptions = computed(() => {
|
|
59
67
|
if (!showViewOptions) {
|
|
@@ -72,6 +80,45 @@ const viewOptions = computed(() => {
|
|
|
72
80
|
];
|
|
73
81
|
});
|
|
74
82
|
|
|
83
|
+
const Svg = require('~shell/assets/images/API.svg')
|
|
84
|
+
|
|
85
|
+
const parent = computed(() => {
|
|
86
|
+
|
|
87
|
+
const product = store.getters['currentProduct'].name;
|
|
88
|
+
|
|
89
|
+
const defaultLocation = {
|
|
90
|
+
name: 'c-cluster-product-resource',
|
|
91
|
+
params: {
|
|
92
|
+
resource,
|
|
93
|
+
product,
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const location = resource?.parentLocationOverride || defaultLocation;
|
|
98
|
+
|
|
99
|
+
if (parentRouteOverride) {
|
|
100
|
+
location.name = parentRouteOverride;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return { location };
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
const menuIcon = computed(() => {
|
|
107
|
+
const product = store.getters['productId'];
|
|
108
|
+
const resources = parent.value.location?.params?.resource || '';
|
|
109
|
+
return store.getters['type-map/groupsForVirTypes'](product, resources) || 'default menuIcon';
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
const hiddenTypes = [
|
|
113
|
+
'harvesterhci.io.virtualmachinebackup',
|
|
114
|
+
];
|
|
115
|
+
|
|
116
|
+
const shouldShowConfiguration = computed(() =>
|
|
117
|
+
onShowConfiguration &&
|
|
118
|
+
configTabProps &&
|
|
119
|
+
!hiddenTypes.includes(resource?.type)
|
|
120
|
+
);
|
|
121
|
+
|
|
75
122
|
watch(
|
|
76
123
|
() => currentView.value,
|
|
77
124
|
() => {
|
|
@@ -82,33 +129,58 @@ watch(
|
|
|
82
129
|
|
|
83
130
|
<template>
|
|
84
131
|
<div class="title-bar">
|
|
132
|
+
<breadcrumb :resourceTypeLabel="resourceTypeLabel" :resource="resource"/>
|
|
85
133
|
<Top>
|
|
86
134
|
<Title class="title">
|
|
135
|
+
<span class="detailIcon-span">
|
|
136
|
+
<img
|
|
137
|
+
v-if="parentRouteOverride === 'account' && resource=== 'token'"
|
|
138
|
+
:src="Svg"
|
|
139
|
+
style="margin-top: 4px; margin-left: 5px;"
|
|
140
|
+
>
|
|
141
|
+
<i
|
|
142
|
+
v-else
|
|
143
|
+
:class="'icon-'+ menuIcon + ' detailIcon'"
|
|
144
|
+
/>
|
|
145
|
+
</span>
|
|
146
|
+
<div class="resourceTypeLabelCls">
|
|
147
|
+
{{ resourceTypeLabel }}名称:
|
|
148
|
+
</div>
|
|
149
|
+
<span class="resource-name masthead-resource-title">
|
|
150
|
+
{{ resourceName }}
|
|
151
|
+
</span>
|
|
152
|
+
<BadgeState
|
|
153
|
+
v-if="badge"
|
|
154
|
+
class="badge-state"
|
|
155
|
+
:color="badge.color"
|
|
156
|
+
:label="badge.label"
|
|
157
|
+
/>
|
|
158
|
+
<span
|
|
159
|
+
class="valid"
|
|
160
|
+
>|</span>
|
|
87
161
|
<TabTitle :show-child="false">
|
|
88
|
-
|
|
162
|
+
返回
|
|
89
163
|
</TabTitle>
|
|
90
164
|
<router-link
|
|
91
165
|
v-if="resourceTo"
|
|
92
166
|
:to="resourceTo"
|
|
93
167
|
class="resource-link"
|
|
94
168
|
>
|
|
95
|
-
|
|
169
|
+
返回
|
|
96
170
|
</router-link>
|
|
97
171
|
<span
|
|
98
172
|
v-else
|
|
99
173
|
class="resource-text"
|
|
100
174
|
>
|
|
101
|
-
|
|
175
|
+
返回
|
|
102
176
|
</span>
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
:label="badge.label"
|
|
111
|
-
/>
|
|
177
|
+
<div
|
|
178
|
+
v-if="description"
|
|
179
|
+
style="font-size: 12px;margin-left: 16px;"
|
|
180
|
+
class="bottom description text-deemphasized"
|
|
181
|
+
>
|
|
182
|
+
( {{ description }} )
|
|
183
|
+
</div>
|
|
112
184
|
</Title>
|
|
113
185
|
<div class="actions">
|
|
114
186
|
<!-- Please don't expand this pattern, this was a quick fix to resolve a conflict between the new masthead and fleet. -->
|
|
@@ -118,7 +190,7 @@ watch(
|
|
|
118
190
|
:options="viewOptions"
|
|
119
191
|
/>
|
|
120
192
|
<RcButton
|
|
121
|
-
v-if="
|
|
193
|
+
v-if="shouldShowConfiguration"
|
|
122
194
|
:data-testid="showConfigurationDataTestId"
|
|
123
195
|
class="show-configuration"
|
|
124
196
|
:primary="true"
|
|
@@ -134,6 +206,7 @@ watch(
|
|
|
134
206
|
</RcButton>
|
|
135
207
|
<ActionMenu
|
|
136
208
|
v-if="actionMenuResource"
|
|
209
|
+
:showIcon="true"
|
|
137
210
|
button-role="multiAction"
|
|
138
211
|
:resource="actionMenuResource"
|
|
139
212
|
data-testid="masthead-action-menu"
|
|
@@ -141,12 +214,6 @@ watch(
|
|
|
141
214
|
/>
|
|
142
215
|
</div>
|
|
143
216
|
</Top>
|
|
144
|
-
<div
|
|
145
|
-
v-if="description"
|
|
146
|
-
class="bottom description text-deemphasized"
|
|
147
|
-
>
|
|
148
|
-
{{ description }}
|
|
149
|
-
</div>
|
|
150
217
|
<ExtensionPanel
|
|
151
218
|
:resource="resource"
|
|
152
219
|
:type="ExtensionPoint.PANEL"
|
|
@@ -156,12 +223,39 @@ watch(
|
|
|
156
223
|
</template>
|
|
157
224
|
|
|
158
225
|
<style lang="scss" scoped>
|
|
226
|
+
|
|
227
|
+
.detailIcon-span{
|
|
228
|
+
width: 24px;
|
|
229
|
+
height: 24px;
|
|
230
|
+
display: inline-block;
|
|
231
|
+
position: relative;
|
|
232
|
+
background: var(--primary);
|
|
233
|
+
margin-right: 10px;
|
|
234
|
+
}
|
|
235
|
+
.detailIcon{
|
|
236
|
+
position: absolute;
|
|
237
|
+
color: #fff;
|
|
238
|
+
font-size: 38px;
|
|
239
|
+
left: 4px;
|
|
240
|
+
top: -2px;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.detailIcon-span-title{
|
|
244
|
+
font-weight: bold;
|
|
245
|
+
}
|
|
246
|
+
.resourceTypeLabelCls {
|
|
247
|
+
font-weight: 700;
|
|
248
|
+
}
|
|
249
|
+
.valid{
|
|
250
|
+
color: #d7d7d7;
|
|
251
|
+
margin: 0px 10px;
|
|
252
|
+
}
|
|
159
253
|
.title-bar {
|
|
160
254
|
min-width: 740px;
|
|
161
255
|
|
|
162
256
|
.badge-state {
|
|
163
257
|
font-size: 16px;
|
|
164
|
-
margin-left:
|
|
258
|
+
margin-left: 5px;
|
|
165
259
|
position: relative;
|
|
166
260
|
}
|
|
167
261
|
|
|
@@ -170,15 +264,19 @@ watch(
|
|
|
170
264
|
}
|
|
171
265
|
|
|
172
266
|
&:deep() button[data-testid="masthead-action-menu"] {
|
|
173
|
-
border-radius:
|
|
174
|
-
width:
|
|
175
|
-
height:
|
|
176
|
-
margin-left:
|
|
267
|
+
border-radius: 2px;
|
|
268
|
+
width: 32px;
|
|
269
|
+
height: 32px;
|
|
270
|
+
margin-left: 10px;
|
|
177
271
|
|
|
178
272
|
display: inline-flex;
|
|
179
273
|
flex-direction: row;
|
|
180
274
|
justify-content: center;
|
|
181
275
|
align-items: center;
|
|
276
|
+
|
|
277
|
+
a{
|
|
278
|
+
color: #fff;
|
|
279
|
+
}
|
|
182
280
|
}
|
|
183
281
|
|
|
184
282
|
.description {
|