fix: fix issue with add node do not restart docker (#8838)

This commit is contained in:
CityFun 2025-05-26 18:56:18 +08:00 committed by GitHub
parent 7bcfa78573
commit ee04f4afc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 6 deletions

View file

@ -147,7 +147,6 @@ func (u *DockerService) UpdateConf(req dto.SettingUpdate, withRestart bool) erro
}
daemonMap := make(map[string]interface{})
_ = json.Unmarshal(file, &daemonMap)
switch req.Key {
case "Registries":
req.Value = strings.TrimSuffix(req.Value, ",")
@ -480,6 +479,7 @@ func getDockerRestartCommand() (string, error) {
}
func restartDocker() error {
global.LOG.Info("restart docker")
restartCmd, err := getDockerRestartCommand()
if err != nil {
return err

View file

@ -245,11 +245,11 @@ export namespace Setting {
nodeID: number;
licenseID: number;
syncList: string;
withRestartDocker: boolean;
withDockerRestart: boolean;
}
export interface LicenseUnbind {
id: number;
force: boolean;
withRestartDocker: boolean;
withDockerRestart: boolean;
}
}

View file

@ -95,12 +95,11 @@ const onBind = async (formEl: FormInstance | undefined) => {
const submit = async () => {
loading.value = true;
console.log(withDockerRestart.value);
await bindLicense({
licenseID: form.licenseID,
nodeID: form.nodeID,
syncList: form.syncList,
withRestartDocker: withDockerRestart.value,
withDockerRestart: withDockerRestart.value,
})
.then(() => {
loading.value = false;

View file

@ -192,7 +192,7 @@ const submitUnbind = async () => {
await unbindLicense({
id: unbindRow.value.id,
force: forceUnbind.value,
withRestartDocker: withDockerRestart.value,
withDockerRestart: withDockerRestart.value,
})
.then(() => {
loading.value = false;