fix: Fix timezone modification reboot exception (#9432)

Refs #9422
This commit is contained in:
ssongliu 2025-07-07 12:05:50 +08:00 committed by GitHub
parent e2b6ea5253
commit 2bee68dd40
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 4 deletions

View file

@ -120,7 +120,7 @@ func (u *DeviceService) Update(key, value string) error {
if err := ntp.UpdateSystemTimeZone(value); err != nil { if err := ntp.UpdateSystemTimeZone(value); err != nil {
return err return err
} }
go common.RestartService(true, true, false) go common.RestartService(global.IsMaster, true, false)
case "DNS": case "DNS":
if err := updateDNS(strings.Split(value, ",")); err != nil { if err := updateDNS(strings.Split(value, ",")); err != nil {
return err return err

View file

@ -100,9 +100,14 @@ const onSave = async (formEl: FormInstance | undefined) => {
.then(async () => { .then(async () => {
loading.value = false; loading.value = false;
MsgSuccess(i18n.global.t('commons.msg.operationSuccess')); MsgSuccess(i18n.global.t('commons.msg.operationSuccess'));
globalStore.isLogin = false; if (globalStore.currentNode === 'local') {
let href = window.location.href; globalStore.isLogin = false;
window.open(href, '_self'); let href = window.location.href;
window.open(href, '_self');
} else {
globalStore.currentNode = 'local';
location.reload();
}
}) })
.catch(() => { .catch(() => {
loading.value = false; loading.value = false;