diff options
Diffstat (limited to 'app/assets/javascripts/clusters')
-rw-r--r-- | app/assets/javascripts/clusters/components/ingress_modsecurity_settings.vue | 12 | ||||
-rw-r--r-- | app/assets/javascripts/clusters/stores/clusters_store.js | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/app/assets/javascripts/clusters/components/ingress_modsecurity_settings.vue b/app/assets/javascripts/clusters/components/ingress_modsecurity_settings.vue index 6b9a926143d..e4bc00fc102 100644 --- a/app/assets/javascripts/clusters/components/ingress_modsecurity_settings.vue +++ b/app/assets/javascripts/clusters/components/ingress_modsecurity_settings.vue @@ -93,7 +93,10 @@ export default { return [UPDATING].includes(this.ingress.status); }, saveButtonDisabled() { - return [UNINSTALLING, UPDATING, INSTALLING].includes(this.ingress.status); + return ( + [UNINSTALLING, UPDATING, INSTALLING].includes(this.ingress.status) || + this.ingress.updateAvailable + ); }, saveButtonLabel() { return this.saving ? __('Saving') : __('Save changes'); @@ -105,13 +108,14 @@ export default { * neither getting installed nor updated. */ showButtons() { - return ( - this.saving || (this.hasValueChanged && [INSTALLED, UPDATED].includes(this.ingress.status)) - ); + return this.saving || this.valuesChangedByUser; }, modSecurityModeName() { return this.modes[this.ingress.modsecurity_mode].name; }, + valuesChangedByUser() { + return this.hasValueChanged && [INSTALLED, UPDATED].includes(this.ingress.status); + }, }, methods: { updateApplication() { diff --git a/app/assets/javascripts/clusters/stores/clusters_store.js b/app/assets/javascripts/clusters/stores/clusters_store.js index d3382fcf9fe..8685e3decc5 100644 --- a/app/assets/javascripts/clusters/stores/clusters_store.js +++ b/app/assets/javascripts/clusters/stores/clusters_store.js @@ -59,6 +59,7 @@ export default class ClusterStore { isEditingModSecurityEnabled: false, isEditingModSecurityMode: false, updateFailed: false, + updateAvailable: false, }, cert_manager: { ...applicationInitialState, @@ -213,6 +214,7 @@ export default class ClusterStore { if (appId === INGRESS) { this.state.applications.ingress.externalIp = serverAppEntry.external_ip; this.state.applications.ingress.externalHostname = serverAppEntry.external_hostname; + this.state.applications.ingress.updateAvailable = updateAvailable; if (!this.state.applications.ingress.isEditingModSecurityEnabled) { this.state.applications.ingress.modsecurity_enabled = serverAppEntry.modsecurity_enabled; } |