dashboard-shell-shell 3.0.5-test.8 → 3.0.5-test.80
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/iconsNew/demo.css +539 -0
- package/assets/iconsNew/demo.css:Zone.Identifier +0 -0
- package/assets/iconsNew/demo_index.html +303 -0
- package/assets/iconsNew/demo_index.html:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.css +43 -0
- package/assets/iconsNew/iconfont.css:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.js +1 -0
- package/assets/iconsNew/iconfont.js:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.json +44 -0
- package/assets/iconsNew/iconfont.json:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.ttf +0 -0
- package/assets/iconsNew/iconfont.ttf:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.woff +0 -0
- package/assets/iconsNew/iconfont.woff2 +0 -0
- package/assets/iconsNew/iconfont.woff2:Zone.Identifier +0 -0
- package/assets/iconsNew/iconfont.woff:Zone.Identifier +0 -0
- package/assets/images/login-logo.svg +110 -12
- package/assets/images/logo.svg +129 -0
- package/assets/images/pl/dark/logo.svg +129 -0
- package/assets/images/pl/logo.svg +129 -0
- package/assets/styles/all.scss +23 -3
- package/assets/styles/app.scss +1 -0
- package/assets/styles/base/_helpers.scss +1 -1
- package/assets/styles/base/_variables.scss +2 -2
- package/assets/styles/fonts/_icons.scss +3 -2
- package/assets/styles/global/_button.scss +1 -1
- 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 +67 -0
- package/assets/translations/zh-hans.yaml +226 -24
- 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 +22 -19
- package/components/Drawer/ResourceDetailDrawer/index.vue +3 -3
- 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/TitleBar/composables.ts +16 -1
- package/components/Resource/Detail/TitleBar/index.vue +37 -24
- 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 +16 -15
- 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 +54 -18
- package/components/Tabbed/index.vue +6 -1
- package/components/actionButton/index.vue +649 -0
- package/components/auth/Principal.vue +16 -8
- package/components/auth/RoleDetailEdit.vue +11 -7
- package/components/breadcrumb/index.vue +13 -210
- 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 +3 -2
- 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/SecretSelector.vue +24 -23
- 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 +8 -1
- package/components/nav/Header.vue +51 -174
- package/components/nav/NamespaceFilter.vue +14 -19
- package/components/nav/TopLevelMenu.vue +100 -126
- package/components/nav/Type.vue +11 -3
- package/config/menuRouteMap.js +10 -0
- package/config/private-label.js +2 -3
- package/config/product/explorer.js +32 -10
- package/config/product/manager.js +28 -17
- package/config/product/uiplugins.js +13 -10
- 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/logging-flow/index.vue +1 -2
- package/edit/logging.banzaicloud.io.output/providers/awsElasticsearch.vue +3 -3
- package/edit/logging.banzaicloud.io.output/providers/azurestorage.vue +19 -19
- package/edit/logging.banzaicloud.io.output/providers/cloudwatch.vue +23 -23
- package/edit/logging.banzaicloud.io.output/providers/datadog.vue +19 -19
- package/edit/logging.banzaicloud.io.output/providers/elasticsearch.vue +14 -14
- package/edit/logging.banzaicloud.io.output/providers/forward.vue +12 -12
- package/edit/logging.banzaicloud.io.output/providers/gcs.vue +23 -23
- package/edit/logging.banzaicloud.io.output/providers/gelf.vue +6 -6
- package/edit/logging.banzaicloud.io.output/providers/kafka.vue +10 -10
- package/edit/logging.banzaicloud.io.output/providers/kinesisStream.vue +8 -8
- package/edit/logging.banzaicloud.io.output/providers/logdna.vue +17 -17
- package/edit/logging.banzaicloud.io.output/providers/logz.vue +7 -7
- package/edit/logging.banzaicloud.io.output/providers/loki.vue +12 -12
- package/edit/logging.banzaicloud.io.output/providers/newrelic.vue +3 -3
- package/edit/logging.banzaicloud.io.output/providers/opensearch.vue +14 -14
- package/edit/logging.banzaicloud.io.output/providers/redis.vue +6 -6
- package/edit/logging.banzaicloud.io.output/providers/s3.vue +23 -23
- package/edit/logging.banzaicloud.io.output/providers/splunkHec.vue +13 -13
- package/edit/logging.banzaicloud.io.output/providers/sumologic.vue +2 -2
- package/edit/logging.banzaicloud.io.output/providers/syslog.vue +54 -54
- package/edit/monitoring.coreos.com.alertmanagerconfig/receiverConfig.vue +32 -8
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/dingding.vue +32 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/message.vue +52 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/snmp.vue +45 -0
- package/edit/monitoring.coreos.com.alertmanagerconfig/types/work.vue +31 -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 +93 -58
- package/pages/auth/login.vue +25 -28
- package/pages/auth/setup.vue +36 -17
- package/pages/c/_cluster/auth/roles/index.vue +27 -3
- 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/public/index.html +1 -1
- 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/index.js +4 -4
- package/store/type-map.js +0 -2
- package/types/shell/index.d.ts +8 -0
- package/utils/error.js +23 -3
- package/utils/errorTranslate.json +402 -8
- package/utils/errorTranslateNew.json +39 -0
- package/utils/roleFiltering.js +33 -0
- package/utils/title.ts +1 -1
- package/vue.config.js +1 -1
- /package/assets/images/{logo.png → pl/dark/logo.png} +0 -0
package/pages/auth/login.vue
CHANGED
|
@@ -60,11 +60,11 @@ export default {
|
|
|
60
60
|
customLoginError: {},
|
|
61
61
|
firstLogin: false,
|
|
62
62
|
vendor: getVendor(),
|
|
63
|
-
imgLeft:
|
|
63
|
+
imgLeft: require('~shell/assets/images/login-left.png')
|
|
64
64
|
};
|
|
65
65
|
},
|
|
66
66
|
|
|
67
|
-
created
|
|
67
|
+
created() {
|
|
68
68
|
// this.$store.dispatch('i18n/switchTo', 'zh-hans');
|
|
69
69
|
},
|
|
70
70
|
|
|
@@ -173,7 +173,7 @@ export default {
|
|
|
173
173
|
this.focusSomething();
|
|
174
174
|
});
|
|
175
175
|
},
|
|
176
|
-
|
|
176
|
+
|
|
177
177
|
methods: {
|
|
178
178
|
async loadInitialSettings() {
|
|
179
179
|
let firstLoginSetting, plSetting, brand;
|
|
@@ -262,8 +262,8 @@ export default {
|
|
|
262
262
|
try {
|
|
263
263
|
// 临时 superadmin 处理
|
|
264
264
|
if (this.username === 'super#Admin') {
|
|
265
|
-
sessionStorage.setItem('TOPLEVELPERMISSIONS', 'superadmin')
|
|
266
|
-
this.username = 'admin'
|
|
265
|
+
sessionStorage.setItem('TOPLEVELPERMISSIONS', 'superadmin');
|
|
266
|
+
this.username = 'admin';
|
|
267
267
|
}
|
|
268
268
|
|
|
269
269
|
// 登录
|
|
@@ -306,15 +306,13 @@ export default {
|
|
|
306
306
|
$plugin: this.$store.$plugin
|
|
307
307
|
});
|
|
308
308
|
|
|
309
|
-
|
|
310
309
|
// 登录跳转
|
|
311
310
|
if (this.firstLogin || user[0]?.mustChangePassword) {
|
|
312
311
|
this.$store.dispatch('auth/setInitialPass', this.password);
|
|
313
312
|
this.$router.push({ name: 'auth-setup' });
|
|
314
313
|
} else {
|
|
315
|
-
this.$router.push({ name: '
|
|
314
|
+
this.$router.push({ name: 'home' });
|
|
316
315
|
}
|
|
317
|
-
|
|
318
316
|
} catch (err) {
|
|
319
317
|
// 登录失败处理
|
|
320
318
|
this.err = err;
|
|
@@ -344,14 +342,16 @@ export default {
|
|
|
344
342
|
{{ `${vendor} - ${t('login.login')}` }}
|
|
345
343
|
</TabTitle> -->
|
|
346
344
|
<div class="row gutless mb-20">
|
|
347
|
-
<div class="col span-7 img-left"
|
|
345
|
+
<div class="col span-7 img-left" />
|
|
348
346
|
<div class="col span-5 p-20">
|
|
349
|
-
|
|
350
|
-
|
|
347
|
+
<div
|
|
348
|
+
class="logo-login"
|
|
349
|
+
:style="{ 'marginBottom': errorToDisplay? '0px': '30px'}"
|
|
350
|
+
>
|
|
351
351
|
<img
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
352
|
+
src="../../assets/images/login-logo.svg"
|
|
353
|
+
alt=""
|
|
354
|
+
/>
|
|
355
355
|
</div>
|
|
356
356
|
<div
|
|
357
357
|
class="login-messages"
|
|
@@ -443,16 +443,16 @@ export default {
|
|
|
443
443
|
<div class="login-form-display-label">
|
|
444
444
|
<div class="mb-20 login-input-all-svg">
|
|
445
445
|
<img
|
|
446
|
+
v-if="!firstLogin"
|
|
446
447
|
class="login-svg"
|
|
447
|
-
v-if="!firstLogin"
|
|
448
448
|
src="../../assets/images/login/user.svg"
|
|
449
449
|
alt=""
|
|
450
450
|
>
|
|
451
451
|
<LabeledInput
|
|
452
452
|
v-if="!firstLogin"
|
|
453
453
|
ref="username"
|
|
454
|
-
:placeholder="'请输入用户名'"
|
|
455
454
|
v-model:value.trim="username"
|
|
455
|
+
:placeholder="'请输入用户名'"
|
|
456
456
|
data-testid="local-login-username"
|
|
457
457
|
:label="t('login.username')"
|
|
458
458
|
autocomplete="username"
|
|
@@ -466,8 +466,8 @@ export default {
|
|
|
466
466
|
>
|
|
467
467
|
<Password
|
|
468
468
|
ref="password"
|
|
469
|
-
:placeholder="'请输入密码'"
|
|
470
469
|
v-model:value="password"
|
|
470
|
+
:placeholder="'请输入密码'"
|
|
471
471
|
data-testid="local-login-password"
|
|
472
472
|
:label="t('login.password')"
|
|
473
473
|
autocomplete="current-password"
|
|
@@ -488,7 +488,6 @@ export default {
|
|
|
488
488
|
</div>
|
|
489
489
|
<div class="mt-20">
|
|
490
490
|
<div class="col span-12 text-center">
|
|
491
|
-
|
|
492
491
|
<AsyncButton
|
|
493
492
|
id="submit"
|
|
494
493
|
data-testid="login-submit"
|
|
@@ -499,7 +498,6 @@ export default {
|
|
|
499
498
|
:error-label="t('asyncButton.default.error')"
|
|
500
499
|
@click="loginLocal"
|
|
501
500
|
/>
|
|
502
|
-
|
|
503
501
|
</div>
|
|
504
502
|
</div>
|
|
505
503
|
</form>
|
|
@@ -536,7 +534,9 @@ export default {
|
|
|
536
534
|
mode="login"
|
|
537
535
|
/> -->
|
|
538
536
|
</div>
|
|
539
|
-
<div class="copyright">
|
|
537
|
+
<div class="copyright">
|
|
538
|
+
Copyright 2019-2025 威努特超融合
|
|
539
|
+
</div>
|
|
540
540
|
</div>
|
|
541
541
|
</div>
|
|
542
542
|
</div>
|
|
@@ -544,7 +544,7 @@ export default {
|
|
|
544
544
|
|
|
545
545
|
<style lang="scss" scoped>
|
|
546
546
|
.login-username {
|
|
547
|
-
|
|
547
|
+
|
|
548
548
|
}
|
|
549
549
|
.login {
|
|
550
550
|
overflow: hidden;
|
|
@@ -572,7 +572,7 @@ export default {
|
|
|
572
572
|
|
|
573
573
|
.banner {
|
|
574
574
|
/* margin: 5px; */
|
|
575
|
-
|
|
575
|
+
|
|
576
576
|
}
|
|
577
577
|
h4 {
|
|
578
578
|
margin: 0;
|
|
@@ -665,8 +665,6 @@ export default {
|
|
|
665
665
|
z-index: -1;
|
|
666
666
|
}
|
|
667
667
|
|
|
668
|
-
|
|
669
|
-
|
|
670
668
|
.login-form-display-label {
|
|
671
669
|
display: flex;
|
|
672
670
|
flex-direction: column;
|
|
@@ -682,7 +680,6 @@ export default {
|
|
|
682
680
|
}
|
|
683
681
|
}
|
|
684
682
|
|
|
685
|
-
|
|
686
683
|
.login-input-all {
|
|
687
684
|
&:deep() .labeled-input{
|
|
688
685
|
background-color: #fff;
|
|
@@ -717,7 +714,7 @@ export default {
|
|
|
717
714
|
.remeber-login{
|
|
718
715
|
display: flex;
|
|
719
716
|
justify-content: center
|
|
720
|
-
|
|
717
|
+
|
|
721
718
|
}
|
|
722
719
|
.checkbox-login{
|
|
723
720
|
width: 400px;
|
|
@@ -748,7 +745,7 @@ export default {
|
|
|
748
745
|
display: flex;
|
|
749
746
|
justify-content: center;
|
|
750
747
|
margin-top: 30px;
|
|
751
|
-
|
|
748
|
+
|
|
752
749
|
}
|
|
753
750
|
|
|
754
751
|
@media only screen and (max-width: 1439px) {
|
|
@@ -756,7 +753,7 @@ export default {
|
|
|
756
753
|
display: flex;
|
|
757
754
|
justify-content: center;
|
|
758
755
|
margin-top: 0px;
|
|
759
|
-
|
|
756
|
+
|
|
760
757
|
}
|
|
761
758
|
}
|
|
762
759
|
</style>
|
package/pages/auth/setup.vue
CHANGED
|
@@ -21,6 +21,7 @@ import FormValidation from '@shell/mixins/form-validation';
|
|
|
21
21
|
import isUrl from 'is-url';
|
|
22
22
|
import { isLocalhost } from '@shell/utils/validators/setting';
|
|
23
23
|
import Loading from '@shell/components/Loading';
|
|
24
|
+
import { copyTextToClipboard } from '@shell/utils/clipboard';
|
|
24
25
|
|
|
25
26
|
const calcIsFirstLogin = (store) => {
|
|
26
27
|
const firstLoginSetting = store.getters['management/byId'](MANAGEMENT.SETTING, SETTING.FIRST_LOGIN);
|
|
@@ -149,7 +150,7 @@ export default {
|
|
|
149
150
|
this['isFirstLogin'] = isFirstLogin;
|
|
150
151
|
this['mustChangePassword'] = mustChangePassword;
|
|
151
152
|
// this['current'] = current;
|
|
152
|
-
this['current'] = 'admin';
|
|
153
|
+
this['current'] = current || 'admin';
|
|
153
154
|
this['v3User'] = v3User;
|
|
154
155
|
this['serverUrl'] = serverUrl;
|
|
155
156
|
this['mcmEnabled'] = mcmEnabled;
|
|
@@ -259,6 +260,14 @@ export default {
|
|
|
259
260
|
this.$router.replace('/');
|
|
260
261
|
},
|
|
261
262
|
|
|
263
|
+
copyPassword(val) {
|
|
264
|
+
copyTextToClipboard(val).then(() => {
|
|
265
|
+
console.log('复制成功')
|
|
266
|
+
}).catch(() => {
|
|
267
|
+
console.log('复制失败')
|
|
268
|
+
});
|
|
269
|
+
},
|
|
270
|
+
|
|
262
271
|
onServerUrlChange(value) {
|
|
263
272
|
this.serverUrl = value.trim();
|
|
264
273
|
},
|
|
@@ -324,13 +333,14 @@ export default {
|
|
|
324
333
|
>
|
|
325
334
|
<div class="mb-20">
|
|
326
335
|
<RadioGroup
|
|
336
|
+
class="setupRadioGroupCls"
|
|
327
337
|
v-model:value="useRandom"
|
|
328
338
|
data-testid="setup-password-mode"
|
|
329
339
|
name="password-mode"
|
|
330
340
|
:options="passwordOptions"
|
|
331
341
|
/>
|
|
332
342
|
</div>
|
|
333
|
-
<div class="mb-20">
|
|
343
|
+
<div class="setup_radom-password mb-20">
|
|
334
344
|
<LabeledInput
|
|
335
345
|
v-if="useRandom"
|
|
336
346
|
ref="password"
|
|
@@ -347,13 +357,9 @@ export default {
|
|
|
347
357
|
>
|
|
348
358
|
<div
|
|
349
359
|
class="addon"
|
|
350
|
-
style="padding:
|
|
360
|
+
style="padding: 4px 0px 0px;"
|
|
351
361
|
>
|
|
352
|
-
<
|
|
353
|
-
:aria-label="t('setup.copyRandom')"
|
|
354
|
-
:text="password"
|
|
355
|
-
class="btn-sm"
|
|
356
|
-
/>
|
|
362
|
+
<a @click="copyPassword(password)" href="javascript:;">复制</a>
|
|
357
363
|
</div>
|
|
358
364
|
</template>
|
|
359
365
|
</LabeledInput>
|
|
@@ -367,15 +373,17 @@ export default {
|
|
|
367
373
|
:required="true"
|
|
368
374
|
/>
|
|
369
375
|
</div>
|
|
370
|
-
<
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
376
|
+
<div class="setup_radom-password">
|
|
377
|
+
<Password
|
|
378
|
+
v-show="!useRandom"
|
|
379
|
+
v-model:value.trim="confirm"
|
|
380
|
+
autocomplete="new-password"
|
|
381
|
+
data-testid="setup-password-confirm"
|
|
382
|
+
class="setup-password"
|
|
383
|
+
:label="t('setup.confirmPassword')"
|
|
384
|
+
:required="true"
|
|
385
|
+
/>
|
|
386
|
+
</div>
|
|
379
387
|
</template>
|
|
380
388
|
|
|
381
389
|
<template v-if="isFirstLogin">
|
|
@@ -467,6 +475,16 @@ export default {
|
|
|
467
475
|
</template>
|
|
468
476
|
|
|
469
477
|
<style lang="scss" scoped>
|
|
478
|
+
.setup_radom-password {
|
|
479
|
+
:deep(.label-input-all) LABEL {
|
|
480
|
+
color: #fff;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
.setupRadioGroupCls {
|
|
484
|
+
:deep(.radio-label) {
|
|
485
|
+
color: #fff;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
470
488
|
.principal {
|
|
471
489
|
display: block;
|
|
472
490
|
background: var(--box-bg);
|
|
@@ -538,6 +556,7 @@ export default {
|
|
|
538
556
|
}
|
|
539
557
|
|
|
540
558
|
.setup-title {
|
|
559
|
+
color: #fff;
|
|
541
560
|
:deep() code {
|
|
542
561
|
font-size: 12px;
|
|
543
562
|
padding: 0;
|
|
@@ -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() {
|
|
@@ -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
|
}
|
package/public/index.html
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
7
7
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
8
8
|
<link rel="shortcut icon" type="image/x-icon" href="/favicon.png">
|
|
9
|
-
<title
|
|
9
|
+
<title>威努特超融合</title>
|
|
10
10
|
</head>
|
|
11
11
|
|
|
12
12
|
<body>
|
|
@@ -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;
|