mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-10 04:16:29 +08:00
fix: fix issue with add node do not restart docker (#8838)
This commit is contained in:
parent
7bcfa78573
commit
ee04f4afc8
4 changed files with 5 additions and 6 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue