dashboard-shell-shell 3.0.5-test.6 → 3.0.5-test.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/brand/harvester/favicon.png +0 -0
- package/assets/brand/suse/favicon.png +0 -0
- package/assets/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 +216 -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/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 +19 -0
- package/assets/images/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 +63 -0
- package/assets/styles/app.scss +4 -0
- package/assets/styles/base/_basic.scss +2 -2
- 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/global/_button.scss +43 -25
- package/assets/styles/global/_columns.scss +3 -1
- package/assets/styles/global/_form.scss +45 -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 +56 -8
- package/assets/styles/themes/_dark.scss +3 -0
- package/assets/styles/themes/_light.scss +66 -43
- package/assets/styles/vendor/vue-select.scss +22 -9
- package/assets/translations/en-us.yaml +28 -4
- package/assets/translations/zh-hans.yaml +452 -189
- 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 +26 -4
- package/components/ButtonMultiAction.vue +1 -0
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +20 -6
- package/components/ConsumptionGauge.vue +24 -5
- package/components/CopyToClipboard.vue +15 -0
- package/components/CruResource.vue +9 -8
- 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 +22 -22
- package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +1 -1
- package/components/Drawer/ResourceDetailDrawer/index.vue +2 -1
- package/components/ExplorerMembers.vue +18 -3
- package/components/ExplorerProjectsNamespaces.vue +19 -5
- package/components/GlobalRoleBindings.vue +112 -48
- 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 +1 -1
- package/components/PromptModal.vue +1 -1
- package/components/PromptRemove.vue +30 -11
- 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/index.vue +109 -24
- package/components/ResourceDetail/Masthead/legacy.vue +181 -38
- package/components/ResourceDetail/legacy.vue +32 -14
- package/components/ResourceList/Masthead.vue +226 -54
- package/components/ResourceList/ResourceLoadingIndicator.vue +5 -2
- package/components/ResourceTable.vue +24 -2
- package/components/SideNav.vue +74 -20
- package/components/SortableTable/THead.vue +33 -3
- package/components/SortableTable/index.vue +1016 -463
- 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 +47 -29
- package/components/YamlEditor.vue +0 -1
- package/components/auth/Principal.vue +37 -13
- package/components/auth/RoleDetailEdit.vue +58 -7
- package/components/auth/SelectPrincipal.vue +1 -0
- package/components/breadcrumb/index.vue +316 -0
- package/components/form/ArrayList.vue +41 -33
- package/components/form/ArrayListGrouped.vue +10 -2
- package/components/form/ArrayListSelect.vue +1 -1
- package/components/form/BannerSettings.vue +64 -59
- package/components/form/ChangePassword.vue +4 -4
- package/components/form/ColorInput.vue +32 -8
- package/components/form/Footer.vue +11 -8
- package/components/form/InputWithSelect.vue +8 -5
- package/components/form/KeyValue.vue +47 -7
- package/components/form/LabeledSelect.vue +214 -242
- package/components/form/Labels.vue +3 -3
- package/components/form/MatchExpressions.vue +24 -7
- package/components/form/Members/ClusterPermissionsEditor.vue +1 -2
- package/components/form/Members/MembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +59 -20
- package/components/form/Password.vue +16 -7
- package/components/form/PodAffinity.vue +4 -5
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +18 -17
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +3 -6
- package/components/form/Select.vue +5 -2
- package/components/form/SimpleSecretSelector.vue +29 -9
- package/components/form/Taints.vue +2 -1
- package/components/form/UnitInput.vue +8 -3
- package/components/form/WorkloadPorts.vue +143 -123
- package/components/formatter/BadgeStateFormatter.vue +8 -5
- package/components/formatter/LiveDate.vue +3 -3
- package/components/nav/Favorite.vue +5 -1
- package/components/nav/Group.vue +132 -99
- package/components/nav/Header.vue +124 -27
- package/components/nav/HeaderPageActionMenu.vue +1 -0
- package/components/nav/NamespaceFilter.vue +20 -17
- package/components/nav/TopLevelMenu.vue +182 -119
- package/components/nav/Type.vue +63 -41
- package/composables/useClickOutside.ts +1 -1
- package/config/private-label.js +15 -11
- package/config/product/auth.js +17 -7
- package/config/product/settings.js +19 -9
- package/config/settings.ts +28 -0
- package/config/table-headers.js +3 -2
- package/dialog/ForceMachineRemoveDialog.vue +2 -2
- package/dialog/ScalePoolDownDialog.vue +2 -2
- 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 +31 -31
- package/edit/monitoring.coreos.com.alertmanagerconfig/routeConfig.vue +36 -12
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/pagerduty.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/slack.vue +4 -4
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/webhook.vue +1 -1
- package/edit/monitoring.coreos.com.receiver/types/email.vue +6 -6
- package/edit/monitoring.coreos.com.receiver/types/opsgenie.vue +10 -10
- package/edit/monitoring.coreos.com.receiver/types/pagerduty.vue +5 -5
- package/edit/monitoring.coreos.com.receiver/types/slack.vue +4 -4
- package/edit/namespace.vue +1 -2
- package/edit/token.vue +31 -12
- package/edit/workload/index.vue +4 -4
- 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/package.json +1 -1
- package/pages/account/pri.vue +229 -0
- package/pages/auth/login.vue +220 -52
- package/pages/auth/setup.vue +142 -19
- package/pages/c/_cluster/_product/namespaces.vue +5 -5
- package/pages/c/_cluster/auth/roles/index.vue +56 -5
- 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 +70 -30
- package/pages/prefs.vue +27 -25
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.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 +12 -8
- 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 +13 -5
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +1 -0
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +12 -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/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 +5 -2
- package/store/modal.ts +3 -3
- package/store/prefs.js +11 -4
- package/store/type-map.js +32 -2
- package/types/shell/index.d.ts +78 -97
- package/utils/error.js +89 -8
- package/utils/errorTranslate.json +1351 -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/components/nav/Type.vue
CHANGED
|
@@ -112,6 +112,7 @@ export default {
|
|
|
112
112
|
</script>
|
|
113
113
|
|
|
114
114
|
<template>
|
|
115
|
+
<!-- 当 type 有 route 时,渲染一个 Vue Router 自定义链接 -->
|
|
115
116
|
<router-link
|
|
116
117
|
v-if="type.route"
|
|
117
118
|
:key="type.name"
|
|
@@ -119,18 +120,24 @@ export default {
|
|
|
119
120
|
custom
|
|
120
121
|
:to="type.route"
|
|
121
122
|
>
|
|
123
|
+
|
|
124
|
+
<!-- 导航项容器 -->
|
|
122
125
|
<li
|
|
123
126
|
class="child nav-type"
|
|
124
127
|
:class="{'root': isRoot, [`depth-${depth}`]: true, 'router-link-active': isActive, 'router-link-exact-active': isExactActive}"
|
|
125
128
|
@click="navigate"
|
|
126
129
|
@keypress.enter="navigate"
|
|
127
130
|
>
|
|
131
|
+
|
|
132
|
+
<!-- 如果是精确匹配激活状态,则显示 TabTitle 组件 -->
|
|
128
133
|
<TabTitle
|
|
129
134
|
v-if="isExactActive"
|
|
130
135
|
:show-child="false"
|
|
131
136
|
>
|
|
132
137
|
{{ type.labelKey ? t(type.labelKey) : (type.labelDisplay || type.label) }}
|
|
133
138
|
</TabTitle>
|
|
139
|
+
|
|
140
|
+
<!-- 链接主体 -->
|
|
134
141
|
<a
|
|
135
142
|
role="link"
|
|
136
143
|
:aria-label="type.labelKey ? t(type.labelKey) : (type.labelDisplay || type.label)"
|
|
@@ -141,38 +148,50 @@ export default {
|
|
|
141
148
|
@mouseenter="setNear(true)"
|
|
142
149
|
@mouseleave="setNear(false)"
|
|
143
150
|
>
|
|
151
|
+
<!-- 文本标签:优先使用多语言 key -->
|
|
144
152
|
<span
|
|
145
153
|
v-if="type.labelKey"
|
|
146
154
|
class="label"
|
|
147
155
|
><t :k="type.labelKey" /></span>
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
class="
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
156
|
+
|
|
157
|
+
<!-- 没有 labelKey 时,直接使用 HTML 文本 -->
|
|
158
|
+
<div v-else style="display: flex; align-items: center;" class="labelKey_menu">
|
|
159
|
+
<i v-if="!type.labelDisplay || (type.labelDisplay && type.labelDisplay.indexOf('</i>') === -1)" class="icon icon-fw icon-globe" style="color: var(--muted);width: 32px;text-align: left;"></i>
|
|
160
|
+
<span
|
|
161
|
+
v-clean-html="type.labelDisplay.replace('设置', '基础设置') || type.label"
|
|
162
|
+
class="label"
|
|
163
|
+
:class="{'no-icon': !type.icon}"
|
|
164
|
+
/>
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
<!-- 右侧附加信息(收藏按钮 / 命名空间图标 / 计数) -->
|
|
168
|
+
<!-- <span
|
|
155
169
|
v-if="showFavorite || namespaceIcon || showCount"
|
|
156
170
|
class="count"
|
|
157
171
|
>
|
|
172
|
+
|
|
158
173
|
<Favorite
|
|
159
174
|
v-if="showFavorite"
|
|
160
175
|
:resource="type.name"
|
|
161
176
|
/>
|
|
177
|
+
|
|
162
178
|
<i
|
|
163
179
|
v-if="namespaceIcon"
|
|
164
180
|
class="icon icon-namespace"
|
|
165
181
|
:class="{'ns-and-icon': showCount}"
|
|
166
182
|
data-testid="type-namespaced"
|
|
167
183
|
/>
|
|
184
|
+
|
|
168
185
|
<span
|
|
169
186
|
v-if="showCount"
|
|
170
187
|
data-testid="type-count"
|
|
171
188
|
>{{ count }}</span>
|
|
172
|
-
</span>
|
|
189
|
+
</span> -->
|
|
173
190
|
</a>
|
|
174
191
|
</li>
|
|
175
192
|
</router-link>
|
|
193
|
+
|
|
194
|
+
<!-- 当 type 没有 route 但有外部 link 时 -->
|
|
176
195
|
<li
|
|
177
196
|
v-else-if="type.link"
|
|
178
197
|
class="child nav-type nav-link"
|
|
@@ -188,6 +207,8 @@ export default {
|
|
|
188
207
|
<span class="label">{{ type.label }} <i class="icon icon-external-link" /></span>
|
|
189
208
|
</a>
|
|
190
209
|
</li>
|
|
210
|
+
|
|
211
|
+
<!-- 兜底情况:既没有 route,也没有 link -->
|
|
191
212
|
<li v-else>
|
|
192
213
|
{{ type }}?
|
|
193
214
|
</li>
|
|
@@ -214,6 +235,7 @@ export default {
|
|
|
214
235
|
.label {
|
|
215
236
|
align-items: center;
|
|
216
237
|
grid-area: label;
|
|
238
|
+
display: flex;
|
|
217
239
|
overflow: hidden;
|
|
218
240
|
text-overflow: ellipsis;
|
|
219
241
|
|
|
@@ -221,13 +243,13 @@ export default {
|
|
|
221
243
|
padding-left: 3px;
|
|
222
244
|
}
|
|
223
245
|
|
|
224
|
-
|
|
246
|
+
::v-deep .highlight {
|
|
225
247
|
background: var(--diff-ins-bg);
|
|
226
248
|
color: var(--body-text);
|
|
227
249
|
padding: 2px;
|
|
228
250
|
}
|
|
229
251
|
|
|
230
|
-
|
|
252
|
+
::v-deep .icon {
|
|
231
253
|
position: relative;
|
|
232
254
|
color: var(--muted);
|
|
233
255
|
}
|
|
@@ -236,24 +258,28 @@ export default {
|
|
|
236
258
|
A {
|
|
237
259
|
display: grid;
|
|
238
260
|
grid-template-areas: "label count";
|
|
239
|
-
grid-template-columns: auto
|
|
261
|
+
grid-template-columns: auto 20px;
|
|
240
262
|
grid-column-gap: 5px;
|
|
241
263
|
font-size: 14px;
|
|
242
264
|
line-height: 24px;
|
|
243
|
-
padding: 7.5px 7px 7.5px 10px;
|
|
265
|
+
/* padding: 7.5px 7px 7.5px 10px; */
|
|
266
|
+
padding: 0px 16px 0px 30px;
|
|
267
|
+
height: 50px;
|
|
244
268
|
margin: 0 0 0 -3px;
|
|
245
269
|
overflow: hidden;
|
|
246
270
|
text-overflow: ellipsis;
|
|
247
271
|
white-space: nowrap;
|
|
248
272
|
color: var(--body-text);
|
|
249
|
-
height: 33px;
|
|
250
273
|
|
|
251
274
|
&:hover {
|
|
252
|
-
background: var(--nav-
|
|
275
|
+
background: var(--nav-active) !important;
|
|
276
|
+
color: var(--nav-hover-color);
|
|
277
|
+
/* background: var(--nav-hover); */
|
|
253
278
|
text-decoration: none;
|
|
254
279
|
|
|
255
|
-
|
|
256
|
-
color: var(--body-text);
|
|
280
|
+
::v-deep .icon {
|
|
281
|
+
/* color: var(--body-text); */
|
|
282
|
+
color: var(--nav-hover-color);
|
|
257
283
|
}
|
|
258
284
|
}
|
|
259
285
|
}
|
|
@@ -262,46 +288,42 @@ export default {
|
|
|
262
288
|
grid-area: favorite;
|
|
263
289
|
font-size: 12px;
|
|
264
290
|
position: relative;
|
|
265
|
-
vertical-align: middle;
|
|
266
|
-
margin-right: 4px;
|
|
267
291
|
}
|
|
268
292
|
|
|
269
293
|
.count {
|
|
294
|
+
grid-area: count;
|
|
270
295
|
font-size: 12px;
|
|
296
|
+
text-align: right;
|
|
271
297
|
justify-items: center;
|
|
272
|
-
|
|
273
|
-
display: flex;
|
|
274
|
-
align-items: center;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
&.nav-type.nav-link {
|
|
278
|
-
a .label {
|
|
279
|
-
display: flex;
|
|
280
|
-
}
|
|
298
|
+
line-height: 50px;
|
|
281
299
|
}
|
|
282
300
|
|
|
283
301
|
&.nav-type:not(.depth-0) {
|
|
284
302
|
A {
|
|
285
|
-
|
|
303
|
+
font-size: 13px;
|
|
304
|
+
padding: 5.5px 7px 5.5px 40px;
|
|
286
305
|
}
|
|
287
306
|
|
|
288
|
-
|
|
307
|
+
::v-deep .label I {
|
|
289
308
|
padding-right: 2px;
|
|
290
309
|
}
|
|
291
310
|
}
|
|
311
|
+
}
|
|
292
312
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
313
|
+
.labelKey_menu{
|
|
314
|
+
display: flex;
|
|
315
|
+
align-items: center;
|
|
316
|
+
}
|
|
317
|
+
.labelKey_menu:hover{
|
|
318
|
+
i{
|
|
319
|
+
color: var(--nav-hover-color) !important;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
.router-link-active{
|
|
323
|
+
.labelKey_menu{
|
|
324
|
+
i{
|
|
325
|
+
color: var(--nav-hover-color) !important;
|
|
304
326
|
}
|
|
305
327
|
}
|
|
306
|
-
|
|
328
|
+
}
|
|
307
329
|
</style>
|
|
@@ -76,6 +76,6 @@ export const useClickOutside = <T extends OnClickOutsideOptions>(
|
|
|
76
76
|
|
|
77
77
|
onBeforeUnmount(() => {
|
|
78
78
|
window.removeEventListener('click', listener as any);
|
|
79
|
-
window.removeEventListener('
|
|
79
|
+
window.removeEventListener('pointerdown', setShouldListen);
|
|
80
80
|
});
|
|
81
81
|
};
|
package/config/private-label.js
CHANGED
|
@@ -58,17 +58,21 @@ export function matches(pl) {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
export function getVendor() {
|
|
61
|
-
if ( vendor === SETTING.PL_RANCHER_VALUE ) {
|
|
62
|
-
// Custom vendor override based on brand
|
|
63
|
-
if (brand && CUSTOM_VENDOR[brand]) {
|
|
64
|
-
return CUSTOM_VENDOR[brand];
|
|
65
|
-
}
|
|
66
61
|
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
return vendor;
|
|
62
|
+
return 'HCI';
|
|
71
63
|
}
|
|
64
|
+
// export function getVendor() {
|
|
65
|
+
// if ( vendor === SETTING.PL_RANCHER_VALUE ) {
|
|
66
|
+
// // Custom vendor override based on brand
|
|
67
|
+
// if (brand && CUSTOM_VENDOR[brand]) {
|
|
68
|
+
// return CUSTOM_VENDOR[brand];
|
|
69
|
+
// }
|
|
70
|
+
|
|
71
|
+
// return STANDARD_VENDOR;
|
|
72
|
+
// }
|
|
73
|
+
|
|
74
|
+
// return vendor;
|
|
75
|
+
// }
|
|
72
76
|
|
|
73
77
|
export function getProduct() {
|
|
74
78
|
return product;
|
|
@@ -80,13 +84,13 @@ export function setTitle() {
|
|
|
80
84
|
if (v === 'Harvester') {
|
|
81
85
|
const ico = require(`~shell/assets/images/pl/harvester.png`);
|
|
82
86
|
|
|
83
|
-
document.title = '
|
|
87
|
+
document.title = 'HCI';
|
|
84
88
|
const link = document.createElement('link');
|
|
85
89
|
|
|
86
90
|
link.hid = 'icon';
|
|
87
91
|
link.rel = 'icon';
|
|
88
92
|
link.type = 'image/x-icon';
|
|
89
|
-
link.
|
|
93
|
+
link.href = ico;
|
|
90
94
|
const head = document.getElementsByTagName('head')[0];
|
|
91
95
|
|
|
92
96
|
head.appendChild(link);
|
package/config/product/auth.js
CHANGED
|
@@ -191,13 +191,23 @@ export function init(store) {
|
|
|
191
191
|
componentForType(`${ MANAGEMENT.AUTH_CONFIG }/genericoidc`, 'auth/oidc');
|
|
192
192
|
componentForType(`${ MANAGEMENT.AUTH_CONFIG }/cognito`, 'auth/oidc');
|
|
193
193
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
194
|
+
const topLevelPermissions = sessionStorage.getItem('TOPLEVELPERMISSIONS')
|
|
195
|
+
|
|
196
|
+
if (topLevelPermissions && topLevelPermissions === 'superadmin') {
|
|
197
|
+
basicType([
|
|
198
|
+
'config',
|
|
199
|
+
USERS_VIRTUAL_TYPE,
|
|
200
|
+
NORMAN.SPOOFED.GROUP_PRINCIPAL,
|
|
201
|
+
ROLES_VIRTUAL_TYPE,
|
|
202
|
+
MANAGEMENT.OIDC_CLIENT
|
|
203
|
+
]);
|
|
204
|
+
} else {
|
|
205
|
+
basicType([
|
|
206
|
+
USERS_VIRTUAL_TYPE,
|
|
207
|
+
ROLES_VIRTUAL_TYPE
|
|
208
|
+
]);
|
|
209
|
+
}
|
|
210
|
+
|
|
201
211
|
|
|
202
212
|
headers(NORMAN.SPOOFED.GROUP_PRINCIPAL, [
|
|
203
213
|
GROUP_NAME,
|
|
@@ -112,15 +112,25 @@ export function init(store) {
|
|
|
112
112
|
route: { name: 'c-cluster-settings-fleet' }
|
|
113
113
|
});
|
|
114
114
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
115
|
+
const topLevelPermissions = sessionStorage.getItem('TOPLEVELPERMISSIONS')
|
|
116
|
+
|
|
117
|
+
if (topLevelPermissions && topLevelPermissions === 'superadmin') {
|
|
118
|
+
basicType([
|
|
119
|
+
'settings',
|
|
120
|
+
'features',
|
|
121
|
+
'brand',
|
|
122
|
+
'banners',
|
|
123
|
+
'performance',
|
|
124
|
+
'links',
|
|
125
|
+
'fleet-settings'
|
|
126
|
+
]);
|
|
127
|
+
} else {
|
|
128
|
+
basicType([
|
|
129
|
+
'settings',
|
|
130
|
+
'brand',
|
|
131
|
+
]);
|
|
132
|
+
}
|
|
133
|
+
|
|
124
134
|
|
|
125
135
|
configureType(MANAGEMENT.SETTING, {
|
|
126
136
|
isCreatable: false,
|
package/config/settings.ts
CHANGED
|
@@ -112,6 +112,34 @@ export const SETTING = {
|
|
|
112
112
|
CLUSTER_AGENT_DEFAULT_POD_DISTRIBUTION_BUDGET: 'cluster-agent-default-pod-disruption-budget'
|
|
113
113
|
} as const;
|
|
114
114
|
|
|
115
|
+
export const ALLOWED_SETTINGS_NEW: GlobalSetting = {
|
|
116
|
+
[SETTING.CA_CERTS]: { kind: 'multiline', readOnly: true },
|
|
117
|
+
[SETTING.PASSWORD_MIN_LENGTH]: {
|
|
118
|
+
kind: 'integer',
|
|
119
|
+
ruleSet: [
|
|
120
|
+
{
|
|
121
|
+
name: 'betweenValues',
|
|
122
|
+
key: 'Password',
|
|
123
|
+
factoryArg: [2, 256]
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: 'isInteger',
|
|
127
|
+
key: 'Password',
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: 'isPositive',
|
|
131
|
+
key: 'Password',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: 'isOctal',
|
|
135
|
+
key: 'Password',
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
[SETTING.AUTH_USER_SESSION_TTL_MINUTES]: {},
|
|
140
|
+
[SETTING.AUTH_TOKEN_MAX_TTL_MINUTES]: {},
|
|
141
|
+
}
|
|
142
|
+
|
|
115
143
|
// These are the settings that are allowed to be edited via the UI
|
|
116
144
|
export const ALLOWED_SETTINGS: GlobalSetting = {
|
|
117
145
|
[SETTING.CA_CERTS]: { kind: 'multiline', readOnly: true },
|
package/config/table-headers.js
CHANGED
|
@@ -52,6 +52,7 @@ export const NAME = {
|
|
|
52
52
|
getValue: (row) => row.nameDisplay,
|
|
53
53
|
sort: ['nameSort'],
|
|
54
54
|
formatter: 'LinkDetail',
|
|
55
|
+
width: 200,
|
|
55
56
|
canBeVariable: true,
|
|
56
57
|
};
|
|
57
58
|
|
|
@@ -161,7 +162,7 @@ export const NAMESPACE = {
|
|
|
161
162
|
name: 'namespace',
|
|
162
163
|
labelKey: 'tableHeaders.namespace',
|
|
163
164
|
value: 'namespace',
|
|
164
|
-
getValue:
|
|
165
|
+
getValue: row => row && row.namespace && row.namespace,
|
|
165
166
|
sort: 'namespace',
|
|
166
167
|
dashIfEmpty: true,
|
|
167
168
|
};
|
|
@@ -280,7 +281,7 @@ export const NS_SNAPSHOT_QUOTA = {
|
|
|
280
281
|
labelKey: 'harvester.tableHeaders.totalSnapshotQuota',
|
|
281
282
|
value: 'snapshotSizeQuota',
|
|
282
283
|
sort: 'snapshotSizeQuota',
|
|
283
|
-
align: '
|
|
284
|
+
align: 'left',
|
|
284
285
|
formatter: 'Si',
|
|
285
286
|
formatterOpts: {
|
|
286
287
|
opts: {
|
|
@@ -214,7 +214,11 @@ export default {
|
|
|
214
214
|
</script>
|
|
215
215
|
|
|
216
216
|
<template>
|
|
217
|
+
|
|
218
|
+
<!-- 如果没有获取到 value 数据,则显示加载组件 -->
|
|
217
219
|
<Loading v-if="!value" />
|
|
220
|
+
|
|
221
|
+
<!-- 如果有数据,则进入资源编辑/创建的表单界面 -->
|
|
218
222
|
<CruResource
|
|
219
223
|
v-else
|
|
220
224
|
:done-route="doneRoute"
|
|
@@ -226,10 +230,14 @@ export default {
|
|
|
226
230
|
class="create-edit"
|
|
227
231
|
@finish="save"
|
|
228
232
|
>
|
|
233
|
+
|
|
234
|
+
<!-- 账户凭据区域 -->
|
|
229
235
|
<div class="credentials">
|
|
230
236
|
<h2> {{ t("user.edit.credentials.label") }}</h2>
|
|
237
|
+
|
|
238
|
+
<!-- 用户名 & 显示名 -->
|
|
231
239
|
<div class="row">
|
|
232
|
-
<div class="col span-
|
|
240
|
+
<div class="col span-6">
|
|
233
241
|
<LabeledInput
|
|
234
242
|
ref="name"
|
|
235
243
|
v-model:value="form.username"
|
|
@@ -241,7 +249,7 @@ export default {
|
|
|
241
249
|
:ignore-password-managers="!isCreate"
|
|
242
250
|
/>
|
|
243
251
|
</div>
|
|
244
|
-
<div class="col span-
|
|
252
|
+
<div class="col span-6">
|
|
245
253
|
<LabeledInput
|
|
246
254
|
v-model:value="form.displayName"
|
|
247
255
|
label-key="user.edit.credentials.displayName.label"
|
|
@@ -250,8 +258,10 @@ export default {
|
|
|
250
258
|
/>
|
|
251
259
|
</div>
|
|
252
260
|
</div>
|
|
253
|
-
|
|
254
|
-
|
|
261
|
+
|
|
262
|
+
<!-- 用户描述 -->
|
|
263
|
+
<div class="row">
|
|
264
|
+
<div class="col span-6">
|
|
255
265
|
<LabeledInput
|
|
256
266
|
v-model:value="form.description"
|
|
257
267
|
label-key="user.edit.credentials.userDescription.label"
|
|
@@ -261,6 +271,7 @@ export default {
|
|
|
261
271
|
</div>
|
|
262
272
|
</div>
|
|
263
273
|
|
|
274
|
+
<!-- 修改密码(仅非查看模式显示) -->
|
|
264
275
|
<ChangePassword
|
|
265
276
|
v-if="!isView"
|
|
266
277
|
ref="changePassword"
|
|
@@ -270,6 +281,8 @@ export default {
|
|
|
270
281
|
@valid="validation.password = $event"
|
|
271
282
|
/>
|
|
272
283
|
</div>
|
|
284
|
+
|
|
285
|
+
<!-- 全局角色绑定区域(仅当 showGlobalRoles 为 true 时显示) -->
|
|
273
286
|
<div
|
|
274
287
|
v-if="showGlobalRoles"
|
|
275
288
|
class="global-permissions"
|
|
@@ -243,14 +243,14 @@ export default {
|
|
|
243
243
|
v-model:value="authType"
|
|
244
244
|
:disabled="mode === view"
|
|
245
245
|
:options="authOptions"
|
|
246
|
-
label="
|
|
246
|
+
label="验证类型"
|
|
247
247
|
@update:value="initializeType(authOptions, authType)"
|
|
248
248
|
/>
|
|
249
249
|
</div>
|
|
250
250
|
</div>
|
|
251
|
-
<div
|
|
252
|
-
v-if="authType === 'basicAuth'"
|
|
253
|
-
class="row mb-20"
|
|
251
|
+
<div
|
|
252
|
+
v-if="authType === 'basicAuth'"
|
|
253
|
+
class="row mb-20"
|
|
254
254
|
>
|
|
255
255
|
<SimpleSecretSelector
|
|
256
256
|
v-if="namespace"
|
|
@@ -265,16 +265,16 @@ export default {
|
|
|
265
265
|
@updateSecretName="updateBasicAuthUsernameSecretName"
|
|
266
266
|
@updateSecretKey="updateBasicAuthUsernameSecretKey"
|
|
267
267
|
/>
|
|
268
|
-
<Banner
|
|
269
|
-
v-else
|
|
270
|
-
color="error"
|
|
268
|
+
<Banner
|
|
269
|
+
v-else
|
|
270
|
+
color="error"
|
|
271
271
|
>
|
|
272
272
|
{{ t("alertmanagerConfigReceiver.namespaceWarning") }}
|
|
273
273
|
</Banner>
|
|
274
274
|
</div>
|
|
275
|
-
<div
|
|
276
|
-
v-if="authType === 'basicAuth'"
|
|
277
|
-
class="row mb-20"
|
|
275
|
+
<div
|
|
276
|
+
v-if="authType === 'basicAuth'"
|
|
277
|
+
class="row mb-20"
|
|
278
278
|
>
|
|
279
279
|
<SimpleSecretSelector
|
|
280
280
|
v-if="namespace"
|
|
@@ -289,16 +289,16 @@ export default {
|
|
|
289
289
|
@updateSecretName="updateBasicAuthPasswordSecretName"
|
|
290
290
|
@updateSecretKey="updateBasicAuthPasswordSecretKey"
|
|
291
291
|
/>
|
|
292
|
-
<Banner
|
|
293
|
-
v-else
|
|
294
|
-
color="error"
|
|
292
|
+
<Banner
|
|
293
|
+
v-else
|
|
294
|
+
color="error"
|
|
295
295
|
>
|
|
296
296
|
{{ t("alertmanagerConfigReceiver.namespaceWarning") }}
|
|
297
297
|
</Banner>
|
|
298
298
|
</div>
|
|
299
|
-
<div
|
|
300
|
-
v-if="authType === 'bearerTokenSecret'"
|
|
301
|
-
class="row mb-20"
|
|
299
|
+
<div
|
|
300
|
+
v-if="authType === 'bearerTokenSecret'"
|
|
301
|
+
class="row mb-20"
|
|
302
302
|
>
|
|
303
303
|
<SimpleSecretSelector
|
|
304
304
|
v-if="namespace"
|
|
@@ -313,9 +313,9 @@ export default {
|
|
|
313
313
|
@updateSecretName="updateBearerTokenSecretName"
|
|
314
314
|
@updateSecretKey="updateBearerTokenSecretKey"
|
|
315
315
|
/>
|
|
316
|
-
<Banner
|
|
317
|
-
v-else
|
|
318
|
-
color="error"
|
|
316
|
+
<Banner
|
|
317
|
+
v-else
|
|
318
|
+
color="error"
|
|
319
319
|
>
|
|
320
320
|
{{ t("alertmanagerConfigReceiver.namespaceWarning") }}
|
|
321
321
|
</Banner>
|
|
@@ -17,14 +17,14 @@ import { fetchAlertManagerConfigSpecs } from '@shell/utils/alertmanagerconfig';
|
|
|
17
17
|
// i18n-uses monitoringReceiver.slack.*, monitoringReceiver.email.*, monitoringReceiver.pagerduty.*
|
|
18
18
|
// i18n-uses monitoringReceiver.opsgenie.*, monitoringReceiver.webhook.*, monitoringReceiver.custom.*
|
|
19
19
|
export const RECEIVERS_TYPES = [
|
|
20
|
-
{
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
20
|
+
// {
|
|
21
|
+
// name: 'slack',
|
|
22
|
+
// label: 'monitoringReceiver.slack.label',
|
|
23
|
+
// title: 'monitoringReceiver.slack.title',
|
|
24
|
+
// info: 'monitoringReceiver.slack.info',
|
|
25
|
+
// key: 'slackConfigs',
|
|
26
|
+
// logo: require(`@shell/assets/images/vendor/slack.svg`)
|
|
27
|
+
// },
|
|
28
28
|
{
|
|
29
29
|
name: 'email',
|
|
30
30
|
label: 'monitoringReceiver.email.label',
|
|
@@ -32,21 +32,21 @@ export const RECEIVERS_TYPES = [
|
|
|
32
32
|
key: 'emailConfigs',
|
|
33
33
|
logo: require(`@shell/assets/images/vendor/email.svg`)
|
|
34
34
|
},
|
|
35
|
-
{
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
},
|
|
35
|
+
// {
|
|
36
|
+
// name: 'pagerduty',
|
|
37
|
+
// label: 'monitoringReceiver.pagerduty.label',
|
|
38
|
+
// title: 'monitoringReceiver.pagerduty.title',
|
|
39
|
+
// info: 'monitoringReceiver.pagerduty.info',
|
|
40
|
+
// key: 'pagerdutyConfigs',
|
|
41
|
+
// logo: require(`@shell/assets/images/vendor/pagerduty.svg`)
|
|
42
|
+
// },
|
|
43
|
+
// {
|
|
44
|
+
// name: 'opsgenie',
|
|
45
|
+
// label: 'monitoringReceiver.opsgenie.label',
|
|
46
|
+
// title: 'monitoringReceiver.opsgenie.title',
|
|
47
|
+
// key: 'opsgenieConfigs',
|
|
48
|
+
// logo: require(`@shell/assets/images/vendor/email.svg`)
|
|
49
|
+
// },
|
|
50
50
|
{
|
|
51
51
|
name: 'webhook',
|
|
52
52
|
label: 'monitoringReceiver.webhook.label',
|
|
@@ -54,14 +54,14 @@ export const RECEIVERS_TYPES = [
|
|
|
54
54
|
key: 'webhookConfigs',
|
|
55
55
|
logo: require(`@shell/assets/images/vendor/webhook.svg`),
|
|
56
56
|
},
|
|
57
|
-
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
},
|
|
57
|
+
// {
|
|
58
|
+
// name: 'custom',
|
|
59
|
+
// label: 'monitoringReceiver.custom.label',
|
|
60
|
+
// title: 'monitoringReceiver.custom.title',
|
|
61
|
+
// info: 'monitoringReceiver.custom.info',
|
|
62
|
+
// key: 'webhookConfigs',
|
|
63
|
+
// logo: require(`@shell/assets/images/vendor/custom.svg`)
|
|
64
|
+
// },
|
|
65
65
|
];
|
|
66
66
|
|
|
67
67
|
export default {
|