mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-05 21:14:40 +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
|
||||
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
|
||||
i++
|
||||
}
|
||||
|
|
|
@ -242,6 +242,7 @@ func loadDbConn(snap *snapHelper, targetDir string, req dto.SnapshotCreate) erro
|
|||
return err
|
||||
}
|
||||
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")
|
||||
snap.Task.LogWithStatus(i18n.GetWithName("SnapNewDB", "core"), err)
|
||||
if err != nil {
|
||||
|
|
|
@ -136,7 +136,7 @@ export const updateAppStoreConfig = (req: App.AppStoreConfigUpdate) => {
|
|||
|
||||
// snapshot
|
||||
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) => {
|
||||
return http.post(`/settings/snapshot`, param);
|
||||
|
|
|
@ -397,6 +397,8 @@ const load18n = (node: any, label: string) => {
|
|||
return i18n.global.t('setting.' + label + 'Label');
|
||||
case 'system_snapshot':
|
||||
return i18n.global.t('setting.snapshotLabel');
|
||||
case 'master':
|
||||
return i18n.global.t('xpack.node.masterBackup');
|
||||
default:
|
||||
return label;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue