bfg-common 1.5.418 → 1.5.420
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/backup/storage/actions/delete/Delete.vue +1 -1
- package/components/common/modals/confirmation/ConfirmationNew.vue +1 -1
- package/components/common/pages/backups/lib/models/interfaces.ts +13 -1
- package/components/common/pages/backups/lib/models/types.ts +3 -3
- package/components/common/{backup → pages/backups}/lib/utils/getBackupOrBackupStorageId.ts +0 -4
- package/components/common/pages/backups/modals/Modals.vue +16 -37
- package/components/common/pages/backups/modals/createBackup/CreateBackup.vue +15 -33
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/MaxBandwidth.vue +3 -2
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +2 -2
- package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue +2 -3
- package/components/common/pages/backups/modals/createBackup/datastores/Datastores.vue +5 -4
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/TableView.vue +95 -94
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/lib/config/table.ts +119 -117
- package/components/common/pages/backups/modals/createBackup/disks/tableView/lib/config/table.ts +117 -117
- package/components/common/pages/backups/modals/createBackup/lib/config/strategyOptions.ts +2 -2
- package/components/common/pages/backups/modals/deleteBackup/DeleteBackup.vue +12 -5
- package/components/common/pages/backups/modals/lib/models/interfaces.ts +185 -164
- package/components/common/pages/backups/modals/restore/Restore.vue +74 -45
- package/components/common/pages/backups/modals/restore/disks/Disks.vue +4 -5
- package/components/common/pages/backups/modals/restore/disks/tableView/TableView.vue +9 -8
- package/components/common/pages/backups/modals/restore/disks/tableView/lib/config/table.ts +117 -114
- package/components/common/pages/backups/modals/restore/lib/config/restoreCodes.ts +5 -0
- package/components/common/pages/backups/modals/restore/lib/config/steps.ts +108 -92
- package/components/common/pages/backups/modals/restore/name/Name.vue +160 -159
- package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -0
- package/components/common/pages/backups/modals/restore/networks/Networks.vue +67 -67
- package/components/common/pages/backups/modals/restore/networks/table/Table.vue +3 -5
- package/components/common/pages/backups/modals/restore/networks/table/lib/config/networkTable.ts +1 -8
- package/components/common/pages/backups/modals/restore/types/Types.vue +10 -11
- package/components/common/pages/backups/modals/restore/types/lib/config/typeOptions.ts +25 -24
- package/components/common/pages/backups/tools/lib/config/tabs.ts +7 -7
- package/package.json +1 -1
- package/components/common/pages/backups/modals/createBackup/lib/config/createBackup.ts +0 -14
- package/components/common/pages/backups/modals/restore/disks/tableView/lib/models/interfaces.ts +0 -4
@@ -1,114 +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
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
[localization.common.
|
19
|
-
[localization.common.
|
20
|
-
[localization.common.
|
21
|
-
[localization.common.
|
22
|
-
[localization.common.
|
23
|
-
[localization.common.
|
24
|
-
[localization.common.
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
item[
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
const
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
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 type { UI_I_RestoreForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
8
|
+
import {
|
9
|
+
constructHeadItem,
|
10
|
+
constructColumnKey,
|
11
|
+
} from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
|
12
|
+
import { tableKeys } from '~/components/common/pages/backups/modals/restore/disks/tableView/lib/config/keys'
|
13
|
+
|
14
|
+
const getItems = (
|
15
|
+
localization: UI_I_Localization
|
16
|
+
): [string, boolean, string, string][] => {
|
17
|
+
return [
|
18
|
+
[localization.common.source, true, '180px', tableKeys[0]],
|
19
|
+
[localization.common.deviceType, true, '180px', tableKeys[1]],
|
20
|
+
[localization.common.bus, true, '180px', tableKeys[2]],
|
21
|
+
[localization.common.target, true, '180px', tableKeys[3]],
|
22
|
+
[localization.common.capacity, true, '180px', tableKeys[4]],
|
23
|
+
[localization.common.used, true, '180px', tableKeys[5]],
|
24
|
+
[localization.common.free, true, '180px', tableKeys[6]],
|
25
|
+
[localization.common.volumePath, 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: UI_I_RestoreForm['pvm']['disk_devices']
|
59
|
+
): 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_RestoreForm['pvm']['disk_devices'][0]) => {
|
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
|
+
}
|
@@ -1,92 +1,108 @@
|
|
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 { UI_E_WIZARD_STATUS } from '~/components/atoms/wizard/lib/models/enums'
|
4
|
-
|
5
|
-
export const
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
testId: 'backup-restore-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
testId: 'backup-restore-select
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
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 { UI_E_WIZARD_STATUS } from '~/components/atoms/wizard/lib/models/enums'
|
4
|
+
|
5
|
+
export const dynamicSteps = {
|
6
|
+
selectType: 0,
|
7
|
+
selectName: 1,
|
8
|
+
selectStorage: 2,
|
9
|
+
selectDisks: 3,
|
10
|
+
selectNetwork: 4,
|
11
|
+
readyComplete: 5,
|
12
|
+
}
|
13
|
+
|
14
|
+
export const stepsFunc = (
|
15
|
+
localization: UI_I_Localization
|
16
|
+
): UI_I_WizardStep[] => {
|
17
|
+
return [
|
18
|
+
{
|
19
|
+
id: dynamicSteps.selectType,
|
20
|
+
stepName: '',
|
21
|
+
title: localization.common.selectAType,
|
22
|
+
subTitle: '',
|
23
|
+
status: UI_E_WIZARD_STATUS.SELECTED,
|
24
|
+
isValid: true,
|
25
|
+
fields: {},
|
26
|
+
testId: 'backup-restore-type',
|
27
|
+
},
|
28
|
+
{
|
29
|
+
id: dynamicSteps.selectName,
|
30
|
+
stepName: '',
|
31
|
+
title: localization.common.selectName,
|
32
|
+
subTitle: '',
|
33
|
+
status: UI_E_WIZARD_STATUS.INACTIVE,
|
34
|
+
isValid: true,
|
35
|
+
testId: 'backup-restore-select-name',
|
36
|
+
fields: {
|
37
|
+
name: {
|
38
|
+
field: '',
|
39
|
+
alert: '',
|
40
|
+
},
|
41
|
+
},
|
42
|
+
},
|
43
|
+
{
|
44
|
+
id: dynamicSteps.selectStorage,
|
45
|
+
stepName: '',
|
46
|
+
title: localization.common.selectStorage,
|
47
|
+
subTitle: '',
|
48
|
+
status: UI_E_WIZARD_STATUS.INACTIVE,
|
49
|
+
isValid: true,
|
50
|
+
testId: 'backup-restore-select-storage',
|
51
|
+
fields: {
|
52
|
+
storage: {
|
53
|
+
field: '',
|
54
|
+
alert: '',
|
55
|
+
},
|
56
|
+
},
|
57
|
+
},
|
58
|
+
{
|
59
|
+
id: dynamicSteps.selectDisks,
|
60
|
+
stepName: '',
|
61
|
+
title: localization.common.selectDisks,
|
62
|
+
subTitle: localization.common.selectDisksInvolvedBackup,
|
63
|
+
status: UI_E_WIZARD_STATUS.INACTIVE,
|
64
|
+
isValid: true,
|
65
|
+
fields: {
|
66
|
+
disk_devices: {
|
67
|
+
field: '',
|
68
|
+
alert: '',
|
69
|
+
},
|
70
|
+
},
|
71
|
+
testId: 'backup-restore-select--disks',
|
72
|
+
},
|
73
|
+
{
|
74
|
+
id: dynamicSteps.selectNetwork,
|
75
|
+
stepName: '',
|
76
|
+
title: localization.common.selectNetwork,
|
77
|
+
subTitle: '',
|
78
|
+
status: UI_E_WIZARD_STATUS.INACTIVE,
|
79
|
+
isValid: true,
|
80
|
+
testId: 'backup-restore-select-network',
|
81
|
+
fields: {},
|
82
|
+
},
|
83
|
+
{
|
84
|
+
id: dynamicSteps.readyComplete,
|
85
|
+
stepName: '',
|
86
|
+
title: localization.common.readyComplete,
|
87
|
+
subTitle: localization.common.clickFinishRestore,
|
88
|
+
status: UI_E_WIZARD_STATUS.INACTIVE,
|
89
|
+
isValid: true,
|
90
|
+
testId: 'backup-restore-ready-complete',
|
91
|
+
fields: {},
|
92
|
+
},
|
93
|
+
]
|
94
|
+
}
|
95
|
+
|
96
|
+
export const stepsSchemeInitial = [
|
97
|
+
// [0, 1, 5], // disk only
|
98
|
+
[dynamicSteps.selectType, dynamicSteps.readyComplete], // disk only
|
99
|
+
[dynamicSteps.selectType, dynamicSteps.readyComplete], // existing
|
100
|
+
[
|
101
|
+
dynamicSteps.selectType,
|
102
|
+
dynamicSteps.selectName,
|
103
|
+
dynamicSteps.selectStorage,
|
104
|
+
dynamicSteps.selectDisks,
|
105
|
+
dynamicSteps.selectNetwork,
|
106
|
+
dynamicSteps.readyComplete,
|
107
|
+
], // as new
|
108
|
+
]
|