mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-02-04 15:01:46 +00:00
refactor: allow editConfig when status is empty
Signed-off-by: Andy Lee <andy.lee@suse.com>
This commit is contained in:
parent
9f0eca1725
commit
16a0df8864
@ -14,8 +14,8 @@ export default class MIGCONFIGURATION extends SteveModel {
|
|||||||
if (action.action === 'goToEditYaml') {
|
if (action.action === 'goToEditYaml') {
|
||||||
return { ...action, enabled: true };
|
return { ...action, enabled: true };
|
||||||
} else if (action.action === 'goToEdit') {
|
} else if (action.action === 'goToEdit') {
|
||||||
// need to wait for status to be disabled, then allow user to editConfig
|
// need to wait for status to be disabled or empty value, then allow user to editConfig
|
||||||
return { ...action, enabled: !this.spec.enabled && this.configStatus === 'disabled' };
|
return { ...action, enabled: !this.spec.enabled && ['disabled', ''].includes(this.configStatus) };
|
||||||
} else {
|
} else {
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
@ -48,6 +48,8 @@ export default class MIGCONFIGURATION extends SteveModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
get configStatus() {
|
get configStatus() {
|
||||||
|
// console.log("🚀 ~ MIGCONFIGURATION ~ configStatus ~ this.status.status:", this.status.status)
|
||||||
|
// console.log('this.status.status.length', this.status.status?.length);
|
||||||
return this.status.status;
|
return this.status.status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user