mirror of https://github.com/rancher/ui.git
Merge pull request #4975 from nwmac/allow-labels-imported-clusters
Allow labels to be edited on k3s imported clusters
This commit is contained in:
commit
25b24c86d7
|
|
@ -415,8 +415,18 @@ export default Component.extend(ViewNewEdit, ChildHook, {
|
|||
};
|
||||
}),
|
||||
|
||||
// If this is a k3s cluster, then prevent editing of two 'system' labels
|
||||
readonlyLabels: computed('isK3sCluster', function() {
|
||||
const isK3sCluster = get(this, 'isK3sCluster');
|
||||
|
||||
return isK3sCluster ? [
|
||||
'provider.cattle.io',
|
||||
'objectset.rio.cattle.io/hash'
|
||||
] : [];
|
||||
}),
|
||||
|
||||
isImportedOther: computed('isK3sCluster', 'provider', 'router.currentRoute.queryParams.importProvider', function() {
|
||||
// This is a special case because k3s is treated as a special cluster and no longer looks imported by the time it's actve
|
||||
// This is a special case because k3s is treated as a special cluster and no longer looks imported by the time it's active
|
||||
if (get(this, 'isK3sCluster')) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,8 @@
|
|||
expandFn=expandFn
|
||||
initialLabels=model.cluster.labels
|
||||
model=model.cluster
|
||||
editing=(and (and notView (not (or isK3sCluster isRke2Cluster))) (not isEksClusterPending))
|
||||
readonlyLabels=readonlyLabels
|
||||
editing=(and (and notView (not isRke2Cluster)) (not isEksClusterPending))
|
||||
}}
|
||||
{{/accordion-list}}
|
||||
{{#if isImportedOther}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue