Skip to content

Commit b80c55c

Browse files
authored
feat: Add the display of details for backup accounts. (#7941)
1 parent 8e645d9 commit b80c55c

File tree

17 files changed

+188
-88
lines changed

17 files changed

+188
-88
lines changed

agent/app/dto/snapshot.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,6 @@ package dto
22

33
import "time"
44

5-
type SnapshotStatus struct {
6-
BaseData string `json:"baseData"`
7-
AppImage string `json:"appImage"`
8-
PanelData string `json:"panelData"`
9-
BackupData string `json:"backupData"`
10-
11-
Compress string `json:"compress"`
12-
Size string `json:"size"`
13-
Upload string `json:"upload"`
14-
}
15-
165
type PageSnapshot struct {
176
PageInfo
187
Info string `json:"info"`

agent/cron/cron.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ func Run() {
7272
global.LOG.Errorf("update cronjob %s %s failed, err: %v", cronJobs[i].Type, cronJobs[i].Name, err)
7373
}
7474
}
75+
global.Cron.Start()
7576
}
7677

7778
func syncBeforeStart() {

core/app/dto/setting.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,6 @@ type PortUpdate struct {
8080
ServerPort uint `json:"serverPort" validate:"required,number,max=65535,min=1"`
8181
}
8282

83-
type SnapshotStatus struct {
84-
Panel string `json:"panel"`
85-
PanelInfo string `json:"panelInfo"`
86-
DaemonJson string `json:"daemonJson"`
87-
AppData string `json:"appData"`
88-
PanelData string `json:"panelData"`
89-
BackupData string `json:"backupData"`
90-
91-
Compress string `json:"compress"`
92-
Size string `json:"size"`
93-
Upload string `json:"upload"`
94-
}
95-
9683
type SnapshotCreate struct {
9784
ID uint `json:"id"`
9885
From string `json:"from" validate:"required"`

frontend/src/api/interface/setting.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -198,16 +198,6 @@ export namespace Setting {
198198

199199
Children: Array<DataTree>;
200200
}
201-
export interface SnapshotStatus {
202-
baseData: string;
203-
appImage: string;
204-
panelData: string;
205-
backupData: string;
206-
207-
compress: string;
208-
size: string;
209-
upload: string;
210-
}
211201
export interface UpgradeInfo {
212202
testVersion: string;
213203
newVersion: string;

frontend/src/api/modules/setting.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,6 @@ export const snapshotCreate = (param: Setting.SnapshotCreate) => {
121121
export const snapshotRecreate = (id: number) => {
122122
return http.post(`/settings/snapshot/recreate`, { id: id });
123123
};
124-
export const loadSnapStatus = (id: number) => {
125-
return http.post<Setting.SnapshotStatus>(`/settings/snapshot/status`, { id: id });
126-
};
127124
export const snapshotImport = (param: Setting.SnapshotImport) => {
128125
return http.post(`/settings/snapshot/import`, param);
129126
};

frontend/src/components/codemirror-pro/index.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const initCodeMirror = () => {
7070
const defaultTheme = EditorView.theme({
7171
'&.cm-editor': {
7272
minHeight: props.minHeight + 'px',
73-
height: props.height ? props.height + 'px' : 'calc(100vh - ' + props.heightDiff + 'px)',
73+
height: loadHeight(),
7474
},
7575
});
7676
@@ -119,6 +119,12 @@ const initCodeMirror = () => {
119119
});
120120
};
121121
122+
const loadHeight = () => {
123+
if (props.height || props.heightDiff) {
124+
return props.height ? props.height + 'px' : 'calc(100vh - ' + props.heightDiff + 'px)';
125+
}
126+
};
127+
122128
watch(
123129
() => content.value,
124130
(newValue) => {
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<template>
2+
<DialogPro v-model="visible" :title="$t('app.detail')">
3+
<div class="mt-5">
4+
<el-descriptions border :column="1">
5+
<el-descriptions-item v-for="(item, key) in list" :label="item.label" :key="key">
6+
{{ item.value }}
7+
<CopyButton v-if="!item.hideCopy" :content="item.value" type="icon" />
8+
</el-descriptions-item>
9+
</el-descriptions>
10+
</div>
11+
<template #footer>
12+
<span class="dialog-footer">
13+
<el-button @click="visible = false">
14+
{{ $t('commons.button.cancel') }}
15+
</el-button>
16+
</span>
17+
</template>
18+
</DialogPro>
19+
</template>
20+
21+
<script lang="ts" setup>
22+
import { ref } from 'vue';
23+
24+
const list = ref();
25+
const visible = ref(false);
26+
27+
interface DialogProps {
28+
list: Array<string>;
29+
}
30+
31+
const acceptParams = (props: DialogProps): void => {
32+
visible.value = true;
33+
list.value = props.list;
34+
};
35+
36+
defineExpose({
37+
acceptParams,
38+
});
39+
</script>

frontend/src/lang/modules/en.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,14 +1185,15 @@ const message = {
11851185
apps: 'App',
11861186
websites: 'Website',
11871187
containers: 'Container',
1188-
files: 'File Manage',
1188+
files: 'File',
11891189
runtimes: 'Runtime',
11901190
process: 'Process',
11911191
toolbox: 'Toolbox',
1192+
backups: 'Backup / Restore',
11921193
tampers: 'Tamper',
11931194
xsetting: 'Interface Settings',
1194-
logs: 'Panel Logs',
1195-
settings: 'Panel Setting',
1195+
logs: 'Log',
1196+
settings: 'Setting',
11961197
cronjobs: 'Cronjob',
11971198
databases: 'Database',
11981199
},

frontend/src/lang/modules/ja.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,16 +1122,19 @@ const message = {
11221122
detail: {
11231123
groups: 'グループ',
11241124
hosts: 'ホスト',
1125-
apps: 'アプリ',
1126-
websites: 'Webサイト',
1127-
containers: '容器',
1125+
apps: 'アプリケーション',
1126+
websites: 'ウェブサイト',
1127+
containers: 'コンテナ',
11281128
files: 'ファイル管理',
11291129
runtimes: 'ランタイム',
1130-
process: 'プロセス',
1130+
process: 'プロセス管理',
11311131
toolbox: 'ツールボックス',
1132-
logs: 'パネルログ',
1132+
backups: 'バックアップ / 復元',
1133+
tampers: '改ざん防止',
1134+
xsetting: 'インターフェース設定',
1135+
logs: 'ログ監査',
11331136
settings: 'パネル設定',
1134-
cronjobs: 'クローニョブ',
1137+
cronjobs: 'スケジュールされたタスク',
11351138
databases: 'データベース',
11361139
},
11371140
websiteLog: 'ウェブサイトログ',

frontend/src/lang/modules/ko.ts

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,12 +1114,15 @@ const message = {
11141114
websites: '웹사이트',
11151115
containers: '컨테이너',
11161116
files: '파일 관리',
1117-
runtimes: '런타임',
1118-
process: '프로세스',
1119-
toolbox: '도구상자',
1120-
logs: '패널 로그',
1117+
runtimes: '실행 환경',
1118+
process: '프로세스 관리',
1119+
toolbox: '도구 상자',
1120+
backups: '백업 / 복원',
1121+
tampers: '변조 방지',
1122+
xsetting: '인터페이스 설정',
1123+
logs: '로그 감사',
11211124
settings: '패널 설정',
1122-
cronjobs: '크론 작업',
1125+
cronjobs: '예약 작업',
11231126
databases: '데이터베이스',
11241127
},
11251128
websiteLog: '웹사이트 로그',

0 commit comments

Comments
 (0)