dashboard-shell-shell 1.0.1000000098 → 1.0.1000000099
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ExplorerProjectsNamespaces.vue +1 -0
- package/components/ResourceDetail/Masthead.vue +1 -1
- package/components/ResourceList/Masthead.vue +3 -1
- package/components/SideNav.vue +1 -1
- package/components/SortableTable/index.vue +2 -15
- package/components/auth/RoleDetailEdit.vue +1 -1
- package/components/rancherResourceDetail/Masthead.vue +1 -1
- package/components/rancherResourceList/Masthead-btn.vue +1 -1
- package/components/rancherResourceList/Masthead.vue +1 -1
- package/config/product/auth.js +1 -1
- package/config/router/navigation-guards/index.js +6 -4
- package/models/management.cattle.io.setting.js +1 -1
- package/package.json +1 -1
- package/pages/auth/login.vue +1 -1
- package/pages/auth copy/login.vue +1 -1
- package/pages/prefs.vue +1 -1
- package/plugins/dashboard-store/resource-class.js +2 -2
- package/types/shell/index.d.ts +2 -2
|
@@ -86,7 +86,7 @@ export default {
|
|
|
86
86
|
data() {
|
|
87
87
|
const params = { ...this.$route.params };
|
|
88
88
|
|
|
89
|
-
params.resource =
|
|
89
|
+
params.resource = params.resource
|
|
90
90
|
|
|
91
91
|
const formRoute = { name: `${ cloud2harvesterhci(this.$route.name) }-create`, params };
|
|
92
92
|
|
|
@@ -128,6 +128,8 @@ export default {
|
|
|
128
128
|
return '?';
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
// console.log(this.$store.getters['type-map/labelFor'](this.schema, 99), ' type-map/labelFor---------------')
|
|
132
|
+
|
|
131
133
|
return this.$store.getters['type-map/labelFor'](this.schema, 99);
|
|
132
134
|
},
|
|
133
135
|
_descriptionDisplay() {
|
package/components/SideNav.vue
CHANGED
|
@@ -418,26 +418,13 @@ export default {
|
|
|
418
418
|
let isCreatable = false;
|
|
419
419
|
const lastPath = cloud2harvesterhci(this.$route.path.split('/').pop());
|
|
420
420
|
|
|
421
|
-
if (lastPath
|
|
421
|
+
if (lastPath.includes('.')) {
|
|
422
422
|
isCreatable = this.$store.getters['type-map/optionsFor'](lastPath).isCreatable;
|
|
423
423
|
} else if (lastPath === 'namespace') {
|
|
424
424
|
isCreatable = this.$store.getters['type-map/optionsFor'](this.$route.name).isCreatable;
|
|
425
425
|
}
|
|
426
426
|
|
|
427
|
-
const resource = cloud2harvesterhci(this.$route.params.resource);
|
|
428
|
-
|
|
429
|
-
let hasEditComponent = false
|
|
430
|
-
|
|
431
|
-
if (lastPath?.includes('.')) {
|
|
432
|
-
hasEditComponent = this.$store.getters['type-map/hasCustomEdit'](lastPath);
|
|
433
|
-
} else if (lastPath === 'namespace') {
|
|
434
|
-
hasEditComponent = this.$store.getters['type-map/hasCustomEdit'](this.$route.name);
|
|
435
|
-
} else {
|
|
436
|
-
hasEditComponent = this.$store.getters['type-map/hasCustomEdit'](resource);
|
|
437
|
-
}
|
|
438
|
-
|
|
439
427
|
return {
|
|
440
|
-
hasEditComponent,
|
|
441
428
|
refreshButtonPhase: isLoading ? ASYNC_BUTTON_STATES.WAITING : ASYNC_BUTTON_STATES.ACTION,
|
|
442
429
|
expanded: {},
|
|
443
430
|
searchQuery,
|
|
@@ -1240,7 +1227,7 @@ export default {
|
|
|
1240
1227
|
<div
|
|
1241
1228
|
:class="{'titled': $slots.title && $slots.title.length, 'mb-40': isFilterLabel, 'mb-20': search || isCreatable}"
|
|
1242
1229
|
class="sortable-table-header "
|
|
1243
|
-
:style="{marginTop: search&& !isBanner ? marginTopValue + 'px' : '0px',marginLeft: isCreatable
|
|
1230
|
+
:style="{marginTop: search&& !isBanner ? marginTopValue + 'px' : '0px',marginLeft: isCreatable ? '100px' : '-10px',maxHeight: '32px'}"
|
|
1244
1231
|
>
|
|
1245
1232
|
<slot name="title" />
|
|
1246
1233
|
<div
|
|
@@ -70,7 +70,7 @@ export default {
|
|
|
70
70
|
data() {
|
|
71
71
|
const params = { ...this.$route.params };
|
|
72
72
|
|
|
73
|
-
params.resource =
|
|
73
|
+
params.resource = params.resource
|
|
74
74
|
|
|
75
75
|
const formRoute = { name: `${ cloud2harvesterhci(this.$route.name) }-create`, params };
|
|
76
76
|
|
|
@@ -91,7 +91,7 @@ export default {
|
|
|
91
91
|
data() {
|
|
92
92
|
const params = { ...this.$route.params };
|
|
93
93
|
|
|
94
|
-
params.resource =
|
|
94
|
+
params.resource = params.resource
|
|
95
95
|
|
|
96
96
|
const formRoute = { name: `${ cloud2harvesterhci(this.$route.name) }-create`, params };
|
|
97
97
|
|
package/config/product/auth.js
CHANGED
|
@@ -24,7 +24,7 @@ export function init(store) {
|
|
|
24
24
|
spoofedType,
|
|
25
25
|
virtualType,
|
|
26
26
|
} = DSL(store, NAME);
|
|
27
|
-
|
|
27
|
+
console.log('------------------------------------------------2')
|
|
28
28
|
product({
|
|
29
29
|
ifHaveType: new RegExp(`${ MANAGEMENT.USER }|${ MANAGEMENT.AUTH_CONFIG }`, 'i'),
|
|
30
30
|
ifHaveVerb: 'GET',
|
|
@@ -20,11 +20,12 @@ export function installNavigationGuards(router, context) {
|
|
|
20
20
|
// 最早执行:保证进入逻辑时 params 始终是 harvester
|
|
21
21
|
router.beforeEach((to, from, next) => {
|
|
22
22
|
|
|
23
|
-
console.log('-----------------------------------------------------1');
|
|
23
|
+
console.log(to.params.product, 'to.params.product-----------------------------------------------------1');
|
|
24
|
+
console.log(to.params.cluster, 'to.params.cluster-----------------------------------------------------1');
|
|
24
25
|
|
|
25
26
|
// 内部逻辑统一用 harvesterManager
|
|
26
27
|
if (to?.params?.product) {
|
|
27
|
-
|
|
28
|
+
to.params.product = to.params.product.replace(/cloud/g, 'harvester')
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
if (to?.params?.cluster) {
|
|
@@ -50,10 +51,11 @@ export function installNavigationGuards(router, context) {
|
|
|
50
51
|
|
|
51
52
|
navigationGuardInstallers.forEach(installer => installer(router, context));
|
|
52
53
|
|
|
53
|
-
// 最后执行:只改地址栏,不改内部
|
|
54
|
+
// 🔹 最后执行:只改地址栏,不改内部
|
|
54
55
|
router.afterEach((to) => {
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
console.log(to.params.product, 'to.params.product-----------------------------------------------------3');
|
|
58
|
+
console.log(to.params.cluster, 'to.params.cluster-----------------------------------------------------3');
|
|
57
59
|
|
|
58
60
|
const cloudPath = to.fullPath
|
|
59
61
|
.replace(/harvester/g, 'cloud')
|
|
@@ -55,7 +55,7 @@ export default class Setting extends HybridModel {
|
|
|
55
55
|
goToEdit(moreQuery = {}) {
|
|
56
56
|
if (this.$rootGetters['currentProduct'].inStore === HARVESTER) {
|
|
57
57
|
location.name = `${ HARVESTER }-c-cluster-brand`;
|
|
58
|
-
location.params = { cluster: this.$rootGetters['currentCluster'].id, product:
|
|
58
|
+
location.params = { cluster: this.$rootGetters['currentCluster'].id, product: HARVESTER };
|
|
59
59
|
|
|
60
60
|
location.query = {
|
|
61
61
|
...location.query,
|
package/package.json
CHANGED
package/pages/auth/login.vue
CHANGED
package/pages/prefs.vue
CHANGED
|
@@ -45,7 +45,7 @@ export default {
|
|
|
45
45
|
...mapGetters({ hasMultipleLocales: 'i18n/hasMultipleLocales' }),
|
|
46
46
|
|
|
47
47
|
isHarvester() {
|
|
48
|
-
return this.isSingleProduct?.productName ===
|
|
48
|
+
return this.isSingleProduct?.productName === HARVESTER;
|
|
49
49
|
},
|
|
50
50
|
|
|
51
51
|
theme: {
|
|
@@ -1270,7 +1270,7 @@ export default class Resource {
|
|
|
1270
1270
|
params: {
|
|
1271
1271
|
product: this.$rootGetters['productId'],
|
|
1272
1272
|
cluster: this.$rootGetters['clusterId'],
|
|
1273
|
-
resource:
|
|
1273
|
+
resource: this.type,
|
|
1274
1274
|
}
|
|
1275
1275
|
};
|
|
1276
1276
|
}
|
|
@@ -1285,7 +1285,7 @@ export default class Resource {
|
|
|
1285
1285
|
params: {
|
|
1286
1286
|
product: this.$rootGetters['productId'],
|
|
1287
1287
|
cluster: this.$rootGetters['clusterId'],
|
|
1288
|
-
resource:
|
|
1288
|
+
resource: this.type,
|
|
1289
1289
|
namespace: this.metadata?.namespace,
|
|
1290
1290
|
id,
|
|
1291
1291
|
}
|
package/types/shell/index.d.ts
CHANGED
|
@@ -4161,9 +4161,9 @@ export function setPromiseResult(promise: any, obj: any, key: any, label: any):
|
|
|
4161
4161
|
// @shell/utils/router
|
|
4162
4162
|
|
|
4163
4163
|
declare module '@shell/utils/router' {
|
|
4164
|
-
export function
|
|
4164
|
+
export function str: any: any;
|
|
4165
4165
|
export function cloud2harvesterhci(str: any): any;
|
|
4166
|
-
export function
|
|
4166
|
+
export function str: any: any;
|
|
4167
4167
|
export function cloud2harvester(str: any): any;
|
|
4168
4168
|
export function queryParamsFor(current: any, qp: any, defaults?: {}): any;
|
|
4169
4169
|
export function getClusterFromRoute(to: any): any;
|