dashboard-shell-shell 3.0.5-test.1 → 3.0.5-test.11
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/styles/base/_variables.scss +3 -3
- package/assets/styles/global/_button.scss +7 -7
- package/assets/styles/global/_tooltip.scss +4 -4
- package/assets/styles/themes/_light.scss +3 -1
- package/assets/translations/zh-hans.yaml +76 -0
- package/components/ActionDropdown.vue +1 -1
- package/components/CopyToClipboard.vue +15 -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/PodSecurityAdmission.vue +1 -1
- 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 +235 -164
- package/components/ResourceDetail/legacy.vue +29 -13
- package/components/ResourceList/Masthead.vue +22 -14
- package/components/SortableTable/index.vue +2 -2
- package/components/Tabbed/Tab.vue +1 -1
- package/components/Tabbed/index.vue +51 -32
- package/components/auth/Principal.vue +35 -11
- package/components/breadcrumb/index.vue +316 -0
- package/components/form/LabeledSelect.vue +3 -2
- package/components/form/NameNsDescription.vue +5 -5
- package/components/form/Taints.vue +2 -1
- package/components/form/WorkloadPorts.vue +143 -123
- package/components/nav/Header.vue +3 -4
- package/components/nav/NamespaceFilter.vue +1 -2
- package/edit/workload/index.vue +3 -3
- package/package.json +1 -1
- package/pages/account/index.vue +25 -79
- package/pages/c/_cluster/auth/roles/index.vue +38 -5
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.js +2 -2
- package/plugins/dashboard-store/resource-class.js +28 -27
- package/rancher-components/BadgeState/BadgeState.vue +33 -52
- package/rancher-components/Banner/Banner.vue +2 -2
- package/rancher-components/RcDropdown/RcDropdownMenu.vue +8 -7
- package/scripts/publish-shell.sh +1 -1
- package/store/i18n.js +3 -0
- package/store/type-map.js +1 -1
- package/types/shell/index.d.ts +4 -30
- package/utils/error.js +3 -1
- package/utils/errorTranslate.json +15 -0
- package/vue.config.js +2 -2
|
@@ -39,13 +39,13 @@ $z-indexes: (
|
|
|
39
39
|
// ---- Boundary for central content (in `<main>`)
|
|
40
40
|
|
|
41
41
|
// This covers both relative and content modes of the loading indicator
|
|
42
|
-
loading:
|
|
42
|
+
loading: 16,
|
|
43
43
|
|
|
44
44
|
// Users can click on shell in header and show shell even with most loading indicators showing,
|
|
45
45
|
// so add it above them
|
|
46
|
-
windowsManager:
|
|
46
|
+
windowsManager: 17,
|
|
47
47
|
|
|
48
|
-
mainHeader:
|
|
48
|
+
mainHeader: 18,
|
|
49
49
|
|
|
50
50
|
cruFooter: 19,
|
|
51
51
|
|
|
@@ -169,13 +169,13 @@ button,
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
.role-multi-action {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
172
|
+
background-color: rgba(0,0,0,0);
|
|
173
|
+
border: solid thin var(--primary);
|
|
174
|
+
color: var(--primary) !important;
|
|
175
|
+
border-radius: 2px;
|
|
176
|
+
min-width: 32px;
|
|
177
|
+
height: 32px;
|
|
178
|
+
width: 32px;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
.icon-group i {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
background: var(--tooltip-bg);
|
|
12
12
|
box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
|
13
13
|
color: var(--tooltip-text);
|
|
14
|
-
border-radius:
|
|
14
|
+
border-radius: 2px;
|
|
15
15
|
padding: 8px;
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -123,14 +123,14 @@
|
|
|
123
123
|
.v-popper__popper {
|
|
124
124
|
$color: var(--popover-bg);
|
|
125
125
|
border: 1px solid var(--border);
|
|
126
|
-
border-radius:
|
|
126
|
+
border-radius: 2px;
|
|
127
127
|
|
|
128
128
|
.v-popper__inner {
|
|
129
|
-
border-radius:
|
|
129
|
+
border-radius: 2px;
|
|
130
130
|
background: $color;
|
|
131
131
|
color: var(--popover-text);
|
|
132
132
|
padding: 10px;
|
|
133
|
-
border-radius:
|
|
133
|
+
border-radius: 0px;
|
|
134
134
|
border: none;
|
|
135
135
|
|
|
136
136
|
a {
|
|
@@ -8,6 +8,8 @@ $darker : #333;
|
|
|
8
8
|
//light disabled
|
|
9
9
|
$dark : #ffffff;
|
|
10
10
|
|
|
11
|
+
$scroll_dark: #8b8b8b;
|
|
12
|
+
|
|
11
13
|
//light border and buttons
|
|
12
14
|
$medium : #d7d7d7;
|
|
13
15
|
|
|
@@ -364,7 +366,7 @@ BODY, .theme-light {
|
|
|
364
366
|
|
|
365
367
|
--body-bg : #{$lightest};
|
|
366
368
|
--body-text : #{$darkest};
|
|
367
|
-
--scrollbar-thumb : #{$
|
|
369
|
+
--scrollbar-thumb : #{$scroll_dark};
|
|
368
370
|
--scrollbar-thumb-dropdown : #{$lighter};
|
|
369
371
|
--scrollbar-track : transparent;
|
|
370
372
|
|
|
@@ -7856,3 +7856,79 @@ gitPicker:
|
|
|
7856
7856
|
networkAttachmentDefinition:
|
|
7857
7857
|
tabs:
|
|
7858
7858
|
config: 配置
|
|
7859
|
+
|
|
7860
|
+
|
|
7861
|
+
component:
|
|
7862
|
+
drawer:
|
|
7863
|
+
chrome:
|
|
7864
|
+
ariaLabel:
|
|
7865
|
+
close: 关闭抽屉
|
|
7866
|
+
close: 关闭
|
|
7867
|
+
resourceDetailDrawer:
|
|
7868
|
+
title: "{resourceName} ({resourceType}) - 配置"
|
|
7869
|
+
editConfig: 编辑配置
|
|
7870
|
+
editYaml: 编辑YAML
|
|
7871
|
+
ariaLabel:
|
|
7872
|
+
editConfig: 编辑配置
|
|
7873
|
+
editYaml: 编辑YAML
|
|
7874
|
+
yamlTab:
|
|
7875
|
+
title: YAML
|
|
7876
|
+
configTab:
|
|
7877
|
+
title: 配置
|
|
7878
|
+
resource:
|
|
7879
|
+
detail:
|
|
7880
|
+
card:
|
|
7881
|
+
resourceUsage:
|
|
7882
|
+
used: Used
|
|
7883
|
+
amount: '{used} of {available}'
|
|
7884
|
+
cpu: CPU
|
|
7885
|
+
memory: Memory
|
|
7886
|
+
pods: Pods
|
|
7887
|
+
resourcesCard:
|
|
7888
|
+
title: 资源
|
|
7889
|
+
rows:
|
|
7890
|
+
services: 服务
|
|
7891
|
+
ingresses: Ingresses
|
|
7892
|
+
referredToBy: 参考
|
|
7893
|
+
refersTo: 引用
|
|
7894
|
+
podsCard:
|
|
7895
|
+
title: Pods
|
|
7896
|
+
ariaResourceName: pods
|
|
7897
|
+
insightsCard:
|
|
7898
|
+
title: Insights
|
|
7899
|
+
rows:
|
|
7900
|
+
conditions: Conditions
|
|
7901
|
+
events: Events
|
|
7902
|
+
scaler:
|
|
7903
|
+
ariaLabel:
|
|
7904
|
+
increase: Increase {resourceName}
|
|
7905
|
+
decrease: Decrease {resourceName}
|
|
7906
|
+
titleBar:
|
|
7907
|
+
showConfiguration: 显示配置
|
|
7908
|
+
ariaLabel:
|
|
7909
|
+
actionMenu: 更多操作
|
|
7910
|
+
showConfiguration: 显示{resource}的整个配置
|
|
7911
|
+
metadata:
|
|
7912
|
+
labelsAndAnnotations: 标签和注释
|
|
7913
|
+
identifyingInformation:
|
|
7914
|
+
createdBy: 创建
|
|
7915
|
+
namespace: 命名空间
|
|
7916
|
+
project: 项目
|
|
7917
|
+
age: 使用时长
|
|
7918
|
+
image: 图片
|
|
7919
|
+
ready: 准备
|
|
7920
|
+
up-to-date: Up-to-date
|
|
7921
|
+
available: 可用
|
|
7922
|
+
serviceAccount: 服务帐户
|
|
7923
|
+
type: 类型
|
|
7924
|
+
certificate: 证书
|
|
7925
|
+
issuer: Issuer
|
|
7926
|
+
expires: 到期
|
|
7927
|
+
workspace: 工作区
|
|
7928
|
+
annotations:
|
|
7929
|
+
title: 注释
|
|
7930
|
+
labels:
|
|
7931
|
+
title: 标签
|
|
7932
|
+
keyValue:
|
|
7933
|
+
noRows: 此资源上没有配置{propertyName}.
|
|
7934
|
+
showConfiguration: 显示配置
|
|
@@ -42,3 +42,18 @@ export default {
|
|
|
42
42
|
@click="clicked"
|
|
43
43
|
/>
|
|
44
44
|
</template>
|
|
45
|
+
|
|
46
|
+
<style lang="scss"scoped>
|
|
47
|
+
button {
|
|
48
|
+
min-width: auto;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.bg-success{
|
|
52
|
+
background-color: var(--success-hover-text) !important;
|
|
53
|
+
color: #333 !important;
|
|
54
|
+
}
|
|
55
|
+
.bg-success:hover{
|
|
56
|
+
background-color: var(--success-hover-text) !important;
|
|
57
|
+
color: var(--primary) !important;
|
|
58
|
+
}
|
|
59
|
+
</style>
|
|
@@ -35,7 +35,7 @@ const ariaLabel = computed(() => i18n.t('component.drawer.chrome.ariaLabel.close
|
|
|
35
35
|
</div>
|
|
36
36
|
</slot>
|
|
37
37
|
</div>
|
|
38
|
-
<div class="body
|
|
38
|
+
<div class="body">
|
|
39
39
|
<slot name="body" />
|
|
40
40
|
</div>
|
|
41
41
|
<div class="footer pp-4">
|
|
@@ -93,7 +93,7 @@ const ariaLabel = computed(() => i18n.t('component.drawer.chrome.ariaLabel.close
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
.body {
|
|
96
|
-
background-color: var(--
|
|
96
|
+
background-color: var(--body-bg);
|
|
97
97
|
flex: 1;
|
|
98
98
|
overflow-y: scroll;
|
|
99
99
|
}
|
|
@@ -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"
|
|
@@ -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>
|