dashboard-shell-shell 1.0.1000000082 → 1.0.1000000083

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.
@@ -92,6 +92,9 @@ export default {
92
92
 
93
93
  const hasEditComponent = this.$store.getters['type-map/hasCustomEdit'](this.resource);
94
94
 
95
+ console.log(hasEditComponent, ' hasEditComponent------------------------------------1');
96
+
97
+
95
98
  const yamlRoute = {
96
99
  name: `${ cloud2harvesterhci(this.$route.name) }-create`,
97
100
  params,
@@ -418,13 +418,28 @@ 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
+ console.log(hasEditComponent, ' hasEditComponent------------------------------------2');
440
+
427
441
  return {
442
+ hasEditComponent,
428
443
  refreshButtonPhase: isLoading ? ASYNC_BUTTON_STATES.WAITING : ASYNC_BUTTON_STATES.ACTION,
429
444
  expanded: {},
430
445
  searchQuery,
@@ -637,7 +652,6 @@ export default {
637
652
  computed: {
638
653
  ...mapGetters({ isTooManyItemsToAutoUpdate: 'resource-fetch/isTooManyItemsToAutoUpdate' }),
639
654
  ...mapGetters({ isManualRefreshLoading: 'resource-fetch/manualRefreshIsLoading' }),
640
- ...mapGetters('type-map', ['mastheadCreatable']),
641
655
  namespaces() {
642
656
  return this.$store.getters['activeNamespaceCache'];
643
657
  },
@@ -1225,11 +1239,10 @@ export default {
1225
1239
  ref="container"
1226
1240
  :data-testid="componentTestid + '-list-container'"
1227
1241
  >
1228
- {{ mastheadCreatable }}
1229
1242
  <div
1230
1243
  :class="{'titled': $slots.title && $slots.title.length, 'mb-40': isFilterLabel, 'mb-20': search || isCreatable}"
1231
1244
  class="sortable-table-header "
1232
- :style="{marginTop: search&& !isBanner ? marginTopValue + 'px' : '0px',marginLeft: isCreatable && mastheadCreatable ? '100px' : '-10px',maxHeight: '32px'}"
1245
+ :style="{marginTop: search&& !isBanner ? marginTopValue + 'px' : '0px',marginLeft: isCreatable && hasEditComponent ? '100px' : '-10px',maxHeight: '32px'}"
1233
1246
  >
1234
1247
  <slot name="title" />
1235
1248
  <div
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dashboard-shell-shell",
3
- "version": "1.0.1000000082",
3
+ "version": "1.0.1000000083",
4
4
  "description": "Rancher Dashboard Shell",
5
5
  "repository": "https://github.com/rancherlabs/dashboard",
6
6
  "license": "Apache-2.0",