dashboard-shell-shell 3.0.5-test.4 → 3.0.5-test.6
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/images/pl/half-logo.svg +23 -2
- package/assets/images/pl/harvester.png +0 -0
- package/assets/styles/app.scss +0 -4
- package/assets/styles/base/_basic.scss +2 -2
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/base/_typography.scss +1 -2
- package/assets/styles/base/_variables.scss +4 -11
- package/assets/styles/global/_button.scss +27 -45
- package/assets/styles/global/_columns.scss +1 -3
- package/assets/styles/global/_form.scss +13 -45
- package/assets/styles/global/_labeled-input.scss +26 -54
- package/assets/styles/global/_layout.scss +3 -8
- package/assets/styles/global/_select.scss +17 -25
- package/assets/styles/global/_table.scss +1 -7
- package/assets/styles/global/_tooltip.scss +6 -54
- package/assets/styles/themes/_dark.scss +0 -3
- package/assets/styles/themes/_light.scss +42 -63
- package/assets/styles/vendor/vue-select.scss +9 -22
- package/assets/translations/en-us.yaml +4 -28
- package/assets/translations/zh-hans.yaml +189 -376
- package/components/ActionDropdown.vue +1 -2
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +0 -2
- package/components/AppModal.vue +5 -46
- package/components/BrandImage.vue +0 -1
- package/components/ButtonDropdown.vue +4 -26
- package/components/ButtonMultiAction.vue +0 -1
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +6 -20
- package/components/ConsumptionGauge.vue +5 -24
- package/components/CruResource.vue +8 -9
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +17 -29
- package/components/ExplorerProjectsNamespaces.vue +5 -19
- package/components/GlobalRoleBindings.vue +48 -112
- package/components/GrafanaDashboard.vue +4 -4
- package/components/GrowlManager.vue +1 -3
- package/components/HardwareResourceGauge.vue +3 -39
- package/components/IndentedPanel.vue +10 -4
- package/components/InfoBox.vue +3 -3
- package/components/InputOrDisplay.vue +2 -28
- package/components/LabelValue.vue +1 -20
- package/components/ModalWithCard.vue +3 -12
- package/components/PodSecurityAdmission.vue +1 -1
- package/components/PromptModal.vue +1 -1
- package/components/PromptRemove.vue +11 -30
- package/components/ResourceDetail/Masthead/legacy.vue +38 -181
- package/components/ResourceDetail/legacy.vue +13 -29
- package/components/ResourceList/Masthead.vue +54 -226
- package/components/ResourceList/ResourceLoadingIndicator.vue +2 -5
- package/components/ResourceTable.vue +2 -24
- package/components/SideNav.vue +20 -74
- package/components/SortableTable/THead.vue +3 -33
- package/components/SortableTable/index.vue +464 -1017
- package/components/SortableTable/paging.js +16 -26
- package/components/SortableTable/selection.js +2 -2
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +29 -47
- package/components/YamlEditor.vue +1 -0
- package/components/auth/Principal.vue +12 -36
- package/components/auth/RoleDetailEdit.vue +7 -58
- package/components/auth/SelectPrincipal.vue +0 -1
- package/components/form/ArrayList.vue +33 -41
- package/components/form/ArrayListGrouped.vue +2 -10
- package/components/form/ArrayListSelect.vue +1 -1
- package/components/form/BannerSettings.vue +59 -64
- package/components/form/ChangePassword.vue +4 -4
- package/components/form/ColorInput.vue +8 -32
- package/components/form/Footer.vue +8 -11
- package/components/form/InputWithSelect.vue +5 -8
- package/components/form/KeyValue.vue +7 -47
- package/components/form/LabeledSelect.vue +241 -212
- package/components/form/Labels.vue +3 -3
- package/components/form/MatchExpressions.vue +7 -24
- package/components/form/Members/ClusterPermissionsEditor.vue +2 -1
- package/components/form/Members/MembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +20 -59
- package/components/form/Password.vue +7 -16
- package/components/form/PodAffinity.vue +5 -4
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +17 -18
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +6 -3
- package/components/form/Select.vue +2 -5
- package/components/form/SimpleSecretSelector.vue +9 -29
- package/components/form/UnitInput.vue +3 -8
- package/components/formatter/BadgeStateFormatter.vue +5 -8
- package/components/formatter/LiveDate.vue +3 -3
- package/components/nav/Favorite.vue +1 -5
- package/components/nav/Group.vue +99 -132
- package/components/nav/Header.vue +27 -124
- package/components/nav/HeaderPageActionMenu.vue +0 -1
- package/components/nav/NamespaceFilter.vue +15 -19
- package/components/nav/TopLevelMenu.vue +119 -182
- package/components/nav/Type.vue +41 -63
- package/composables/useClickOutside.ts +1 -1
- package/config/private-label.js +11 -15
- package/config/product/auth.js +7 -17
- package/config/product/settings.js +9 -19
- package/config/settings.ts +0 -28
- package/config/table-headers.js +2 -3
- package/dialog/ForceMachineRemoveDialog.vue +2 -2
- package/dialog/ScalePoolDownDialog.vue +2 -2
- package/edit/management.cattle.io.user.vue +4 -17
- 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 +12 -36
- 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 +2 -1
- package/edit/token.vue +12 -31
- package/edit/workload/index.vue +1 -1
- package/list/management.cattle.io.setting.vue +13 -22
- package/list/management.cattle.io.user.vue +3 -7
- package/list/namespace.vue +0 -3
- package/list/provisioning.cattle.io.cluster.vue +7 -6
- package/mixins/brand.js +0 -17
- package/package.json +1 -1
- package/pages/account/index.vue +12 -74
- package/pages/auth/login.vue +51 -214
- package/pages/auth/setup.vue +19 -142
- package/pages/c/_cluster/_product/namespaces.vue +4 -4
- package/pages/c/_cluster/auth/roles/index.vue +1 -19
- package/pages/c/_cluster/monitoring/monitor/index.vue +2 -2
- package/pages/c/_cluster/settings/banners.vue +102 -174
- package/pages/c/_cluster/settings/brand.vue +302 -350
- package/pages/c/_cluster/settings/performance.vue +38 -61
- package/pages/home.vue +30 -70
- package/pages/prefs.vue +25 -27
- package/promptRemove/mixin/roleDeletionCheck.js +2 -2
- package/public/index.html +4 -4
- package/rancher-components/BadgeState/BadgeState.vue +4 -6
- package/rancher-components/Banner/Banner.vue +8 -12
- package/rancher-components/Card/Card.vue +8 -7
- package/rancher-components/Form/Checkbox/Checkbox.vue +0 -4
- package/rancher-components/Form/LabeledInput/LabeledInput.vue +3 -42
- package/rancher-components/Form/Radio/RadioButton.vue +11 -35
- package/rancher-components/Form/Radio/RadioGroup.vue +5 -13
- package/rancher-components/Form/TextArea/TextAreaAutoGrow.vue +3 -3
- package/rancher-components/Form/ToggleSwitch/ToggleSwitch.vue +0 -1
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +4 -12
- package/rancher-components/RcDropdown/RcDropdown.vue +7 -35
- package/rancher-components/RcDropdown/RcDropdownItem.vue +2 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +4 -9
- package/rancher-components/RcDropdown/types.ts +0 -1
- package/rancher-components/StringList/StringList.vue +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 +2 -2
- package/store/modal.ts +3 -3
- package/store/prefs.js +4 -11
- package/store/type-map.js +2 -32
- package/types/shell/index.d.ts +67 -74
- package/utils/error.js +8 -87
- package/utils/router.js +0 -21
- package/utils/select.js +3 -26
- package/utils/string.js +5 -8
- package/utils/title.ts +1 -1
- package/assets/icons/demo.css +0 -539
- package/assets/icons/demo.css:Zone.Identifier +0 -0
- package/assets/icons/demo_index.html +0 -1131
- package/assets/icons/demo_index.html:Zone.Identifier +0 -0
- package/assets/icons/iconfont.css +0 -216
- package/assets/icons/iconfont.css:Zone.Identifier +0 -0
- package/assets/icons/iconfont.js +0 -1
- package/assets/icons/iconfont.js:Zone.Identifier +0 -0
- package/assets/icons/iconfont.json +0 -324
- 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 +0 -3
- package/assets/images/action.svg +0 -6
- package/assets/images/login/password.svg +0 -20
- package/assets/images/login/user.svg +0 -6
- package/assets/images/login-bg.png +0 -0
- package/assets/images/login-left.png +0 -0
- package/assets/images/login-logo.svg +0 -19
- package/assets/images/logo.png +0 -0
- package/assets/images/pl/logo.png +0 -0
- package/assets/images/promp-yellow.svg +0 -5
- package/assets/images/user.png +0 -0
- package/assets/styles/all.scss +0 -63
- package/components/DotState.vue +0 -84
- package/utils/errorTranslate.json +0 -1336
|
@@ -108,12 +108,7 @@ export default {
|
|
|
108
108
|
} catch (e) { }
|
|
109
109
|
},
|
|
110
110
|
data() {
|
|
111
|
-
|
|
112
|
-
const topLevelPermissions = sessionStorage.getItem('TOPLEVELPERMISSIONS') || ''
|
|
113
|
-
|
|
114
111
|
return {
|
|
115
|
-
topLevelPermissions,
|
|
116
|
-
|
|
117
112
|
// This not only identifies global roles but the order here is the order we want to display them in the UI
|
|
118
113
|
globalPermissions: [
|
|
119
114
|
'admin',
|
|
@@ -333,119 +328,60 @@ export default {
|
|
|
333
328
|
|
|
334
329
|
<div v-else>
|
|
335
330
|
<form v-if="selectedRoles">
|
|
336
|
-
<
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
:show-actions="false"
|
|
346
|
-
>
|
|
347
|
-
<template v-slot:title>
|
|
348
|
-
<div class="type-title">
|
|
349
|
-
<h3>{{ t(`rbac.globalRoles.types.${roleType}.label`) }}</h3>
|
|
350
|
-
<div class="type-description">
|
|
351
|
-
{{ t(`rbac.globalRoles.types.${roleType}.description`, { isUser }) }}
|
|
352
|
-
</div>
|
|
353
|
-
</div>
|
|
354
|
-
</template>
|
|
355
|
-
<template v-slot:body>
|
|
356
|
-
<div
|
|
357
|
-
class="checkbox-section"
|
|
358
|
-
:class="'checkbox-section--' + roleType"
|
|
359
|
-
>
|
|
360
|
-
<div
|
|
361
|
-
v-for="(role, i) in sortedRoles[roleType]"
|
|
362
|
-
:key="i"
|
|
363
|
-
class="checkbox mb-10 mr-10"
|
|
364
|
-
>
|
|
365
|
-
<Checkbox
|
|
366
|
-
v-model:value="selectedRoles"
|
|
367
|
-
:value-when-true="role.id"
|
|
368
|
-
:disabled="!!assignOnlyRoles[role.id]"
|
|
369
|
-
:label="role.nameDisplay"
|
|
370
|
-
:description="role.descriptionDisplay"
|
|
371
|
-
:mode="mode"
|
|
372
|
-
:data-testId="'grb-checkbox-' + role.id"
|
|
373
|
-
@update:value="checkboxChanged"
|
|
374
|
-
>
|
|
375
|
-
<template #label>
|
|
376
|
-
<div class="checkbox-label-slot">
|
|
377
|
-
<span class="checkbox-label">{{ role.nameDisplay }}</span>
|
|
378
|
-
<i
|
|
379
|
-
v-if="!!assignOnlyRoles[role.id]"
|
|
380
|
-
v-clean-tooltip="t('rbac.globalRoles.assignOnlyRole')"
|
|
381
|
-
class="checkbox-info icon icon-info icon-lg"
|
|
382
|
-
/>
|
|
383
|
-
</div>
|
|
384
|
-
</template>
|
|
385
|
-
</Checkbox>
|
|
386
|
-
</div>
|
|
387
|
-
</div>
|
|
388
|
-
</template>
|
|
389
|
-
</Card>
|
|
390
|
-
</div>
|
|
391
|
-
</template>
|
|
392
|
-
|
|
393
|
-
<template v-else>
|
|
394
|
-
<div
|
|
395
|
-
v-for="(sortedRole, roleType) in { global: sortedRoles['global'] }"
|
|
396
|
-
:key="roleType"
|
|
397
|
-
class="role-group mb-10"
|
|
331
|
+
<div
|
|
332
|
+
v-for="(sortedRole, roleType) in sortedRoles"
|
|
333
|
+
:key="roleType"
|
|
334
|
+
class="role-group mb-10"
|
|
335
|
+
>
|
|
336
|
+
<Card
|
|
337
|
+
v-if="Object.keys(sortedRole).length"
|
|
338
|
+
:show-highlight-border="false"
|
|
339
|
+
:show-actions="false"
|
|
398
340
|
>
|
|
399
|
-
<
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
<template v-slot:title>
|
|
405
|
-
<div class="type-title">
|
|
406
|
-
<h3>{{ t(`rbac.globalRoles.types.${roleType}.label`) }}</h3>
|
|
407
|
-
<div class="type-description">
|
|
408
|
-
{{ t(`rbac.globalRoles.types.${roleType}.description`, { isUser }) }}
|
|
409
|
-
</div>
|
|
341
|
+
<template v-slot:title>
|
|
342
|
+
<div class="type-title">
|
|
343
|
+
<h3>{{ t(`rbac.globalRoles.types.${roleType}.label`) }}</h3>
|
|
344
|
+
<div class="type-description">
|
|
345
|
+
{{ t(`rbac.globalRoles.types.${roleType}.description`, { isUser }) }}
|
|
410
346
|
</div>
|
|
411
|
-
</
|
|
412
|
-
|
|
347
|
+
</div>
|
|
348
|
+
</template>
|
|
349
|
+
<template v-slot:body>
|
|
350
|
+
<div
|
|
351
|
+
class="checkbox-section"
|
|
352
|
+
:class="'checkbox-section--' + roleType"
|
|
353
|
+
>
|
|
413
354
|
<div
|
|
414
|
-
|
|
415
|
-
:
|
|
355
|
+
v-for="(role, i) in sortedRoles[roleType]"
|
|
356
|
+
:key="i"
|
|
357
|
+
class="checkbox mb-10 mr-10"
|
|
416
358
|
>
|
|
417
|
-
<
|
|
418
|
-
v-
|
|
419
|
-
:
|
|
420
|
-
|
|
359
|
+
<Checkbox
|
|
360
|
+
v-model:value="selectedRoles"
|
|
361
|
+
:value-when-true="role.id"
|
|
362
|
+
:disabled="!!assignOnlyRoles[role.id]"
|
|
363
|
+
:label="role.nameDisplay"
|
|
364
|
+
:description="role.descriptionDisplay"
|
|
365
|
+
:mode="mode"
|
|
366
|
+
:data-testId="'grb-checkbox-' + role.id"
|
|
367
|
+
@update:value="checkboxChanged"
|
|
421
368
|
>
|
|
422
|
-
<
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
>
|
|
432
|
-
|
|
433
|
-
<div class="checkbox-label-slot">
|
|
434
|
-
<span class="checkbox-label">{{ role.nameDisplay }}</span>
|
|
435
|
-
<i
|
|
436
|
-
v-if="!!assignOnlyRoles[role.id]"
|
|
437
|
-
v-clean-tooltip="t('rbac.globalRoles.assignOnlyRole')"
|
|
438
|
-
class="checkbox-info icon icon-info icon-lg"
|
|
439
|
-
/>
|
|
440
|
-
</div>
|
|
441
|
-
</template>
|
|
442
|
-
</Checkbox>
|
|
443
|
-
</div>
|
|
369
|
+
<template #label>
|
|
370
|
+
<div class="checkbox-label-slot">
|
|
371
|
+
<span class="checkbox-label">{{ role.nameDisplay }}</span>
|
|
372
|
+
<i
|
|
373
|
+
v-if="!!assignOnlyRoles[role.id]"
|
|
374
|
+
v-clean-tooltip="t('rbac.globalRoles.assignOnlyRole')"
|
|
375
|
+
class="checkbox-info icon icon-info icon-lg"
|
|
376
|
+
/>
|
|
377
|
+
</div>
|
|
378
|
+
</template>
|
|
379
|
+
</Checkbox>
|
|
444
380
|
</div>
|
|
445
|
-
</
|
|
446
|
-
</
|
|
447
|
-
</
|
|
448
|
-
</
|
|
381
|
+
</div>
|
|
382
|
+
</template>
|
|
383
|
+
</Card>
|
|
384
|
+
</div>
|
|
449
385
|
</form>
|
|
450
386
|
</div>
|
|
451
387
|
</template>
|
|
@@ -262,22 +262,22 @@ export default {
|
|
|
262
262
|
<div v-if="loading">
|
|
263
263
|
<Loading />
|
|
264
264
|
</div>
|
|
265
|
-
|
|
265
|
+
<div
|
|
266
266
|
v-if="!loading && !error"
|
|
267
267
|
class="external-link"
|
|
268
|
-
>
|
|
268
|
+
>
|
|
269
269
|
<!-- https://github.com/harvester/harvester-installer/pull/512/files -->
|
|
270
270
|
<!-- It is necessary to include the parameter referer when accessing the Grafana page. -->
|
|
271
271
|
<!-- This parameter is required by the backend to identify the origin of the request from which cluster -->
|
|
272
272
|
<!-- The matching mechanism as follows: -->
|
|
273
273
|
<!-- ~.*/k8s/clusters/(c-m-.+)/.* -->
|
|
274
274
|
<!-- ~.*/dashboard/harvester/c/(c-m-.+)/.* -->
|
|
275
|
-
|
|
275
|
+
<a
|
|
276
276
|
:href="grafanaUrl"
|
|
277
277
|
target="_blank"
|
|
278
278
|
rel="noopener nofollow"
|
|
279
279
|
>{{ t('grafanaDashboard.grafana') }} <i class="icon icon-external-link" /></a>
|
|
280
|
-
</div>
|
|
280
|
+
</div>
|
|
281
281
|
</div>
|
|
282
282
|
</template>
|
|
283
283
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { mapState } from 'vuex';
|
|
3
|
-
import { translateError } from '@shell/utils/error'
|
|
4
3
|
|
|
5
4
|
export default {
|
|
6
5
|
data() {
|
|
@@ -26,7 +25,6 @@ export default {
|
|
|
26
25
|
},
|
|
27
26
|
|
|
28
27
|
methods: {
|
|
29
|
-
translateError,
|
|
30
28
|
remove(growl) {
|
|
31
29
|
this.$store.dispatch('growl/remove', growl.id);
|
|
32
30
|
},
|
|
@@ -133,7 +131,7 @@ export default {
|
|
|
133
131
|
:id="`growl-message-${ growl.id }`"
|
|
134
132
|
:class="{ 'has-title': !!growl.title }"
|
|
135
133
|
>
|
|
136
|
-
|
|
134
|
+
{{ growl.message }}
|
|
137
135
|
</p>
|
|
138
136
|
</div>
|
|
139
137
|
</div>
|
|
@@ -85,9 +85,8 @@ export default {
|
|
|
85
85
|
:capacity="reserved.total"
|
|
86
86
|
:used="reserved.useful"
|
|
87
87
|
:color-stops="colorStops"
|
|
88
|
-
:reserveText="`已分配`"
|
|
89
88
|
>
|
|
90
|
-
|
|
89
|
+
<template #title>
|
|
91
90
|
<span>
|
|
92
91
|
{{ reservedTitle ?? t('clusterIndexPage.hardwareResourceGauge.reserved') }}
|
|
93
92
|
<span class="values text-muted">
|
|
@@ -109,23 +108,6 @@ export default {
|
|
|
109
108
|
<span>
|
|
110
109
|
{{ percentage(reserved) }}
|
|
111
110
|
</span>
|
|
112
|
-
</template> -->
|
|
113
|
-
<template #content>
|
|
114
|
-
<span>
|
|
115
|
-
{{ percentage(reserved) }}(
|
|
116
|
-
共 <span v-if="reserved.formattedTotal">
|
|
117
|
-
{{ reserved.formattedTotal }}
|
|
118
|
-
</span>
|
|
119
|
-
<span v-else>
|
|
120
|
-
{{ maxDecimalPlaces(reserved.total) }} {{ reserved.units }}
|
|
121
|
-
</span>,{{ reservedTitle === '分配'? '已分配': '预留' }} <span v-if="reserved.formattedUseful">
|
|
122
|
-
{{ reserved.formattedUseful }} {{ reserved.units }}
|
|
123
|
-
</span>
|
|
124
|
-
<span v-else>
|
|
125
|
-
{{ maxDecimalPlaces(reserved.useful) }} {{ reserved.units }}
|
|
126
|
-
</span>
|
|
127
|
-
)
|
|
128
|
-
</span>
|
|
129
111
|
</template>
|
|
130
112
|
</ConsumptionGauge>
|
|
131
113
|
</div>
|
|
@@ -137,26 +119,8 @@ export default {
|
|
|
137
119
|
:capacity="used.total"
|
|
138
120
|
:used="used.useful"
|
|
139
121
|
:color-stops="colorStops"
|
|
140
|
-
:reserveText="`已使用`"
|
|
141
122
|
>
|
|
142
|
-
|
|
143
|
-
<span>
|
|
144
|
-
{{ percentage(used) }}(
|
|
145
|
-
共 <span v-if="used.formattedTotal">
|
|
146
|
-
{{ used.formattedTotal }}
|
|
147
|
-
</span>
|
|
148
|
-
<span v-else>
|
|
149
|
-
{{ maxDecimalPlaces(used.total) }} {{ used.units }}
|
|
150
|
-
</span>,已使用 <span v-if="used.formattedUseful">
|
|
151
|
-
{{ used.formattedUseful }} {{ used.units }}
|
|
152
|
-
</span>
|
|
153
|
-
<span v-else>
|
|
154
|
-
{{ maxDecimalPlaces(used.useful) }} {{ used.units }}
|
|
155
|
-
</span>
|
|
156
|
-
)
|
|
157
|
-
</span>
|
|
158
|
-
</template>
|
|
159
|
-
<!-- <template #title>
|
|
123
|
+
<template #title>
|
|
160
124
|
<span>
|
|
161
125
|
{{ usedTitle ?? t('clusterIndexPage.hardwareResourceGauge.used') }}
|
|
162
126
|
<span class="values text-muted">
|
|
@@ -178,7 +142,7 @@ export default {
|
|
|
178
142
|
<span>
|
|
179
143
|
{{ percentage(used) }}
|
|
180
144
|
</span>
|
|
181
|
-
</template>
|
|
145
|
+
</template>
|
|
182
146
|
</ConsumptionGauge>
|
|
183
147
|
</div>
|
|
184
148
|
</div>
|
|
@@ -4,17 +4,23 @@ export default {};
|
|
|
4
4
|
|
|
5
5
|
<template>
|
|
6
6
|
<div
|
|
7
|
-
class="indented-
|
|
7
|
+
class="indented-panel"
|
|
8
8
|
>
|
|
9
9
|
<slot />
|
|
10
10
|
</div>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<style lang="scss">
|
|
14
|
-
.indented-
|
|
14
|
+
.indented-panel {
|
|
15
15
|
height: 100%;
|
|
16
|
-
width:
|
|
17
|
-
|
|
16
|
+
width: 90%;
|
|
17
|
+
margin-left: 5%;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
@media only screen and (max-width: map-get($breakpoints, '--viewport-9')) {
|
|
21
|
+
.indented-panel {
|
|
22
|
+
margin: 0 20px;
|
|
23
|
+
width: initial;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
20
26
|
</style>
|
package/components/InfoBox.vue
CHANGED
|
@@ -26,8 +26,8 @@ export default {
|
|
|
26
26
|
|
|
27
27
|
<style lang="scss" scoped>
|
|
28
28
|
.info-box {
|
|
29
|
-
border:
|
|
30
|
-
padding:
|
|
29
|
+
border: 2px solid var(--tabbed-border);
|
|
30
|
+
padding: 10px;
|
|
31
31
|
margin-bottom: 20px;
|
|
32
32
|
border-radius: var(--border-radius);
|
|
33
33
|
flex-grow: 1;
|
|
@@ -81,4 +81,4 @@ export default {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
</style>
|
|
84
|
+
</style>
|
|
@@ -45,9 +45,7 @@ export default {
|
|
|
45
45
|
</div>
|
|
46
46
|
<div class="value">
|
|
47
47
|
<slot name="value">
|
|
48
|
-
|
|
49
|
-
{{ displayValue }}
|
|
50
|
-
</span>
|
|
48
|
+
{{ displayValue }}
|
|
51
49
|
</slot>
|
|
52
50
|
</div>
|
|
53
51
|
</div>
|
|
@@ -55,7 +53,7 @@ export default {
|
|
|
55
53
|
</template>
|
|
56
54
|
|
|
57
55
|
<style lang="scss" scoped>
|
|
58
|
-
|
|
56
|
+
.label {
|
|
59
57
|
display: flex;
|
|
60
58
|
flex-direction: column;
|
|
61
59
|
|
|
@@ -63,29 +61,5 @@ export default {
|
|
|
63
61
|
font-size: 14px;
|
|
64
62
|
line-height: $input-line-height;
|
|
65
63
|
}
|
|
66
|
-
} */
|
|
67
|
-
.label {
|
|
68
|
-
display: flex;
|
|
69
|
-
/* align-items: center; */
|
|
70
|
-
/* flex-direction: column; */
|
|
71
|
-
|
|
72
|
-
.text-label{
|
|
73
|
-
width: 160px;
|
|
74
|
-
line-height: 32px;
|
|
75
|
-
}
|
|
76
|
-
.value {
|
|
77
|
-
/* font-size: 14px; */
|
|
78
|
-
/* line-height: $input-line-height; */
|
|
79
|
-
line-height: 32px;
|
|
80
|
-
flex: 1;
|
|
81
|
-
overflow: hidden;
|
|
82
|
-
text-overflow: ellipsis;
|
|
83
|
-
white-space: nowrap;
|
|
84
|
-
|
|
85
|
-
ul{
|
|
86
|
-
line-height: $input-line-height;
|
|
87
|
-
list-style:none;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
64
|
}
|
|
91
65
|
</style>
|
|
@@ -30,7 +30,7 @@ export default {
|
|
|
30
30
|
</template>
|
|
31
31
|
|
|
32
32
|
<style lang="scss" scoped>
|
|
33
|
-
|
|
33
|
+
.label {
|
|
34
34
|
display: flex;
|
|
35
35
|
flex-direction: column;
|
|
36
36
|
|
|
@@ -38,24 +38,5 @@ export default {
|
|
|
38
38
|
font-size: 14px;
|
|
39
39
|
line-height: $input-line-height;
|
|
40
40
|
}
|
|
41
|
-
} */
|
|
42
|
-
.label {
|
|
43
|
-
display: flex;
|
|
44
|
-
/* flex-direction: column; */
|
|
45
|
-
/* align-items: center; */
|
|
46
|
-
.text-label{
|
|
47
|
-
width: 160px;
|
|
48
|
-
line-height: 32px;
|
|
49
|
-
}
|
|
50
|
-
.value {
|
|
51
|
-
line-height: $input-line-height;
|
|
52
|
-
overflow: hidden;
|
|
53
|
-
text-overflow: ellipsis;
|
|
54
|
-
white-space: nowrap;
|
|
55
|
-
line-height: 32px;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
:deep() ul {
|
|
59
|
-
margin: 0px;
|
|
60
41
|
}
|
|
61
42
|
</style>
|
|
@@ -21,7 +21,7 @@ export default {
|
|
|
21
21
|
|
|
22
22
|
closeText: {
|
|
23
23
|
type: String,
|
|
24
|
-
default: '
|
|
24
|
+
default: 'Close'
|
|
25
25
|
},
|
|
26
26
|
|
|
27
27
|
saveText: {
|
|
@@ -66,16 +66,8 @@ export default {
|
|
|
66
66
|
class="modal"
|
|
67
67
|
data-testid="mvc__card"
|
|
68
68
|
:trigger-focus-trap="true"
|
|
69
|
-
@close="$emit('
|
|
69
|
+
@close="$emit('finish', $event)"
|
|
70
70
|
>
|
|
71
|
-
<!-- <slot name="closeicon">
|
|
72
|
-
<button
|
|
73
|
-
class="btn btn-sm role-link hide-icon-dialog-close"
|
|
74
|
-
@click.prevent="hide"
|
|
75
|
-
>
|
|
76
|
-
<i class="icon icon-x" />
|
|
77
|
-
</button>
|
|
78
|
-
</slot> -->
|
|
79
71
|
<Card
|
|
80
72
|
class="modal"
|
|
81
73
|
:show-highlight-border="false"
|
|
@@ -126,7 +118,7 @@ export default {
|
|
|
126
118
|
.footer {
|
|
127
119
|
width: 100%;
|
|
128
120
|
display: flex;
|
|
129
|
-
justify-content:
|
|
121
|
+
justify-content: center;
|
|
130
122
|
}
|
|
131
123
|
|
|
132
124
|
.banner {
|
|
@@ -141,7 +133,6 @@ export default {
|
|
|
141
133
|
|
|
142
134
|
&.card-container {
|
|
143
135
|
box-shadow: none;
|
|
144
|
-
padding: 24px;
|
|
145
136
|
}
|
|
146
137
|
}
|
|
147
138
|
</style>
|
|
@@ -42,7 +42,7 @@ export default {
|
|
|
42
42
|
},
|
|
43
43
|
modalWidth() {
|
|
44
44
|
// property set from workload.js to overwrite modal default width of 600px, with fallback value as well
|
|
45
|
-
return this.modalData?.modalWidth || '
|
|
45
|
+
return this.modalData?.modalWidth || '600px';
|
|
46
46
|
},
|
|
47
47
|
customClass() {
|
|
48
48
|
return this.modalData?.customClass || undefined;
|
|
@@ -12,7 +12,6 @@ import { CATALOG as CATALOG_ANNOTATIONS } from '@shell/config/labels-annotations
|
|
|
12
12
|
import { CATALOG } from '@shell/config/types';
|
|
13
13
|
import { LabeledInput } from '@components/Form/LabeledInput';
|
|
14
14
|
import AppModal from '@shell/components/AppModal.vue';
|
|
15
|
-
import { translateError } from '@shell/utils/error';
|
|
16
15
|
|
|
17
16
|
export default {
|
|
18
17
|
name: 'PromptRemove',
|
|
@@ -215,7 +214,6 @@ export default {
|
|
|
215
214
|
},
|
|
216
215
|
|
|
217
216
|
methods: {
|
|
218
|
-
translateError,
|
|
219
217
|
resourceNames,
|
|
220
218
|
escapeHtml,
|
|
221
219
|
close() {
|
|
@@ -342,7 +340,7 @@ export default {
|
|
|
342
340
|
v-if="showModal"
|
|
343
341
|
custom-class="remove-modal"
|
|
344
342
|
name="promptRemove"
|
|
345
|
-
:width="
|
|
343
|
+
:width="400"
|
|
346
344
|
height="auto"
|
|
347
345
|
styles="max-height: 100vh;"
|
|
348
346
|
:trigger-focus-trap="true"
|
|
@@ -354,11 +352,6 @@ export default {
|
|
|
354
352
|
>
|
|
355
353
|
<template #title>
|
|
356
354
|
<h4 class="text-default-text">
|
|
357
|
-
<img
|
|
358
|
-
src="@shell/assets/images/promp-yellow.svg"
|
|
359
|
-
class="img-span"
|
|
360
|
-
alt=""
|
|
361
|
-
>
|
|
362
355
|
{{ t('promptRemove.title') }}
|
|
363
356
|
</h4>
|
|
364
357
|
</template>
|
|
@@ -390,7 +383,7 @@ export default {
|
|
|
390
383
|
class="mt-10"
|
|
391
384
|
>
|
|
392
385
|
<span
|
|
393
|
-
v-clean-html="t('promptRemove.confirmName', { nameToMatch: escapeHtml(nameToMatch) })"
|
|
386
|
+
v-clean-html="t('promptRemove.confirmName', { nameToMatch: escapeHtml(nameToMatch) }, true)"
|
|
394
387
|
/>
|
|
395
388
|
</div>
|
|
396
389
|
</div>
|
|
@@ -407,14 +400,14 @@ export default {
|
|
|
407
400
|
{{ warning }}
|
|
408
401
|
</div>
|
|
409
402
|
<div class="text-error mb-10 mt-10">
|
|
410
|
-
{{
|
|
403
|
+
{{ error }}
|
|
411
404
|
</div>
|
|
412
|
-
|
|
405
|
+
<div
|
|
413
406
|
v-if="!needsConfirm"
|
|
414
407
|
class="text-info mt-20"
|
|
415
408
|
>
|
|
416
409
|
{{ protip }}
|
|
417
|
-
</div>
|
|
410
|
+
</div>
|
|
418
411
|
</LabeledInput>
|
|
419
412
|
<div v-else-if="!hasCustomRemove">
|
|
420
413
|
<div
|
|
@@ -427,7 +420,7 @@ export default {
|
|
|
427
420
|
v-if="error"
|
|
428
421
|
class="text-error mb-10 mt-10"
|
|
429
422
|
>
|
|
430
|
-
|
|
423
|
+
{{ error }}
|
|
431
424
|
</div>
|
|
432
425
|
</div>
|
|
433
426
|
<Checkbox
|
|
@@ -448,7 +441,7 @@ export default {
|
|
|
448
441
|
<div class="spacer" />
|
|
449
442
|
<AsyncButton
|
|
450
443
|
mode="delete"
|
|
451
|
-
class="btn ml-10"
|
|
444
|
+
class="btn bg-error ml-10"
|
|
452
445
|
:disabled="deleteDisabled"
|
|
453
446
|
:data-testid="componentTestid + '-confirm-button'"
|
|
454
447
|
@click="remove"
|
|
@@ -464,32 +457,20 @@ export default {
|
|
|
464
457
|
box-shadow: none;
|
|
465
458
|
}
|
|
466
459
|
#confirm {
|
|
467
|
-
width:
|
|
468
|
-
|
|
460
|
+
width: 90%;
|
|
461
|
+
margin-left: 3px;
|
|
469
462
|
}
|
|
470
463
|
|
|
471
464
|
.actions {
|
|
472
465
|
text-align: right;
|
|
473
466
|
}
|
|
474
467
|
|
|
475
|
-
|
|
468
|
+
.card-actions {
|
|
476
469
|
display: flex;
|
|
477
470
|
|
|
478
471
|
.spacer {
|
|
479
472
|
flex: 1;
|
|
480
473
|
}
|
|
481
|
-
}
|
|
474
|
+
}
|
|
482
475
|
}
|
|
483
476
|
</style>
|
|
484
|
-
|
|
485
|
-
<style scoped>
|
|
486
|
-
.text-default-text{
|
|
487
|
-
line-height: 20px;
|
|
488
|
-
margin: 0px;
|
|
489
|
-
display: flex;
|
|
490
|
-
align-items: center;
|
|
491
|
-
}
|
|
492
|
-
.img-span{
|
|
493
|
-
margin-right: 8px;
|
|
494
|
-
}
|
|
495
|
-
</style>
|