dashboard-shell-shell 3.0.5-test.5 → 3.0.5-test.51
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/csp/favicon.png +0 -0
- package/assets/icons/iconfont.css +4 -1
- package/assets/images/pl/dark/logo.png +0 -0
- package/assets/styles/all.scss +23 -3
- package/assets/styles/base/_variables.scss +5 -5
- package/assets/styles/fonts/_icons.scss +3 -2
- package/assets/styles/global/_button.scss +2 -2
- package/assets/styles/global/_form.scss +1 -0
- package/assets/styles/global/_select.scss +1 -1
- package/assets/styles/global/_tooltip.scss +5 -1
- package/assets/styles/themes/_light.scss +3 -3
- package/assets/styles/vendor/vue-select.scss +2 -1
- package/assets/translations/en-us.yaml +64 -0
- package/assets/translations/zh-hans.yaml +206 -21
- package/components/ButtonDropdown.vue +3 -1
- package/components/ClusterIconMenu.vue +1 -1
- package/components/CodeMirror.vue +6 -4
- package/components/ConsumptionGauge.vue +1 -1
- package/components/ContainerResourceLimit.vue +2 -2
- package/components/CruResource.vue +3 -2
- package/components/Drawer/ResourceDetailDrawer/ConfigTab.vue +10 -7
- package/components/Drawer/ResourceDetailDrawer/YamlTab.vue +1 -1
- package/components/Drawer/ResourceDetailDrawer/index.vue +3 -2
- package/components/ExplorerMembers.vue +10 -1
- package/components/GlobalRoleBindings.vue +69 -114
- package/components/PodSecurityAdmission.vue +1 -1
- package/components/PromptRemove.vue +23 -1
- package/components/RelatedResources.vue +3 -0
- package/components/Resource/Detail/Metadata/index.vue +1 -0
- package/components/Resource/Detail/TitleBar/Top.vue +2 -0
- package/components/Resource/Detail/TitleBar/composables.ts +16 -1
- package/components/Resource/Detail/TitleBar/index.vue +42 -23
- package/components/ResourceDetail/Masthead/index.vue +1 -1
- package/components/ResourceDetail/Masthead/latest.vue +1 -1
- package/components/ResourceDetail/Masthead/legacy.vue +8 -7
- package/components/ResourceDetail/legacy.vue +15 -15
- package/components/ResourceList/Masthead.vue +13 -17
- package/components/ResourceTable.vue +16 -0
- package/components/SideNav.vue +21 -21
- package/components/SingleClusterInfo.vue +2 -1
- package/components/SortableTable/THead.vue +46 -1
- package/components/SortableTable/index.vue +55 -19
- package/components/Tabbed/index.vue +7 -2
- package/components/auth/Principal.vue +16 -8
- package/components/auth/RoleDetailEdit.vue +11 -7
- package/components/breadcrumb/index.vue +15 -236
- package/components/form/ArrayList.vue +164 -147
- package/components/form/ArrayListGrouped.vue +5 -3
- package/components/form/ChangePassword.vue +1 -1
- package/components/form/ClusterAppearance.vue +4 -3
- package/components/form/Command.vue +4 -5
- package/components/form/Conditions.vue +15 -1
- package/components/form/Footer.vue +1 -0
- package/components/form/HealthCheck.vue +0 -2
- package/components/form/HookOption.vue +87 -58
- package/components/form/InputWithSelect.vue +8 -7
- package/components/form/KeyValue.vue +20 -2
- package/components/form/LabeledSelect.vue +3 -1
- package/components/form/Labels.vue +2 -2
- package/components/form/MatchExpressions.vue +4 -4
- package/components/form/Members/ClusterMembershipEditor.vue +1 -1
- package/components/form/Members/ClusterPermissionsEditor.vue +60 -41
- package/components/form/Members/MembershipEditor.vue +4 -4
- package/components/form/Members/ProjectMembershipEditor.vue +1 -1
- package/components/form/NameNsDescription.vue +2 -1
- package/components/form/Networking.vue +6 -9
- package/components/form/NodeAffinity.vue +29 -28
- package/components/form/PodAffinity.vue +23 -23
- package/components/form/Probe.vue +15 -11
- package/components/form/ProjectMemberEditor.vue +66 -48
- package/components/form/ResourceQuota/Namespace.vue +4 -4
- package/components/form/ResourceQuota/NamespaceRow.vue +11 -9
- package/components/form/ResourceQuota/Project.vue +4 -4
- package/components/form/ResourceQuota/ProjectRow.vue +36 -30
- package/components/form/ResourceSelector.vue +1 -1
- package/components/form/Security.vue +1 -3
- package/components/form/Select.vue +7 -1
- package/components/form/ServiceNameSelect.vue +2 -5
- package/components/form/ServicePorts.vue +149 -75
- package/components/form/Tolerations.vue +13 -9
- package/components/form/ValueFromResource.vue +110 -96
- package/components/formatter/WorkloadHealthScale.vue +4 -3
- package/components/nav/Group.vue +6 -0
- package/components/nav/Header.vue +17 -137
- package/components/nav/NamespaceFilter.vue +15 -21
- package/components/nav/TopLevelMenu.vue +99 -125
- package/components/nav/Type.vue +11 -3
- package/config/menuRouteMap.js +10 -0
- package/config/product/explorer.js +32 -10
- package/config/product/manager.js +28 -17
- package/config/router/navigation-guards/index.js +61 -3
- package/detail/node.vue +28 -23
- package/dialog/AddCustomBadgeDialog.vue +17 -9
- package/dialog/RollbackWorkloadDialog.vue +1 -1
- package/edit/autoscaling.horizontalpodautoscaler/external-metric.vue +1 -1
- package/edit/autoscaling.horizontalpodautoscaler/hpa-scaling-rule.vue +9 -6
- package/edit/autoscaling.horizontalpodautoscaler/index.vue +3 -1
- package/edit/autoscaling.horizontalpodautoscaler/metric-identifier.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/metric-object-reference.vue +7 -5
- package/edit/autoscaling.horizontalpodautoscaler/metric-target.vue +5 -3
- package/edit/autoscaling.horizontalpodautoscaler/metrics-row.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/object-metric.vue +2 -2
- package/edit/autoscaling.horizontalpodautoscaler/pod-metric.vue +1 -1
- package/edit/autoscaling.horizontalpodautoscaler/resource-metric.vue +2 -2
- package/edit/configmap.vue +4 -0
- package/edit/networking.k8s.io.ingress/Certificate.vue +14 -5
- package/edit/networking.k8s.io.ingress/DefaultBackend.vue +2 -2
- package/edit/networking.k8s.io.ingress/Rule.vue +5 -11
- package/edit/networking.k8s.io.ingress/RulePath.vue +105 -96
- package/edit/networking.k8s.io.networkpolicy/PolicyRule.vue +3 -3
- package/edit/networking.k8s.io.networkpolicy/PolicyRulePort.vue +4 -2
- package/edit/networking.k8s.io.networkpolicy/PolicyRuleTarget.vue +12 -11
- package/edit/networking.k8s.io.networkpolicy/index.vue +1 -1
- package/edit/persistentvolume/index.vue +3 -1
- package/edit/persistentvolumeclaim.vue +2 -0
- package/edit/provisioning.cattle.io.cluster/tabs/Basics.vue +1 -1
- package/edit/secret/index.vue +2 -2
- package/edit/service.vue +4 -1
- package/edit/storage.k8s.io.storageclass/index.vue +10 -8
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/aws-ebs.vue +34 -27
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/gce-pd.vue +15 -13
- package/edit/storage.k8s.io.storageclass/provisioners/kubernetes.io/vsphere-volume.vue +41 -39
- package/edit/workload/Job.vue +31 -34
- package/edit/workload/Upgrading.vue +5 -5
- package/edit/workload/index.vue +19 -15
- package/edit/workload/storage/Mount.vue +1 -0
- package/edit/workload/storage/awsElasticBlockStore.vue +9 -7
- package/edit/workload/storage/azureDisk.vue +14 -10
- package/edit/workload/storage/azureFile.vue +9 -7
- package/edit/workload/storage/csi/index.vue +6 -9
- package/edit/workload/storage/emptyDir.vue +7 -5
- package/edit/workload/storage/gcePersistentDisk.vue +9 -7
- package/edit/workload/storage/hostPath.vue +7 -5
- package/edit/workload/storage/nfs.vue +8 -6
- package/edit/workload/storage/persistentVolumeClaim/index.vue +12 -10
- package/edit/workload/storage/persistentVolumeClaim/persistentvolumeclaim.vue +20 -15
- package/edit/workload/storage/secret.vue +9 -6
- package/edit/workload/storage/vsphereVolume.vue +11 -7
- package/initialize/app-extended.js +7 -1
- package/list/management.cattle.io.podsecurityadmissionconfigurationtemplate.vue +8 -6
- package/mixins/create-edit-view/impl.js +10 -0
- package/models/provisioning.cattle.io.cluster.js +19 -18
- package/models/workload.js +2 -2
- package/package.json +1 -1
- package/pages/account/index.vue +96 -115
- package/pages/auth/setup.vue +36 -17
- package/pages/c/_cluster/auth/roles/index.vue +65 -8
- package/pages/c/_cluster/explorer/ConfigBadge.vue +1 -1
- package/pages/c/_cluster/explorer/index.vue +2 -1
- package/pages/c/_cluster/explorer/tools/index.vue +6 -6
- package/pages/home.vue +55 -13
- package/pkg/tsconfig.json +9 -9
- package/pkg/vue.config.js +1 -1
- package/plugins/dashboard-store/actions.js +1 -1
- package/plugins/dashboard-store/resource-class.js +28 -27
- package/rancher-components/Banner/Banner.vue +14 -2
- package/rancher-components/Form/Radio/RadioGroup.vue +9 -1
- package/rancher-components/LabeledTooltip/LabeledTooltip.vue +31 -2
- package/scripts/build-pkg.sh +18 -23
- package/scripts/publish-shell.sh +1 -1
- package/store/i18n.js +1 -0
- package/store/type-map.js +1 -3
- package/types/shell/index.d.ts +12 -30
- package/utils/error.js +26 -4
- package/utils/errorTranslate.json +390 -6
- package/utils/errorTranslateNew.json +39 -0
- package/utils/roleFiltering.js +33 -0
- package/vue.config.js +1 -1
|
@@ -7,6 +7,7 @@ import Loading from '@shell/components/Loading';
|
|
|
7
7
|
import { SUBTYPE_MAPPING, CREATE_VERBS } from '@shell/models/management.cattle.io.roletemplate';
|
|
8
8
|
import { NAME } from '@shell/config/product/auth';
|
|
9
9
|
import { BLANK_CLUSTER } from '@shell/store/store-types.js';
|
|
10
|
+
import { globalRoleFilteringfn, clusterRoleFilteringfn, projectRoleFilteringfn } from '@shell/utils/roleFiltering'
|
|
10
11
|
|
|
11
12
|
const GLOBAL = SUBTYPE_MAPPING.GLOBAL.key;
|
|
12
13
|
const CLUSTER = SUBTYPE_MAPPING.CLUSTER.key;
|
|
@@ -99,15 +100,38 @@ export default {
|
|
|
99
100
|
|
|
100
101
|
computed: {
|
|
101
102
|
globalResources() {
|
|
102
|
-
|
|
103
|
+
|
|
104
|
+
let rolesList = globalRoleFilteringfn(this.globalRoles)
|
|
105
|
+
|
|
106
|
+
if (sessionStorage.getItem('TOPLEVELPERMISSIONS') === 'superadmin') {
|
|
107
|
+
rolesList = this.globalRoles
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return rolesList
|
|
103
111
|
},
|
|
104
112
|
|
|
105
113
|
clusterResources() {
|
|
106
|
-
|
|
114
|
+
const roleList = this.roleTemplates.filter((r) => r.context === SUBTYPE_MAPPING.CLUSTER.context);
|
|
115
|
+
|
|
116
|
+
let rolesList = clusterRoleFilteringfn(roleList)
|
|
117
|
+
|
|
118
|
+
if (sessionStorage.getItem('TOPLEVELPERMISSIONS') === 'superadmin') {
|
|
119
|
+
rolesList = roleList
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return rolesList
|
|
107
123
|
},
|
|
108
124
|
|
|
109
125
|
namespaceResources() {
|
|
110
|
-
|
|
126
|
+
const roleList = this.roleTemplates.filter((r) => r.context === SUBTYPE_MAPPING.NAMESPACE.context);
|
|
127
|
+
|
|
128
|
+
let rolesList = projectRoleFilteringfn(roleList)
|
|
129
|
+
|
|
130
|
+
if (sessionStorage.getItem('TOPLEVELPERMISSIONS') === 'superadmin') {
|
|
131
|
+
rolesList = roleList
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return rolesList
|
|
111
135
|
},
|
|
112
136
|
|
|
113
137
|
type() {
|
|
@@ -162,7 +186,7 @@ export default {
|
|
|
162
186
|
</h1>
|
|
163
187
|
<div style="margin: 20px 0;">支持管理员创建与管理不同角色,每个角色可预设特定权限集合,可简化用户权限分配流程,提升权限管理的灵活性与安全性。</div>
|
|
164
188
|
</div>
|
|
165
|
-
<div class="actions-container actions-container-box">
|
|
189
|
+
<!-- <div class="actions-container actions-container-box">
|
|
166
190
|
<div class="actions">
|
|
167
191
|
<router-link
|
|
168
192
|
v-if="canCreate"
|
|
@@ -172,7 +196,7 @@ export default {
|
|
|
172
196
|
{{ createLabel }}
|
|
173
197
|
</router-link>
|
|
174
198
|
</div>
|
|
175
|
-
</div>
|
|
199
|
+
</div> -->
|
|
176
200
|
</header>
|
|
177
201
|
<Tabbed>
|
|
178
202
|
<Tab
|
|
@@ -184,7 +208,18 @@ export default {
|
|
|
184
208
|
<ResourceTable
|
|
185
209
|
:schema="tabs[GLOBAL].schema"
|
|
186
210
|
:rows="globalResources"
|
|
187
|
-
|
|
211
|
+
>
|
|
212
|
+
<template #header-right>
|
|
213
|
+
<router-link
|
|
214
|
+
v-if="canCreate"
|
|
215
|
+
:to="createLocation"
|
|
216
|
+
style="margin-right: 10px;"
|
|
217
|
+
class="btn role-primary"
|
|
218
|
+
>
|
|
219
|
+
{{ createLabel }}
|
|
220
|
+
</router-link>
|
|
221
|
+
</template>
|
|
222
|
+
</ResourceTable>
|
|
188
223
|
</Tab>
|
|
189
224
|
|
|
190
225
|
<Tab
|
|
@@ -197,7 +232,18 @@ export default {
|
|
|
197
232
|
:schema="tabs[CLUSTER].schema"
|
|
198
233
|
:headers="tabs[CLUSTER].headers"
|
|
199
234
|
:rows="clusterResources"
|
|
200
|
-
|
|
235
|
+
>
|
|
236
|
+
<template #header-right>
|
|
237
|
+
<router-link
|
|
238
|
+
v-if="canCreate"
|
|
239
|
+
:to="createLocation"
|
|
240
|
+
style="margin-right: 10px;"
|
|
241
|
+
class="btn role-primary"
|
|
242
|
+
>
|
|
243
|
+
{{ createLabel }}
|
|
244
|
+
</router-link>
|
|
245
|
+
</template>
|
|
246
|
+
</ResourceTable>
|
|
201
247
|
</Tab>
|
|
202
248
|
|
|
203
249
|
<Tab
|
|
@@ -210,7 +256,18 @@ export default {
|
|
|
210
256
|
:schema="tabs[PROJECT].schema"
|
|
211
257
|
:headers="tabs[PROJECT].headers"
|
|
212
258
|
:rows="namespaceResources"
|
|
213
|
-
|
|
259
|
+
>
|
|
260
|
+
<template #header-right>
|
|
261
|
+
<router-link
|
|
262
|
+
v-if="canCreate"
|
|
263
|
+
:to="createLocation"
|
|
264
|
+
style="margin-right: 10px;"
|
|
265
|
+
class="btn role-primary"
|
|
266
|
+
>
|
|
267
|
+
{{ createLabel }}
|
|
268
|
+
</router-link>
|
|
269
|
+
</template>
|
|
270
|
+
</ResourceTable>
|
|
214
271
|
</Tab>
|
|
215
272
|
</Tabbed>
|
|
216
273
|
</div>
|
|
@@ -694,7 +694,8 @@ export default {
|
|
|
694
694
|
role="link"
|
|
695
695
|
:aria-label="t('nav.clusterTools')"
|
|
696
696
|
>
|
|
697
|
-
|
|
697
|
+
<!-- 禅道 3539 隐藏集群工具 -->
|
|
698
|
+
<!-- <span>{{ t('nav.clusterTools') }}</span> -->
|
|
698
699
|
</router-link>
|
|
699
700
|
</div>
|
|
700
701
|
<ConfigBadge
|
|
@@ -230,7 +230,7 @@ export default {
|
|
|
230
230
|
|
|
231
231
|
.name {
|
|
232
232
|
white-space: nowrap;
|
|
233
|
-
overflow: hidden;
|
|
233
|
+
// overflow: hidden;
|
|
234
234
|
text-overflow: ellipsis;
|
|
235
235
|
margin: 0;
|
|
236
236
|
}
|
|
@@ -249,7 +249,7 @@ export default {
|
|
|
249
249
|
.version {
|
|
250
250
|
color: var(--muted);
|
|
251
251
|
white-space: nowrap;
|
|
252
|
-
overflow: hidden;
|
|
252
|
+
// overflow: hidden;
|
|
253
253
|
text-overflow: ellipsis;
|
|
254
254
|
font-size: 0.9em;
|
|
255
255
|
margin-top: 4px;
|
|
@@ -262,10 +262,10 @@ export default {
|
|
|
262
262
|
.description-content {
|
|
263
263
|
display: -webkit-box;
|
|
264
264
|
-webkit-box-orient: vertical;
|
|
265
|
-
-webkit-line-clamp: 3;
|
|
266
|
-
line-clamp: 3;
|
|
267
|
-
overflow: hidden;
|
|
268
|
-
text-overflow: ellipsis;
|
|
265
|
+
// -webkit-line-clamp: 3;
|
|
266
|
+
// line-clamp: 3;
|
|
267
|
+
// overflow: hidden;
|
|
268
|
+
// text-overflow: ellipsis;
|
|
269
269
|
color: var(--text-muted);
|
|
270
270
|
}
|
|
271
271
|
|
package/pages/home.vue
CHANGED
|
@@ -485,32 +485,24 @@ export default defineComponent({
|
|
|
485
485
|
>
|
|
486
486
|
|
|
487
487
|
<!-- 页签标题组件,不显示子页面标题和面包屑 -->
|
|
488
|
-
<TabTitle
|
|
489
|
-
v-if="topLevelPermissionsVis"
|
|
490
|
-
:show-child="false"
|
|
491
|
-
:breadcrumb="false"
|
|
492
|
-
>
|
|
493
|
-
|
|
494
|
-
<!-- 页面标题:{vendor} - 首页 -->
|
|
495
|
-
{{ `${vendor} - ${t('landing.homepage')}` }}
|
|
496
|
-
</TabTitle>
|
|
497
488
|
|
|
498
489
|
<!-- 首页欢迎横幅 -->
|
|
499
|
-
<BannerGraphic
|
|
490
|
+
<!-- <BannerGraphic
|
|
500
491
|
v-if="topLevelPermissionsVis"
|
|
501
492
|
:small="true"
|
|
502
493
|
:title="t('landing.welcomeToRancher', {vendor})"
|
|
503
494
|
:pref="HIDE_HOME_PAGE_CARDS"
|
|
504
495
|
pref-key="welcomeBanner"
|
|
505
496
|
data-testid="home-banner-graphic"
|
|
506
|
-
/>
|
|
497
|
+
/> -->
|
|
507
498
|
<IndentedPanel class="mt-20 mb-20">
|
|
508
499
|
|
|
509
500
|
<!-- 主面板布局 -->
|
|
510
501
|
<div class="row home-panels">
|
|
511
502
|
<div class="col main-panel">
|
|
512
503
|
<h2 class="mb-20">
|
|
513
|
-
{{ t('landing.clusters.title') }}
|
|
504
|
+
<!-- {{ t('landing.clusters.title') }} -->
|
|
505
|
+
首页
|
|
514
506
|
</h2>
|
|
515
507
|
|
|
516
508
|
<!-- 集群列表面板 -->
|
|
@@ -548,7 +540,7 @@ export default defineComponent({
|
|
|
548
540
|
v-if="canCreateCluster || !!provClusterSchema"
|
|
549
541
|
#header-right
|
|
550
542
|
>
|
|
551
|
-
<div
|
|
543
|
+
<div class="table-heading">
|
|
552
544
|
<router-link
|
|
553
545
|
v-if="!!provClusterSchema"
|
|
554
546
|
:to="manageLocation"
|
|
@@ -669,6 +661,14 @@ export default defineComponent({
|
|
|
669
661
|
</button>
|
|
670
662
|
</template>
|
|
671
663
|
</PaginatedResourceTable>
|
|
664
|
+
<div v-else class="home-prompt">
|
|
665
|
+
<div style="text-align: center;position: relative;">
|
|
666
|
+
<div class="left-border"></div>
|
|
667
|
+
<!-- <div class="right-border"></div> -->
|
|
668
|
+
<div class="home-prompt-title">欢 迎 登 录</div>
|
|
669
|
+
<div class="home-prompt-subtitle">企业级容器编排与管理解决方案,提供强大的Kubernetes集群管理、应用部署和服务治理能力。</div>
|
|
670
|
+
</div>
|
|
671
|
+
</div>
|
|
672
672
|
</div>
|
|
673
673
|
|
|
674
674
|
<!-- 单集群模式 -->
|
|
@@ -688,6 +688,48 @@ export default defineComponent({
|
|
|
688
688
|
</template>
|
|
689
689
|
|
|
690
690
|
<style lang='scss' scoped>
|
|
691
|
+
.home-prompt {
|
|
692
|
+
width: 100%;
|
|
693
|
+
height: 500px;
|
|
694
|
+
display: flex;
|
|
695
|
+
align-items: center;
|
|
696
|
+
justify-content: center;
|
|
697
|
+
.left-border,
|
|
698
|
+
.right-border {
|
|
699
|
+
position: absolute;
|
|
700
|
+
height: 1px;
|
|
701
|
+
width: 120px;
|
|
702
|
+
background: linear-gradient(90deg, transparent, #00a8ff, transparent);
|
|
703
|
+
bottom: 0px;
|
|
704
|
+
}
|
|
705
|
+
.left-border {
|
|
706
|
+
left: calc(50% - 60px);
|
|
707
|
+
}
|
|
708
|
+
.right-border {
|
|
709
|
+
right: 0;
|
|
710
|
+
}
|
|
711
|
+
.home-prompt-title {
|
|
712
|
+
font-size: 32px;
|
|
713
|
+
color: #1a1a1a;
|
|
714
|
+
font-weight: 700;
|
|
715
|
+
letter-spacing: -0.5px;
|
|
716
|
+
margin-bottom: 15px;
|
|
717
|
+
background: linear-gradient(135deg, #00a8ff, #0050b3);
|
|
718
|
+
-webkit-background-clip: text;
|
|
719
|
+
-webkit-text-fill-color: transparent;
|
|
720
|
+
background-clip: text;
|
|
721
|
+
display: inline-block;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
.home-prompt-subtitle {
|
|
725
|
+
font-size: 18px;
|
|
726
|
+
color: #666666;
|
|
727
|
+
margin-bottom: 20px;
|
|
728
|
+
max-width: 800px;
|
|
729
|
+
margin-left: auto;
|
|
730
|
+
margin-right: auto;
|
|
731
|
+
}
|
|
732
|
+
}
|
|
691
733
|
.banner-link:focus-visible {
|
|
692
734
|
@include focus-outline;
|
|
693
735
|
}
|
package/pkg/tsconfig.json
CHANGED
|
@@ -27,25 +27,25 @@
|
|
|
27
27
|
],
|
|
28
28
|
"paths": {
|
|
29
29
|
"@shell/core/*": [
|
|
30
|
-
"../../node_modules
|
|
30
|
+
"../../node_modules/dashboard-shell-shell/core/*"
|
|
31
31
|
],
|
|
32
32
|
"@shell/config/*": [
|
|
33
|
-
"../../node_modules
|
|
33
|
+
"../../node_modules/dashboard-shell-shell/config/*"
|
|
34
34
|
],
|
|
35
35
|
"@shell/store/*": [
|
|
36
|
-
"../../node_modules
|
|
36
|
+
"../../node_modules/dashboard-shell-shell/store/*"
|
|
37
37
|
],
|
|
38
38
|
"@shell/plugins/*": [
|
|
39
|
-
"../../node_modules
|
|
39
|
+
"../../node_modules/dashboard-shell-shell/plugins/*"
|
|
40
40
|
],
|
|
41
41
|
"@shell/utils/*": [
|
|
42
|
-
"../../node_modules
|
|
42
|
+
"../../node_modules/dashboard-shell-shell/utils/*"
|
|
43
43
|
],
|
|
44
44
|
"@shell/models/*": [
|
|
45
|
-
"../../node_modules
|
|
45
|
+
"../../node_modules/dashboard-shell-shell/models/*"
|
|
46
46
|
],
|
|
47
47
|
"@shell/mixins/*": [
|
|
48
|
-
"../../node_modules
|
|
48
|
+
"../../node_modules/dashboard-shell-shell/mixins/*"
|
|
49
49
|
],
|
|
50
50
|
"@pkg/*": [
|
|
51
51
|
"./*"
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"**/*.ts",
|
|
57
57
|
"**/*.tsx",
|
|
58
58
|
"**/*.vue",
|
|
59
|
-
"../../node_modules
|
|
60
|
-
"../../node_modules
|
|
59
|
+
"../../node_modules/dashboard-shell-shell/types/*.d.ts",
|
|
60
|
+
"../../node_modules/dashboard-shell-shell/core/types.ts"
|
|
61
61
|
],
|
|
62
62
|
"exclude": [
|
|
63
63
|
"node_modules"
|
package/pkg/vue.config.js
CHANGED
|
@@ -117,7 +117,7 @@ module.exports = function(dir) {
|
|
|
117
117
|
if (p.use) {
|
|
118
118
|
p.use.forEach((u) => {
|
|
119
119
|
if (u.loader.includes('babel-loader')) {
|
|
120
|
-
p.exclude = /node_modules\/(
|
|
120
|
+
p.exclude = /node_modules\/(?!dashboard-shell-shell\/).*/;
|
|
121
121
|
}
|
|
122
122
|
});
|
|
123
123
|
}
|
|
@@ -913,42 +913,42 @@ export default class Resource {
|
|
|
913
913
|
{
|
|
914
914
|
action: this.canUpdate ? 'goToEdit' : 'goToViewConfig',
|
|
915
915
|
label: this.t(this.canUpdate ? 'action.edit' : 'action.view'),
|
|
916
|
-
icon: 'icon icon-edit',
|
|
916
|
+
// icon: 'icon icon-edit',
|
|
917
917
|
enabled: this.canCustomEdit,
|
|
918
918
|
},
|
|
919
|
-
{
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
},
|
|
919
|
+
// {
|
|
920
|
+
// action: this.canEditYaml ? 'goToEditYaml' : 'goToViewYaml',
|
|
921
|
+
// label: this.t(this.canEditYaml ? 'action.editYaml' : 'action.viewYaml'),
|
|
922
|
+
// icon: 'icon icon-file',
|
|
923
|
+
// enabled: this.canYaml,
|
|
924
|
+
// },
|
|
925
925
|
{
|
|
926
926
|
action: (this.canCustomEdit ? 'goToClone' : 'cloneYaml'),
|
|
927
927
|
label: this.t('action.clone'),
|
|
928
|
-
icon: 'icon icon-copy',
|
|
929
|
-
enabled: this.canClone && this.canCreate && (this.canCustomEdit || this.canYaml),
|
|
930
|
-
},
|
|
931
|
-
{ divider: true },
|
|
932
|
-
{
|
|
933
|
-
action: 'download',
|
|
934
|
-
label: this.t('action.download'),
|
|
935
|
-
icon: 'icon icon-download',
|
|
936
|
-
bulkable: true,
|
|
937
|
-
bulkAction: 'downloadBulk',
|
|
938
|
-
enabled: this.canYaml,
|
|
939
|
-
weight: -9,
|
|
940
|
-
},
|
|
941
|
-
{
|
|
942
|
-
action: 'viewInApi',
|
|
943
|
-
label: this.t('action.viewInApi'),
|
|
944
|
-
icon: 'icon icon-external-link',
|
|
945
|
-
enabled: this.canViewInApi,
|
|
928
|
+
// icon: 'icon icon-copy',
|
|
929
|
+
enabled: this.canClone && this.canCreate && (this.canCustomEdit || this.canYaml)&& this.schema.id!=='event',
|
|
946
930
|
},
|
|
931
|
+
// { divider: true },
|
|
932
|
+
// {
|
|
933
|
+
// action: 'download',
|
|
934
|
+
// label: this.t('action.download'),
|
|
935
|
+
// icon: 'icon icon-download',
|
|
936
|
+
// bulkable: true,
|
|
937
|
+
// bulkAction: 'downloadBulk',
|
|
938
|
+
// enabled: this.canYaml,
|
|
939
|
+
// weight: -9,
|
|
940
|
+
// },
|
|
941
|
+
// {
|
|
942
|
+
// action: 'viewInApi',
|
|
943
|
+
// label: this.t('action.viewInApi'),
|
|
944
|
+
// icon: 'icon icon-external-link',
|
|
945
|
+
// enabled: this.canViewInApi,
|
|
946
|
+
// },
|
|
947
947
|
{
|
|
948
948
|
action: 'promptRemove',
|
|
949
949
|
altAction: 'remove',
|
|
950
950
|
label: this.t('action.remove'),
|
|
951
|
-
icon: 'icon icon-trash',
|
|
951
|
+
// icon: 'icon icon-trash',
|
|
952
952
|
bulkable: true,
|
|
953
953
|
enabled: this.canDelete,
|
|
954
954
|
bulkAction: 'promptRemove',
|
|
@@ -1322,7 +1322,8 @@ export default class Resource {
|
|
|
1322
1322
|
}
|
|
1323
1323
|
|
|
1324
1324
|
get detailLocation() {
|
|
1325
|
-
|
|
1325
|
+
let location = this._detailLocation;
|
|
1326
|
+
return location;
|
|
1326
1327
|
}
|
|
1327
1328
|
|
|
1328
1329
|
goToDetail() {
|
|
@@ -78,7 +78,16 @@ export default defineComponent({
|
|
|
78
78
|
* Return message text as label.
|
|
79
79
|
*/
|
|
80
80
|
messageLabel(): string | void {
|
|
81
|
-
|
|
81
|
+
|
|
82
|
+
let labelStr = this.label
|
|
83
|
+
|
|
84
|
+
if (labelStr === 'waiting for api to be available') {
|
|
85
|
+
labelStr = '等待api可用'
|
|
86
|
+
} else if (labelStr === 'Cluster agent is not connected') {
|
|
87
|
+
labelStr = '集群agent未连接'
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return !(typeof labelStr === 'string') ? stringify(labelStr) : undefined;
|
|
82
91
|
},
|
|
83
92
|
},
|
|
84
93
|
methods: { nlToBr }
|
|
@@ -164,6 +173,7 @@ $icon-size: 24px;
|
|
|
164
173
|
margin: 0px 0px 20px 0px;
|
|
165
174
|
position: relative;
|
|
166
175
|
width: 100%;
|
|
176
|
+
min-height: 32px;
|
|
167
177
|
color: var(--body-text);
|
|
168
178
|
|
|
169
179
|
&__icon {
|
|
@@ -201,13 +211,15 @@ $icon-size: 24px;
|
|
|
201
211
|
}
|
|
202
212
|
|
|
203
213
|
&__content {
|
|
204
|
-
padding:
|
|
214
|
+
padding: 2px 10px;
|
|
205
215
|
transition: all 0.2s ease;
|
|
206
216
|
line-height: 12px;
|
|
207
217
|
width: 100%;
|
|
208
218
|
border-left: solid $left-border-size transparent;
|
|
209
219
|
display: flex;
|
|
210
220
|
gap: 3px;
|
|
221
|
+
min-height: 32px;
|
|
222
|
+
align-items: center;
|
|
211
223
|
word-wrap:break-word;
|
|
212
224
|
word-break:break-all;
|
|
213
225
|
|
|
@@ -102,6 +102,11 @@ export default defineComponent({
|
|
|
102
102
|
row: {
|
|
103
103
|
type: Boolean,
|
|
104
104
|
default: false
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
flexDirection: {
|
|
108
|
+
type: String,
|
|
109
|
+
default: 'row'
|
|
105
110
|
}
|
|
106
111
|
},
|
|
107
112
|
|
|
@@ -274,7 +279,7 @@ export default defineComponent({
|
|
|
274
279
|
:aria-describedby="radioGroupAriaDescribedBy"
|
|
275
280
|
:aria-activedescendant="ariaActiveDescendant"
|
|
276
281
|
class="radio-group"
|
|
277
|
-
:class="{'row':row}"
|
|
282
|
+
:class="{'row':row, 'flexDirection': flexDirection === 'column'}"
|
|
278
283
|
:tabindex="isDisabled ? -1 : 0"
|
|
279
284
|
:aria-disabled="isDisabled"
|
|
280
285
|
@keydown.down.prevent.stop="clickNext(1)"
|
|
@@ -312,6 +317,9 @@ export default defineComponent({
|
|
|
312
317
|
</template>
|
|
313
318
|
|
|
314
319
|
<style lang='scss'>
|
|
320
|
+
.flexDirection {
|
|
321
|
+
flex-direction: column;
|
|
322
|
+
}
|
|
315
323
|
.radio-group {
|
|
316
324
|
&:focus, &:focus-visible {
|
|
317
325
|
border: none;
|
|
@@ -123,8 +123,8 @@ export default defineComponent({
|
|
|
123
123
|
&.null {
|
|
124
124
|
|
|
125
125
|
.status-icon {
|
|
126
|
-
top:
|
|
127
|
-
right:
|
|
126
|
+
top: 8px !important;
|
|
127
|
+
right: 25px !important;
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
|
|
@@ -146,6 +146,35 @@ export default defineComponent({
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
.labeled-select{
|
|
150
|
+
.labeled-tooltip{
|
|
151
|
+
&.null {
|
|
152
|
+
.status-icon {
|
|
153
|
+
top: 10px !important;
|
|
154
|
+
right: 25px !important;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&.error {
|
|
159
|
+
|
|
160
|
+
.status-icon {
|
|
161
|
+
top: 9px !important;
|
|
162
|
+
right: 20px;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
.labeled-input{
|
|
168
|
+
.labeled-tooltip{
|
|
169
|
+
&.null {
|
|
170
|
+
.status-icon {
|
|
171
|
+
top: 10px !important;
|
|
172
|
+
right: 10px !important;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
149
178
|
// Ensure code blocks inside tootips don't look awful
|
|
150
179
|
.v-popper__popper.v-popper--theme-tooltip {
|
|
151
180
|
.v-popper__inner {
|
package/scripts/build-pkg.sh
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
|
4
4
|
BASE_DIR="$( cd $SCRIPT_DIR && cd ../.. & pwd)"
|
|
5
|
-
SHELL_DIR=$BASE_DIR/shell/
|
|
6
5
|
EXIT_CODE=0
|
|
7
6
|
FORMATS="umd-min"
|
|
8
7
|
|
|
@@ -19,12 +18,18 @@ done
|
|
|
19
18
|
|
|
20
19
|
shift $((OPTIND-1))
|
|
21
20
|
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
SHELL_DIR=$
|
|
21
|
+
# ---- 修改这里 ----
|
|
22
|
+
# 优先使用顶级 shell 文件夹,如果不存在则使用 node_modules/dashboard-shell-shell
|
|
23
|
+
SHELL_DIR=$BASE_DIR/shell/
|
|
24
|
+
if [ ! -d "${SHELL_DIR}" ]; then
|
|
25
|
+
SHELL_DIR=$BASE_DIR/node_modules/dashboard-shell-shell/
|
|
26
|
+
if [ ! -d "${SHELL_DIR}" ]; then
|
|
27
|
+
echo "Error: dashboard-shell-shell not found in node_modules"
|
|
28
|
+
exit 1
|
|
29
|
+
fi
|
|
27
30
|
fi
|
|
31
|
+
# 转为绝对路径,防止符号链接循环
|
|
32
|
+
SHELL_DIR=$(cd -P "${SHELL_DIR}" && pwd)
|
|
28
33
|
|
|
29
34
|
CREATE_TARBALL=${2}
|
|
30
35
|
|
|
@@ -46,18 +51,14 @@ if [ -d "${BASE_DIR}/pkg/${1}" ]; then
|
|
|
46
51
|
|
|
47
52
|
pushd pkg/${1}
|
|
48
53
|
|
|
49
|
-
#
|
|
50
|
-
if [ -e ".shell" ]; then
|
|
51
|
-
|
|
52
|
-
if [ "${LINK}" != "${SHELL_DIR}" ]; then
|
|
53
|
-
echo ".shell symlink exists but does not point to expected location - please check and fix"
|
|
54
|
-
popd
|
|
55
|
-
exit -1
|
|
56
|
-
fi
|
|
57
|
-
else
|
|
58
|
-
ln -s ${SHELL_DIR} .shell
|
|
54
|
+
# 删除旧的 .shell,防止循环
|
|
55
|
+
if [ -L ".shell" ] || [ -e ".shell" ]; then
|
|
56
|
+
rm -rf .shell
|
|
59
57
|
fi
|
|
60
58
|
|
|
59
|
+
# 创建新的符号链接
|
|
60
|
+
ln -s "${SHELL_DIR}" .shell
|
|
61
|
+
|
|
61
62
|
FILE=index.js
|
|
62
63
|
if [ -f ./index.ts ]; then
|
|
63
64
|
FILE=index.ts
|
|
@@ -72,7 +73,7 @@ if [ -d "${BASE_DIR}/pkg/${1}" ]; then
|
|
|
72
73
|
cp -f ./package.json ${PKG_DIST}/package.json
|
|
73
74
|
node ${SCRIPT_DIR}/pkgfile.js ${PKG_DIST}/package.json
|
|
74
75
|
rm -rf ${PKG_DIST}/*.bak
|
|
75
|
-
rm .shell
|
|
76
|
+
rm -rf .shell
|
|
76
77
|
|
|
77
78
|
popd
|
|
78
79
|
fi
|
|
@@ -81,22 +82,16 @@ if [ $EXIT_CODE -ne 0 ]; then
|
|
|
81
82
|
exit $EXIT_CODE
|
|
82
83
|
fi
|
|
83
84
|
|
|
84
|
-
|
|
85
85
|
if [ -n "${CREATE_TARBALL}" ]; then
|
|
86
86
|
echo $COMMIT $COMMIT_BRANCH > ${PKG_DIST}/version-commit.txt
|
|
87
87
|
|
|
88
88
|
TARBALL=${NAME}.tar.gz
|
|
89
89
|
|
|
90
90
|
pushd ${PKG_DIST}
|
|
91
|
-
|
|
92
91
|
rm -f ../$TARBALL
|
|
93
|
-
|
|
94
92
|
echo "Compressing to ${TARBALL}..."
|
|
95
|
-
|
|
96
93
|
tar -czf ../${TARBALL} .
|
|
97
|
-
|
|
98
94
|
popd
|
|
99
|
-
|
|
100
95
|
fi
|
|
101
96
|
|
|
102
97
|
exit $EXIT_CODE
|
package/scripts/publish-shell.sh
CHANGED
package/store/i18n.js
CHANGED
package/store/type-map.js
CHANGED
|
@@ -515,7 +515,7 @@ export const getters = {
|
|
|
515
515
|
|
|
516
516
|
groupsForVirTypes(state) {
|
|
517
517
|
return (product, name) => {
|
|
518
|
-
return state
|
|
518
|
+
return state?.virtualTypes?.[product]?.find(item => item.name === name)?.icon;
|
|
519
519
|
};
|
|
520
520
|
},
|
|
521
521
|
|
|
@@ -823,9 +823,7 @@ export const getters = {
|
|
|
823
823
|
}
|
|
824
824
|
|
|
825
825
|
if ( icon ) {
|
|
826
|
-
console.log(icon)
|
|
827
826
|
label = `<i class="icon icon-fw icon-${ icon }"></i>${ label }`;
|
|
828
|
-
console.log(label)
|
|
829
827
|
}
|
|
830
828
|
|
|
831
829
|
return label;
|