mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-09 23:17:21 +08:00
parent
fd9c421969
commit
5fd9d20f99
4 changed files with 5 additions and 2 deletions
|
@ -121,7 +121,7 @@ func (u *SnapshotService) LoadSnapshotData() (dto.SnapshotData, error) {
|
||||||
}
|
}
|
||||||
i := 0
|
i := 0
|
||||||
for _, item := range itemBackups {
|
for _, item := range itemBackups {
|
||||||
if item.Label != "app" && item.Label != "system_snapshot" {
|
if item.Label != "app" && item.Label != "system_snapshot" && item.Label != "tmp" {
|
||||||
itemBackups[i] = item
|
itemBackups[i] = item
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
|
|
|
@ -242,6 +242,7 @@ func loadDbConn(snap *snapHelper, targetDir string, req dto.SnapshotCreate) erro
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
snap.snapAgentDB = agentDb
|
snap.snapAgentDB = agentDb
|
||||||
|
_ = snap.snapAgentDB.Model(&model.Setting{}).Where("key = ?", "SystemIP").Updates(map[string]interface{}{"value": ""}).Error
|
||||||
coreDb, err := common.LoadDBConnByPathWithErr(path.Join(targetDir, "db/core.db"), "core.db")
|
coreDb, err := common.LoadDBConnByPathWithErr(path.Join(targetDir, "db/core.db"), "core.db")
|
||||||
snap.Task.LogWithStatus(i18n.GetWithName("SnapNewDB", "core"), err)
|
snap.Task.LogWithStatus(i18n.GetWithName("SnapNewDB", "core"), err)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -136,7 +136,7 @@ export const updateAppStoreConfig = (req: App.AppStoreConfigUpdate) => {
|
||||||
|
|
||||||
// snapshot
|
// snapshot
|
||||||
export const loadSnapshotInfo = () => {
|
export const loadSnapshotInfo = () => {
|
||||||
return http.get<Setting.SnapshotData>(`/settings/snapshot/load`);
|
return http.get<Setting.SnapshotData>(`/settings/snapshot/load`, {}, TimeoutEnum.T_60S);
|
||||||
};
|
};
|
||||||
export const snapshotCreate = (param: Setting.SnapshotCreate) => {
|
export const snapshotCreate = (param: Setting.SnapshotCreate) => {
|
||||||
return http.post(`/settings/snapshot`, param);
|
return http.post(`/settings/snapshot`, param);
|
||||||
|
|
|
@ -397,6 +397,8 @@ const load18n = (node: any, label: string) => {
|
||||||
return i18n.global.t('setting.' + label + 'Label');
|
return i18n.global.t('setting.' + label + 'Label');
|
||||||
case 'system_snapshot':
|
case 'system_snapshot':
|
||||||
return i18n.global.t('setting.snapshotLabel');
|
return i18n.global.t('setting.snapshotLabel');
|
||||||
|
case 'master':
|
||||||
|
return i18n.global.t('xpack.node.masterBackup');
|
||||||
default:
|
default:
|
||||||
return label;
|
return label;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue