dashboard-shell-shell 1.0.118 → 1.0.120
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.
|
@@ -378,6 +378,34 @@ export default {
|
|
|
378
378
|
return this.shouldHifenize ? ` - ${ displayName }` : displayName;
|
|
379
379
|
},
|
|
380
380
|
|
|
381
|
+
demoDisplay() {
|
|
382
|
+
const product = this.$store.getters['productId'];
|
|
383
|
+
|
|
384
|
+
const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], this.location.params.resource);
|
|
385
|
+
|
|
386
|
+
if (productId === undefined) {
|
|
387
|
+
return '';
|
|
388
|
+
}
|
|
389
|
+
const parts = productId.split('::');
|
|
390
|
+
const newString = 'root';
|
|
391
|
+
|
|
392
|
+
if (!parts?.includes(newString)) {
|
|
393
|
+
parts.unshift(newString); // 将字符串添加到数组第一位
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
const partsEn = parts.map((item) => {
|
|
397
|
+
return this.$store.getters['i18n/t'](`typeLabel."${ item.toLowerCase() }"`);
|
|
398
|
+
});
|
|
399
|
+
|
|
400
|
+
return partsEn;
|
|
401
|
+
},
|
|
402
|
+
menuIcon() {
|
|
403
|
+
const product = this.$store.getters['productId'];
|
|
404
|
+
|
|
405
|
+
return this.$store.getters['type-map/groupsForVirTypes'](product, this.location.params.resource);
|
|
406
|
+
},
|
|
407
|
+
|
|
408
|
+
|
|
381
409
|
location() {
|
|
382
410
|
const { parent } = this;
|
|
383
411
|
|
|
@@ -424,10 +452,80 @@ export default {
|
|
|
424
452
|
|
|
425
453
|
<template>
|
|
426
454
|
<div class="masthead">
|
|
455
|
+
<!-- 创建api密钥不需要面包屑 -->
|
|
456
|
+
<div
|
|
457
|
+
v-if="!(parentRouteOverride === 'account' && resource=== 'token')"
|
|
458
|
+
class="excram-list"
|
|
459
|
+
>
|
|
460
|
+
<span
|
|
461
|
+
v-for="(item,index) in demoDisplay"
|
|
462
|
+
:key="index"
|
|
463
|
+
>
|
|
464
|
+
<span>{{ item }}</span>
|
|
465
|
+
<span>/</span>
|
|
466
|
+
</span>
|
|
467
|
+
<span class="excram-last-name">
|
|
468
|
+
{{ (realMode === 'view'? '查看': realMode === 'edit' ? '编辑':'创建') + parent.displayName }}
|
|
469
|
+
</span>
|
|
470
|
+
</div>
|
|
427
471
|
<header>
|
|
428
472
|
<div class="title">
|
|
429
473
|
<div class="primaryheader">
|
|
430
|
-
<
|
|
474
|
+
<span class="primary-title">
|
|
475
|
+
<!-- <nuxt-link
|
|
476
|
+
v-if="location"
|
|
477
|
+
:to="location"
|
|
478
|
+
>
|
|
479
|
+
{{ parent.displayName }}:
|
|
480
|
+
</nuxt-link> -->
|
|
481
|
+
<span class="detailIcon-span">
|
|
482
|
+
<img
|
|
483
|
+
v-if="parentRouteOverride === 'account' && resource=== 'token'"
|
|
484
|
+
:src="Svg"
|
|
485
|
+
style="margin-top: 4px; margin-left: 5px;"
|
|
486
|
+
>
|
|
487
|
+
<i
|
|
488
|
+
v-else
|
|
489
|
+
:class="'icon-'+ menuIcon + ' detailIcon'"
|
|
490
|
+
/>
|
|
491
|
+
</span>
|
|
492
|
+
<span class="detailIcon-span-title">{{ realMode=== 'create'? '创建': '' }}{{ parent.displayName }}{{ realMode=== 'create'? '': '名称:' }}</span>
|
|
493
|
+
<span v-if="realMode !== 'create'">
|
|
494
|
+
<span v-if="value.detailPageHeaderActionOverride && value.detailPageHeaderActionOverride(realMode)">{{ value.detailPageHeaderActionOverride(realMode) }}</span>
|
|
495
|
+
<t
|
|
496
|
+
v-else
|
|
497
|
+
:k="'resourceDetail.header.' + realMode"
|
|
498
|
+
:subtype="resourceSubtype"
|
|
499
|
+
:name="displayName"
|
|
500
|
+
:escapehtml="false"
|
|
501
|
+
/>
|
|
502
|
+
</span>
|
|
503
|
+
<DotState
|
|
504
|
+
v-if="!isCreate && parent.showState"
|
|
505
|
+
class="masthead-state"
|
|
506
|
+
:value="value"
|
|
507
|
+
/>
|
|
508
|
+
<span
|
|
509
|
+
v-if="!isCreate && value.injectionEnabled"
|
|
510
|
+
class="masthead-istio"
|
|
511
|
+
>
|
|
512
|
+
<i
|
|
513
|
+
v-clean-tooltip="t('projectNamespaces.isIstioInjectionEnabled')"
|
|
514
|
+
class="icon icon-sm icon-istio"
|
|
515
|
+
/>
|
|
516
|
+
</span>
|
|
517
|
+
</span>
|
|
518
|
+
<span
|
|
519
|
+
v-if="location"
|
|
520
|
+
class="valid"
|
|
521
|
+
>|</span>
|
|
522
|
+
<router-link
|
|
523
|
+
v-if="location"
|
|
524
|
+
:to="location"
|
|
525
|
+
>
|
|
526
|
+
返回
|
|
527
|
+
</router-link>
|
|
528
|
+
<!-- <h1>
|
|
431
529
|
<TabTitle
|
|
432
530
|
v-if="isCreate"
|
|
433
531
|
:showChild="false"
|
|
@@ -483,9 +581,9 @@ export default {
|
|
|
483
581
|
>
|
|
484
582
|
<i class="icon icon-external-link" />
|
|
485
583
|
</a>
|
|
486
|
-
</h1>
|
|
584
|
+
</h1> -->
|
|
487
585
|
</div>
|
|
488
|
-
<div
|
|
586
|
+
<!-- <div
|
|
489
587
|
v-if="!isCreate"
|
|
490
588
|
class="subheader"
|
|
491
589
|
>
|
|
@@ -531,7 +629,7 @@ export default {
|
|
|
531
629
|
</span>
|
|
532
630
|
</span>
|
|
533
631
|
<span v-if="value.showPodRestarts">{{ t("resourceDetail.masthead.restartCount") }}:<span class="live-data"> {{ value.restartCount }}</span></span>
|
|
534
|
-
</div>
|
|
632
|
+
</div> -->
|
|
535
633
|
</div>
|
|
536
634
|
<slot name="right">
|
|
537
635
|
<div class="actions-container align-start">
|
|
@@ -604,36 +702,23 @@ export default {
|
|
|
604
702
|
<style lang='scss' scoped>
|
|
605
703
|
.masthead {
|
|
606
704
|
padding-bottom: 10px;
|
|
607
|
-
border-bottom: 1px solid var(--border);
|
|
705
|
+
/* border-bottom: 1px solid var(--border); */
|
|
608
706
|
margin-bottom: 10px;
|
|
609
707
|
}
|
|
610
708
|
|
|
611
709
|
HEADER {
|
|
612
710
|
margin: 0;
|
|
613
|
-
grid-template-columns: minmax(0, 1fr) auto;
|
|
614
711
|
}
|
|
615
712
|
|
|
616
713
|
.primaryheader {
|
|
617
714
|
display: flex;
|
|
618
715
|
flex-direction: row;
|
|
619
716
|
align-items: center;
|
|
717
|
+
font-size:14px;
|
|
718
|
+
height: 50px;
|
|
620
719
|
|
|
621
720
|
h1 {
|
|
622
|
-
margin: 0
|
|
623
|
-
overflow-x: hidden;
|
|
624
|
-
display: flex;
|
|
625
|
-
flex-direction: row;
|
|
626
|
-
align-items: center;
|
|
627
|
-
|
|
628
|
-
.masthead-resource-title {
|
|
629
|
-
text-overflow: ellipsis;
|
|
630
|
-
overflow: hidden;
|
|
631
|
-
white-space: nowrap;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
.masthead-resource-list-link {
|
|
635
|
-
margin: 5px;
|
|
636
|
-
}
|
|
721
|
+
margin: 0;
|
|
637
722
|
}
|
|
638
723
|
}
|
|
639
724
|
|
|
@@ -646,8 +731,7 @@ export default {
|
|
|
646
731
|
}
|
|
647
732
|
|
|
648
733
|
.live-data {
|
|
649
|
-
color: var(--body-text)
|
|
650
|
-
margin-left: 3px;
|
|
734
|
+
color: var(--body-text)
|
|
651
735
|
}
|
|
652
736
|
}
|
|
653
737
|
|
|
@@ -656,8 +740,12 @@ export default {
|
|
|
656
740
|
}
|
|
657
741
|
|
|
658
742
|
.masthead-state {
|
|
659
|
-
margin-left: 8px;
|
|
660
743
|
font-size: initial;
|
|
744
|
+
display: inline-block;
|
|
745
|
+
position: relative;
|
|
746
|
+
/* top: -2px; */
|
|
747
|
+
font-size: 12px;
|
|
748
|
+
margin-left: 5px;
|
|
661
749
|
}
|
|
662
750
|
|
|
663
751
|
.masthead-istio {
|
|
@@ -680,13 +768,40 @@ export default {
|
|
|
680
768
|
}
|
|
681
769
|
}
|
|
682
770
|
|
|
683
|
-
div.actions-container > div.actions {
|
|
684
|
-
display: flex;
|
|
685
|
-
flex-direction: row;
|
|
686
|
-
justify-content: flex-end;
|
|
687
|
-
}
|
|
688
|
-
|
|
689
771
|
.resource-external {
|
|
690
772
|
font-size: 18px;
|
|
691
773
|
}
|
|
774
|
+
.excram-list{
|
|
775
|
+
font-size: 14px;
|
|
776
|
+
margin-bottom: 20px;
|
|
777
|
+
}
|
|
778
|
+
.excram-last-name{
|
|
779
|
+
color: var(--link);
|
|
780
|
+
}
|
|
781
|
+
.valid{
|
|
782
|
+
color: #d7d7d7;
|
|
783
|
+
margin: 0px 10px;
|
|
784
|
+
}
|
|
785
|
+
.detailIcon-span{
|
|
786
|
+
width: 24px;
|
|
787
|
+
height: 24px;
|
|
788
|
+
display: inline-block;
|
|
789
|
+
position: relative;
|
|
790
|
+
background: var(--primary);
|
|
791
|
+
margin-right: 10px;
|
|
792
|
+
}
|
|
793
|
+
.detailIcon{
|
|
794
|
+
position: absolute;
|
|
795
|
+
color: #fff;
|
|
796
|
+
font-size: 38px;
|
|
797
|
+
left: 4px;
|
|
798
|
+
top: -2px;
|
|
799
|
+
}
|
|
800
|
+
.primary-title{
|
|
801
|
+
display: flex;
|
|
802
|
+
align-items: center;
|
|
803
|
+
}
|
|
804
|
+
.detailIcon-span-title{
|
|
805
|
+
font-weight: bold;
|
|
806
|
+
}
|
|
692
807
|
</style>
|
|
@@ -125,6 +125,28 @@ export default {
|
|
|
125
125
|
|
|
126
126
|
return this.$store.getters['type-map/labelFor'](this.schema, 99);
|
|
127
127
|
},
|
|
128
|
+
_descriptionDisplay() {
|
|
129
|
+
const key = this.$route.path.split('/').pop();
|
|
130
|
+
|
|
131
|
+
return this.$store.getters['i18n/t'](`typeDescription."${ key.toLowerCase() }"`);
|
|
132
|
+
},
|
|
133
|
+
demoDisplay() {
|
|
134
|
+
const product = this.$store.getters['productId'];
|
|
135
|
+
const productId = this.$store.getters['type-map/groupForBasicType'](this.$store.getters['productId'], this._createLocation.params.resource);
|
|
136
|
+
const parts = productId?.split('::');
|
|
137
|
+
const newString = 'root';
|
|
138
|
+
|
|
139
|
+
if (!parts.includes(newString)) {
|
|
140
|
+
parts.unshift(newString); // 将字符串添加到数组第一位
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const partsEn = parts.map((item) => {
|
|
144
|
+
return this.$store.getters['i18n/t'](`typeLabel."${ item.toLowerCase() }"`);
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
return partsEn;
|
|
148
|
+
// return this.$store.getters['i18n/t'](`typeLabel."${ productId.toLowerCase() }"`)
|
|
149
|
+
},
|
|
128
150
|
|
|
129
151
|
_isYamlCreatable() {
|
|
130
152
|
if ( this.isYamlCreatable !== null) {
|
|
@@ -165,16 +187,30 @@ export default {
|
|
|
165
187
|
|
|
166
188
|
<template>
|
|
167
189
|
<header class="with-subheader">
|
|
168
|
-
<slot name="typeDescription">
|
|
190
|
+
<!-- <slot name="typeDescription">
|
|
169
191
|
<TypeDescription :resource="resource" />
|
|
170
|
-
</slot>
|
|
192
|
+
</slot> -->
|
|
171
193
|
<div class="title">
|
|
194
|
+
<div class="excram-list">
|
|
195
|
+
<span
|
|
196
|
+
v-for="(item,index) in demoDisplay"
|
|
197
|
+
:key="index"
|
|
198
|
+
>
|
|
199
|
+
<span>{{ item }}</span>
|
|
200
|
+
<span>/</span>
|
|
201
|
+
</span>
|
|
202
|
+
<span class="excram-last-name">{{ _typeDisplay }}</span>
|
|
203
|
+
</div>
|
|
172
204
|
<h1 class="m-0">
|
|
173
205
|
<TabTitle>{{ _typeDisplay }}</TabTitle> <Favorite
|
|
174
206
|
v-if="isExplorer"
|
|
175
207
|
:resource="favoriteResource || resource"
|
|
176
208
|
/>
|
|
177
209
|
</h1>
|
|
210
|
+
<!-- 描述 -->
|
|
211
|
+
<div class="masthod-title-description">
|
|
212
|
+
{{ _descriptionDisplay }}
|
|
213
|
+
</div>
|
|
178
214
|
<ResourceLoadingIndicator
|
|
179
215
|
v-if="showIncrementalLoadingIndicator"
|
|
180
216
|
:resources="loadResources"
|
|
@@ -186,7 +222,15 @@ export default {
|
|
|
186
222
|
<!--Slot content-->
|
|
187
223
|
</slot>
|
|
188
224
|
</div>
|
|
189
|
-
<div
|
|
225
|
+
<div
|
|
226
|
+
v-if="!(tabList.includes(_typeDisplay))"
|
|
227
|
+
style="width: 110%;height: 1px;background-color: #D7D7D7;margin-top: 10px;margin-bottom: 20px;margin-left: -20px;margin-right: -20px;"
|
|
228
|
+
/>
|
|
229
|
+
<div
|
|
230
|
+
v-if="!(tabList.includes(_typeDisplay))"
|
|
231
|
+
class="actions-container"
|
|
232
|
+
style="width: 100%;min-height: 32px;text-align: left"
|
|
233
|
+
>
|
|
190
234
|
<slot name="actions">
|
|
191
235
|
<div class="actions">
|
|
192
236
|
<slot name="extraActions" />
|
|
@@ -200,14 +244,14 @@ export default {
|
|
|
200
244
|
>
|
|
201
245
|
{{ _createButtonlabel }}
|
|
202
246
|
</router-link>
|
|
203
|
-
<router-link
|
|
247
|
+
<!-- <router-link
|
|
204
248
|
v-else-if="_isYamlCreatable"
|
|
205
249
|
:to="_yamlCreateLocation"
|
|
206
250
|
class="btn role-primary"
|
|
207
251
|
:data-testid="componentTestid+'-create-yaml'"
|
|
208
252
|
>
|
|
209
253
|
{{ t("resourceList.head.createFromYaml") }}
|
|
210
|
-
</router-link>
|
|
254
|
+
</router-link> -->
|
|
211
255
|
</slot>
|
|
212
256
|
</div>
|
|
213
257
|
</slot>
|
|
@@ -217,30 +261,46 @@ export default {
|
|
|
217
261
|
|
|
218
262
|
<style lang="scss" scoped>
|
|
219
263
|
.title {
|
|
220
|
-
align-items: center;
|
|
221
|
-
display: flex;
|
|
264
|
+
/* align-items: center;
|
|
265
|
+
display: flex; */
|
|
222
266
|
h1 {
|
|
223
267
|
margin: 0;
|
|
224
268
|
}
|
|
225
269
|
}
|
|
226
270
|
|
|
227
271
|
header {
|
|
228
|
-
margin-bottom: 20px;
|
|
272
|
+
/* margin-bottom: 20px; */
|
|
229
273
|
}
|
|
230
274
|
|
|
231
275
|
header.with-subheader {
|
|
232
|
-
grid-template-areas:
|
|
276
|
+
/* grid-template-areas:
|
|
233
277
|
'type-banner type-banner'
|
|
234
278
|
'title actions'
|
|
235
279
|
'sub-header sub-header'
|
|
236
|
-
'state-banner state-banner';
|
|
280
|
+
'state-banner state-banner'; */
|
|
281
|
+
position: relative;
|
|
282
|
+
display: unset;
|
|
237
283
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
284
|
+
.excram-list{
|
|
285
|
+
font-size: 14px;
|
|
286
|
+
line-height: 22px;
|
|
287
|
+
margin-bottom: 20px;
|
|
288
|
+
font-family: 'Microsoft YaHei';
|
|
289
|
+
}
|
|
290
|
+
.excram-last-name{
|
|
291
|
+
color: var(--primary);
|
|
292
|
+
}
|
|
293
|
+
.descrip-name{
|
|
294
|
+
font-size: 26px;
|
|
295
|
+
font-family: 'Microsoft YaHei';
|
|
296
|
+
}
|
|
297
|
+
.masthod-title-description{
|
|
298
|
+
font-family: 'Microsoft YaHei';
|
|
299
|
+
margin: 20px 0px;
|
|
300
|
+
}
|
|
301
|
+
.actions-container{
|
|
302
|
+
/* display: flex; */
|
|
303
|
+
/* margin-left: 0px; */
|
|
304
|
+
position: absolute;
|
|
245
305
|
}
|
|
246
306
|
</style>
|
|
@@ -8,6 +8,7 @@ import { get, clone } from '@shell/utils/object';
|
|
|
8
8
|
import { removeObject } from '@shell/utils/array';
|
|
9
9
|
import { Checkbox } from '@components/Form/Checkbox';
|
|
10
10
|
import AsyncButton, { ASYNC_BUTTON_STATES } from '@shell/components/AsyncButton';
|
|
11
|
+
import Select from '@shell/components/form/Select';
|
|
11
12
|
import ActionDropdown from '@shell/components/ActionDropdown';
|
|
12
13
|
import throttle from 'lodash/throttle';
|
|
13
14
|
import debounce from 'lodash/debounce';
|
|
@@ -55,6 +56,7 @@ export default {
|
|
|
55
56
|
components: {
|
|
56
57
|
THead,
|
|
57
58
|
Checkbox,
|
|
59
|
+
Select,
|
|
58
60
|
AsyncButton,
|
|
59
61
|
ActionDropdown,
|
|
60
62
|
LabeledSelect,
|
|
@@ -375,7 +377,25 @@ export default {
|
|
|
375
377
|
manualRefreshButtonSize: {
|
|
376
378
|
type: String,
|
|
377
379
|
default: ''
|
|
378
|
-
}
|
|
380
|
+
},
|
|
381
|
+
isBanner: {
|
|
382
|
+
// Show isBanner input to filter rows
|
|
383
|
+
type: Boolean,
|
|
384
|
+
default: false
|
|
385
|
+
},
|
|
386
|
+
marginTopValue: {
|
|
387
|
+
type: Number,
|
|
388
|
+
default: 0
|
|
389
|
+
},
|
|
390
|
+
isFilterLabel: {
|
|
391
|
+
type: Boolean,
|
|
392
|
+
default: false
|
|
393
|
+
},
|
|
394
|
+
searchPlaceholder: {
|
|
395
|
+
// search框内的输入提示
|
|
396
|
+
type: String,
|
|
397
|
+
default: ''
|
|
398
|
+
},
|
|
379
399
|
|
|
380
400
|
},
|
|
381
401
|
|
|
@@ -391,11 +411,19 @@ export default {
|
|
|
391
411
|
|
|
392
412
|
const isLoading = this.loading || false;
|
|
393
413
|
|
|
414
|
+
let isCreatable = false;
|
|
415
|
+
const lastPath = his.$route.path.split('/').pop();
|
|
416
|
+
|
|
417
|
+
if (lastPath.includes('.')) {
|
|
418
|
+
isCreatable = this.$store.getters['type-map/optionsFor'](lastPath).isCreatable;
|
|
419
|
+
}
|
|
420
|
+
|
|
394
421
|
return {
|
|
395
422
|
refreshButtonPhase: isLoading ? ASYNC_BUTTON_STATES.WAITING : ASYNC_BUTTON_STATES.ACTION,
|
|
396
423
|
expanded: {},
|
|
397
424
|
searchQuery,
|
|
398
425
|
eventualSearchQuery,
|
|
426
|
+
optionsFor,
|
|
399
427
|
subMatches: null,
|
|
400
428
|
actionOfInterest: null,
|
|
401
429
|
loadingDelay: false,
|
|
@@ -1370,7 +1398,7 @@ export default {
|
|
|
1370
1398
|
type="search"
|
|
1371
1399
|
class="input-sm search-box"
|
|
1372
1400
|
:aria-label="t('sortableTable.searchLabel')"
|
|
1373
|
-
:placeholder="t('sortableTable.search')"
|
|
1401
|
+
:placeholder="t('sortableTable.search')+searchPlaceholder"
|
|
1374
1402
|
>
|
|
1375
1403
|
|
|
1376
1404
|
</div>
|