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
|
@@ -21,32 +21,32 @@ const i18n = useI18n(store);
|
|
|
21
21
|
name="config-tab"
|
|
22
22
|
:label="i18n.t('component.drawer.resourceDetailDrawer.configTab.title')"
|
|
23
23
|
>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
24
|
+
<div class="container">
|
|
25
|
+
<component
|
|
26
|
+
:is="props.component"
|
|
27
|
+
:value="props.resource"
|
|
28
|
+
:liveValue="props.resource"
|
|
29
|
+
:resourceType="props.resourceType"
|
|
30
|
+
:mode="_VIEW"
|
|
31
|
+
:real-mode="_VIEW"
|
|
32
|
+
:initial-value="props.resource"
|
|
33
|
+
:use-tabbed-hash="false /* Have to disable hashing on child components or it modifies the url and closes the drawer */"
|
|
34
|
+
as="config"
|
|
35
|
+
/>
|
|
36
|
+
</div>
|
|
37
|
+
</Tab>
|
|
38
38
|
</template>
|
|
39
39
|
|
|
40
40
|
<style lang="scss" scoped>
|
|
41
|
+
.container {
|
|
42
|
+
background-color: var(--body-bg);
|
|
43
|
+
border-radius: var(--border-radius-md);
|
|
44
|
+
padding: 20px;
|
|
45
|
+
max-width: 100%;
|
|
46
|
+
width: 100%;
|
|
47
|
+
position: relative;
|
|
48
|
+
}
|
|
41
49
|
.config-tab {
|
|
42
|
-
.container {
|
|
43
|
-
background-color: var(--body-bg);
|
|
44
|
-
border-radius: var(--border-radius-md);
|
|
45
|
-
padding: 16px;
|
|
46
|
-
max-width: 100%;
|
|
47
|
-
width: 100%;
|
|
48
|
-
position: relative;
|
|
49
|
-
}
|
|
50
50
|
|
|
51
51
|
// Handle the loading indicator
|
|
52
52
|
:deep() .overlay-content-mode {
|
|
@@ -38,7 +38,7 @@ const yamlComponent: any = useTemplateRef('yaml');
|
|
|
38
38
|
:deep() .codemirror-container {
|
|
39
39
|
background-color: var(--body-bg);
|
|
40
40
|
border-radius: var(--border-radius-md);
|
|
41
|
-
padding:
|
|
41
|
+
padding: 20px;
|
|
42
42
|
|
|
43
43
|
.CodeMirror, .CodeMirror-gutter {
|
|
44
44
|
background-color: var(--body-bg);
|
|
@@ -27,6 +27,8 @@ const i18n = useI18n(store);
|
|
|
27
27
|
const yamlTabProps = ref<YamlProps | null>(null);
|
|
28
28
|
const configTabProps = useDefaultConfigTabProps(props.resource);
|
|
29
29
|
|
|
30
|
+
console.log(configTabProps, ' configTabProps---------------------------------2');
|
|
31
|
+
|
|
30
32
|
useDefaultYamlTabProps(props.resource).then((props) => {
|
|
31
33
|
yamlTabProps.value = props;
|
|
32
34
|
});
|
|
@@ -116,7 +118,6 @@ const canEdit = computed(() => {
|
|
|
116
118
|
border: none;
|
|
117
119
|
border-top: 1px solid var(--border);
|
|
118
120
|
padding: 0;
|
|
119
|
-
padding-top: 24px;
|
|
120
121
|
}
|
|
121
122
|
}
|
|
122
123
|
}
|
|
@@ -293,6 +293,7 @@ export default {
|
|
|
293
293
|
:create-button-label="t('members.createActionLabel')"
|
|
294
294
|
:is-creatable="false"
|
|
295
295
|
:type-display="t('members.clusterAndProject')"
|
|
296
|
+
|
|
296
297
|
/>
|
|
297
298
|
<Banner
|
|
298
299
|
v-if="isLocal"
|
|
@@ -304,7 +305,7 @@ export default {
|
|
|
304
305
|
name="cluster-membership"
|
|
305
306
|
:label="t('members.clusterMembership')"
|
|
306
307
|
>
|
|
307
|
-
<div
|
|
308
|
+
<!-- <div
|
|
308
309
|
v-if="canEditClusterMembers"
|
|
309
310
|
class="row mb-10 cluster-add"
|
|
310
311
|
>
|
|
@@ -314,7 +315,7 @@ export default {
|
|
|
314
315
|
>
|
|
315
316
|
{{ t('members.createActionLabel') }}
|
|
316
317
|
</router-link>
|
|
317
|
-
</div>
|
|
318
|
+
</div> -->
|
|
318
319
|
<ResourceTable
|
|
319
320
|
:schema="schema"
|
|
320
321
|
:headers="headers"
|
|
@@ -325,7 +326,21 @@ export default {
|
|
|
325
326
|
:loading="$fetchState.pending || !currentCluster || loadingClusterBindings"
|
|
326
327
|
sub-search="subSearch"
|
|
327
328
|
:sub-fields="['nameDisplay']"
|
|
328
|
-
|
|
329
|
+
>
|
|
330
|
+
<template #header-right>
|
|
331
|
+
<div
|
|
332
|
+
v-if="canEditClusterMembers"
|
|
333
|
+
class="row mb-10 mr-10 cluster-add"
|
|
334
|
+
>
|
|
335
|
+
<router-link
|
|
336
|
+
:to="createLocation"
|
|
337
|
+
class="btn role-primary pull-right"
|
|
338
|
+
>
|
|
339
|
+
{{ t('members.createActionLabel') }}
|
|
340
|
+
</router-link>
|
|
341
|
+
</div>
|
|
342
|
+
</template>
|
|
343
|
+
</ResourceTable>
|
|
329
344
|
</Tab>
|
|
330
345
|
<Tab
|
|
331
346
|
v-if="canManageProjectMembers && !isHarvester"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { mapGetters, useStore } from 'vuex';
|
|
3
3
|
import ResourceTable, { defaultTableSortGenerationFn } from '@shell/components/ResourceTable';
|
|
4
|
-
import {
|
|
5
|
-
STATE, AGE, NAME, NS_SNAPSHOT_QUOTA, DESCRIPTION
|
|
4
|
+
import {
|
|
5
|
+
STATE, AGE, NAME, NS_SNAPSHOT_QUOTA, DESCRIPTION
|
|
6
6
|
} from '@shell/config/table-headers';
|
|
7
7
|
import { uniq } from '@shell/utils/array';
|
|
8
8
|
import { MANAGEMENT, NAMESPACE, VIRTUAL_TYPES, HCI } from '@shell/config/types';
|
|
@@ -494,19 +494,22 @@ export default {
|
|
|
494
494
|
{{ projectDescription(group.group) }}
|
|
495
495
|
</div>
|
|
496
496
|
</div>
|
|
497
|
-
<div class="right
|
|
497
|
+
<div class="right">
|
|
498
498
|
<router-link
|
|
499
499
|
v-if="isNamespaceCreatable && (canSeeProjectlessNamespaces || group.group.key !== notInProjectKey)"
|
|
500
|
-
class="create-namespace
|
|
500
|
+
class="create-namespace"
|
|
501
|
+
style="margin-bottom: 3px;"
|
|
501
502
|
:to="createNamespaceLocation(group.group)"
|
|
502
503
|
>
|
|
503
504
|
{{ t('projectNamespaces.createNamespace') }}
|
|
504
505
|
</router-link>
|
|
506
|
+
<span v-if="showProjectActionButton(group.group)" style="margin-bottom: 3px;color: var(--link);margin-left: 20px;">|</span>
|
|
505
507
|
<template v-if="featureDropdownMenu">
|
|
506
508
|
<ActionMenu
|
|
507
509
|
v-if="showProjectActionButton(group.group)"
|
|
508
510
|
:resource="getProjectActions(group.group)"
|
|
509
511
|
data-testid="action-button"
|
|
512
|
+
:showIcon="true"
|
|
510
513
|
:button-aria-label="t('projectNamespaces.tableActionsLabel', { resource: projectResource(group.group) })"
|
|
511
514
|
/>
|
|
512
515
|
<div
|
|
@@ -588,7 +591,7 @@ export default {
|
|
|
588
591
|
<style lang="scss" scoped>
|
|
589
592
|
.invisible {
|
|
590
593
|
display: inline-block;
|
|
591
|
-
min-width:
|
|
594
|
+
min-width: 58px;
|
|
592
595
|
}
|
|
593
596
|
|
|
594
597
|
.project-namespaces {
|
|
@@ -602,9 +605,20 @@ export default {
|
|
|
602
605
|
}
|
|
603
606
|
|
|
604
607
|
.project-bar {
|
|
608
|
+
padding-right: 20px;
|
|
605
609
|
display: flex;
|
|
606
610
|
flex-direction: row;
|
|
607
611
|
justify-content: space-between;
|
|
612
|
+
background-color: var(--sortable-table-bg) !important;
|
|
613
|
+
|
|
614
|
+
.right {
|
|
615
|
+
display: flex;
|
|
616
|
+
align-items: center;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
.create-namespace {
|
|
620
|
+
color: var(--link);
|
|
621
|
+
}
|
|
608
622
|
|
|
609
623
|
.group-tab {
|
|
610
624
|
max-width: calc(100% - 230px);
|
|
@@ -108,7 +108,12 @@ export default {
|
|
|
108
108
|
} catch (e) { }
|
|
109
109
|
},
|
|
110
110
|
data() {
|
|
111
|
+
|
|
112
|
+
const topLevelPermissions = sessionStorage.getItem('TOPLEVELPERMISSIONS') || ''
|
|
113
|
+
|
|
111
114
|
return {
|
|
115
|
+
topLevelPermissions,
|
|
116
|
+
|
|
112
117
|
// This not only identifies global roles but the order here is the order we want to display them in the UI
|
|
113
118
|
globalPermissions: [
|
|
114
119
|
'admin',
|
|
@@ -328,60 +333,119 @@ export default {
|
|
|
328
333
|
|
|
329
334
|
<div v-else>
|
|
330
335
|
<form v-if="selectedRoles">
|
|
331
|
-
<
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
336
|
+
<template v-if="topLevelPermissions && topLevelPermissions !== 'superadmin'">
|
|
337
|
+
<div
|
|
338
|
+
v-for="(sortedRole, roleType) in sortedRoles"
|
|
339
|
+
:key="roleType"
|
|
340
|
+
class="role-group mb-10"
|
|
341
|
+
>
|
|
342
|
+
<Card
|
|
343
|
+
v-if="Object.keys(sortedRole).length"
|
|
344
|
+
:show-highlight-border="false"
|
|
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"
|
|
340
398
|
>
|
|
341
|
-
<
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
399
|
+
<Card
|
|
400
|
+
v-if="Object.keys(sortedRole).length"
|
|
401
|
+
:show-highlight-border="false"
|
|
402
|
+
:show-actions="false"
|
|
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>
|
|
346
410
|
</div>
|
|
347
|
-
</
|
|
348
|
-
|
|
349
|
-
<template v-slot:body>
|
|
350
|
-
<div
|
|
351
|
-
class="checkbox-section"
|
|
352
|
-
:class="'checkbox-section--' + roleType"
|
|
353
|
-
>
|
|
411
|
+
</template>
|
|
412
|
+
<template v-slot:body>
|
|
354
413
|
<div
|
|
355
|
-
|
|
356
|
-
:
|
|
357
|
-
class="checkbox mb-10 mr-10"
|
|
414
|
+
class="checkbox-section"
|
|
415
|
+
:class="'checkbox-section--' + roleType"
|
|
358
416
|
>
|
|
359
|
-
<
|
|
360
|
-
v-
|
|
361
|
-
:
|
|
362
|
-
|
|
363
|
-
:label="role.nameDisplay"
|
|
364
|
-
:description="role.descriptionDisplay"
|
|
365
|
-
:mode="mode"
|
|
366
|
-
:data-testId="'grb-checkbox-' + role.id"
|
|
367
|
-
@update:value="checkboxChanged"
|
|
417
|
+
<div
|
|
418
|
+
v-for="(role, i) in sortedRoles[roleType]"
|
|
419
|
+
:key="i"
|
|
420
|
+
class="checkbox mb-10 mr-10"
|
|
368
421
|
>
|
|
369
|
-
<
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
422
|
+
<Checkbox
|
|
423
|
+
v-model:value="selectedRoles"
|
|
424
|
+
:value-when-true="role.id"
|
|
425
|
+
:disabled="!!assignOnlyRoles[role.id]"
|
|
426
|
+
:label="role.nameDisplay"
|
|
427
|
+
:description="role.descriptionDisplay"
|
|
428
|
+
:mode="mode"
|
|
429
|
+
:data-testId="'grb-checkbox-' + role.id"
|
|
430
|
+
@update:value="checkboxChanged"
|
|
431
|
+
>
|
|
432
|
+
<template #label>
|
|
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>
|
|
380
444
|
</div>
|
|
381
|
-
</
|
|
382
|
-
</
|
|
383
|
-
</
|
|
384
|
-
</
|
|
445
|
+
</template>
|
|
446
|
+
</Card>
|
|
447
|
+
</div>
|
|
448
|
+
</template>
|
|
385
449
|
</form>
|
|
386
450
|
</div>
|
|
387
451
|
</template>
|
|
@@ -262,22 +262,22 @@ export default {
|
|
|
262
262
|
<div v-if="loading">
|
|
263
263
|
<Loading />
|
|
264
264
|
</div>
|
|
265
|
-
<div
|
|
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
|
-
<a
|
|
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,5 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { mapState } from 'vuex';
|
|
3
|
+
import { translateError } from '@shell/utils/error'
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
data() {
|
|
@@ -25,6 +26,7 @@ export default {
|
|
|
25
26
|
},
|
|
26
27
|
|
|
27
28
|
methods: {
|
|
29
|
+
translateError,
|
|
28
30
|
remove(growl) {
|
|
29
31
|
this.$store.dispatch('growl/remove', growl.id);
|
|
30
32
|
},
|
|
@@ -131,7 +133,7 @@ export default {
|
|
|
131
133
|
:id="`growl-message-${ growl.id }`"
|
|
132
134
|
:class="{ 'has-title': !!growl.title }"
|
|
133
135
|
>
|
|
134
|
-
|
|
136
|
+
{{ translateError(growl.message) }}
|
|
135
137
|
</p>
|
|
136
138
|
</div>
|
|
137
139
|
</div>
|
|
@@ -85,8 +85,9 @@ export default {
|
|
|
85
85
|
:capacity="reserved.total"
|
|
86
86
|
:used="reserved.useful"
|
|
87
87
|
:color-stops="colorStops"
|
|
88
|
+
:reserveText="`已分配`"
|
|
88
89
|
>
|
|
89
|
-
<template #title>
|
|
90
|
+
<!-- <template #title>
|
|
90
91
|
<span>
|
|
91
92
|
{{ reservedTitle ?? t('clusterIndexPage.hardwareResourceGauge.reserved') }}
|
|
92
93
|
<span class="values text-muted">
|
|
@@ -108,6 +109,23 @@ export default {
|
|
|
108
109
|
<span>
|
|
109
110
|
{{ percentage(reserved) }}
|
|
110
111
|
</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>
|
|
111
129
|
</template>
|
|
112
130
|
</ConsumptionGauge>
|
|
113
131
|
</div>
|
|
@@ -119,8 +137,26 @@ export default {
|
|
|
119
137
|
:capacity="used.total"
|
|
120
138
|
:used="used.useful"
|
|
121
139
|
:color-stops="colorStops"
|
|
140
|
+
:reserveText="`已使用`"
|
|
122
141
|
>
|
|
123
|
-
|
|
142
|
+
<template #content>
|
|
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>
|
|
124
160
|
<span>
|
|
125
161
|
{{ usedTitle ?? t('clusterIndexPage.hardwareResourceGauge.used') }}
|
|
126
162
|
<span class="values text-muted">
|
|
@@ -142,7 +178,7 @@ export default {
|
|
|
142
178
|
<span>
|
|
143
179
|
{{ percentage(used) }}
|
|
144
180
|
</span>
|
|
145
|
-
</template>
|
|
181
|
+
</template> -->
|
|
146
182
|
</ConsumptionGauge>
|
|
147
183
|
</div>
|
|
148
184
|
</div>
|
|
@@ -4,23 +4,17 @@ export default {};
|
|
|
4
4
|
|
|
5
5
|
<template>
|
|
6
6
|
<div
|
|
7
|
-
class="indented-
|
|
7
|
+
class="indented-panels"
|
|
8
8
|
>
|
|
9
9
|
<slot />
|
|
10
10
|
</div>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<style lang="scss">
|
|
14
|
-
.indented-
|
|
14
|
+
.indented-panels {
|
|
15
15
|
height: 100%;
|
|
16
|
-
width:
|
|
17
|
-
|
|
16
|
+
width: 100%;
|
|
17
|
+
padding: 0 20px;
|
|
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
|
-
}
|
|
26
20
|
</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: 1px solid var(--tabbed-border);
|
|
30
|
+
padding: 20px;
|
|
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,7 +45,9 @@ export default {
|
|
|
45
45
|
</div>
|
|
46
46
|
<div class="value">
|
|
47
47
|
<slot name="value">
|
|
48
|
-
|
|
48
|
+
<span v-clean-tooltip="displayValue">
|
|
49
|
+
{{ displayValue }}
|
|
50
|
+
</span>
|
|
49
51
|
</slot>
|
|
50
52
|
</div>
|
|
51
53
|
</div>
|
|
@@ -53,7 +55,7 @@ export default {
|
|
|
53
55
|
</template>
|
|
54
56
|
|
|
55
57
|
<style lang="scss" scoped>
|
|
56
|
-
.label {
|
|
58
|
+
/* .label {
|
|
57
59
|
display: flex;
|
|
58
60
|
flex-direction: column;
|
|
59
61
|
|
|
@@ -61,5 +63,29 @@ export default {
|
|
|
61
63
|
font-size: 14px;
|
|
62
64
|
line-height: $input-line-height;
|
|
63
65
|
}
|
|
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
|
+
}
|
|
64
90
|
}
|
|
65
91
|
</style>
|
|
@@ -30,7 +30,7 @@ export default {
|
|
|
30
30
|
</template>
|
|
31
31
|
|
|
32
32
|
<style lang="scss" scoped>
|
|
33
|
-
.label {
|
|
33
|
+
/* .label {
|
|
34
34
|
display: flex;
|
|
35
35
|
flex-direction: column;
|
|
36
36
|
|
|
@@ -38,5 +38,24 @@ 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;
|
|
41
60
|
}
|
|
42
61
|
</style>
|
|
@@ -21,7 +21,7 @@ export default {
|
|
|
21
21
|
|
|
22
22
|
closeText: {
|
|
23
23
|
type: String,
|
|
24
|
-
default: '
|
|
24
|
+
default: '关闭'
|
|
25
25
|
},
|
|
26
26
|
|
|
27
27
|
saveText: {
|
|
@@ -66,8 +66,16 @@ export default {
|
|
|
66
66
|
class="modal"
|
|
67
67
|
data-testid="mvc__card"
|
|
68
68
|
:trigger-focus-trap="true"
|
|
69
|
-
@close="$emit('
|
|
69
|
+
@close="$emit('close', $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> -->
|
|
71
79
|
<Card
|
|
72
80
|
class="modal"
|
|
73
81
|
:show-highlight-border="false"
|
|
@@ -118,7 +126,7 @@ export default {
|
|
|
118
126
|
.footer {
|
|
119
127
|
width: 100%;
|
|
120
128
|
display: flex;
|
|
121
|
-
justify-content:
|
|
129
|
+
justify-content: flex-end;
|
|
122
130
|
}
|
|
123
131
|
|
|
124
132
|
.banner {
|
|
@@ -133,6 +141,7 @@ export default {
|
|
|
133
141
|
|
|
134
142
|
&.card-container {
|
|
135
143
|
box-shadow: none;
|
|
144
|
+
padding: 24px;
|
|
136
145
|
}
|
|
137
146
|
}
|
|
138
147
|
</style>
|