dashboard-shell-shell 1.0.113 → 1.0.115
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/components/ActionDropdown.vue +1 -1
- package/components/ActionMenu.vue +2 -2
- package/components/ActionMenuShell.vue +0 -1
- package/components/AppModal.vue +6 -78
- package/components/AssignTo.vue +11 -25
- package/components/AsyncButton.vue +7 -24
- package/components/BannerGraphic.vue +0 -1
- package/components/ButtonDropdown.vue +4 -26
- package/components/ButtonGroup.vue +0 -4
- package/components/ButtonMultiAction.vue +0 -1
- package/components/CommunityLinks.vue +3 -3
- package/components/ConsumptionGauge.vue +5 -24
- package/components/CopyToClipboardText.vue +1 -2
- package/components/CruResource.vue +7 -12
- package/components/CruResourceFooter.vue +2 -2
- package/components/DashboardOptions.vue +15 -21
- package/components/DetailText.vue +0 -5
- package/components/DisableAuthProviderModal.vue +0 -1
- package/components/ExplorerMembers.vue +1 -1
- package/components/ExplorerProjectsNamespaces.vue +14 -56
- package/components/FixedBanner.vue +12 -19
- package/components/GlobalRoleBindings.vue +1 -5
- package/components/GrafanaDashboard.vue +4 -4
- package/components/GrowlManager.vue +1 -4
- package/components/HardwareResourceGauge.vue +3 -39
- package/components/InfoBox.vue +3 -3
- package/components/InputOrDisplay.vue +2 -28
- package/components/LabelValue.vue +1 -16
- package/components/LandingPagePreference.vue +3 -5
- package/components/LocaleSelector.vue +93 -39
- package/components/ModalWithCard.vue +0 -2
- package/components/MoveModal.vue +0 -1
- package/components/PromptChangePassword.vue +1 -1
- package/components/PromptModal.vue +2 -15
- package/components/PromptRemove.vue +8 -28
- package/components/PromptRestore.vue +0 -1
- package/components/ResourceCancelModal.vue +0 -1
- package/components/ResourceDetail/Masthead.vue +43 -188
- package/components/ResourceDetail/__tests__/Masthead.test.ts +1 -5
- package/components/ResourceDetail/index.vue +14 -49
- package/components/ResourceList/Masthead.vue +18 -80
- package/components/ResourceTable.vue +8 -3
- package/components/SideNav.vue +3 -2
- package/components/SortableTable/THead.vue +4 -10
- package/components/SortableTable/actions.js +1 -1
- package/components/SortableTable/index.vue +537 -637
- package/components/SortableTable/selection.js +11 -0
- package/components/Tabbed/Tab.vue +3 -3
- package/components/Tabbed/index.vue +26 -44
- package/components/Wizard.vue +2 -2
- package/components/__tests__/AsyncButton.test.ts +2 -2
- package/components/__tests__/FixedBanner.test.ts +3 -3
- package/components/auth/Principal.vue +3 -10
- package/components/auth/__tests__/RoleDetailEdit.test.ts +2 -3
- package/components/form/ArrayList.vue +85 -123
- package/components/form/ArrayListGrouped.vue +2 -10
- package/components/form/Command.vue +15 -6
- package/components/form/EnvVars.vue +8 -16
- package/components/form/Footer.vue +5 -8
- package/components/form/HealthCheck.vue +3 -3
- package/components/form/HookOption.vue +16 -11
- package/components/form/KeyValue.vue +7 -16
- package/components/form/LabeledSelect.vue +76 -59
- package/components/form/LifecycleHooks.vue +3 -3
- package/components/form/MatchExpressions.vue +12 -35
- package/components/form/NameNsDescription.vue +115 -147
- package/components/form/Networking.vue +12 -20
- package/components/form/NodeAffinity.vue +23 -31
- package/components/form/NodeScheduling.vue +3 -13
- package/components/form/Password.vue +5 -11
- package/components/form/PodAffinity.vue +44 -43
- package/components/form/Probe.vue +66 -68
- package/components/form/ResourceQuota/Project.vue +1 -5
- package/components/form/ResourceSelector.vue +9 -7
- package/components/form/SSHKnownHosts/KnownHostsEditDialog.vue +3 -6
- package/components/form/SSHKnownHosts/__tests__/KnownHostsEditDialog.test.ts +1 -12
- package/components/form/SSHKnownHosts/index.vue +2 -16
- package/components/form/Security.vue +56 -54
- package/components/form/Select.vue +7 -41
- package/components/form/ShellInput.vue +1 -5
- package/components/form/Tolerations.vue +1 -5
- package/components/form/UnitInput.vue +2 -2
- package/components/form/ValueFromResource.vue +121 -134
- package/components/form/WorkloadPorts.vue +18 -18
- package/components/form/__tests__/ArrayList.test.ts +2 -5
- package/components/form/__tests__/MatchExpressions.test.ts +12 -12
- package/components/form/__tests__/NameNsDescription.test.ts +14 -115
- package/components/form/__tests__/Probe.test.ts +8 -12
- package/components/form/__tests__/SSHKnownHosts.test.ts +0 -11
- package/components/form/__tests__/Select.test.ts +0 -37
- package/components/form/__tests__/UnitInput.test.ts +5 -4
- package/components/formatter/BadgeStateFormatter.vue +5 -8
- package/components/formatter/ExtensionCache.vue +74 -0
- package/components/formatter/InternalExternalIP.vue +0 -2
- package/components/formatter/Port.vue +24 -0
- package/components/formatter/SecretData.vue +7 -20
- package/components/formatter/SecretType.vue +41 -0
- package/components/nav/Favorite.vue +1 -5
- package/components/nav/Group.vue +3 -16
- package/components/nav/Header.vue +13 -39
- package/components/nav/Jump.vue +0 -7
- package/components/nav/NamespaceFilter.vue +8 -14
- package/components/nav/Pinned.vue +1 -1
- package/components/nav/TopLevelMenu.vue +17 -5
- package/components/nav/Type.vue +1 -14
- package/components/nav/__tests__/TopLevelMenu.test.ts +40 -0
- package/components/templates/blank.vue +1 -4
- package/components/templates/default.vue +0 -8
- package/components/templates/home.vue +1 -10
- package/components/templates/plain.vue +1 -10
- package/package.json +1 -1
- package/public/index.html +3 -3
- package/components/ActionDropdownShell.vue +0 -71
- package/components/DotState.vue +0 -84
- package/components/ModalManager.vue +0 -55
- package/components/SlideInPanelManager.vue +0 -126
- package/components/StatusBadge.vue +0 -77
- package/components/__tests__/ModalManager.spec.ts +0 -176
- package/components/__tests__/SlideInPanelManager.spec.ts +0 -166
|
@@ -95,12 +95,10 @@ export default {
|
|
|
95
95
|
query: { [AS]: _YAML },
|
|
96
96
|
};
|
|
97
97
|
|
|
98
|
-
const tabList = ['集群配置'];
|
|
99
98
|
return {
|
|
100
99
|
formRoute,
|
|
101
100
|
yamlRoute,
|
|
102
101
|
hasEditComponent,
|
|
103
|
-
tabList,
|
|
104
102
|
};
|
|
105
103
|
},
|
|
106
104
|
|
|
@@ -127,28 +125,6 @@ export default {
|
|
|
127
125
|
|
|
128
126
|
return this.$store.getters['type-map/labelFor'](this.schema, 99);
|
|
129
127
|
},
|
|
130
|
-
_descriptionDisplay() {
|
|
131
|
-
const key = this.$route.path.split('/').pop();
|
|
132
|
-
|
|
133
|
-
return this.$store.getters['i18n/t'](`typeDescription."${ key.toLowerCase() }"`);
|
|
134
|
-
},
|
|
135
|
-
demoDisplay() {
|
|
136
|
-
const product = this.$store.getters['productId'];
|
|
137
|
-
const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], this._createLocation.params.resource);
|
|
138
|
-
const parts = productId?.split('::');
|
|
139
|
-
const newString = 'root';
|
|
140
|
-
|
|
141
|
-
if (!parts.includes(newString)) {
|
|
142
|
-
parts.unshift(newString); // 将字符串添加到数组第一位
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
const partsEn = parts.map((item) => {
|
|
146
|
-
return this.$store.getters['i18n/t'](`typeLabel."${ item.toLowerCase() }"`);
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
return partsEn;
|
|
150
|
-
// return this.$store.getters['i18n/t'](`typeLabel."${ productId.toLowerCase() }"`)
|
|
151
|
-
},
|
|
152
128
|
|
|
153
129
|
_isYamlCreatable() {
|
|
154
130
|
if ( this.isYamlCreatable !== null) {
|
|
@@ -189,30 +165,16 @@ export default {
|
|
|
189
165
|
|
|
190
166
|
<template>
|
|
191
167
|
<header class="with-subheader">
|
|
192
|
-
|
|
168
|
+
<slot name="typeDescription">
|
|
193
169
|
<TypeDescription :resource="resource" />
|
|
194
|
-
</slot>
|
|
170
|
+
</slot>
|
|
195
171
|
<div class="title">
|
|
196
|
-
<
|
|
197
|
-
<span
|
|
198
|
-
v-for="(item,index) in demoDisplay"
|
|
199
|
-
:key="index"
|
|
200
|
-
>
|
|
201
|
-
<span>{{ item }}</span>
|
|
202
|
-
<span>/</span>
|
|
203
|
-
</span>
|
|
204
|
-
<span class="excram-last-name">{{ _typeDisplay }}</span>
|
|
205
|
-
</div>
|
|
206
|
-
<h1 class="m-0 descrip-name">
|
|
172
|
+
<h1 class="m-0">
|
|
207
173
|
<TabTitle>{{ _typeDisplay }}</TabTitle> <Favorite
|
|
208
174
|
v-if="isExplorer"
|
|
209
175
|
:resource="favoriteResource || resource"
|
|
210
176
|
/>
|
|
211
177
|
</h1>
|
|
212
|
-
<!-- 描述 -->
|
|
213
|
-
<div class="masthod-title-description">
|
|
214
|
-
{{ _descriptionDisplay }}
|
|
215
|
-
</div>
|
|
216
178
|
<ResourceLoadingIndicator
|
|
217
179
|
v-if="showIncrementalLoadingIndicator"
|
|
218
180
|
:resources="loadResources"
|
|
@@ -224,15 +186,7 @@ export default {
|
|
|
224
186
|
<!--Slot content-->
|
|
225
187
|
</slot>
|
|
226
188
|
</div>
|
|
227
|
-
<div
|
|
228
|
-
v-if="!(tabList.includes(_typeDisplay))"
|
|
229
|
-
style="width: 110%;height: 1px;background-color: #D7D7D7;margin-top: 10px;margin-bottom: 20px;margin-left: -20px;margin-right: -20px;"
|
|
230
|
-
/>
|
|
231
|
-
<div
|
|
232
|
-
v-if="!(tabList.includes(_typeDisplay))"
|
|
233
|
-
class="actions-container"
|
|
234
|
-
style="width: 100%;min-height: 32px;text-align: left"
|
|
235
|
-
>
|
|
189
|
+
<div class="actions-container">
|
|
236
190
|
<slot name="actions">
|
|
237
191
|
<div class="actions">
|
|
238
192
|
<slot name="extraActions" />
|
|
@@ -246,14 +200,14 @@ export default {
|
|
|
246
200
|
>
|
|
247
201
|
{{ _createButtonlabel }}
|
|
248
202
|
</router-link>
|
|
249
|
-
|
|
203
|
+
<router-link
|
|
250
204
|
v-else-if="_isYamlCreatable"
|
|
251
205
|
:to="_yamlCreateLocation"
|
|
252
206
|
class="btn role-primary"
|
|
253
207
|
:data-testid="componentTestid+'-create-yaml'"
|
|
254
208
|
>
|
|
255
209
|
{{ t("resourceList.head.createFromYaml") }}
|
|
256
|
-
</router-link>
|
|
210
|
+
</router-link>
|
|
257
211
|
</slot>
|
|
258
212
|
</div>
|
|
259
213
|
</slot>
|
|
@@ -263,46 +217,30 @@ export default {
|
|
|
263
217
|
|
|
264
218
|
<style lang="scss" scoped>
|
|
265
219
|
.title {
|
|
266
|
-
|
|
267
|
-
display: flex;
|
|
220
|
+
align-items: center;
|
|
221
|
+
display: flex;
|
|
268
222
|
h1 {
|
|
269
223
|
margin: 0;
|
|
270
224
|
}
|
|
271
225
|
}
|
|
272
226
|
|
|
273
227
|
header {
|
|
274
|
-
|
|
228
|
+
margin-bottom: 20px;
|
|
275
229
|
}
|
|
276
230
|
|
|
277
231
|
header.with-subheader {
|
|
278
|
-
|
|
232
|
+
grid-template-areas:
|
|
279
233
|
'type-banner type-banner'
|
|
280
234
|
'title actions'
|
|
281
235
|
'sub-header sub-header'
|
|
282
|
-
'state-banner state-banner';
|
|
283
|
-
position: relative;
|
|
284
|
-
display: unset;
|
|
236
|
+
'state-banner state-banner';
|
|
285
237
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
color: var(--primary);
|
|
294
|
-
}
|
|
295
|
-
.descrip-name{
|
|
296
|
-
font-size: 26px;
|
|
297
|
-
font-family: 'Microsoft YaHei';
|
|
298
|
-
}
|
|
299
|
-
.masthod-title-description{
|
|
300
|
-
font-family: 'Microsoft YaHei';
|
|
301
|
-
margin: 20px 0px;
|
|
302
|
-
}
|
|
303
|
-
.actions-container{
|
|
304
|
-
/* display: flex; */
|
|
305
|
-
/* margin-left: 0px; */
|
|
306
|
-
position: absolute;
|
|
238
|
+
|
|
239
|
+
.sub-header {
|
|
240
|
+
grid-area: sub-header;
|
|
241
|
+
|
|
242
|
+
a {
|
|
243
|
+
display: inline-block;
|
|
244
|
+
}
|
|
307
245
|
}
|
|
308
246
|
</style>
|
|
@@ -207,7 +207,11 @@ export default {
|
|
|
207
207
|
type: Number,
|
|
208
208
|
default: null, // Default comes from the user preference
|
|
209
209
|
},
|
|
210
|
-
|
|
210
|
+
searchPlaceholder: {
|
|
211
|
+
// search框内的输入提示
|
|
212
|
+
type: String,
|
|
213
|
+
default: '名称'
|
|
214
|
+
},
|
|
211
215
|
},
|
|
212
216
|
|
|
213
217
|
data() {
|
|
@@ -607,6 +611,7 @@ export default {
|
|
|
607
611
|
:headers="_headers"
|
|
608
612
|
:rows="filteredRows"
|
|
609
613
|
:loading="loading"
|
|
614
|
+
:search-placeholder="searchPlaceholder"
|
|
610
615
|
:alt-loading="altLoading"
|
|
611
616
|
:group-by="computedGroupBy"
|
|
612
617
|
:group="group"
|
|
@@ -680,11 +685,11 @@ export default {
|
|
|
680
685
|
class="hide"
|
|
681
686
|
@shortkey="keyAction('edit')"
|
|
682
687
|
/>
|
|
683
|
-
<button
|
|
688
|
+
<!-- <button
|
|
684
689
|
v-shortkey.once="['y']"
|
|
685
690
|
class="hide"
|
|
686
691
|
@shortkey="keyAction('yaml')"
|
|
687
|
-
/>
|
|
692
|
+
/> -->
|
|
688
693
|
<button
|
|
689
694
|
v-if="_showBulkActions"
|
|
690
695
|
v-shortkey.once="['del']"
|
package/components/SideNav.vue
CHANGED
|
@@ -20,6 +20,7 @@ import { TYPE_MODES } from '@shell/store/type-map';
|
|
|
20
20
|
import { NAME as NAVLINKS } from '@shell/config/product/navlinks';
|
|
21
21
|
import Group from '@shell/components/nav/Group';
|
|
22
22
|
import LocaleSelector from '@shell/components/LocaleSelector';
|
|
23
|
+
import { cloud2harvesterhci, harvester2cloud } from '@shell/utils/router';
|
|
23
24
|
|
|
24
25
|
export default {
|
|
25
26
|
name: 'SideNav',
|
|
@@ -154,7 +155,7 @@ export default {
|
|
|
154
155
|
},
|
|
155
156
|
|
|
156
157
|
isVirtualProduct() {
|
|
157
|
-
return this.rootProduct.name === HARVESTER;
|
|
158
|
+
return this.rootProduct.name === harvester2cloud(HARVESTER);
|
|
158
159
|
},
|
|
159
160
|
|
|
160
161
|
allNavLinks() {
|
|
@@ -236,7 +237,7 @@ export default {
|
|
|
236
237
|
|
|
237
238
|
getProductsGroups(out, loadProducts, namespaceMode, productMap) {
|
|
238
239
|
const clusterId = this.$store.getters['clusterId'];
|
|
239
|
-
const currentType = this.$route.params.resource || '';
|
|
240
|
+
const currentType = cloud2harvesterhci(this.$route.params.resource) || '';
|
|
240
241
|
|
|
241
242
|
for ( const productId of loadProducts ) {
|
|
242
243
|
const modes = [TYPE_MODES.BASIC];
|
|
@@ -273,13 +273,10 @@ export default {
|
|
|
273
273
|
v-clean-tooltip="tooltip(col)"
|
|
274
274
|
class="content"
|
|
275
275
|
>
|
|
276
|
-
<span
|
|
277
|
-
v-clean-html="labelFor(col)"
|
|
278
|
-
class="text-no-break"
|
|
279
|
-
/>
|
|
276
|
+
<span v-clean-html="labelFor(col)" />
|
|
280
277
|
<span
|
|
281
278
|
v-if="col.subLabel"
|
|
282
|
-
class="text-muted
|
|
279
|
+
class="text-muted"
|
|
283
280
|
>
|
|
284
281
|
{{ col.subLabel }}
|
|
285
282
|
</span>
|
|
@@ -299,12 +296,10 @@ export default {
|
|
|
299
296
|
<i
|
|
300
297
|
v-if="isCurrent(col) && !descending"
|
|
301
298
|
class="icon icon-sort-down icon-stack-1x"
|
|
302
|
-
:alt="t('sortableTable.alt.sortingIconDesc')"
|
|
303
299
|
/>
|
|
304
300
|
<i
|
|
305
301
|
v-if="isCurrent(col) && descending"
|
|
306
302
|
class="icon icon-sort-up icon-stack-1x"
|
|
307
|
-
:alt="t('sortableTable.alt.sortingIconAsc')"
|
|
308
303
|
/>
|
|
309
304
|
</span>
|
|
310
305
|
</div>
|
|
@@ -313,7 +308,6 @@ export default {
|
|
|
313
308
|
<th
|
|
314
309
|
v-if="rowActions && hasAdvancedFiltering && tableColsOptions.length"
|
|
315
310
|
:width="rowActionsWidth"
|
|
316
|
-
:align="'left'"
|
|
317
311
|
>
|
|
318
312
|
<div
|
|
319
313
|
ref="table-options"
|
|
@@ -462,7 +456,7 @@ export default {
|
|
|
462
456
|
}
|
|
463
457
|
|
|
464
458
|
th {
|
|
465
|
-
padding:
|
|
459
|
+
padding: 8px 5px;
|
|
466
460
|
font-weight: normal;
|
|
467
461
|
border: 0;
|
|
468
462
|
color: var(--body-text);
|
|
@@ -502,7 +496,7 @@ export default {
|
|
|
502
496
|
&:last-child {
|
|
503
497
|
padding-right: 10px;
|
|
504
498
|
padding-left: 12px;
|
|
505
|
-
|
|
499
|
+
|
|
506
500
|
}
|
|
507
501
|
|
|
508
502
|
&:not(.sortable) > SPAN {
|