diff --git a/frontend/src/features/admin/views/AdminBackupView.vue b/frontend/src/features/admin/views/AdminBackupView.vue index 13f0d9a..f97e7ac 100644 --- a/frontend/src/features/admin/views/AdminBackupView.vue +++ b/frontend/src/features/admin/views/AdminBackupView.vue @@ -17,8 +17,15 @@ const loading = ref(false) const saving = ref(false) const status = ref(null) const statusError = ref('') -const canUpdateSchedule = computed(() => adminSession.isSuperAdmin || adminSession.hasPermission('backup:schedule:update')) -const schedule = reactive({ enabled: true, full_hour: 4, full_minute: 30, binlog_interval_minutes: 1 }) +const canUpdateSchedule = computed( + () => adminSession.isSuperAdmin || adminSession.hasPermission('backup:schedule:update') +) +const schedule = reactive({ + enabled: true, + full_hour: 4, + full_minute: 30, + binlog_interval_minutes: 1, +}) const healthLabel = computed(() => (status.value?.health === 'healthy' ? '链路正常' : '需要检查')) const healthType = computed(() => (status.value?.health === 'healthy' ? 'success' : 'warning')) @@ -27,7 +34,10 @@ async function load() { loading.value = true statusError.value = '' try { - const [nextStatus, nextSchedule] = await Promise.all([fetchBackupStatus(), fetchBackupSchedule()]) + const [nextStatus, nextSchedule] = await Promise.all([ + fetchBackupStatus(), + fetchBackupSchedule(), + ]) status.value = nextStatus Object.assign(schedule, nextSchedule) } catch (error) { @@ -64,7 +74,7 @@ onMounted(load)
- + {{ healthLabel }}
@@ -77,7 +87,7 @@ onMounted(load)
- +
本地完成标识
@@ -87,7 +97,7 @@ onMounted(load)
- +
Binlog 文件
@@ -101,41 +111,176 @@ onMounted(load) - - - - -
- - : - -
-
- - - - - - - - - 保存定时配置 +
+ + + + +
+ + : + +
+
+ + + + + + + + +
+
+ 保存定时配置 +