summaryrefslogtreecommitdiff
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-27 21:07:53 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-27 21:07:53 +0000
commitf50b93c373428d624cc2cabe98e4022dce846e67 (patch)
tree0349e25d3d106aabd6b520afa96ebd35578ab38b /app/assets/javascripts
parente20baee820ea2c76ee16980a98e8080f255d9035 (diff)
downloadgitlab-ce-f50b93c373428d624cc2cabe98e4022dce846e67.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/clusters/components/ingress_modsecurity_settings.vue12
-rw-r--r--app/assets/javascripts/clusters/stores/clusters_store.js2
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;
}