From a1e56b9542dcde3ddf89c389e7775de28a68d878 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 4 Nov 2025 10:20:41 +0530 Subject: [PATCH 1/2] ui: show usage server restart message on usage config change Fixes #10853 Signed-off-by: Abhishek Kumar --- ui/public/locales/en.json | 1 + ui/src/components/view/ListView.vue | 10 +--------- ui/src/utils/plugins.js | 13 +++++++++++++ ui/src/views/setting/ConfigurationValue.vue | 20 ++------------------ 4 files changed, 17 insertions(+), 27 deletions(-) diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index 4f450e940fc0..071359f534c2 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -3726,6 +3726,7 @@ "message.resource.not.found": "Resource not found.", "message.restart.mgmt.server": "Please restart your management server(s) for your new settings to take effect.", "message.restart.network": "All services provided by this Network will be interrupted. Please confirm that you want to restart this Network.", +"message.restart.usage.server": "Please restart your usage server(s) for your new settings to take effect.", "message.restart.vm.to.update.settings": "Update in fields other than name and display name will require the Instance to be restarted.", "message.restart.vpc": "Please confirm that you want to restart the VPC.", "message.restart.vpc.remark": "Please confirm that you want to restart the VPC

Remark: making a non-redundant VPC redundant will force a clean up. The Networks will not be available for a couple of minutes.

", diff --git a/ui/src/components/view/ListView.vue b/ui/src/components/view/ListView.vue index 47aa3d2ddef1..6ec6dfa7d00e 100644 --- a/ui/src/components/view/ListView.vue +++ b/ui/src/components/view/ListView.vue @@ -1245,15 +1245,7 @@ export default { this.editableValueKey = null this.$store.dispatch('RefreshFeatures') this.$messageConfigSuccess(`${this.$t('message.setting.updated')} ${record.name}`, record) - if (json.updateconfigurationresponse && - json.updateconfigurationresponse.configuration && - !json.updateconfigurationresponse.configuration.isdynamic && - ['Admin'].includes(this.$store.getters.userInfo.roletype)) { - this.$notification.warning({ - message: this.$t('label.status'), - description: this.$t('message.restart.mgmt.server') - }) - } + this.$notifyConfigurationValueChange(json?.updateconfigurationresponse?.configuration || null) }).catch(error => { console.error(error) this.$message.error(this.$t('message.error.save.setting')) diff --git a/ui/src/utils/plugins.js b/ui/src/utils/plugins.js index 648bc3ae0811..3c64c5fe01aa 100644 --- a/ui/src/utils/plugins.js +++ b/ui/src/utils/plugins.js @@ -549,6 +549,19 @@ export const dialogUtilPlugin = { onOk: () => callback(configRecord) }) } + + app.config.globalProperties.$notifyConfigurationValueChange = function (configRecord) { + console.log('1notifyConfigurationValueChange', configRecord, store.getters.userInfo?.roletype) + if (!configRecord || configRecord.isdynamic || store.getters.userInfo?.roletype !== 'Admin') { + return + } + const server = configRecord.group === 'Usage Server' ? 'usage' : 'mgmt' + console.log('2notifyConfigurationValueChange', configRecord, store.getters.userInfo?.roletype, server) + this.$notification.warning({ + message: this.$t('label.status'), + description: this.$t('message.restart.' + server + '.server') + }) + } } } diff --git a/ui/src/views/setting/ConfigurationValue.vue b/ui/src/views/setting/ConfigurationValue.vue index e438f0eb8315..22292c17b15b 100644 --- a/ui/src/views/setting/ConfigurationValue.vue +++ b/ui/src/views/setting/ConfigurationValue.vue @@ -286,15 +286,7 @@ export default { this.$emit('change-config', { value: newValue }) this.$store.dispatch('RefreshFeatures') this.$messageConfigSuccess(`${this.$t('message.setting.updated')} ${configrecord.name}`, configrecord) - if (json.updateconfigurationresponse && - json.updateconfigurationresponse.configuration && - !json.updateconfigurationresponse.configuration.isdynamic && - ['Admin'].includes(this.$store.getters.userInfo.roletype)) { - this.$notification.warning({ - message: this.$t('label.status'), - description: this.$t('message.restart.mgmt.server') - }) - } + this.$notifyConfigurationValueChange(json?.updateconfigurationresponse?.configuration || null) }).catch(error => { this.editableValue = this.actualValue console.error(error) @@ -325,15 +317,7 @@ export default { this.$emit('change-config', { value: newValue }) this.$store.dispatch('RefreshFeatures') this.$messageConfigSuccess(`${this.$t('label.setting')} ${configrecord.name} ${this.$t('label.reset.config.value')}`, configrecord) - if (json.resetconfigurationresponse && - json.resetconfigurationresponse.configuration && - !json.resetconfigurationresponse.configuration.isdynamic && - ['Admin'].includes(this.$store.getters.userInfo.roletype)) { - this.$notification.warning({ - message: this.$t('label.status'), - description: this.$t('message.restart.mgmt.server') - }) - } + this.$notifyConfigurationValueChange(json?.resetconfigurationresponse?.configuration || null) }).catch(error => { this.editableValue = this.actualValue console.error(error) From c24c1e05443539a67ca8b11e4c05b9b890adeb7a Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 4 Nov 2025 15:10:14 +0530 Subject: [PATCH 2/2] Update plugins.js --- ui/src/utils/plugins.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui/src/utils/plugins.js b/ui/src/utils/plugins.js index 3c64c5fe01aa..2c5b5d4f8bbe 100644 --- a/ui/src/utils/plugins.js +++ b/ui/src/utils/plugins.js @@ -551,12 +551,10 @@ export const dialogUtilPlugin = { } app.config.globalProperties.$notifyConfigurationValueChange = function (configRecord) { - console.log('1notifyConfigurationValueChange', configRecord, store.getters.userInfo?.roletype) if (!configRecord || configRecord.isdynamic || store.getters.userInfo?.roletype !== 'Admin') { return } const server = configRecord.group === 'Usage Server' ? 'usage' : 'mgmt' - console.log('2notifyConfigurationValueChange', configRecord, store.getters.userInfo?.roletype, server) this.$notification.warning({ message: this.$t('label.status'), description: this.$t('message.restart.' + server + '.server')