From 33c126c900b44bceb593e579e3d623e2123b25d4 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 10 Apr 2020 16:24:32 +0530 Subject: [PATCH] view: notify admin to restart MS for non-dynamic settings Signed-off-by: Abhishek Kumar --- src/components/view/ListView.vue | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/components/view/ListView.vue b/src/components/view/ListView.vue index b43b7664e..2f01845c1 100644 --- a/src/components/view/ListView.vue +++ b/src/components/view/ListView.vue @@ -266,14 +266,19 @@ export default { api('updateConfiguration', { name: record.name, value: this.editableValue - }).then(() => { + }).then(json => { this.editableValueKey = null this.$message.success('Setting Updated: ' + record.name) - this.$notification.warning({ - message: 'Status', - description: 'Please restart your management server(s) for your new settings to take effect.' - }) + if (json.updateconfigurationresponse && + json.updateconfigurationresponse.configuration && + !json.updateconfigurationresponse.configuration.isdynamic && + ['Admin'].includes(this.$store.getters.userInfo.roletype)) { + this.$notification.warning({ + message: 'Status', + description: 'Please restart your management server(s) for your new settings to take effect.' + }) + } }).catch(error => { console.error(error) this.$message.error('There was an error saving this setting.')