dashboard-shell-shell 1.0.1000000117 → 1.0.1000000118
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/_functions.scss +0 -0
- package/assets/styles/base/_mixins.scss +1 -1
- package/assets/styles/global/_button.scss +10 -17
- package/assets/styles/global/_form.scss +2 -2
- package/assets/styles/global/_labeled-input.scss +2 -6
- package/assets/styles/global/_select.scss +7 -6
- package/assets/styles/global/_table.scss +2 -3
- package/assets/styles/global/_tooltip.scss +1 -8
- package/assets/styles/themes/_dark.scss +0 -2
- package/assets/styles/themes/_light.scss +2 -5
- package/assets/styles/vendor/vue-select.scss +1 -2
- package/assets/translations/en-us.yaml +3 -1
- package/assets/translations/zh-hans.yaml +28 -51
- package/components/ActionDropdown.vue +0 -1
- package/components/ActionMenuShell.vue +3 -6
- package/components/BrandImage.vue +0 -22
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +0 -1
- package/components/CruResource.vue +1 -1
- package/components/CruResourceFooter.vue +1 -1
- package/components/ExplorerProjectsNamespaces.vue +24 -4
- package/components/GlobalRoleBindings.vue +48 -112
- package/components/IndentedPanel.vue +10 -4
- package/components/PromptRemove.vue +3 -3
- package/components/ResourceDetail/Masthead.vue +242 -190
- package/components/ResourceDetail/index.vue +5 -20
- package/components/ResourceList/Masthead.vue +84 -146
- package/components/ResourceList/ResourceLoadingIndicator.vue +2 -5
- package/components/ResourceTable.vue +1 -76
- package/components/SideNav.vue +29 -66
- package/components/SortableTable/THead.vue +0 -6
- package/components/SortableTable/index.vue +388 -481
- package/components/Tabbed/index.vue +5 -4
- package/components/auth/Principal.vue +2 -3
- package/components/auth/RoleDetailEdit.vue +5 -58
- package/components/auth/SelectPrincipal.vue +0 -1
- package/components/form/BannerSettings.vue +16 -18
- package/components/form/ChangePassword.vue +4 -4
- package/components/form/ColorInput.vue +8 -32
- package/components/form/Footer.vue +1 -1
- package/components/form/InputWithSelect.vue +0 -2
- package/components/form/KeyValue.vue +7 -31
- package/components/form/LabeledSelect.vue +178 -178
- package/components/form/Members/ClusterPermissionsEditor.vue +2 -1
- package/components/form/Members/MembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +11 -24
- package/components/form/Password.vue +2 -6
- package/components/form/ResourceQuota/Namespace.vue +1 -1
- package/components/form/ResourceQuota/NamespaceRow.vue +10 -13
- package/components/form/ResourceQuota/ProjectRow.vue +1 -0
- package/components/form/Select.vue +2 -2
- package/components/nav/Favorite.vue +1 -5
- package/components/nav/Group.vue +23 -69
- package/components/nav/Header.vue +17 -82
- package/components/nav/HeaderPageActionMenu.vue +0 -1
- package/components/nav/NamespaceFilter.vue +3 -0
- package/components/nav/TopLevelMenu.vue +119 -182
- package/components/nav/Type.vue +11 -48
- package/components/rancherResourceDetail/Masthead.vue +769 -0
- package/components/rancherResourceDetail/__tests__/Masthead.test.ts +65 -0
- package/components/rancherResourceDetail/index.vue +591 -0
- package/components/rancherResourceList/Masthead.vue +375 -0
- package/components/rancherResourceList/ResourceLoadingIndicator.vue +140 -0
- package/components/rancherResourceList/index.vue +307 -0
- package/components/rancherResourceList/resource-list.config.js +7 -0
- package/components/rancherResourceTable.vue +783 -0
- package/components/rancherSortableTable/THead.vue +561 -0
- package/components/rancherSortableTable/actions.js +153 -0
- package/components/rancherSortableTable/advanced-filtering.js +272 -0
- package/components/rancherSortableTable/debug.js +117 -0
- package/components/rancherSortableTable/filtering.js +290 -0
- package/components/rancherSortableTable/grouping.js +48 -0
- package/components/rancherSortableTable/index.vue +2712 -0
- package/components/rancherSortableTable/paging.js +155 -0
- package/components/rancherSortableTable/selection.js +629 -0
- package/components/rancherSortableTable/sortable-config.ts +4 -0
- package/components/rancherSortableTable/sorting.js +129 -0
- package/composables/useClickOutside.ts +1 -1
- package/config/product/auth.js +7 -16
- package/config/product/explorer.js +1 -1
- package/config/product/settings.js +8 -17
- package/config/settings.ts +0 -28
- package/edit/management.cattle.io.user.vue +4 -17
- package/edit/networking.k8s.io.ingress/RulePath.vue +1 -1
- package/edit/token.vue +1 -1
- package/list/harvesterhci.io.management.cluster.vue +0 -17
- package/list/management.cattle.io.setting.vue +13 -22
- package/list/management.cattle.io.user.vue +14 -25
- package/list/provisioning.cattle.io.cluster.vue +7 -6
- package/mixins/brand.js +0 -17
- package/package.json +1 -1
- package/pages/auth/login.vue +29 -84
- package/pages/c/_cluster/auth/roles/index.vue +14 -61
- package/pages/c/_cluster/settings/banners.vue +101 -174
- package/pages/c/_cluster/settings/brand.vue +301 -348
- package/pages/c/_cluster/settings/performance.vue +38 -61
- package/pages/home.vue +21 -70
- package/pages/prefs.vue +23 -25
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.js +1 -1
- package/promptRemove/mixin/roleDeletionCheck.js +2 -2
- package/scripts/clean +0 -0
- package/scripts/extension/bundle +0 -0
- package/scripts/extension/helm/scripts/package +0 -0
- package/scripts/extension/helm/scripts/patch +0 -0
- package/scripts/extension/helm/scripts/version +0 -0
- package/scripts/extension/helmpatch +0 -0
- package/scripts/extension/parse-tag-name +0 -0
- package/scripts/extension/publish +0 -0
- package/scripts/publish-shell.sh +60 -86
- package/scripts/serve-pkgs +0 -0
- package/scripts/sync-shell-deps +0 -0
- package/scripts/typegen.sh +28 -44
- package/store/i18n.js +5 -5
- package/store/prefs.js +5 -17
- package/store/type-map.js +1 -2
- package/types/cloud-shell/index.d.ts +11014 -0
- package/types/shell/index.d.ts +1 -1
- package/utils/error.js +0 -4
- package/utils/router.js +3 -3
- package/vue.config.js +6 -1
- package/assets/images/action.svg +0 -6
- package/assets/images/pl/logo.png +0 -0
- /package/components/{ResourceList → rancherResourceList}/Masthead-btn.vue +0 -0
|
@@ -368,12 +368,13 @@ export default {
|
|
|
368
368
|
padding: 0;
|
|
369
369
|
|
|
370
370
|
&.horizontal {
|
|
371
|
-
border
|
|
371
|
+
border: solid thin var(--border);
|
|
372
|
+
border-bottom: 0;
|
|
372
373
|
display: flex;
|
|
373
374
|
flex-direction: row;
|
|
374
375
|
|
|
375
376
|
+ .tab-container {
|
|
376
|
-
|
|
377
|
+
border: solid thin var(--border);
|
|
377
378
|
}
|
|
378
379
|
|
|
379
380
|
.tab.active {
|
|
@@ -442,7 +443,7 @@ export default {
|
|
|
442
443
|
}
|
|
443
444
|
|
|
444
445
|
.tab-container {
|
|
445
|
-
padding: 20px
|
|
446
|
+
padding: 20px;
|
|
446
447
|
|
|
447
448
|
&.no-content {
|
|
448
449
|
padding: 0 0 3px 0;
|
|
@@ -498,7 +499,7 @@ margin: 0px -20px;
|
|
|
498
499
|
// }
|
|
499
500
|
& .tab {
|
|
500
501
|
/* width: 100%; */
|
|
501
|
-
min-width:
|
|
502
|
+
min-width: 120px;
|
|
502
503
|
height: 36px;
|
|
503
504
|
/* border-top: solid 5px transparent; */
|
|
504
505
|
display: flex;
|
|
@@ -154,7 +154,7 @@ export default {
|
|
|
154
154
|
</template>
|
|
155
155
|
|
|
156
156
|
<style lang="scss" scoped>
|
|
157
|
-
$size:
|
|
157
|
+
$size: 40px;
|
|
158
158
|
|
|
159
159
|
.principal {
|
|
160
160
|
display: grid;
|
|
@@ -162,7 +162,7 @@ export default {
|
|
|
162
162
|
"avatar name"
|
|
163
163
|
"avatar description";
|
|
164
164
|
grid-template-columns: $size auto;
|
|
165
|
-
|
|
165
|
+
grid-template-rows: auto math.div($size, 2);
|
|
166
166
|
column-gap: 10px;
|
|
167
167
|
|
|
168
168
|
th {
|
|
@@ -189,7 +189,6 @@ export default {
|
|
|
189
189
|
.avatar {
|
|
190
190
|
grid-area: avatar;
|
|
191
191
|
text-align: center;
|
|
192
|
-
|
|
193
192
|
|
|
194
193
|
DIV.empty {
|
|
195
194
|
border: 1px solid var(--border);
|
|
@@ -331,7 +331,7 @@ export default {
|
|
|
331
331
|
return this.value.listLocation;
|
|
332
332
|
},
|
|
333
333
|
ruleClass() {
|
|
334
|
-
return `
|
|
334
|
+
return `col ${ this.isNamespaced ? 'span-4' : 'span-3' }`;
|
|
335
335
|
},
|
|
336
336
|
// Detail View
|
|
337
337
|
rules() {
|
|
@@ -536,11 +536,7 @@ export default {
|
|
|
536
536
|
</script>
|
|
537
537
|
|
|
538
538
|
<template>
|
|
539
|
-
|
|
540
|
-
<!-- 加载状态下显示 Loading 组件 -->
|
|
541
539
|
<Loading v-if="$fetchState.pending" />
|
|
542
|
-
|
|
543
|
-
<!-- 主表单容器,基于 CruResource 封装 -->
|
|
544
540
|
<CruResource
|
|
545
541
|
v-else
|
|
546
542
|
class="receiver"
|
|
@@ -554,10 +550,7 @@ export default {
|
|
|
554
550
|
@finish="save"
|
|
555
551
|
@cancel="cancel"
|
|
556
552
|
>
|
|
557
|
-
<!-- ========== 详情模式显示规则表 ========== -->
|
|
558
553
|
<template v-if="isDetail">
|
|
559
|
-
|
|
560
|
-
<!-- 当前规则列表 -->
|
|
561
554
|
<SortableTable
|
|
562
555
|
key-field="index"
|
|
563
556
|
:rows="rules"
|
|
@@ -566,8 +559,6 @@ export default {
|
|
|
566
559
|
:row-actions="false"
|
|
567
560
|
:search="false"
|
|
568
561
|
/>
|
|
569
|
-
|
|
570
|
-
<!-- 继承的规则列表 -->
|
|
571
562
|
<div
|
|
572
563
|
v-for="(inherited, index) of inheritedRules"
|
|
573
564
|
:key="index"
|
|
@@ -589,11 +580,7 @@ export default {
|
|
|
589
580
|
/>
|
|
590
581
|
</div>
|
|
591
582
|
</template>
|
|
592
|
-
|
|
593
|
-
<!-- ========== 表单编辑/创建模式 ========== -->
|
|
594
583
|
<template v-else>
|
|
595
|
-
|
|
596
|
-
<!-- 名称 & 命名空间 & 描述输入 -->
|
|
597
584
|
<NameNsDescription
|
|
598
585
|
:value="value"
|
|
599
586
|
:namespaced="isNamespaced"
|
|
@@ -604,15 +591,11 @@ export default {
|
|
|
604
591
|
:rules="{ name: fvGetAndReportPathRules('displayName') }"
|
|
605
592
|
@update:value="$emit('input', $event)"
|
|
606
593
|
/>
|
|
607
|
-
|
|
608
|
-
<!-- Rancher 相关的默认选项设置 -->
|
|
609
594
|
<div
|
|
610
595
|
v-if="isRancherType"
|
|
611
596
|
class="row"
|
|
612
597
|
>
|
|
613
598
|
<div class="col span-6">
|
|
614
|
-
|
|
615
|
-
<!-- 默认角色选项 -->
|
|
616
599
|
<RadioGroup
|
|
617
600
|
v-model:value="defaultValue"
|
|
618
601
|
name="storageSource"
|
|
@@ -623,8 +606,6 @@ export default {
|
|
|
623
606
|
:mode="mode"
|
|
624
607
|
/>
|
|
625
608
|
</div>
|
|
626
|
-
|
|
627
|
-
<!-- 锁定角色模板选项 -->
|
|
628
609
|
<div
|
|
629
610
|
v-if="isRancherRoleTemplate"
|
|
630
611
|
class="col span-6"
|
|
@@ -641,25 +622,17 @@ export default {
|
|
|
641
622
|
</div>
|
|
642
623
|
</div>
|
|
643
624
|
<div class="spacer" />
|
|
644
|
-
|
|
645
|
-
<!-- ========== 选项卡容器 ========== -->
|
|
646
625
|
<Tabbed :side-tabs="true">
|
|
647
|
-
|
|
648
|
-
<!-- ---------- 授权资源 Tab ---------- -->
|
|
649
626
|
<Tab
|
|
650
627
|
name="grant-resources"
|
|
651
628
|
:label="t('rbac.roletemplate.tabs.grantResources.label')"
|
|
652
629
|
:weight="1"
|
|
653
630
|
>
|
|
654
|
-
|
|
655
|
-
<!-- 校验错误展示 -->
|
|
656
631
|
<Error
|
|
657
632
|
:value="value.rules"
|
|
658
633
|
:rules="fvGetAndReportPathRules('rules')"
|
|
659
634
|
as-banner
|
|
660
635
|
/>
|
|
661
|
-
|
|
662
|
-
<!-- 规则编辑列表 -->
|
|
663
636
|
<ArrayList
|
|
664
637
|
v-model:value="value.rules"
|
|
665
638
|
label="Resources"
|
|
@@ -669,11 +642,9 @@ export default {
|
|
|
669
642
|
:default-add-value="defaultRule"
|
|
670
643
|
:initial-empty-row="true"
|
|
671
644
|
:show-header="true"
|
|
672
|
-
add-label="
|
|
645
|
+
add-label="Add Resource"
|
|
673
646
|
:mode="mode"
|
|
674
647
|
>
|
|
675
|
-
|
|
676
|
-
<!-- 列表头部 -->
|
|
677
648
|
<template #column-headers>
|
|
678
649
|
<div class="column-headers row">
|
|
679
650
|
<div :class="ruleClass">
|
|
@@ -705,12 +676,8 @@ export default {
|
|
|
705
676
|
</div>
|
|
706
677
|
</div>
|
|
707
678
|
</template>
|
|
708
|
-
|
|
709
|
-
<!-- 列内容渲染 -->
|
|
710
679
|
<template #columns="props">
|
|
711
680
|
<div class="columns row mr-20">
|
|
712
|
-
|
|
713
|
-
<!-- 动作(verbs)选择 -->
|
|
714
681
|
<div :class="ruleClass">
|
|
715
682
|
<!-- Select verbs -->
|
|
716
683
|
<Select
|
|
@@ -727,11 +694,8 @@ export default {
|
|
|
727
694
|
@update:value="updateSelectValue(props.row.value, 'verbs', $event)"
|
|
728
695
|
/>
|
|
729
696
|
</div>
|
|
730
|
-
|
|
731
|
-
<!-- 资源(resources)选择 -->
|
|
732
697
|
<div :class="ruleClass">
|
|
733
698
|
<Select
|
|
734
|
-
style="width: auto;"
|
|
735
699
|
:value="getRule('resources', props.row.value)"
|
|
736
700
|
:disabled="isBuiltin"
|
|
737
701
|
:options="resourceOptions"
|
|
@@ -745,8 +709,6 @@ export default {
|
|
|
745
709
|
@createdListItem="setRule('resources', props.row.value, $event)"
|
|
746
710
|
/>
|
|
747
711
|
</div>
|
|
748
|
-
|
|
749
|
-
<!-- API Groups 输入 -->
|
|
750
712
|
<div :class="ruleClass">
|
|
751
713
|
<LabeledInput
|
|
752
714
|
:value="getRule('apiGroups', props.row.value)"
|
|
@@ -756,8 +718,6 @@ export default {
|
|
|
756
718
|
@input="setRule('apiGroups', props.row.value, $event.target.value)"
|
|
757
719
|
/>
|
|
758
720
|
</div>
|
|
759
|
-
|
|
760
|
-
<!-- 非命名空间 URL 输入(仅非命名空间模式显示) -->
|
|
761
721
|
<div
|
|
762
722
|
v-if="!isNamespaced"
|
|
763
723
|
:class="ruleClass"
|
|
@@ -774,8 +734,6 @@ export default {
|
|
|
774
734
|
</template>
|
|
775
735
|
</ArrayList>
|
|
776
736
|
</Tab>
|
|
777
|
-
|
|
778
|
-
<!-- ---------- 继承角色模板 Tab(仅 Rancher 角色模板可用) ---------- -->
|
|
779
737
|
<Tab
|
|
780
738
|
v-if="isRancherRoleTemplate"
|
|
781
739
|
name="inherit-from"
|
|
@@ -788,7 +746,7 @@ export default {
|
|
|
788
746
|
:remove-allowed="!isBuiltin"
|
|
789
747
|
:add-allowed="!isBuiltin"
|
|
790
748
|
label="Resources"
|
|
791
|
-
add-label="
|
|
749
|
+
add-label="Add Resource"
|
|
792
750
|
:mode="mode"
|
|
793
751
|
>
|
|
794
752
|
<template #columns="props">
|
|
@@ -819,16 +777,13 @@ export default {
|
|
|
819
777
|
</template>
|
|
820
778
|
|
|
821
779
|
<style lang="scss" scoped>
|
|
822
|
-
.ruleCls {
|
|
823
|
-
margin-right: 10px;
|
|
824
|
-
}
|
|
825
780
|
.required {
|
|
826
781
|
color: var(--error);
|
|
827
782
|
}
|
|
828
783
|
|
|
829
784
|
:deep() {
|
|
830
785
|
.column-headers {
|
|
831
|
-
margin-right:
|
|
786
|
+
margin-right: 75px;
|
|
832
787
|
margin-bottom: 5px;
|
|
833
788
|
}
|
|
834
789
|
|
|
@@ -838,6 +793,7 @@ export default {
|
|
|
838
793
|
.remove {
|
|
839
794
|
display: flex;
|
|
840
795
|
flex-direction: column;
|
|
796
|
+
justify-content: center;
|
|
841
797
|
align-items: flex-end;
|
|
842
798
|
}
|
|
843
799
|
}
|
|
@@ -849,13 +805,4 @@ export default {
|
|
|
849
805
|
}
|
|
850
806
|
}
|
|
851
807
|
}
|
|
852
|
-
|
|
853
|
-
.columns {
|
|
854
|
-
:deep() {
|
|
855
|
-
.unlabeled-select {
|
|
856
|
-
width: auto;
|
|
857
|
-
}
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
}
|
|
861
808
|
</style>
|
|
@@ -104,10 +104,10 @@ export default ({
|
|
|
104
104
|
</script>
|
|
105
105
|
|
|
106
106
|
<template>
|
|
107
|
-
<div class="row">
|
|
107
|
+
<div class="row mb-20">
|
|
108
108
|
<div class="col span-12">
|
|
109
109
|
<div class="row">
|
|
110
|
-
<div class="col span-
|
|
110
|
+
<div class="col span-6">
|
|
111
111
|
<LabeledInput
|
|
112
112
|
v-model:value="value[bannerType].text"
|
|
113
113
|
:disabled="isUiDisabled"
|
|
@@ -154,20 +154,18 @@ export default ({
|
|
|
154
154
|
<h3>
|
|
155
155
|
{{ t('banner.bannerDecoration.label') }}
|
|
156
156
|
</h3>
|
|
157
|
-
<div
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
/>
|
|
170
|
-
</div>
|
|
157
|
+
<div
|
|
158
|
+
v-for="(o, i) in textDecorationOptions"
|
|
159
|
+
:key="i"
|
|
160
|
+
>
|
|
161
|
+
<Checkbox
|
|
162
|
+
v-model:value="value[bannerType][o.style]"
|
|
163
|
+
name="bannerDecoration"
|
|
164
|
+
:data-testid="`banner_decoration_checkbox${bannerType}${o.label}`"
|
|
165
|
+
class="banner-decoration-checkbox"
|
|
166
|
+
:mode="mode"
|
|
167
|
+
:label="o.label"
|
|
168
|
+
/>
|
|
171
169
|
</div>
|
|
172
170
|
</div>
|
|
173
171
|
<div class="col span-2">
|
|
@@ -181,7 +179,7 @@ export default ({
|
|
|
181
179
|
</div>
|
|
182
180
|
</div>
|
|
183
181
|
<div class="row mt-10">
|
|
184
|
-
<div class="col span-
|
|
182
|
+
<div class="col span-6">
|
|
185
183
|
<ColorInput
|
|
186
184
|
v-model:value="value[bannerType].color"
|
|
187
185
|
:default-value="themeVars.bannerTextColor"
|
|
@@ -189,7 +187,7 @@ export default ({
|
|
|
189
187
|
:mode="mode"
|
|
190
188
|
/>
|
|
191
189
|
</div>
|
|
192
|
-
<div class="col span-
|
|
190
|
+
<div class="col span-6">
|
|
193
191
|
<ColorInput
|
|
194
192
|
v-model:value="value[bannerType].background"
|
|
195
193
|
:default-value="themeVars.bannerBgColor"
|
|
@@ -353,7 +353,7 @@ export default {
|
|
|
353
353
|
v-if="isRandomGenerated"
|
|
354
354
|
:class="{'row': isCreateEdit}"
|
|
355
355
|
>
|
|
356
|
-
<div :class="{'col': isCreateEdit, 'span-
|
|
356
|
+
<div :class="{'col': isCreateEdit, 'span-8': isCreateEdit}">
|
|
357
357
|
<Password
|
|
358
358
|
v-model:value="passwordGen"
|
|
359
359
|
class="mt-10"
|
|
@@ -368,7 +368,7 @@ export default {
|
|
|
368
368
|
class="userGen"
|
|
369
369
|
:class="{'row': isCreateEdit}"
|
|
370
370
|
>
|
|
371
|
-
<div :class="{'col': isCreateEdit, 'span-
|
|
371
|
+
<div :class="{'col': isCreateEdit, 'span-4': isCreateEdit}">
|
|
372
372
|
<Password
|
|
373
373
|
v-model:value="passwordNew"
|
|
374
374
|
data-testid="account__new_password"
|
|
@@ -378,7 +378,7 @@ export default {
|
|
|
378
378
|
:ignore-password-managers="!isChange"
|
|
379
379
|
/>
|
|
380
380
|
</div>
|
|
381
|
-
<div :class="{'col': isCreateEdit, 'span-
|
|
381
|
+
<div :class="{'col': isCreateEdit, 'span-4': isCreateEdit}">
|
|
382
382
|
<Password
|
|
383
383
|
v-model:value="passwordConfirm"
|
|
384
384
|
data-testid="account__confirm_password"
|
|
@@ -403,7 +403,7 @@ export default {
|
|
|
403
403
|
class="text-error"
|
|
404
404
|
:class="{'row': isCreateEdit}"
|
|
405
405
|
>
|
|
406
|
-
<div :class="{'col': isCreateEdit, 'span-
|
|
406
|
+
<div :class="{'col': isCreateEdit, 'span-8': isCreateEdit}">
|
|
407
407
|
<Banner
|
|
408
408
|
v-for="(err, i) in errorMessages"
|
|
409
409
|
:key="i"
|
|
@@ -93,7 +93,8 @@ export default {
|
|
|
93
93
|
|
|
94
94
|
<template>
|
|
95
95
|
<div
|
|
96
|
-
class="color-input
|
|
96
|
+
class="color-input"
|
|
97
|
+
:class="{[mode]:mode, disabled: isDisabled}"
|
|
97
98
|
:data-testid="componentTestid + '-color-input'"
|
|
98
99
|
:tabindex="isDisabled ? -1 : 0"
|
|
99
100
|
@keydown.space.prevent
|
|
@@ -106,7 +107,6 @@ export default {
|
|
|
106
107
|
/>{{ label }}</label>
|
|
107
108
|
<div
|
|
108
109
|
:data-testid="componentTestid + '-color-input_preview-container'"
|
|
109
|
-
:class="{[mode]:mode, disabled: isDisabled}"
|
|
110
110
|
class="preview-container"
|
|
111
111
|
@click.stop="$refs.input.click($event)"
|
|
112
112
|
>
|
|
@@ -115,30 +115,27 @@ export default {
|
|
|
115
115
|
class="color-display"
|
|
116
116
|
>
|
|
117
117
|
<input
|
|
118
|
-
style="margin-bottom: 6px;"
|
|
119
118
|
ref="input"
|
|
120
119
|
:aria-disabled="isDisabled ? 'true' : 'false'"
|
|
121
120
|
:aria-label="t('generic.colorPicker')"
|
|
122
121
|
type="color"
|
|
123
|
-
class="color-input"
|
|
124
122
|
:disabled="isDisabled"
|
|
125
123
|
tabindex="-1"
|
|
126
124
|
:value="inputValue"
|
|
127
125
|
@input="$emit('update:value', $event.target.value)"
|
|
128
126
|
>
|
|
129
127
|
</span>
|
|
130
|
-
<span class="color-value">{{ inputValue }}</span>
|
|
128
|
+
<span class="text-muted color-value">{{ inputValue }}</span>
|
|
131
129
|
</div>
|
|
132
130
|
</div>
|
|
133
131
|
</template>
|
|
134
132
|
|
|
135
133
|
<style lang='scss' scoped>
|
|
136
|
-
.color-input
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
134
|
+
.color-input {
|
|
135
|
+
border: 1px solid var(--border);
|
|
136
|
+
border-radius: var(--border-radius);
|
|
137
|
+
padding: 10px;
|
|
138
|
+
|
|
142
139
|
&:focus-visible {
|
|
143
140
|
@include focus-outline;
|
|
144
141
|
}
|
|
@@ -175,26 +172,6 @@ export default {
|
|
|
175
172
|
|
|
176
173
|
.color-value {
|
|
177
174
|
margin-left: 4px;
|
|
178
|
-
color: var(--input-label);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
&.disabled, &.disabled .selected, &[disabled], &[disabled]:hover {
|
|
182
|
-
color: var(--input-disabled-text);
|
|
183
|
-
outline-width: 0;
|
|
184
|
-
border-color: var(--input-disabled-border);
|
|
185
|
-
cursor: not-allowed;
|
|
186
|
-
|
|
187
|
-
label, span, div, input {
|
|
188
|
-
cursor: not-allowed !important;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.color-value {
|
|
192
|
-
color: var(--muted);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
&::placeholder {
|
|
196
|
-
color: var(--input-disabled-placeholder);
|
|
197
|
-
}
|
|
198
175
|
}
|
|
199
176
|
}
|
|
200
177
|
|
|
@@ -220,5 +197,4 @@ export default {
|
|
|
220
197
|
}
|
|
221
198
|
}
|
|
222
199
|
}
|
|
223
|
-
|
|
224
200
|
</style>
|
|
@@ -217,7 +217,6 @@ export default {
|
|
|
217
217
|
|
|
218
218
|
&.labeled-select {
|
|
219
219
|
.selected {
|
|
220
|
-
background-color: var(--input-bg);
|
|
221
220
|
color: var(--input-text);
|
|
222
221
|
text-align: center;
|
|
223
222
|
margin-right: 1em;
|
|
@@ -304,7 +303,6 @@ export default {
|
|
|
304
303
|
// position: relative;
|
|
305
304
|
|
|
306
305
|
.vs__selected {
|
|
307
|
-
background-color: var(--input-bg);
|
|
308
306
|
color: var(--input-text);
|
|
309
307
|
}
|
|
310
308
|
|
|
@@ -389,10 +389,10 @@ export default {
|
|
|
389
389
|
}
|
|
390
390
|
|
|
391
391
|
rows = rows.map((item) => {
|
|
392
|
-
if (item.key
|
|
392
|
+
if (item.key.includes('harvester')) {
|
|
393
393
|
item.key = item.key.replace('harvester', 'cloud');
|
|
394
394
|
}
|
|
395
|
-
if (item.
|
|
395
|
+
if (item.value.includes('harvester')) {
|
|
396
396
|
item.value = item.value.replace('harvester', 'cloud');
|
|
397
397
|
}
|
|
398
398
|
|
|
@@ -409,22 +409,14 @@ export default {
|
|
|
409
409
|
[this.valueName]: value,
|
|
410
410
|
};
|
|
411
411
|
|
|
412
|
-
obj.key = obj.key
|
|
413
|
-
obj.value = obj.value
|
|
412
|
+
obj.key = obj.key.replace('harvester', 'cloud');
|
|
413
|
+
obj.value = obj.value.replace('harvester', 'cloud');
|
|
414
414
|
obj.binary = false;
|
|
415
415
|
obj.canEncode = this.handleBase64;
|
|
416
416
|
obj.supported = true;
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
// 如果 item.key 或 obj.key 为空,直接保留
|
|
421
|
-
if (!item.key || !obj.key) {
|
|
422
|
-
return true;
|
|
423
|
-
}
|
|
424
|
-
// 两者都有值时才比较
|
|
425
|
-
return item.key !== obj.key;
|
|
426
|
-
});
|
|
427
|
-
this.rows = s;
|
|
417
|
+
// 上传镜像问题
|
|
418
|
+
const s = this.rows.filter(item => item.key !== obj.key);
|
|
419
|
+
this.rows = s
|
|
428
420
|
|
|
429
421
|
this.rows.push(obj);
|
|
430
422
|
this.queueUpdate();
|
|
@@ -608,7 +600,6 @@ export default {
|
|
|
608
600
|
</script>
|
|
609
601
|
<template>
|
|
610
602
|
<div class="key-value">
|
|
611
|
-
<!-- 标题部分:如果传了 title 或者插槽 title 才显示 -->
|
|
612
603
|
<div
|
|
613
604
|
v-if="title || $slots.title"
|
|
614
605
|
class="clearfix"
|
|
@@ -616,7 +607,6 @@ export default {
|
|
|
616
607
|
<slot name="title">
|
|
617
608
|
<h3>
|
|
618
609
|
{{ title }}
|
|
619
|
-
<!-- 标题右侧提示信息 -->
|
|
620
610
|
<i
|
|
621
611
|
v-if="titleProtip"
|
|
622
612
|
v-clean-tooltip="titleProtip"
|
|
@@ -625,8 +615,6 @@ export default {
|
|
|
625
615
|
</h3>
|
|
626
616
|
</slot>
|
|
627
617
|
</div>
|
|
628
|
-
|
|
629
|
-
<!-- 整个 Key-Value 表格容器 -->
|
|
630
618
|
<div
|
|
631
619
|
class="kv-container"
|
|
632
620
|
role="grid"
|
|
@@ -634,8 +622,6 @@ export default {
|
|
|
634
622
|
:aria-colcount="extraColumns.length + 2"
|
|
635
623
|
:style="containerStyle"
|
|
636
624
|
>
|
|
637
|
-
|
|
638
|
-
<!-- 表头:有数据或者处于 view 模式才显示 -->
|
|
639
625
|
<template v-if="rows.length || isView">
|
|
640
626
|
<div class="rowgroup">
|
|
641
627
|
<div class="row">
|
|
@@ -674,8 +660,6 @@ export default {
|
|
|
674
660
|
</div>
|
|
675
661
|
</div>
|
|
676
662
|
</template>
|
|
677
|
-
|
|
678
|
-
<!-- 如果是 view 模式但没有数据,显示占位符 -->
|
|
679
663
|
<template v-if="!rows.length && isView">
|
|
680
664
|
<div class="rowgroup">
|
|
681
665
|
<div class="row">
|
|
@@ -694,8 +678,6 @@ export default {
|
|
|
694
678
|
</div>
|
|
695
679
|
</div>
|
|
696
680
|
</template>
|
|
697
|
-
|
|
698
|
-
<!-- 遍历 rows 渲染每一行 -->
|
|
699
681
|
<template
|
|
700
682
|
v-for="(row,i) in rows"
|
|
701
683
|
v-else
|
|
@@ -873,8 +855,6 @@ export default {
|
|
|
873
855
|
</div>
|
|
874
856
|
</template>
|
|
875
857
|
</div>
|
|
876
|
-
|
|
877
|
-
<!-- 底部新增/从文件导入 -->
|
|
878
858
|
<div
|
|
879
859
|
v-if="(addAllowed || readAllowed) && !isView"
|
|
880
860
|
class="footer mt-10"
|
|
@@ -883,8 +863,6 @@ export default {
|
|
|
883
863
|
name="add"
|
|
884
864
|
:add="add"
|
|
885
865
|
>
|
|
886
|
-
|
|
887
|
-
<!-- 添加按钮 -->
|
|
888
866
|
<button
|
|
889
867
|
v-if="addAllowed"
|
|
890
868
|
type="button"
|
|
@@ -900,8 +878,6 @@ export default {
|
|
|
900
878
|
:class="loading ? ['icon-lg', 'icon-spinner','icon-spin']: [addIcon]"
|
|
901
879
|
/> {{ _addLabel }}
|
|
902
880
|
</button>
|
|
903
|
-
|
|
904
|
-
<!-- 从文件读取 -->
|
|
905
881
|
<FileSelector
|
|
906
882
|
v-if="readAllowed"
|
|
907
883
|
:disabled="isView"
|