Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ui/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <p><i>Remark: making a non-redundant VPC redundant will force a clean up. The Networks will not be available for a couple of minutes</i>.</p>",
Expand Down
10 changes: 1 addition & 9 deletions ui/src/components/view/ListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down
11 changes: 11 additions & 0 deletions ui/src/utils/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,17 @@ export const dialogUtilPlugin = {
onOk: () => callback(configRecord)
})
}

app.config.globalProperties.$notifyConfigurationValueChange = function (configRecord) {
if (!configRecord || configRecord.isdynamic || store.getters.userInfo?.roletype !== 'Admin') {
return
}
const server = configRecord.group === 'Usage Server' ? 'usage' : 'mgmt'
this.$notification.warning({
message: this.$t('label.status'),
description: this.$t('message.restart.' + server + '.server')
})
}
}
}

Expand Down
20 changes: 2 additions & 18 deletions ui/src/views/setting/ConfigurationValue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
Loading