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.
@@ -416,6 +416,7 @@ export default {
416
416
  </script>
417
417
 
418
418
  <template>
419
+ 测试111111111111111111111111
419
420
  <div class="project-namespaces outlet">
420
421
  <Masthead
421
422
  :schema="projectSchema"
@@ -256,7 +256,7 @@ export default {
256
256
  const defaultLocation = {
257
257
  name: 'c-cluster-product-resource',
258
258
  params: {
259
- resource: harvesterhci2cloud(this.resource),
259
+ resource: this.resource,
260
260
  product,
261
261
  }
262
262
  };
@@ -86,7 +86,7 @@ export default {
86
86
  data() {
87
87
  const params = { ...this.$route.params };
88
88
 
89
- params.resource = harvesterhci2cloud(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() {
@@ -155,7 +155,7 @@ export default {
155
155
  },
156
156
 
157
157
  isVirtualProduct() {
158
- return this.rootProduct.name === harvester2cloud(HARVESTER);
158
+ return this.rootProduct.name === HARVESTER;
159
159
  },
160
160
 
161
161
  allNavLinks() {
@@ -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?.includes('.')) {
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 && hasEditComponent ? '100px' : '-10px',maxHeight: '32px'}"
1230
+ :style="{marginTop: search&& !isBanner ? marginTopValue + 'px' : '0px',marginLeft: isCreatable ? '100px' : '-10px',maxHeight: '32px'}"
1244
1231
  >
1245
1232
  <slot name="title" />
1246
1233
  <div
@@ -737,7 +737,7 @@ export default {
737
737
  <Tab
738
738
  v-if="isRancherRoleTemplate"
739
739
  name="inherit-from"
740
- label="继承表单"
740
+ label="Inherit From"
741
741
  :weight="0"
742
742
  >
743
743
  <ArrayList
@@ -256,7 +256,7 @@ export default {
256
256
  const defaultLocation = {
257
257
  name: 'c-cluster-product-resource',
258
258
  params: {
259
- resource: harvesterhci2cloud(this.resource),
259
+ resource: this.resource,
260
260
  product,
261
261
  }
262
262
  };
@@ -70,7 +70,7 @@ export default {
70
70
  data() {
71
71
  const params = { ...this.$route.params };
72
72
 
73
- params.resource = harvesterhci2cloud(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 = harvesterhci2cloud(params.resource)
94
+ params.resource = params.resource
95
95
 
96
96
  const formRoute = { name: `${ cloud2harvesterhci(this.$route.name) }-create`, params };
97
97
 
@@ -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
- // to.params.product = to.params.product.replace(/harvester/g, 'cloud')
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
- console.log('-----------------------------------------------------3');
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: harvester2cloud(HARVESTER) };
58
+ location.params = { cluster: this.$rootGetters['currentCluster'].id, product: HARVESTER };
59
59
 
60
60
  location.query = {
61
61
  ...location.query,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dashboard-shell-shell",
3
- "version": "1.0.1000000098",
3
+ "version": "1.0.1000000099",
4
4
  "description": "Rancher Dashboard Shell",
5
5
  "repository": "https://github.com/rancherlabs/dashboard",
6
6
  "license": "Apache-2.0",
@@ -79,7 +79,7 @@ export default {
79
79
  },
80
80
 
81
81
  isHarvester() {
82
- return this.isSingleProduct?.productName === harvester2cloud(HARVESTER);
82
+ return this.isSingleProduct?.productName === HARVESTER;
83
83
  },
84
84
 
85
85
  singleProvider() {
@@ -78,7 +78,7 @@ export default {
78
78
  },
79
79
 
80
80
  isHarvester() {
81
- return this.isSingleProduct?.productName === harvester2cloud(HARVESTER);
81
+ return this.isSingleProduct?.productName === HARVESTER;
82
82
  },
83
83
 
84
84
  singleProvider() {
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 === harvester2cloud(HARVESTER);
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: harvesterhci2cloud(this.type),
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: harvesterhci2cloud(this.type),
1288
+ resource: this.type,
1289
1289
  namespace: this.metadata?.namespace,
1290
1290
  id,
1291
1291
  }
@@ -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 harvesterhci2cloud(str: any): any;
4164
+ export function str: any: any;
4165
4165
  export function cloud2harvesterhci(str: any): any;
4166
- export function harvester2cloud(str: any): any;
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;