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
|
@@ -198,14 +198,16 @@ export default {
|
|
|
198
198
|
<template>
|
|
199
199
|
<Loading v-if="$fetchState.pending" />
|
|
200
200
|
<div v-else>
|
|
201
|
+
<!-- 面包屑 -->
|
|
202
|
+
<div class="excram-list">全局设置 / <span style="color: #1890FF;">性能</span></div>
|
|
201
203
|
<h1 class="mb-20">
|
|
202
204
|
{{ t('performance.label') }}
|
|
203
205
|
</h1>
|
|
204
206
|
<div>
|
|
205
|
-
<div class="ui-perf-setting">
|
|
206
|
-
<!--
|
|
207
|
-
<div class="
|
|
208
|
-
<h2>{{ t('performance.inactivity.title') }}</h2>
|
|
207
|
+
<div class="ui-perf-setting pb-40">
|
|
208
|
+
<!-- 闲置状态 -->
|
|
209
|
+
<div class="mb-20 p-20" style="border: 1px solid var(--nav-border);">
|
|
210
|
+
<h2 class="mb-20">{{ t('performance.inactivity.title') }}</h2>
|
|
209
211
|
<p>{{ t('performance.inactivity.description') }}</p>
|
|
210
212
|
<Checkbox
|
|
211
213
|
v-model:value="value.inactivity.enabled"
|
|
@@ -232,21 +234,21 @@ export default {
|
|
|
232
234
|
/>
|
|
233
235
|
</div>
|
|
234
236
|
</div>
|
|
235
|
-
<!--
|
|
236
|
-
<div class="
|
|
237
|
-
<h2>{{ t('performance.websocketNotification.label') }}</h2>
|
|
237
|
+
<!-- WebSocket 通知 -->
|
|
238
|
+
<div class="mb-40 p-20" style="border: 1px solid var(--nav-border);">
|
|
239
|
+
<h2 class="mb-20">{{ t('performance.websocketNotification.label') }}</h2>
|
|
238
240
|
<p>{{ t('performance.websocketNotification.description') }}</p>
|
|
239
241
|
<Checkbox
|
|
240
242
|
v-model:value="value.disableWebsocketNotification"
|
|
241
243
|
:mode="mode"
|
|
242
244
|
:label="t('performance.websocketNotification.checkboxLabel')"
|
|
243
|
-
class="mt-10
|
|
245
|
+
class="mt-10"
|
|
244
246
|
:primary="true"
|
|
245
247
|
/>
|
|
246
248
|
</div>
|
|
247
249
|
<!-- Server Side Pagination -->
|
|
248
|
-
<div class="
|
|
249
|
-
<h2 id="ssp-setting">
|
|
250
|
+
<div class="mb-20 p-20" style="border: 1px solid var(--nav-border);">
|
|
251
|
+
<h2 class="mb-20" id="ssp-setting">
|
|
250
252
|
{{ t('performance.serverPagination.label') }}
|
|
251
253
|
</h2>
|
|
252
254
|
<p>{{ t('performance.serverPagination.description') }}</p>
|
|
@@ -267,9 +269,9 @@ export default {
|
|
|
267
269
|
/>
|
|
268
270
|
</Collapse>
|
|
269
271
|
</div>
|
|
270
|
-
<!--
|
|
271
|
-
<div class="
|
|
272
|
-
<h2>{{ t('performance.incrementalLoad.label') }}</h2>
|
|
272
|
+
<!-- 增量加载 -->
|
|
273
|
+
<div class="mb-20 p-20" style="border: 1px solid var(--nav-border);">
|
|
274
|
+
<h2 class="mb-20">{{ t('performance.incrementalLoad.label') }}</h2>
|
|
273
275
|
<Banner
|
|
274
276
|
color="warning"
|
|
275
277
|
>
|
|
@@ -299,9 +301,9 @@ export default {
|
|
|
299
301
|
/>
|
|
300
302
|
</div>
|
|
301
303
|
</div>
|
|
302
|
-
<!--
|
|
303
|
-
<div class="
|
|
304
|
-
<h2 v-t="'performance.manualRefresh.label'" />
|
|
304
|
+
<!-- 手动刷新 -->
|
|
305
|
+
<div class="mb-20 p-20" style="border: 1px solid var(--nav-border);">
|
|
306
|
+
<h2 class="mb-20" v-t="'performance.manualRefresh.label'" />
|
|
305
307
|
<Banner
|
|
306
308
|
color="warning"
|
|
307
309
|
>
|
|
@@ -331,9 +333,9 @@ export default {
|
|
|
331
333
|
/>
|
|
332
334
|
</div>
|
|
333
335
|
</div>
|
|
334
|
-
<!--
|
|
335
|
-
<div class="
|
|
336
|
-
<h2 v-t="'performance.gc.label'" />
|
|
336
|
+
<!-- 资源垃圾回收 -->
|
|
337
|
+
<div class="mb-20 p-20" style="border: 1px solid var(--nav-border);">
|
|
338
|
+
<h2 class="mb-20" v-t="'performance.gc.label'" />
|
|
337
339
|
<Banner
|
|
338
340
|
color="warning"
|
|
339
341
|
>
|
|
@@ -412,9 +414,9 @@ export default {
|
|
|
412
414
|
</div>
|
|
413
415
|
</div>
|
|
414
416
|
</div>
|
|
415
|
-
<!--
|
|
416
|
-
<div class="
|
|
417
|
-
<h2>{{ t('performance.nsFiltering.label') }}</h2>
|
|
417
|
+
<!-- 要求资源组/项目过滤 -->
|
|
418
|
+
<div class="mb-20 p-20" style="border: 1px solid var(--nav-border);">
|
|
419
|
+
<h2 class="mb-20">{{ t('performance.nsFiltering.label') }}</h2>
|
|
418
420
|
<Banner
|
|
419
421
|
color="warning"
|
|
420
422
|
>
|
|
@@ -430,9 +432,9 @@ export default {
|
|
|
430
432
|
@update:value="compatibleWarning('forceNsFilterV2', $event)"
|
|
431
433
|
/>
|
|
432
434
|
</div>
|
|
433
|
-
<!--
|
|
434
|
-
<div class="
|
|
435
|
-
<h2>{{ t('performance.advancedWorker.label') }}</h2>
|
|
435
|
+
<!-- Websocket Web Worker -->
|
|
436
|
+
<div class="mb-20 p-20" style="border: 1px solid var(--nav-border);">
|
|
437
|
+
<h2 class="mb-20">{{ t('performance.advancedWorker.label') }}</h2>
|
|
436
438
|
<Banner
|
|
437
439
|
color="warning"
|
|
438
440
|
>
|
|
@@ -458,10 +460,10 @@ export default {
|
|
|
458
460
|
:label="err"
|
|
459
461
|
/>
|
|
460
462
|
</template>
|
|
461
|
-
<div v-if="mode === 'edit'">
|
|
463
|
+
<div class="action-btn" v-if="mode === 'edit'">
|
|
462
464
|
<AsyncButton
|
|
463
465
|
data-testid="performance__save-btn"
|
|
464
|
-
class="pull-right
|
|
466
|
+
class="pull-right"
|
|
465
467
|
mode="apply"
|
|
466
468
|
:disabled="!canSave"
|
|
467
469
|
@click="save"
|
|
@@ -471,6 +473,17 @@ export default {
|
|
|
471
473
|
</template>
|
|
472
474
|
|
|
473
475
|
<style scoped lang='scss'>
|
|
476
|
+
.action-btn {
|
|
477
|
+
padding: 10px 30px;
|
|
478
|
+
position: fixed;
|
|
479
|
+
bottom: 0;
|
|
480
|
+
left: 0;
|
|
481
|
+
width: 100%;
|
|
482
|
+
background: var(--body-bg);
|
|
483
|
+
border-top: 1px solid var(--nav-border);
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
|
|
474
487
|
.overlay {
|
|
475
488
|
width: 100%;
|
|
476
489
|
height: 100%;
|
|
@@ -480,17 +493,27 @@ export default {
|
|
|
480
493
|
background-color: var(--overlay-bg);
|
|
481
494
|
z-index: 1;
|
|
482
495
|
}
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
.underline {
|
|
490
|
-
text-decoration: underline;
|
|
491
|
-
}
|
|
496
|
+
.ui-perf-setting {
|
|
497
|
+
P {
|
|
498
|
+
line-height: 1.25;
|
|
499
|
+
margin-bottom: 10px;
|
|
492
500
|
}
|
|
493
|
-
|
|
494
|
-
|
|
501
|
+
|
|
502
|
+
.underline {
|
|
503
|
+
text-decoration: underline;
|
|
495
504
|
}
|
|
505
|
+
}
|
|
506
|
+
.input {
|
|
507
|
+
max-width: 25%;
|
|
508
|
+
}
|
|
509
|
+
h2{
|
|
510
|
+
font-size: 14px;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
.excram-list{
|
|
514
|
+
font-size: 14px;
|
|
515
|
+
line-height: 22px;
|
|
516
|
+
margin-bottom: 20px;
|
|
517
|
+
font-family: 'Microsoft YaHei';
|
|
518
|
+
}
|
|
496
519
|
</style>
|
package/pages/home.vue
CHANGED
|
@@ -62,7 +62,12 @@ export default defineComponent({
|
|
|
62
62
|
query: { [MODE]: _IMPORT }
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
+
const topLevelPermissions = sessionStorage.getItem('TOPLEVELPERMISSIONS') || ''
|
|
66
|
+
|
|
67
|
+
const topLevelPermissionsVis = topLevelPermissions && topLevelPermissions === 'superadmin'
|
|
68
|
+
|
|
65
69
|
return {
|
|
70
|
+
topLevelPermissionsVis,
|
|
66
71
|
HIDE_HOME_PAGE_CARDS,
|
|
67
72
|
// Page actions don't change on the Home Page
|
|
68
73
|
pageActions: [
|
|
@@ -473,17 +478,26 @@ export default defineComponent({
|
|
|
473
478
|
</script>
|
|
474
479
|
|
|
475
480
|
<template>
|
|
481
|
+
<!-- 当 managementReady 为 true 时才显示首页内容 -->
|
|
476
482
|
<div
|
|
477
483
|
v-if="managementReady"
|
|
478
484
|
class="home-page"
|
|
479
485
|
>
|
|
486
|
+
|
|
487
|
+
<!-- 页签标题组件,不显示子页面标题和面包屑 -->
|
|
480
488
|
<TabTitle
|
|
489
|
+
v-if="topLevelPermissionsVis"
|
|
481
490
|
:show-child="false"
|
|
482
491
|
:breadcrumb="false"
|
|
483
492
|
>
|
|
493
|
+
|
|
494
|
+
<!-- 页面标题:{vendor} - 首页 -->
|
|
484
495
|
{{ `${vendor} - ${t('landing.homepage')}` }}
|
|
485
496
|
</TabTitle>
|
|
497
|
+
|
|
498
|
+
<!-- 首页欢迎横幅 -->
|
|
486
499
|
<BannerGraphic
|
|
500
|
+
v-if="topLevelPermissionsVis"
|
|
487
501
|
:small="true"
|
|
488
502
|
:title="t('landing.welcomeToRancher', {vendor})"
|
|
489
503
|
:pref="HIDE_HOME_PAGE_CARDS"
|
|
@@ -491,13 +505,24 @@ export default defineComponent({
|
|
|
491
505
|
data-testid="home-banner-graphic"
|
|
492
506
|
/>
|
|
493
507
|
<IndentedPanel class="mt-20 mb-20">
|
|
508
|
+
|
|
509
|
+
<!-- 主面板布局 -->
|
|
494
510
|
<div class="row home-panels">
|
|
495
511
|
<div class="col main-panel">
|
|
512
|
+
<h2 class="mb-20">
|
|
513
|
+
{{ t('landing.clusters.title') }}
|
|
514
|
+
</h2>
|
|
515
|
+
|
|
516
|
+
<!-- 集群列表面板 -->
|
|
496
517
|
<div class="row panel">
|
|
518
|
+
|
|
519
|
+
<!-- 如果是多集群模式(mcm = multi-cluster management) -->
|
|
497
520
|
<div
|
|
498
521
|
v-if="mcm"
|
|
499
522
|
class="col span-12"
|
|
500
523
|
>
|
|
524
|
+
|
|
525
|
+
<!-- 分页资源表格 -->
|
|
501
526
|
<PaginatedResourceTable
|
|
502
527
|
v-if="provClusterSchema"
|
|
503
528
|
:schema="provClusterSchema"
|
|
@@ -517,27 +542,17 @@ export default defineComponent({
|
|
|
517
542
|
:fetchSecondaryResources="fetchSecondaryResources"
|
|
518
543
|
:fetchPageSecondaryResources="fetchPageSecondaryResources"
|
|
519
544
|
>
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
<h2 class="mb-0">
|
|
523
|
-
{{ t('landing.clusters.title') }}
|
|
524
|
-
</h2>
|
|
525
|
-
<BadgeState
|
|
526
|
-
v-if="clusterCount"
|
|
527
|
-
:label="clusterCount.toString()"
|
|
528
|
-
color="role-tertiary ml-20 mr-20"
|
|
529
|
-
/>
|
|
530
|
-
</div>
|
|
531
|
-
</template>
|
|
545
|
+
|
|
546
|
+
<!-- 表头中间:管理、导入、创建按钮 -->
|
|
532
547
|
<template
|
|
533
548
|
v-if="canCreateCluster || !!provClusterSchema"
|
|
534
|
-
#header-
|
|
549
|
+
#header-right
|
|
535
550
|
>
|
|
536
|
-
<div class="table-heading">
|
|
551
|
+
<div v-if="topLevelPermissionsVis" class="table-heading">
|
|
537
552
|
<router-link
|
|
538
553
|
v-if="!!provClusterSchema"
|
|
539
554
|
:to="manageLocation"
|
|
540
|
-
class="btn btn-sm role-
|
|
555
|
+
class="btn btn-sm role-primary"
|
|
541
556
|
data-testid="cluster-management-manage-button"
|
|
542
557
|
role="button"
|
|
543
558
|
:aria-label="t('cluster.manageAction')"
|
|
@@ -569,6 +584,8 @@ export default defineComponent({
|
|
|
569
584
|
</router-link>
|
|
570
585
|
</div>
|
|
571
586
|
</template>
|
|
587
|
+
|
|
588
|
+
<!-- 列渲染:集群名称 -->
|
|
572
589
|
<template #col:name="{row}">
|
|
573
590
|
<td class="col-name">
|
|
574
591
|
<div class="list-cluster-name">
|
|
@@ -576,6 +593,8 @@ export default defineComponent({
|
|
|
576
593
|
v-if="row.mgmt"
|
|
577
594
|
class="cluster-name"
|
|
578
595
|
>
|
|
596
|
+
|
|
597
|
+
<!-- 如果集群就绪且无错误,跳转到集群 Explorer 页面 -->
|
|
579
598
|
<router-link
|
|
580
599
|
v-if="row.mgmt.isReady && !row.hasError"
|
|
581
600
|
:to="{ name: 'c-cluster-explorer', params: { cluster: row.mgmt.id }}"
|
|
@@ -584,18 +603,17 @@ export default defineComponent({
|
|
|
584
603
|
>
|
|
585
604
|
{{ row.nameDisplay }}
|
|
586
605
|
</router-link>
|
|
606
|
+
|
|
607
|
+
<!-- 否则只显示名称 -->
|
|
587
608
|
<span v-else>{{ row.nameDisplay }}</span>
|
|
588
609
|
<i
|
|
589
610
|
v-if="row.unavailableMachines"
|
|
590
611
|
v-clean-tooltip="row.unavailableMachines"
|
|
591
612
|
class="conditions-alert-icon icon-alert icon"
|
|
592
613
|
/>
|
|
593
|
-
<i
|
|
594
|
-
v-if="row.isRke1"
|
|
595
|
-
v-clean-tooltip="t('cluster.rke1Unsupported')"
|
|
596
|
-
class="rke1-unsupported-icon icon-warning icon"
|
|
597
|
-
/>
|
|
598
614
|
</p>
|
|
615
|
+
|
|
616
|
+
<!-- 集群描述 -->
|
|
599
617
|
<p
|
|
600
618
|
v-if="row.description"
|
|
601
619
|
class="cluster-description"
|
|
@@ -605,6 +623,8 @@ export default defineComponent({
|
|
|
605
623
|
</div>
|
|
606
624
|
</td>
|
|
607
625
|
</template>
|
|
626
|
+
|
|
627
|
+
<!-- 列渲染:Kubernetes 版本 + 架构 -->
|
|
608
628
|
<template #col:kubernetesVersion="{row}">
|
|
609
629
|
<td class="col-name">
|
|
610
630
|
<span>
|
|
@@ -618,6 +638,8 @@ export default defineComponent({
|
|
|
618
638
|
</div>
|
|
619
639
|
</td>
|
|
620
640
|
</template>
|
|
641
|
+
|
|
642
|
+
<!-- 列渲染:CPU 核数 -->
|
|
621
643
|
<template #col:cpu="{row}">
|
|
622
644
|
<td v-if="row.mgmt && cpuAllocatable(row.mgmt)">
|
|
623
645
|
{{ `${cpuAllocatable(row.mgmt)} ${t('landing.clusters.cores', {count:cpuAllocatable(row.mgmt) })}` }}
|
|
@@ -626,6 +648,8 @@ export default defineComponent({
|
|
|
626
648
|
—
|
|
627
649
|
</td>
|
|
628
650
|
</template>
|
|
651
|
+
|
|
652
|
+
<!-- 列渲染:内存 -->
|
|
629
653
|
<template #col:memory="{row}">
|
|
630
654
|
<td v-if="row.mgmt && memoryAllocatable(row.mgmt) && !memoryAllocatable(row.mgmt).match(/^0 [a-zA-z]/)">
|
|
631
655
|
{{ memoryAllocatable(row.mgmt) }}
|
|
@@ -634,16 +658,20 @@ export default defineComponent({
|
|
|
634
658
|
—
|
|
635
659
|
</td>
|
|
636
660
|
</template>
|
|
637
|
-
|
|
661
|
+
|
|
662
|
+
<!-- 列渲染:探索按钮 -->
|
|
663
|
+
<template #cell:explorer="{row}">
|
|
638
664
|
<router-link v-if="row && row.isReady" class="btn btn-sm role-primary" :to="{name: 'c-cluster', params: {cluster: row.id}}">
|
|
639
665
|
{{ t('landing.clusters.explore') }}
|
|
640
666
|
</router-link>
|
|
641
667
|
<button v-else :disabled="true" class="btn btn-sm role-primary">
|
|
642
668
|
{{ t('landing.clusters.explore') }}
|
|
643
669
|
</button>
|
|
644
|
-
</template>
|
|
670
|
+
</template>
|
|
645
671
|
</PaginatedResourceTable>
|
|
646
672
|
</div>
|
|
673
|
+
|
|
674
|
+
<!-- 单集群模式 -->
|
|
647
675
|
<div
|
|
648
676
|
v-else
|
|
649
677
|
class="col span-12"
|
|
@@ -652,7 +680,8 @@ export default defineComponent({
|
|
|
652
680
|
</div>
|
|
653
681
|
</div>
|
|
654
682
|
</div>
|
|
655
|
-
|
|
683
|
+
<!-- 右侧社区链接面板 -->
|
|
684
|
+
<!-- <CommunityLinks class="col span-3 side-panel" /> -->
|
|
656
685
|
</div>
|
|
657
686
|
</IndentedPanel>
|
|
658
687
|
</div>
|
|
@@ -678,13 +707,29 @@ export default defineComponent({
|
|
|
678
707
|
}
|
|
679
708
|
}
|
|
680
709
|
|
|
710
|
+
.set-login-page, .whats-new {
|
|
711
|
+
> :deep() .banner__content {
|
|
712
|
+
display: flex;
|
|
713
|
+
|
|
714
|
+
> div {
|
|
715
|
+
flex: 1;
|
|
716
|
+
}
|
|
717
|
+
> a {
|
|
718
|
+
align-self: flex-end;
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
.banner.set-login-page {
|
|
724
|
+
border: 1px solid var(--border);
|
|
725
|
+
}
|
|
681
726
|
.table-heading {
|
|
682
727
|
align-items: center;
|
|
683
728
|
display: flex;
|
|
684
729
|
height: 39px;
|
|
685
730
|
|
|
686
731
|
& > a {
|
|
687
|
-
margin-
|
|
732
|
+
margin-right: 10px;
|
|
688
733
|
}
|
|
689
734
|
}
|
|
690
735
|
.panel:not(:first-child) {
|
|
@@ -715,7 +760,7 @@ export default defineComponent({
|
|
|
715
760
|
align-items: center;
|
|
716
761
|
|
|
717
762
|
// Ensure long cluster names truncate with ellipsis
|
|
718
|
-
> A
|
|
763
|
+
> A {
|
|
719
764
|
overflow: hidden;
|
|
720
765
|
text-overflow: ellipsis;
|
|
721
766
|
}
|
|
@@ -732,11 +777,6 @@ export default defineComponent({
|
|
|
732
777
|
color: var(--error);
|
|
733
778
|
margin-left: 4px;
|
|
734
779
|
}
|
|
735
|
-
|
|
736
|
-
.rke1-unsupported-icon {
|
|
737
|
-
color: var(--warning);
|
|
738
|
-
margin-left: 4px;
|
|
739
|
-
}
|
|
740
780
|
}
|
|
741
781
|
|
|
742
782
|
// Hide the side-panel showing links when the screen is small
|
package/pages/prefs.vue
CHANGED
|
@@ -17,6 +17,7 @@ import LabeledSelect from '@shell/components/form/LabeledSelect';
|
|
|
17
17
|
import { addObject } from '@shell/utils/array';
|
|
18
18
|
import LocaleSelector from '@shell/components/LocaleSelector';
|
|
19
19
|
import TabTitle from '@shell/components/TabTitle';
|
|
20
|
+
import { HARVESTER_NAME as HARVESTER } from '@shell/config/features';
|
|
20
21
|
|
|
21
22
|
export default {
|
|
22
23
|
components: {
|
|
@@ -43,7 +44,7 @@ export default {
|
|
|
43
44
|
...mapGetters({ hasMultipleLocales: 'i18n/hasMultipleLocales' }),
|
|
44
45
|
|
|
45
46
|
isHarvester() {
|
|
46
|
-
return this.isSingleProduct?.productName ===
|
|
47
|
+
return this.isSingleProduct?.productName === HARVESTER;
|
|
47
48
|
},
|
|
48
49
|
|
|
49
50
|
theme: {
|
|
@@ -189,11 +190,13 @@ export default {
|
|
|
189
190
|
<!-- Language -->
|
|
190
191
|
<div
|
|
191
192
|
v-if="hasMultipleLocales && !isHarvester"
|
|
192
|
-
class="
|
|
193
|
+
class="mb-20 p-20 pb-0"
|
|
194
|
+
style="border: 1px solid var(--nav-border);"
|
|
193
195
|
>
|
|
194
196
|
<h4
|
|
195
197
|
id="prefs-language"
|
|
196
198
|
v-t="'prefs.language'"
|
|
199
|
+
class="pb-20"
|
|
197
200
|
/>
|
|
198
201
|
<div class="row">
|
|
199
202
|
<div class="col span-4">
|
|
@@ -205,36 +208,35 @@ export default {
|
|
|
205
208
|
</div>
|
|
206
209
|
</div>
|
|
207
210
|
<!-- Theme -->
|
|
208
|
-
<div class="
|
|
209
|
-
<h4 v-t="'prefs.theme.label'" />
|
|
211
|
+
<div class="mb-20 p-20" style="border: 1px solid var(--nav-border);">
|
|
212
|
+
<h4 v-t="'prefs.theme.label'" class="mb-20" />
|
|
210
213
|
<ButtonGroup
|
|
211
214
|
v-model:value="theme"
|
|
212
215
|
data-testid="prefs__themeOptions"
|
|
213
216
|
:options="themeOptions"
|
|
214
217
|
/>
|
|
215
|
-
<div class="mt-10">
|
|
218
|
+
<!-- <div class="mt-10">
|
|
216
219
|
<t
|
|
217
220
|
k="prefs.theme.autoDetail"
|
|
218
221
|
:pm="pm"
|
|
219
222
|
:am="am"
|
|
220
223
|
/>
|
|
221
|
-
</div>
|
|
224
|
+
</div> -->
|
|
222
225
|
</div>
|
|
223
226
|
<!-- Login landing page -->
|
|
224
227
|
<div
|
|
225
228
|
v-if="!isSingleProduct"
|
|
226
|
-
class="
|
|
229
|
+
class="mb-20 p-20"
|
|
230
|
+
style="border: 1px solid var(--nav-border);"
|
|
227
231
|
>
|
|
228
|
-
<
|
|
229
|
-
<h4 v-t="'prefs.landing.label'" />
|
|
232
|
+
<h4 v-t="'prefs.landing.label'" class="mb-20" />
|
|
230
233
|
<LandingPagePreference
|
|
231
234
|
data-testid="prefs__landingPagePreference"
|
|
232
235
|
/>
|
|
233
236
|
</div>
|
|
234
237
|
<!-- Display Settings -->
|
|
235
|
-
<div class="
|
|
236
|
-
<
|
|
237
|
-
<h4 v-t="'prefs.displaySettings.title'" />
|
|
238
|
+
<div class="mb-20 p-20" style="border: 1px solid var(--nav-border);">
|
|
239
|
+
<h4 v-t="'prefs.displaySettings.title'" class="mb-20" />
|
|
238
240
|
<p class="set-landing-leadin">
|
|
239
241
|
{{ t('prefs.displaySettings.detail', {}, raw=true) }}
|
|
240
242
|
</p>
|
|
@@ -275,10 +277,10 @@ export default {
|
|
|
275
277
|
<!-- Confirmation setting -->
|
|
276
278
|
<div
|
|
277
279
|
v-if="!isSingleProduct"
|
|
278
|
-
class="col adv-features
|
|
280
|
+
class="col adv-features mb-20 p-20"
|
|
281
|
+
style="border: 1px solid var(--nav-border);"
|
|
279
282
|
>
|
|
280
|
-
<
|
|
281
|
-
<h4 v-t="'prefs.confirmationSetting.title'" />
|
|
283
|
+
<h4 v-t="'prefs.confirmationSetting.title'" class="mb-20" />
|
|
282
284
|
<Checkbox
|
|
283
285
|
v-model:value="scalingDownPrompt"
|
|
284
286
|
data-testid="prefs__scalingDownPrompt"
|
|
@@ -287,9 +289,8 @@ export default {
|
|
|
287
289
|
/>
|
|
288
290
|
</div>
|
|
289
291
|
<!-- Advanced Features -->
|
|
290
|
-
<div class="col adv-features
|
|
291
|
-
<
|
|
292
|
-
<h4 v-t="'prefs.advFeatures.title'" />
|
|
292
|
+
<div class="col adv-features mb-20 p-20" style="border: 1px solid var(--nav-border);">
|
|
293
|
+
<h4 v-t="'prefs.advFeatures.title'" class="mb-20" />
|
|
293
294
|
<Checkbox
|
|
294
295
|
v-model:value="viewInApi"
|
|
295
296
|
data-testid="prefs__viewInApi"
|
|
@@ -325,15 +326,13 @@ export default {
|
|
|
325
326
|
<Checkbox
|
|
326
327
|
v-model:value="pluginDeveloper"
|
|
327
328
|
:label="t('prefs.advFeatures.pluginDeveloper', {}, true)"
|
|
328
|
-
:tooltip="t('prefs.advFeatures.pluginDeveloperTooltip')"
|
|
329
329
|
class="mt-20"
|
|
330
330
|
/>
|
|
331
331
|
</template>
|
|
332
332
|
</div>
|
|
333
333
|
<!-- YAML editor key mapping -->
|
|
334
|
-
<div class="col
|
|
335
|
-
<
|
|
336
|
-
<h4 v-t="'prefs.keymap.label'" />
|
|
334
|
+
<div class="col mb-20 p-20" style="border: 1px solid var(--nav-border);">
|
|
335
|
+
<h4 v-t="'prefs.keymap.label'" class="mb-20" />
|
|
337
336
|
<ButtonGroup
|
|
338
337
|
v-model:value="keymap"
|
|
339
338
|
data-testid="prefs__keymapOptions"
|
|
@@ -343,10 +342,10 @@ export default {
|
|
|
343
342
|
<!-- Helm Charts -->
|
|
344
343
|
<div
|
|
345
344
|
v-if="!isSingleProduct"
|
|
346
|
-
class="col
|
|
345
|
+
class="col mb-40 p-20"
|
|
346
|
+
style="border: 1px solid var(--nav-border);"
|
|
347
347
|
>
|
|
348
|
-
<
|
|
349
|
-
<h4 v-t="'prefs.helm.label'" />
|
|
348
|
+
<h4 v-t="'prefs.helm.label'" class="mb-20" />
|
|
350
349
|
<ButtonGroup
|
|
351
350
|
v-model:value="showPreRelease"
|
|
352
351
|
data-testid="prefs__helmOptions"
|
|
@@ -365,4 +364,7 @@ export default {
|
|
|
365
364
|
max-width: 80vw;
|
|
366
365
|
color: var(--input-label);
|
|
367
366
|
}
|
|
367
|
+
h4{
|
|
368
|
+
font-size: 14px;
|
|
369
|
+
}
|
|
368
370
|
</style>
|
package/pkg/tsconfig.json
CHANGED
|
@@ -27,25 +27,25 @@
|
|
|
27
27
|
],
|
|
28
28
|
"paths": {
|
|
29
29
|
"@shell/core/*": [
|
|
30
|
-
"../../node_modules
|
|
30
|
+
"../../node_modules/dashboard-shell-shell/core/*"
|
|
31
31
|
],
|
|
32
32
|
"@shell/config/*": [
|
|
33
|
-
"../../node_modules
|
|
33
|
+
"../../node_modules/dashboard-shell-shell/config/*"
|
|
34
34
|
],
|
|
35
35
|
"@shell/store/*": [
|
|
36
|
-
"../../node_modules
|
|
36
|
+
"../../node_modules/dashboard-shell-shell/store/*"
|
|
37
37
|
],
|
|
38
38
|
"@shell/plugins/*": [
|
|
39
|
-
"../../node_modules
|
|
39
|
+
"../../node_modules/dashboard-shell-shell/plugins/*"
|
|
40
40
|
],
|
|
41
41
|
"@shell/utils/*": [
|
|
42
|
-
"../../node_modules
|
|
42
|
+
"../../node_modules/dashboard-shell-shell/utils/*"
|
|
43
43
|
],
|
|
44
44
|
"@shell/models/*": [
|
|
45
|
-
"../../node_modules
|
|
45
|
+
"../../node_modules/dashboard-shell-shell/models/*"
|
|
46
46
|
],
|
|
47
47
|
"@shell/mixins/*": [
|
|
48
|
-
"../../node_modules
|
|
48
|
+
"../../node_modules/dashboard-shell-shell/mixins/*"
|
|
49
49
|
],
|
|
50
50
|
"@pkg/*": [
|
|
51
51
|
"./*"
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"**/*.ts",
|
|
57
57
|
"**/*.tsx",
|
|
58
58
|
"**/*.vue",
|
|
59
|
-
"../../node_modules
|
|
60
|
-
"../../node_modules
|
|
59
|
+
"../../node_modules/dashboard-shell-shell/types/*.d.ts",
|
|
60
|
+
"../../node_modules/dashboard-shell-shell/core/types.ts"
|
|
61
61
|
],
|
|
62
62
|
"exclude": [
|
|
63
63
|
"node_modules"
|
package/pkg/vue.config.js
CHANGED
|
@@ -117,7 +117,7 @@ module.exports = function(dir) {
|
|
|
117
117
|
if (p.use) {
|
|
118
118
|
p.use.forEach((u) => {
|
|
119
119
|
if (u.loader.includes('babel-loader')) {
|
|
120
|
-
p.exclude = /node_modules\/(
|
|
120
|
+
p.exclude = /node_modules\/(?!dashboard-shell-shell\/).*/;
|
|
121
121
|
}
|
|
122
122
|
});
|
|
123
123
|
}
|