dashboard-shell-shell 3.0.5-test.6 → 3.0.5-test.8
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/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
|
@@ -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 || '610px';
|
|
46
46
|
},
|
|
47
47
|
customClass() {
|
|
48
48
|
return this.modalData?.customClass || undefined;
|
|
@@ -12,6 +12,7 @@ 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';
|
|
15
16
|
|
|
16
17
|
export default {
|
|
17
18
|
name: 'PromptRemove',
|
|
@@ -214,6 +215,7 @@ export default {
|
|
|
214
215
|
},
|
|
215
216
|
|
|
216
217
|
methods: {
|
|
218
|
+
translateError,
|
|
217
219
|
resourceNames,
|
|
218
220
|
escapeHtml,
|
|
219
221
|
close() {
|
|
@@ -340,7 +342,7 @@ export default {
|
|
|
340
342
|
v-if="showModal"
|
|
341
343
|
custom-class="remove-modal"
|
|
342
344
|
name="promptRemove"
|
|
343
|
-
:width="
|
|
345
|
+
:width="460"
|
|
344
346
|
height="auto"
|
|
345
347
|
styles="max-height: 100vh;"
|
|
346
348
|
:trigger-focus-trap="true"
|
|
@@ -352,6 +354,11 @@ export default {
|
|
|
352
354
|
>
|
|
353
355
|
<template #title>
|
|
354
356
|
<h4 class="text-default-text">
|
|
357
|
+
<img
|
|
358
|
+
src="@shell/assets/images/promp-yellow.svg"
|
|
359
|
+
class="img-span"
|
|
360
|
+
alt=""
|
|
361
|
+
>
|
|
355
362
|
{{ t('promptRemove.title') }}
|
|
356
363
|
</h4>
|
|
357
364
|
</template>
|
|
@@ -383,7 +390,7 @@ export default {
|
|
|
383
390
|
class="mt-10"
|
|
384
391
|
>
|
|
385
392
|
<span
|
|
386
|
-
v-clean-html="t('promptRemove.confirmName', { nameToMatch: escapeHtml(nameToMatch) }
|
|
393
|
+
v-clean-html="t('promptRemove.confirmName', { nameToMatch: escapeHtml(nameToMatch) })"
|
|
387
394
|
/>
|
|
388
395
|
</div>
|
|
389
396
|
</div>
|
|
@@ -400,14 +407,14 @@ export default {
|
|
|
400
407
|
{{ warning }}
|
|
401
408
|
</div>
|
|
402
409
|
<div class="text-error mb-10 mt-10">
|
|
403
|
-
{{ error }}
|
|
410
|
+
{{ translateError(error) }}
|
|
404
411
|
</div>
|
|
405
|
-
<div
|
|
412
|
+
<!-- <div
|
|
406
413
|
v-if="!needsConfirm"
|
|
407
414
|
class="text-info mt-20"
|
|
408
415
|
>
|
|
409
416
|
{{ protip }}
|
|
410
|
-
</div>
|
|
417
|
+
</div> -->
|
|
411
418
|
</LabeledInput>
|
|
412
419
|
<div v-else-if="!hasCustomRemove">
|
|
413
420
|
<div
|
|
@@ -420,7 +427,7 @@ export default {
|
|
|
420
427
|
v-if="error"
|
|
421
428
|
class="text-error mb-10 mt-10"
|
|
422
429
|
>
|
|
423
|
-
|
|
430
|
+
{{ translateError(error) }}
|
|
424
431
|
</div>
|
|
425
432
|
</div>
|
|
426
433
|
<Checkbox
|
|
@@ -441,7 +448,7 @@ export default {
|
|
|
441
448
|
<div class="spacer" />
|
|
442
449
|
<AsyncButton
|
|
443
450
|
mode="delete"
|
|
444
|
-
class="btn
|
|
451
|
+
class="btn ml-10"
|
|
445
452
|
:disabled="deleteDisabled"
|
|
446
453
|
:data-testid="componentTestid + '-confirm-button'"
|
|
447
454
|
@click="remove"
|
|
@@ -457,20 +464,32 @@ export default {
|
|
|
457
464
|
box-shadow: none;
|
|
458
465
|
}
|
|
459
466
|
#confirm {
|
|
460
|
-
width:
|
|
461
|
-
margin-left: 3px;
|
|
467
|
+
width: 100%;
|
|
468
|
+
// margin-left: 3px;
|
|
462
469
|
}
|
|
463
470
|
|
|
464
471
|
.actions {
|
|
465
472
|
text-align: right;
|
|
466
473
|
}
|
|
467
474
|
|
|
468
|
-
.card-actions {
|
|
475
|
+
/* .card-actions {
|
|
469
476
|
display: flex;
|
|
470
477
|
|
|
471
478
|
.spacer {
|
|
472
479
|
flex: 1;
|
|
473
480
|
}
|
|
474
|
-
}
|
|
481
|
+
} */
|
|
475
482
|
}
|
|
476
483
|
</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>
|
|
@@ -89,12 +89,10 @@ const getRowValueId = (row:Row): string => `value-${ row.label }:${ row.value }`
|
|
|
89
89
|
flex-direction: column;
|
|
90
90
|
|
|
91
91
|
.row {
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
min-height: 40px;
|
|
94
93
|
.value {
|
|
95
94
|
display: flex;
|
|
96
95
|
flex-direction: row;
|
|
97
|
-
align-items: center;
|
|
98
96
|
|
|
99
97
|
&, & * {
|
|
100
98
|
max-width: 100%;
|
|
@@ -53,13 +53,13 @@ const showConfigurationMoreFocusSelector = computed(() => `[data-testid="${ show
|
|
|
53
53
|
|
|
54
54
|
<template>
|
|
55
55
|
<div class="key-value">
|
|
56
|
-
<div class="heading">
|
|
56
|
+
<div class="heading h40">
|
|
57
57
|
<span class="title text-deemphasized">{{ propertyName }}</span>
|
|
58
58
|
<span class="count">{{ rows.length }}</span>
|
|
59
59
|
</div>
|
|
60
60
|
<div
|
|
61
61
|
v-if="visibleRows.length === 0"
|
|
62
|
-
class="empty
|
|
62
|
+
class="empty text-deemphasized"
|
|
63
63
|
>
|
|
64
64
|
<div class="no-rows">
|
|
65
65
|
{{ i18n.t('component.resource.detail.metadata.keyValue.noRows', {propertyName: lowercasePropertyName}) }}
|
|
@@ -78,7 +78,7 @@ const showConfigurationMoreFocusSelector = computed(() => `[data-testid="${ show
|
|
|
78
78
|
<div
|
|
79
79
|
v-for="row in visibleRows"
|
|
80
80
|
:key="displayValue(row)"
|
|
81
|
-
class="row"
|
|
81
|
+
class="row h40"
|
|
82
82
|
>
|
|
83
83
|
<Rectangle
|
|
84
84
|
v-clean-tooltip="displayValue(row)"
|
|
@@ -104,18 +104,22 @@ const showConfigurationMoreFocusSelector = computed(() => `[data-testid="${ show
|
|
|
104
104
|
display: flex;
|
|
105
105
|
flex-direction: column;
|
|
106
106
|
align-items: flex-start;
|
|
107
|
+
|
|
108
|
+
.h40 {
|
|
109
|
+
min-height: 40px;
|
|
110
|
+
}
|
|
107
111
|
|
|
108
112
|
.count {
|
|
109
113
|
margin-left: 24px;
|
|
110
114
|
}
|
|
111
115
|
|
|
112
116
|
.heading {
|
|
113
|
-
margin-bottom: 8px;
|
|
114
117
|
}
|
|
115
118
|
|
|
116
119
|
.row {
|
|
117
120
|
display: block;
|
|
118
121
|
width: 100%;
|
|
122
|
+
line-height: 40px;
|
|
119
123
|
|
|
120
124
|
&:not(:nth-child(2)) {
|
|
121
125
|
margin-top: 4px;
|
|
@@ -31,10 +31,12 @@ const showBothEmpty = computed(() => labels.length === 0 && annotations.length =
|
|
|
31
31
|
|
|
32
32
|
<template>
|
|
33
33
|
<SpacedRow
|
|
34
|
-
|
|
34
|
+
v-if="false"
|
|
35
|
+
class="metadata ppb-5"
|
|
35
36
|
v-bind="$attrs"
|
|
36
37
|
>
|
|
37
38
|
<div
|
|
39
|
+
v-if="identifyingInformation?.length > 0"
|
|
38
40
|
class="identifying-info"
|
|
39
41
|
>
|
|
40
42
|
<IdentifyingInformation :rows="identifyingInformation" />
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div class="title">
|
|
3
3
|
<slot name="default" />
|
|
4
|
-
</
|
|
4
|
+
</div>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<style lang="scss" scoped>
|
|
8
|
-
|
|
8
|
+
.title {
|
|
9
9
|
display: inline-block;
|
|
10
10
|
align-items: center;
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: row;
|
|
13
|
+
font-size: 14px;
|
|
13
14
|
}
|
|
14
15
|
</style>
|
|
@@ -13,6 +13,8 @@ import { _CONFIG, _GRAPH, AS } from '@shell/config/query-params';
|
|
|
13
13
|
import ButtonGroup from '@shell/components/ButtonGroup';
|
|
14
14
|
import { ExtensionPoint, PanelLocation } from '@shell/core/types';
|
|
15
15
|
import ExtensionPanel from '@shell/components/ExtensionPanel.vue';
|
|
16
|
+
import breadcrumb from '@shell/components/breadcrumb/index.vue'
|
|
17
|
+
import { useDefaultConfigTabProps } from '@shell/components/Drawer/ResourceDetailDrawer/composables';
|
|
16
18
|
|
|
17
19
|
export interface Badge {
|
|
18
20
|
color: 'bg-success' | 'bg-error' | 'bg-warning' | 'bg-info';
|
|
@@ -36,6 +38,8 @@ export interface TitleBarProps {
|
|
|
36
38
|
showViewOptions?: boolean;
|
|
37
39
|
|
|
38
40
|
onShowConfiguration?: (returnFocusSelector: string) => void;
|
|
41
|
+
value?: any;
|
|
42
|
+
parentRouteOverride?: string;
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
const showConfigurationIcon = require(`@shell/assets/images/icons/document.svg`);
|
|
@@ -43,7 +47,7 @@ const showConfigurationIcon = require(`@shell/assets/images/icons/document.svg`)
|
|
|
43
47
|
|
|
44
48
|
<script setup lang="ts">
|
|
45
49
|
const {
|
|
46
|
-
resource, resourceTypeLabel, resourceTo, resourceName, description, badge, showViewOptions, onShowConfiguration,
|
|
50
|
+
parentRouteOverride, value, resource, resourceTypeLabel, resourceTo, resourceName, description, badge, showViewOptions, onShowConfiguration,
|
|
47
51
|
} = defineProps<TitleBarProps>();
|
|
48
52
|
|
|
49
53
|
const store = useStore();
|
|
@@ -54,6 +58,12 @@ const emit = defineEmits(['show-configuration']);
|
|
|
54
58
|
const showConfigurationDataTestId = 'show-configuration-cta';
|
|
55
59
|
const showConfigurationReturnFocusSelector = computed(() => `[data-testid="${ showConfigurationDataTestId }"]`);
|
|
56
60
|
|
|
61
|
+
|
|
62
|
+
const configTabProps = useDefaultConfigTabProps(resource);
|
|
63
|
+
|
|
64
|
+
console.log(configTabProps, ' configTabProps---------------------------------1');
|
|
65
|
+
|
|
66
|
+
|
|
57
67
|
const currentView = ref(router?.currentRoute?.value?.query?.as || _CONFIG);
|
|
58
68
|
const viewOptions = computed(() => {
|
|
59
69
|
if (!showViewOptions) {
|
|
@@ -72,6 +82,42 @@ const viewOptions = computed(() => {
|
|
|
72
82
|
];
|
|
73
83
|
});
|
|
74
84
|
|
|
85
|
+
const Svg = require('~shell/assets/images/API.svg')
|
|
86
|
+
|
|
87
|
+
const parent = computed(() =>{
|
|
88
|
+
const displayName = value?.parentNameOverride || store.getters['type-map/labelFor'](schema);
|
|
89
|
+
const product = store.getters['currentProduct'].name;
|
|
90
|
+
|
|
91
|
+
const defaultLocation = {
|
|
92
|
+
name: 'c-cluster-product-resource',
|
|
93
|
+
params: {
|
|
94
|
+
resource: resource,
|
|
95
|
+
product,
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const location = value?.parentLocationOverride || defaultLocation;
|
|
100
|
+
|
|
101
|
+
if (parentRouteOverride) {
|
|
102
|
+
location.name = parentRouteOverride;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const out = {
|
|
106
|
+
location
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
return out;
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
const menuIcon = computed(() => {
|
|
113
|
+
const product = store.getters['productId'];
|
|
114
|
+
|
|
115
|
+
const resources = parent?.location?.params?.resource || ''
|
|
116
|
+
|
|
117
|
+
return store.getters['type-map/groupsForVirTypes'](product, resources);
|
|
118
|
+
})
|
|
119
|
+
|
|
120
|
+
|
|
75
121
|
watch(
|
|
76
122
|
() => currentView.value,
|
|
77
123
|
() => {
|
|
@@ -82,33 +128,58 @@ watch(
|
|
|
82
128
|
|
|
83
129
|
<template>
|
|
84
130
|
<div class="title-bar">
|
|
131
|
+
<breadcrumb :resource="resource"/>
|
|
85
132
|
<Top>
|
|
86
133
|
<Title class="title">
|
|
134
|
+
<span v-if="menuIcon && parentRouteOverride === 'account' && resource=== 'token'" class="detailIcon-span">
|
|
135
|
+
<img
|
|
136
|
+
v-if="parentRouteOverride === 'account' && resource=== 'token'"
|
|
137
|
+
:src="Svg"
|
|
138
|
+
style="margin-top: 4px; margin-left: 5px;"
|
|
139
|
+
>
|
|
140
|
+
<i
|
|
141
|
+
v-else
|
|
142
|
+
:class="'icon-'+ menuIcon + ' detailIcon'"
|
|
143
|
+
/>
|
|
144
|
+
</span>
|
|
145
|
+
<div class="resourceTypeLabelCls">
|
|
146
|
+
{{ resourceTypeLabel }}名称:
|
|
147
|
+
</div>
|
|
148
|
+
<span class="resource-name masthead-resource-title">
|
|
149
|
+
{{ resourceName }}
|
|
150
|
+
</span>
|
|
151
|
+
<BadgeState
|
|
152
|
+
v-if="badge"
|
|
153
|
+
class="badge-state"
|
|
154
|
+
:color="badge.color"
|
|
155
|
+
:label="badge.label"
|
|
156
|
+
/>
|
|
157
|
+
<span
|
|
158
|
+
class="valid"
|
|
159
|
+
>|</span>
|
|
87
160
|
<TabTitle :show-child="false">
|
|
88
|
-
|
|
161
|
+
返回
|
|
89
162
|
</TabTitle>
|
|
90
163
|
<router-link
|
|
91
164
|
v-if="resourceTo"
|
|
92
165
|
:to="resourceTo"
|
|
93
166
|
class="resource-link"
|
|
94
167
|
>
|
|
95
|
-
|
|
168
|
+
返回
|
|
96
169
|
</router-link>
|
|
97
170
|
<span
|
|
98
171
|
v-else
|
|
99
172
|
class="resource-text"
|
|
100
173
|
>
|
|
101
|
-
|
|
102
|
-
</span>
|
|
103
|
-
<span class="resource-name masthead-resource-title">
|
|
104
|
-
{{ resourceName }}
|
|
174
|
+
返回
|
|
105
175
|
</span>
|
|
106
|
-
<
|
|
107
|
-
v-if="
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
176
|
+
<div
|
|
177
|
+
v-if="description"
|
|
178
|
+
style="font-size: 12px;margin-left: 16px;"
|
|
179
|
+
class="bottom description text-deemphasized"
|
|
180
|
+
>
|
|
181
|
+
( {{ description }} )
|
|
182
|
+
</div>
|
|
112
183
|
</Title>
|
|
113
184
|
<div class="actions">
|
|
114
185
|
<!-- Please don't expand this pattern, this was a quick fix to resolve a conflict between the new masthead and fleet. -->
|
|
@@ -134,6 +205,7 @@ watch(
|
|
|
134
205
|
</RcButton>
|
|
135
206
|
<ActionMenu
|
|
136
207
|
v-if="actionMenuResource"
|
|
208
|
+
:showIcon="true"
|
|
137
209
|
button-role="multiAction"
|
|
138
210
|
:resource="actionMenuResource"
|
|
139
211
|
data-testid="masthead-action-menu"
|
|
@@ -141,12 +213,6 @@ watch(
|
|
|
141
213
|
/>
|
|
142
214
|
</div>
|
|
143
215
|
</Top>
|
|
144
|
-
<div
|
|
145
|
-
v-if="description"
|
|
146
|
-
class="bottom description text-deemphasized"
|
|
147
|
-
>
|
|
148
|
-
{{ description }}
|
|
149
|
-
</div>
|
|
150
216
|
<ExtensionPanel
|
|
151
217
|
:resource="resource"
|
|
152
218
|
:type="ExtensionPoint.PANEL"
|
|
@@ -156,12 +222,27 @@ watch(
|
|
|
156
222
|
</template>
|
|
157
223
|
|
|
158
224
|
<style lang="scss" scoped>
|
|
225
|
+
.detailIcon-span{
|
|
226
|
+
width: 24px;
|
|
227
|
+
height: 24px;
|
|
228
|
+
display: inline-block;
|
|
229
|
+
position: relative;
|
|
230
|
+
background: var(--primary);
|
|
231
|
+
margin-right: 10px;
|
|
232
|
+
}
|
|
233
|
+
.resourceTypeLabelCls {
|
|
234
|
+
font-weight: 700;
|
|
235
|
+
}
|
|
236
|
+
.valid{
|
|
237
|
+
color: #d7d7d7;
|
|
238
|
+
margin: 0px 10px;
|
|
239
|
+
}
|
|
159
240
|
.title-bar {
|
|
160
241
|
min-width: 740px;
|
|
161
242
|
|
|
162
243
|
.badge-state {
|
|
163
244
|
font-size: 16px;
|
|
164
|
-
margin-left:
|
|
245
|
+
margin-left: 5px;
|
|
165
246
|
position: relative;
|
|
166
247
|
}
|
|
167
248
|
|
|
@@ -170,15 +251,19 @@ watch(
|
|
|
170
251
|
}
|
|
171
252
|
|
|
172
253
|
&:deep() button[data-testid="masthead-action-menu"] {
|
|
173
|
-
border-radius:
|
|
174
|
-
width:
|
|
175
|
-
height:
|
|
176
|
-
margin-left:
|
|
254
|
+
border-radius: 2px;
|
|
255
|
+
width: 32px;
|
|
256
|
+
height: 32px;
|
|
257
|
+
margin-left: 10px;
|
|
177
258
|
|
|
178
259
|
display: inline-flex;
|
|
179
260
|
flex-direction: row;
|
|
180
261
|
justify-content: center;
|
|
181
262
|
align-items: center;
|
|
263
|
+
|
|
264
|
+
a{
|
|
265
|
+
color: #fff;
|
|
266
|
+
}
|
|
182
267
|
}
|
|
183
268
|
|
|
184
269
|
.description {
|