bfg-common 1.5.426 → 1.5.428
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,10 @@
|
|
1
1
|
<template>
|
2
2
|
<common-pages-backups-modals-create-backup
|
3
|
-
v-if="
|
3
|
+
v-if="schedulerTask.isShow"
|
4
4
|
v-model="backupForm"
|
5
5
|
v-model:scheduler-form="schedulerTaskForm"
|
6
|
-
:is-scheduled-tasks="
|
7
|
-
:is-edit-scheduled-tasks="
|
6
|
+
:is-scheduled-tasks="schedulerTask.scheduler.isSchedulerTask"
|
7
|
+
:is-edit-scheduled-tasks="schedulerTask.scheduler.editTask"
|
8
8
|
:target="props.target"
|
9
9
|
:selected-vm-name="props.selectedVmName"
|
10
10
|
:disks="props.disks"
|
@@ -55,6 +55,7 @@ import type { UI_I_NetworkTableItem } from '~/lib/models/store/network/interface
|
|
55
55
|
import type { UI_I_WizardStep } from '~/components/atoms/wizard/lib/models/interfaces'
|
56
56
|
import type { UI_I_BackupAction } from '~/components/common/pages/backups/lib/models/interfaces'
|
57
57
|
import type { UI_I_NameCheck } from '~/components/common/pages/backups/modals/restore/name/lib/models/interfaces'
|
58
|
+
import type { UI_I_ModalPayloadSchedulerData } from '~/components/common/pages/scheduledTasks/lib/models/interfaces'
|
58
59
|
import { sendTask } from '~/lib/utils/sendTask'
|
59
60
|
import { scheduledTaskDefaultFormFunc } from '~/components/common/pages/scheduledTasks/modals/lib/config/createScheduledTask'
|
60
61
|
import { backupDefaultFormFunc } from '~/components/common/pages/backups/modals/lib/config/createBackup'
|
@@ -100,10 +101,18 @@ const schedulerTaskForm = ref<UI_I_ScheduleNewTasksForm>(
|
|
100
101
|
const restoreForm = ref<UI_I_RestoreForm>(useDeepCopy(restoreDefaultFormFunc()))
|
101
102
|
const deleteBackupId = ref<string>('')
|
102
103
|
|
103
|
-
|
104
|
-
const isShowCreateBackupModal = computed<any>( // ??
|
104
|
+
const schedulerTask = computed<UI_I_ModalPayloadSchedulerData>(
|
105
105
|
() => $store.getters['backup/getCreateBackupModal']
|
106
106
|
)
|
107
|
+
watch(
|
108
|
+
schedulerTask,
|
109
|
+
(newValue: UI_I_ModalPayloadSchedulerData) => {
|
110
|
+
if (!newValue.isSchedulerTask) return
|
111
|
+
schedulerTaskForm.value = newValue.data
|
112
|
+
},
|
113
|
+
{ immediate: true, deep: true }
|
114
|
+
)
|
115
|
+
|
107
116
|
const isShowDeleteBackupModal = ref<boolean>(false)
|
108
117
|
const isShowDeleteAllBackupsModal = ref<boolean>(false)
|
109
118
|
const isLoadingDeleteBackup = ref<boolean>(false)
|
@@ -122,7 +131,7 @@ const onCreateBackup = (): void => {
|
|
122
131
|
|
123
132
|
const {
|
124
133
|
scheduler: { isSchedulerTask, editTask, data },
|
125
|
-
} =
|
134
|
+
} = schedulerTask.value
|
126
135
|
const sendData = isSchedulerTask
|
127
136
|
? scheduledTasks(
|
128
137
|
schedulerTaskForm.value,
|
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
|
2
|
+
|
3
|
+
export interface UI_I_ModalPayloadSchedulerData<T = UI_I_ScheduleNewTasksForm> {
|
2
4
|
isSchedulerTask: false
|
3
5
|
editTask: false
|
4
6
|
data: T
|
@@ -27,7 +29,7 @@ export interface API_UI_I_ScheduledTasksTableItem {
|
|
27
29
|
}[]
|
28
30
|
}
|
29
31
|
export interface UI_I_ScheduledTasksTableItem
|
30
|
-
|
32
|
+
extends API_UI_I_ScheduledTasksTableItem {}
|
31
33
|
|
32
34
|
export interface UI_I_CreateScheduledTaskArgs {
|
33
35
|
name: string
|
@@ -37,4 +39,4 @@ export interface UI_I_CreateScheduledTaskArgs {
|
|
37
39
|
cron_2: string
|
38
40
|
notify_emails: string
|
39
41
|
args: string
|
40
|
-
}
|
42
|
+
}
|
@@ -183,10 +183,6 @@ import { mapCapabilities } from '~/components/common/vm/actions/common/lib/utils
|
|
183
183
|
import { scheduledTaskDefaultFormFunc } from '~/components/common/pages/scheduledTasks/modals/lib/config/createScheduledTask'
|
184
184
|
import { capabilities } from '~/components/common/vm/actions/common/lib/config/capabilities'
|
185
185
|
|
186
|
-
const modelSchedulerTask = defineModel<UI_I_ScheduleNewTasksForm>(
|
187
|
-
'schedulerForm',
|
188
|
-
{ required: true }
|
189
|
-
)
|
190
186
|
const props = withDefaults(
|
191
187
|
defineProps<{
|
192
188
|
project: UI_T_Project
|