bfg-common 1.5.417 → 1.5.419
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.
- package/components/common/modals/confirmation/ConfirmationNew.vue +1 -1
- package/components/common/pages/backups/Backups.vue +102 -0
- package/components/common/pages/backups/DetailView.vue +52 -0
- package/components/common/pages/backups/lib/models/interfaces.ts +24 -0
- package/components/common/pages/backups/lib/models/types.ts +7 -0
- package/components/common/pages/backups/modals/Modals.vue +229 -0
- package/components/common/pages/backups/modals/createBackup/CreateBackup.vue +371 -0
- package/components/common/pages/backups/modals/createBackup/configuration/Configuration.vue +29 -0
- package/components/common/pages/backups/modals/createBackup/configuration/backupWindow/BackupWindow.vue +26 -0
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/MaxBandwidth.vue +65 -0
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -0
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/models/types.ts +1 -0
- package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue +36 -0
- package/components/common/pages/backups/modals/createBackup/datastores/Datastores.vue +58 -0
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/TableView.vue +94 -0
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/lib/config/keys.ts +14 -0
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/lib/config/table.ts +117 -0
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/lib/models/types.ts +10 -0
- package/components/common/pages/backups/modals/createBackup/disks/Disks.vue +28 -0
- package/components/common/pages/backups/modals/createBackup/disks/tableView/TableView.vue +105 -0
- package/components/common/pages/backups/modals/createBackup/disks/tableView/lib/config/keys.ts +12 -0
- package/components/common/pages/backups/modals/createBackup/disks/tableView/lib/config/table.ts +117 -0
- package/components/common/pages/backups/modals/createBackup/disks/tableView/lib/models/interfaces.ts +4 -0
- package/components/common/pages/backups/modals/createBackup/disks/tableView/lib/models/types.ts +10 -0
- package/components/common/pages/backups/modals/createBackup/general/General.vue +48 -0
- package/components/common/pages/backups/modals/createBackup/lib/config/createBackup.ts +14 -0
- package/components/common/pages/backups/modals/createBackup/lib/config/steps.ts +117 -0
- package/components/common/pages/backups/modals/createBackup/lib/config/strategyOptions.ts +12 -0
- package/components/common/pages/backups/modals/createBackup/lib/models/interfaces.ts +8 -0
- package/components/common/pages/backups/modals/createBackup/readyToComplete/ReadyToComplete.vue +15 -0
- package/components/common/pages/backups/modals/lib/config/createBackup.ts +16 -0
- package/components/common/pages/backups/modals/lib/config/restore.ts +115 -0
- package/components/common/pages/backups/modals/lib/models/interfaces.ts +164 -0
- package/components/common/pages/backups/modals/restore/Restore.vue +388 -0
- package/components/common/pages/backups/modals/restore/disks/Disks.vue +28 -0
- package/components/common/pages/backups/modals/restore/disks/tableView/TableView.vue +101 -0
- package/components/common/pages/backups/modals/restore/disks/tableView/lib/config/keys.ts +14 -0
- package/components/common/pages/backups/modals/restore/disks/tableView/lib/config/table.ts +114 -0
- package/components/common/pages/backups/modals/restore/disks/tableView/lib/models/interfaces.ts +4 -0
- package/components/common/pages/backups/modals/restore/disks/tableView/lib/models/types.ts +10 -0
- package/components/common/pages/backups/modals/restore/lib/config/steps.ts +92 -0
- package/components/common/pages/backups/modals/restore/name/Name.vue +159 -0
- package/components/common/pages/backups/modals/restore/networks/Networks.vue +67 -0
- package/components/common/pages/backups/modals/restore/networks/table/Table.vue +216 -0
- package/components/common/pages/backups/modals/restore/networks/table/adapterType/AdapterType.vue +32 -0
- package/components/common/pages/backups/modals/restore/networks/table/adapterType/lib/config/options.ts +8 -0
- package/components/common/pages/backups/modals/restore/networks/table/lib/config/networkTable.ts +82 -0
- package/components/common/pages/backups/modals/restore/networks/table/lib/config/tableKeys.ts +10 -0
- package/components/common/pages/backups/modals/restore/networks/table/lib/models/types.ts +6 -0
- package/components/common/pages/backups/modals/restore/types/Types.vue +61 -0
- package/components/common/pages/backups/modals/restore/types/lib/config/descriptions.ts +7 -0
- package/components/common/pages/backups/modals/restore/types/lib/config/typeOptions.ts +24 -0
- package/components/common/pages/backups/tools/Tools.vue +75 -0
- package/components/common/pages/backups/tools/lib/config/tabs.ts +36 -0
- package/components/common/pages/scheduledTasks/lib/models/interfaces.ts +35 -0
- package/components/common/pages/scheduledTasks/lib/models/types.ts +16 -0
- package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -0
- package/components/common/treeView/TreeView.vue +52 -0
- package/lib/models/interfaces.ts +1 -1
- package/package.json +1 -1
- /package/components/common/{backup/actions → pages/backups/modals}/deleteBackup/DeleteBackup.vue +0 -0
package/components/common/pages/backups/modals/createBackup/datastores/tableView/lib/config/keys.ts
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
import type {
|
2
|
+
UI_T_DatastoreTableKeysTuple
|
3
|
+
} from '~/components/common/pages/backups/modals/createBackup/datastores/tableView/lib/models/types';
|
4
|
+
|
5
|
+
export const tableKeys: UI_T_DatastoreTableKeysTuple = [
|
6
|
+
'name',
|
7
|
+
'state',
|
8
|
+
'capacity',
|
9
|
+
'capacity',
|
10
|
+
'capacity',
|
11
|
+
'capacity',
|
12
|
+
'type_text',
|
13
|
+
'location'
|
14
|
+
]
|
package/components/common/pages/backups/modals/createBackup/datastores/tableView/lib/config/table.ts
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
import type {
|
2
|
+
UI_I_HeadItem,
|
3
|
+
UI_I_ColumnKey,
|
4
|
+
UI_I_BodyItem,
|
5
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
6
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
7
|
+
import {
|
8
|
+
constructHeadItem,
|
9
|
+
constructColumnKey,
|
10
|
+
} from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
11
|
+
import { datastoreLocalizationByState } from '~/components/common/lib/config/states'
|
12
|
+
import { tableKeys } from '~/components/common/pages/backups/modals/createBackup/datastores/tableView/lib/config/keys'
|
13
|
+
|
14
|
+
const getItems = (
|
15
|
+
localization: UI_I_Localization
|
16
|
+
): [string, boolean, string, string][] => {
|
17
|
+
return [
|
18
|
+
[localization.common.name, true, '180px', tableKeys[0]],
|
19
|
+
[localization.inventorySummary.state, true, '180px', tableKeys[1]],
|
20
|
+
[localization.common.capacity, true, '180px', tableKeys[2]],
|
21
|
+
[localization.common.provisioned, true, '180px', tableKeys[3]],
|
22
|
+
[localization.common.free, true, '180px', tableKeys[4]],
|
23
|
+
[localization.common.used, true, '180px', tableKeys[5]],
|
24
|
+
[localization.common.type, true, '180px', tableKeys[6]],
|
25
|
+
[localization.common.location, true, '180px', tableKeys[7]],
|
26
|
+
]
|
27
|
+
}
|
28
|
+
export const columnKeys = (
|
29
|
+
localization: UI_I_Localization
|
30
|
+
): UI_I_ColumnKey[] => {
|
31
|
+
const result: UI_I_ColumnKey[] = []
|
32
|
+
getItems(localization).forEach((item, i) => {
|
33
|
+
result.push(
|
34
|
+
constructColumnKey(`col${i}`, item[0], item[1], `show-column-${item[3]}`)
|
35
|
+
)
|
36
|
+
})
|
37
|
+
return result
|
38
|
+
}
|
39
|
+
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
40
|
+
const result: UI_I_HeadItem[] = []
|
41
|
+
getItems(localization).forEach((item, i) => {
|
42
|
+
result.push(
|
43
|
+
constructHeadItem(
|
44
|
+
`col${i}`,
|
45
|
+
item[0],
|
46
|
+
item[3],
|
47
|
+
true,
|
48
|
+
item[2],
|
49
|
+
undefined,
|
50
|
+
item[3]
|
51
|
+
)
|
52
|
+
)
|
53
|
+
})
|
54
|
+
return result
|
55
|
+
}
|
56
|
+
|
57
|
+
export const bodyItems = (
|
58
|
+
data: any, // ??
|
59
|
+
localization: UI_I_Localization
|
60
|
+
): UI_I_BodyItem[][] => {
|
61
|
+
const { $binary }: any = useNuxtApp()
|
62
|
+
const lang = useLocalStorage('lang') === 'ru_RU' ? 'ru' : 'en'
|
63
|
+
|
64
|
+
const bodyItems: UI_I_BodyItem[][] = []
|
65
|
+
data.forEach((datastore: any) => { // ??
|
66
|
+
const state =
|
67
|
+
localization.common[datastoreLocalizationByState[datastore[tableKeys[1]]]]
|
68
|
+
|
69
|
+
bodyItems.push([
|
70
|
+
{
|
71
|
+
key: 'col0',
|
72
|
+
text: datastore[tableKeys[0]],
|
73
|
+
id: datastore.id,
|
74
|
+
},
|
75
|
+
{
|
76
|
+
key: 'col1',
|
77
|
+
text: state,
|
78
|
+
id: datastore.id,
|
79
|
+
},
|
80
|
+
{
|
81
|
+
key: 'col2',
|
82
|
+
text: $binary.round(datastore[tableKeys[2]].capacity_mb, false, lang),
|
83
|
+
id: datastore.id,
|
84
|
+
},
|
85
|
+
{
|
86
|
+
key: 'col3',
|
87
|
+
text: $binary.round(
|
88
|
+
datastore[tableKeys[3]].provisioned_mb,
|
89
|
+
false,
|
90
|
+
lang
|
91
|
+
),
|
92
|
+
id: datastore.id,
|
93
|
+
},
|
94
|
+
{
|
95
|
+
key: 'col4',
|
96
|
+
text: $binary.round(datastore[tableKeys[4]].free_mb, false, lang),
|
97
|
+
id: datastore.id,
|
98
|
+
},
|
99
|
+
{
|
100
|
+
key: 'col5',
|
101
|
+
text: $binary.round(datastore[tableKeys[5]].used_mb, false, lang),
|
102
|
+
id: datastore.id,
|
103
|
+
},
|
104
|
+
{
|
105
|
+
key: 'col6',
|
106
|
+
text: datastore[tableKeys[6]],
|
107
|
+
id: datastore.id,
|
108
|
+
},
|
109
|
+
{
|
110
|
+
key: 'col7',
|
111
|
+
text: datastore[tableKeys[7]],
|
112
|
+
id: datastore.id,
|
113
|
+
},
|
114
|
+
])
|
115
|
+
})
|
116
|
+
return bodyItems
|
117
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="disks h-full">
|
3
|
+
<common-pages-backups-modals-create-backup-disks-table-view
|
4
|
+
v-model:selected="model.disk_devices"
|
5
|
+
:data-table="props.disks"
|
6
|
+
:loading="props.disksLoading"
|
7
|
+
:total-items="props.disks.length"
|
8
|
+
:total-pages="1"
|
9
|
+
/>
|
10
|
+
</div>
|
11
|
+
</template>
|
12
|
+
|
13
|
+
<script lang="ts" setup>
|
14
|
+
import type {
|
15
|
+
UI_I_CreateBackupForm,
|
16
|
+
UI_I_CreateBackupFormDiskDevice
|
17
|
+
} from "~/components/common/pages/backups/modals/lib/models/interfaces";
|
18
|
+
|
19
|
+
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
20
|
+
|
21
|
+
const props = defineProps<{
|
22
|
+
disks: UI_I_CreateBackupFormDiskDevice[]
|
23
|
+
disksLoading: boolean
|
24
|
+
}>()
|
25
|
+
|
26
|
+
</script>
|
27
|
+
|
28
|
+
<style lang="scss" scoped></style>
|
@@ -0,0 +1,105 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="data-table-view overflow-hidden">
|
3
|
+
<div class="data-table-view__inner">
|
4
|
+
<atoms-table-data-grid
|
5
|
+
v-model:selected-row="selectedRowsLocal"
|
6
|
+
v-model:column-keys="columnKeys"
|
7
|
+
class="data-table"
|
8
|
+
type="checkbox"
|
9
|
+
test-id="disks-table"
|
10
|
+
:head-items="headItems"
|
11
|
+
:body-items="bodyItems"
|
12
|
+
:total-items="props.totalItems"
|
13
|
+
:total-pages="props.totalPages"
|
14
|
+
:items-per-page="itemsPerPage"
|
15
|
+
:loading="loading"
|
16
|
+
hide-pagination
|
17
|
+
server-off
|
18
|
+
/>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
</template>
|
22
|
+
|
23
|
+
<script lang="ts" setup>
|
24
|
+
import type {
|
25
|
+
UI_I_HeadItem,
|
26
|
+
UI_I_ColumnKey,
|
27
|
+
UI_I_BodyItem,
|
28
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
29
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
30
|
+
import type { UI_I_DiskDevice } from '~/components/common/pages/backups/modals/createBackup/disks/tableView/lib/models/interfaces'
|
31
|
+
import { itemsPerPage } from '~/components/atoms/table/dataGrid/lib/config/itemsPerPage'
|
32
|
+
import * as table from '~/components/common/pages/backups/modals/createBackup/disks/tableView/lib/config/table'
|
33
|
+
|
34
|
+
const props = defineProps<{
|
35
|
+
dataTable: UI_I_DiskDevice[]
|
36
|
+
loading: boolean
|
37
|
+
totalItems: number
|
38
|
+
totalPages: number
|
39
|
+
}>()
|
40
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
41
|
+
|
42
|
+
const selectedRows = defineModel<UI_I_DiskDevice[]>('selected', { required: true })
|
43
|
+
|
44
|
+
const selectedRowsLocal = ref<string[]>(
|
45
|
+
selectedRows.value?.map((item) => item.location) || []
|
46
|
+
)
|
47
|
+
watch(
|
48
|
+
selectedRowsLocal,
|
49
|
+
(newValue) => {
|
50
|
+
const selected: UI_I_DiskDevice[] = []
|
51
|
+
bodyItems.value.forEach((row) => {
|
52
|
+
if (newValue.includes(row[0].id + '')) {
|
53
|
+
selected.push(row[0].data)
|
54
|
+
}
|
55
|
+
})
|
56
|
+
selectedRows.value = selected
|
57
|
+
},
|
58
|
+
{ deep: true }
|
59
|
+
)
|
60
|
+
|
61
|
+
const columnKeys = ref<UI_I_ColumnKey[]>(table.columnKeys(localization.value))
|
62
|
+
|
63
|
+
const headItems = computed<UI_I_HeadItem[]>(() =>
|
64
|
+
table.headItems(localization.value)
|
65
|
+
)
|
66
|
+
|
67
|
+
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
68
|
+
let result: UI_I_BodyItem[][] = []
|
69
|
+
if (props.dataTable.length) {
|
70
|
+
result = table.bodyItems(props.dataTable)
|
71
|
+
}
|
72
|
+
|
73
|
+
return result
|
74
|
+
})
|
75
|
+
watch(
|
76
|
+
bodyItems,
|
77
|
+
() => {
|
78
|
+
setTimeout(() => {
|
79
|
+
selectedRows.value = []
|
80
|
+
}, 0)
|
81
|
+
},
|
82
|
+
{ deep: true, immediate: true }
|
83
|
+
)
|
84
|
+
</script>
|
85
|
+
|
86
|
+
<style lang="scss" scoped>
|
87
|
+
.data-table-view {
|
88
|
+
height: inherit;
|
89
|
+
margin-bottom: 10px;
|
90
|
+
margin-right: 10px;
|
91
|
+
|
92
|
+
&__inner {
|
93
|
+
height: inherit;
|
94
|
+
}
|
95
|
+
:deep(.data-table) {
|
96
|
+
height: inherit;
|
97
|
+
.datagrid-outer-wrapper {
|
98
|
+
height: inherit;
|
99
|
+
}
|
100
|
+
}
|
101
|
+
}
|
102
|
+
.vm-icon {
|
103
|
+
margin-right: 5px;
|
104
|
+
}
|
105
|
+
</style>
|
package/components/common/pages/backups/modals/createBackup/disks/tableView/lib/config/keys.ts
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { UI_T_DiskTableKeysTuple } from '~/components/common/pages/backups/modals/createBackup/disks/tableView/lib/models/types'
|
2
|
+
|
3
|
+
export const tableKeys: UI_T_DiskTableKeysTuple = [
|
4
|
+
'source',
|
5
|
+
'device_type',
|
6
|
+
'bus',
|
7
|
+
'target',
|
8
|
+
'capacity_mb',
|
9
|
+
'used_mb',
|
10
|
+
'free_mb',
|
11
|
+
'volume_path',
|
12
|
+
]
|
package/components/common/pages/backups/modals/createBackup/disks/tableView/lib/config/table.ts
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
2
|
+
import type {
|
3
|
+
UI_I_HeadItem,
|
4
|
+
UI_I_ColumnKey,
|
5
|
+
UI_I_BodyItem,
|
6
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
7
|
+
import type {
|
8
|
+
UI_I_DiskDevice
|
9
|
+
} from "~/components/common/pages/backups/modals/createBackup/disks/tableView/lib/models/interfaces";
|
10
|
+
import {
|
11
|
+
constructHeadItem,
|
12
|
+
constructColumnKey,
|
13
|
+
} from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
14
|
+
import { tableKeys } from '~/components/common/pages/backups/modals/createBackup/disks/tableView/lib/config/keys'
|
15
|
+
|
16
|
+
const getItems = (
|
17
|
+
localization: UI_I_Localization
|
18
|
+
): [string, boolean, string, string][] => {
|
19
|
+
return [
|
20
|
+
[localization.common.source, true, '180px', tableKeys[0]],
|
21
|
+
[localization.common.deviceType, true, '180px', tableKeys[1]],
|
22
|
+
[localization.common.bus, true, '180px', tableKeys[2]],
|
23
|
+
[localization.common.target, true, '180px', tableKeys[3]],
|
24
|
+
[localization.common.capacity, true, '180px', tableKeys[4]],
|
25
|
+
[localization.common.used, true, '180px', tableKeys[5]],
|
26
|
+
[localization.common.free, true, '180px', tableKeys[6]],
|
27
|
+
[localization.common.volumePath, true, '180px', tableKeys[7]],
|
28
|
+
]
|
29
|
+
}
|
30
|
+
export const columnKeys = (
|
31
|
+
localization: UI_I_Localization
|
32
|
+
): UI_I_ColumnKey[] => {
|
33
|
+
const result: UI_I_ColumnKey[] = []
|
34
|
+
getItems(localization).forEach((item, i) => {
|
35
|
+
result.push(
|
36
|
+
constructColumnKey(`col${i}`, item[0], item[1], `show-column-${item[3]}`)
|
37
|
+
)
|
38
|
+
})
|
39
|
+
return result
|
40
|
+
}
|
41
|
+
export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
|
42
|
+
const result: UI_I_HeadItem[] = []
|
43
|
+
getItems(localization).forEach((item, i) => {
|
44
|
+
result.push(
|
45
|
+
constructHeadItem(
|
46
|
+
`col${i}`,
|
47
|
+
item[0],
|
48
|
+
item[3],
|
49
|
+
true,
|
50
|
+
item[2],
|
51
|
+
undefined,
|
52
|
+
item[3]
|
53
|
+
)
|
54
|
+
)
|
55
|
+
})
|
56
|
+
return result
|
57
|
+
}
|
58
|
+
|
59
|
+
export const bodyItems = (data: UI_I_DiskDevice[]): UI_I_BodyItem[][] => {
|
60
|
+
const { $binary }: any = useNuxtApp()
|
61
|
+
const lang = useLocalStorage('lang') === 'ru_RU' ? 'ru' : 'en'
|
62
|
+
|
63
|
+
const bodyItems: UI_I_BodyItem[][] = []
|
64
|
+
data.forEach((disk: UI_I_DiskDevice) => {
|
65
|
+
bodyItems.push([
|
66
|
+
{
|
67
|
+
key: 'col0',
|
68
|
+
text: disk[tableKeys[0]],
|
69
|
+
id: disk.source,
|
70
|
+
data: {
|
71
|
+
location: disk.source,
|
72
|
+
target: disk.target,
|
73
|
+
},
|
74
|
+
},
|
75
|
+
{
|
76
|
+
key: 'col1',
|
77
|
+
text: disk[tableKeys[1]],
|
78
|
+
id: disk.source,
|
79
|
+
},
|
80
|
+
{
|
81
|
+
key: 'col2',
|
82
|
+
text: disk[tableKeys[2]],
|
83
|
+
id: disk.source,
|
84
|
+
},
|
85
|
+
{
|
86
|
+
key: 'col3',
|
87
|
+
text: disk[tableKeys[3]],
|
88
|
+
id: disk.source,
|
89
|
+
},
|
90
|
+
{
|
91
|
+
key: 'col4',
|
92
|
+
text: $binary.round(disk[tableKeys[4]], false, lang),
|
93
|
+
id: disk.source,
|
94
|
+
},
|
95
|
+
{
|
96
|
+
key: 'col5',
|
97
|
+
text: $binary.round(
|
98
|
+
disk[tableKeys[4]] - disk[tableKeys[6]],
|
99
|
+
false,
|
100
|
+
lang
|
101
|
+
),
|
102
|
+
id: disk.source,
|
103
|
+
},
|
104
|
+
{
|
105
|
+
key: 'col6',
|
106
|
+
text: $binary.round(disk[tableKeys[6]], false, lang),
|
107
|
+
id: disk.source,
|
108
|
+
},
|
109
|
+
{
|
110
|
+
key: 'col7',
|
111
|
+
text: disk[tableKeys[7]],
|
112
|
+
id: disk.source,
|
113
|
+
},
|
114
|
+
])
|
115
|
+
})
|
116
|
+
return bodyItems
|
117
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<template>
|
2
|
+
<div class="general">
|
3
|
+
<form @submit.prevent>
|
4
|
+
<div class="field flex pt-4">
|
5
|
+
<label for="general-name">{{ localization.common.name }}:</label>
|
6
|
+
<input
|
7
|
+
id="general-name"
|
8
|
+
v-model.trim="model.name"
|
9
|
+
data-id="general-name-input"
|
10
|
+
type="text"
|
11
|
+
/>
|
12
|
+
</div>
|
13
|
+
<div class="field flex pt-4">
|
14
|
+
<label for="general-description"
|
15
|
+
>{{ localization.common.description }} ({{
|
16
|
+
localization.common.optional
|
17
|
+
}}):</label
|
18
|
+
>
|
19
|
+
<textarea
|
20
|
+
id="general-description"
|
21
|
+
v-model="model.description"
|
22
|
+
data-id="general-description-textarea"
|
23
|
+
/>
|
24
|
+
</div>
|
25
|
+
</form>
|
26
|
+
</div>
|
27
|
+
</template>
|
28
|
+
|
29
|
+
<script lang="ts" setup>
|
30
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
31
|
+
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
32
|
+
|
33
|
+
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
34
|
+
|
35
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
36
|
+
</script>
|
37
|
+
|
38
|
+
<style lang="scss" scoped>
|
39
|
+
.field {
|
40
|
+
label {
|
41
|
+
width: 216px;
|
42
|
+
}
|
43
|
+
input,
|
44
|
+
textarea {
|
45
|
+
width: 345px;
|
46
|
+
}
|
47
|
+
}
|
48
|
+
</style>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
2
|
+
|
3
|
+
export const backupDefaultFormFunc = (): UI_I_CreateBackupForm => {
|
4
|
+
return {
|
5
|
+
target: '',
|
6
|
+
name: '',
|
7
|
+
description: '',
|
8
|
+
disk_devices: [],
|
9
|
+
backup_storage: '',
|
10
|
+
strategy: 0,
|
11
|
+
// start_window_min: 60,
|
12
|
+
bandwidth_limit: 1_024 * 1_024,
|
13
|
+
}
|
14
|
+
}
|
@@ -0,0 +1,117 @@
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
2
|
+
import type { UI_I_WizardStep } from '~/components/atoms/wizard/lib/models/interfaces'
|
3
|
+
import type { UI_I_DynamicSteps } from '~/components/common/pages/backups/modals/createBackup/lib/models/interfaces'
|
4
|
+
import { UI_E_WIZARD_STATUS } from '~/components/atoms/wizard/lib/models/enums'
|
5
|
+
|
6
|
+
export const dynamicSteps: UI_I_DynamicSteps = {
|
7
|
+
schedulingOptions: 0,
|
8
|
+
general: 1,
|
9
|
+
disks: 2,
|
10
|
+
datastores: 3,
|
11
|
+
configuration: 4,
|
12
|
+
readyComplete: 5,
|
13
|
+
}
|
14
|
+
|
15
|
+
export const stepsFunc = (
|
16
|
+
localization: UI_I_Localization,
|
17
|
+
): UI_I_WizardStep[] => {
|
18
|
+
return [
|
19
|
+
{
|
20
|
+
id: dynamicSteps.schedulingOptions,
|
21
|
+
stepName: '',
|
22
|
+
title: localization.common.schedulingOptions,
|
23
|
+
subTitle: '',
|
24
|
+
status: UI_E_WIZARD_STATUS.SELECTED,
|
25
|
+
isValid: true,
|
26
|
+
fields: {},
|
27
|
+
testId: 'new-roles-scheduling-options',
|
28
|
+
},
|
29
|
+
{
|
30
|
+
id: dynamicSteps.general,
|
31
|
+
stepName: '',
|
32
|
+
title: localization.common.general,
|
33
|
+
subTitle: '',
|
34
|
+
status: UI_E_WIZARD_STATUS.SELECTED, // ??
|
35
|
+
isValid: true,
|
36
|
+
fields: {
|
37
|
+
name: {
|
38
|
+
field: '',
|
39
|
+
alert: '',
|
40
|
+
},
|
41
|
+
},
|
42
|
+
testId: 'create-backup-general',
|
43
|
+
},
|
44
|
+
{
|
45
|
+
id: dynamicSteps.disks,
|
46
|
+
stepName: '',
|
47
|
+
title: localization.common.disks,
|
48
|
+
subTitle: localization.common.selectDisksInvolvedBackup,
|
49
|
+
status: UI_E_WIZARD_STATUS.INACTIVE,
|
50
|
+
isValid: true,
|
51
|
+
fields: {
|
52
|
+
disk_devices: {
|
53
|
+
field: '',
|
54
|
+
alert: '',
|
55
|
+
},
|
56
|
+
},
|
57
|
+
testId: 'create-backup-disks',
|
58
|
+
},
|
59
|
+
{
|
60
|
+
id: dynamicSteps.datastores,
|
61
|
+
stepName: '',
|
62
|
+
title: localization.common.datastores,
|
63
|
+
subTitle: localization.common.selectStorageConfigurationDiskFiles,
|
64
|
+
status: UI_E_WIZARD_STATUS.INACTIVE,
|
65
|
+
isValid: true,
|
66
|
+
fields: {
|
67
|
+
backup_storage: {
|
68
|
+
field: '',
|
69
|
+
alert: '',
|
70
|
+
},
|
71
|
+
},
|
72
|
+
testId: 'create-backup-datastores',
|
73
|
+
},
|
74
|
+
{
|
75
|
+
id: dynamicSteps.configuration,
|
76
|
+
stepName: '',
|
77
|
+
title: localization.common.configuration,
|
78
|
+
subTitle: '',
|
79
|
+
status: UI_E_WIZARD_STATUS.INACTIVE,
|
80
|
+
isValid: true,
|
81
|
+
fields: {},
|
82
|
+
testId: 'create-backup-configuration',
|
83
|
+
},
|
84
|
+
{
|
85
|
+
id: dynamicSteps.readyComplete,
|
86
|
+
stepName: '',
|
87
|
+
title: localization.common.readyComplete,
|
88
|
+
subTitle: localization.common.clickFinishStartCreation,
|
89
|
+
status: UI_E_WIZARD_STATUS.INACTIVE,
|
90
|
+
isValid: true,
|
91
|
+
testId: 'datastore-ready-complete',
|
92
|
+
fields: {},
|
93
|
+
},
|
94
|
+
]
|
95
|
+
}
|
96
|
+
|
97
|
+
export const stepsSchemeInitial = (isScheduledTasks: boolean): number[][] => {
|
98
|
+
const resultWithOutScheduledTasks = [
|
99
|
+
dynamicSteps.general,
|
100
|
+
dynamicSteps.disks,
|
101
|
+
dynamicSteps.datastores,
|
102
|
+
dynamicSteps.configuration,
|
103
|
+
dynamicSteps.readyComplete,
|
104
|
+
]
|
105
|
+
const resultWithScheduledTasks = [
|
106
|
+
dynamicSteps.schedulingOptions,
|
107
|
+
dynamicSteps.general,
|
108
|
+
dynamicSteps.disks,
|
109
|
+
dynamicSteps.datastores,
|
110
|
+
dynamicSteps.configuration,
|
111
|
+
dynamicSteps.readyComplete,
|
112
|
+
]
|
113
|
+
|
114
|
+
return isScheduledTasks
|
115
|
+
? [resultWithScheduledTasks]
|
116
|
+
: [resultWithOutScheduledTasks]
|
117
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
2
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
3
|
+
|
4
|
+
export const strategyOptionsFunc = (
|
5
|
+
localization: UI_I_Localization
|
6
|
+
): UI_I_OptionItem[] => {
|
7
|
+
return [
|
8
|
+
{ label: localization.common.fullBackup, value: 0 },
|
9
|
+
{ label: localization.common.incrementalBackup, value: 1 },
|
10
|
+
{ label: localization.common.differentialBackup, value: 2 },
|
11
|
+
]
|
12
|
+
}
|
package/components/common/pages/backups/modals/createBackup/readyToComplete/ReadyToComplete.vue
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
<template>
|
2
|
+
<div>
|
3
|
+
<atoms-table-info :items="props.data" test-id="backup-ready-to-complete"/>
|
4
|
+
</div>
|
5
|
+
</template>
|
6
|
+
|
7
|
+
<script lang="ts" setup>
|
8
|
+
import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
|
9
|
+
|
10
|
+
const props = defineProps<{
|
11
|
+
data: UI_I_TableInfoItem[]
|
12
|
+
}>()
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<style lang="scss" scoped></style>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type {
|
2
|
+
UI_I_CreateBackupForm,
|
3
|
+
} from "~/components/common/pages/backups/modals/lib/models/interfaces";
|
4
|
+
|
5
|
+
export const backupDefaultFormFunc = (): UI_I_CreateBackupForm => {
|
6
|
+
return {
|
7
|
+
target: '',
|
8
|
+
name: '',
|
9
|
+
description: '',
|
10
|
+
disk_devices: [],
|
11
|
+
backup_storage: '',
|
12
|
+
strategy: 0,
|
13
|
+
// start_window_min: 60,
|
14
|
+
bandwidth_limit: 1_024 * 1_024
|
15
|
+
}
|
16
|
+
}
|