dashboard-shell-shell 1.0.1000000081 → 1.0.1000000082
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.
|
@@ -186,6 +186,23 @@ export default {
|
|
|
186
186
|
_createButtonlabel() {
|
|
187
187
|
return this.createButtonLabel || this.t('resourceList.head.create');
|
|
188
188
|
},
|
|
189
|
+
|
|
190
|
+
canCreateCustom() {
|
|
191
|
+
return this.hasEditComponent && this._isCreatable;
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
|
|
195
|
+
watch: {
|
|
196
|
+
canCreateCustom: {
|
|
197
|
+
immediate: true,
|
|
198
|
+
handler(newVal) {
|
|
199
|
+
|
|
200
|
+
console.log(newVal, ' newVal---------------------------');
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
this.$store.commit('type-map/setMastheadCreatable', newVal);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
189
206
|
}
|
|
190
207
|
};
|
|
191
208
|
</script>
|
|
@@ -637,6 +637,7 @@ export default {
|
|
|
637
637
|
computed: {
|
|
638
638
|
...mapGetters({ isTooManyItemsToAutoUpdate: 'resource-fetch/isTooManyItemsToAutoUpdate' }),
|
|
639
639
|
...mapGetters({ isManualRefreshLoading: 'resource-fetch/manualRefreshIsLoading' }),
|
|
640
|
+
...mapGetters('type-map', ['mastheadCreatable']),
|
|
640
641
|
namespaces() {
|
|
641
642
|
return this.$store.getters['activeNamespaceCache'];
|
|
642
643
|
},
|
|
@@ -1224,10 +1225,11 @@ export default {
|
|
|
1224
1225
|
ref="container"
|
|
1225
1226
|
:data-testid="componentTestid + '-list-container'"
|
|
1226
1227
|
>
|
|
1228
|
+
{{ mastheadCreatable }}
|
|
1227
1229
|
<div
|
|
1228
1230
|
:class="{'titled': $slots.title && $slots.title.length, 'mb-40': isFilterLabel, 'mb-20': search || isCreatable}"
|
|
1229
1231
|
class="sortable-table-header "
|
|
1230
|
-
:style="{marginTop: search&& !isBanner ? marginTopValue + 'px' : '0px',marginLeft: isCreatable ? '100px' : '-10px',maxHeight: '32px'}"
|
|
1232
|
+
:style="{marginTop: search&& !isBanner ? marginTopValue + 'px' : '0px',marginLeft: isCreatable && mastheadCreatable ? '100px' : '-10px',maxHeight: '32px'}"
|
|
1231
1233
|
>
|
|
1232
1234
|
<slot name="title" />
|
|
1233
1235
|
<div
|
package/package.json
CHANGED
package/store/type-map.js
CHANGED
|
@@ -432,10 +432,13 @@ export const state = function() {
|
|
|
432
432
|
'cloud-credential': {}
|
|
433
433
|
|
|
434
434
|
},
|
|
435
|
+
mastheadCreatable: true,
|
|
435
436
|
};
|
|
436
437
|
};
|
|
437
438
|
|
|
438
439
|
export const getters = {
|
|
440
|
+
mastheadCreatable: (state) => state.mastheadCreatable,
|
|
441
|
+
|
|
439
442
|
// ----------------------------------------------------------------------------
|
|
440
443
|
// 1 ) Getting info
|
|
441
444
|
// ----------------------------------------------------------------------------
|
|
@@ -1484,6 +1487,10 @@ export const getters = {
|
|
|
1484
1487
|
};
|
|
1485
1488
|
|
|
1486
1489
|
export const mutations = {
|
|
1490
|
+
setMastheadCreatable(state, value) {
|
|
1491
|
+
state.mastheadCreatable = value;
|
|
1492
|
+
},
|
|
1493
|
+
|
|
1487
1494
|
schemaChanged(state) {
|
|
1488
1495
|
state.schemaGeneration = state.schemaGeneration + 1;
|
|
1489
1496
|
},
|
|
@@ -3858,8 +3858,10 @@ export function state(): {
|
|
|
3858
3858
|
'machine-config': {};
|
|
3859
3859
|
'cloud-credential': {};
|
|
3860
3860
|
};
|
|
3861
|
+
mastheadCreatable: boolean;
|
|
3861
3862
|
};
|
|
3862
3863
|
export namespace getters {
|
|
3864
|
+
function mastheadCreatable(state: any): any;
|
|
3863
3865
|
function labelFor(state: any, getters: any, rootState: any, rootGetters: any): (schema: any, count?: number, language?: any) => any;
|
|
3864
3866
|
function groupLabelFor(state: any): (schemaOrName: any) => any;
|
|
3865
3867
|
function groupForBasicType(state: any): (product: any, schemaId: any) => any;
|
|
@@ -3922,6 +3924,7 @@ export namespace getters {
|
|
|
3922
3924
|
function productByName(state: any): (productName: any) => any;
|
|
3923
3925
|
}
|
|
3924
3926
|
export namespace mutations {
|
|
3927
|
+
function setMastheadCreatable(state: any, value: any): void;
|
|
3925
3928
|
function schemaChanged(state: any): void;
|
|
3926
3929
|
function remove(state: any, { product, plugin }: {
|
|
3927
3930
|
product: any;
|
|
@@ -9407,8 +9410,10 @@ export function state(): {
|
|
|
9407
9410
|
'machine-config': {};
|
|
9408
9411
|
'cloud-credential': {};
|
|
9409
9412
|
};
|
|
9413
|
+
mastheadCreatable: boolean;
|
|
9410
9414
|
};
|
|
9411
9415
|
export namespace getters {
|
|
9416
|
+
function mastheadCreatable(state: any): any;
|
|
9412
9417
|
function labelFor(state: any, getters: any, rootState: any, rootGetters: any): (schema: any, count?: number, language?: any) => any;
|
|
9413
9418
|
function groupLabelFor(state: any): (schemaOrName: any) => any;
|
|
9414
9419
|
function groupForBasicType(state: any): (product: any, schemaId: any) => any;
|
|
@@ -9471,6 +9476,7 @@ export namespace getters {
|
|
|
9471
9476
|
function productByName(state: any): (productName: any) => any;
|
|
9472
9477
|
}
|
|
9473
9478
|
export namespace mutations {
|
|
9479
|
+
function setMastheadCreatable(state: any, value: any): void;
|
|
9474
9480
|
function schemaChanged(state: any): void;
|
|
9475
9481
|
function remove(state: any, { product, plugin }: {
|
|
9476
9482
|
product: any;
|