bfg-common 1.5.516 → 1.5.518
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/assets/localization/local_be.json +2 -1
- package/assets/localization/local_en.json +2 -1
- package/assets/localization/local_hy.json +2 -1
- package/assets/localization/local_kk.json +2 -1
- package/assets/localization/local_ru.json +2 -1
- package/assets/localization/local_zh.json +2 -1
- package/components/atoms/sortableView/SortableView.vue +2 -2
- package/components/common/pages/backups/modals/createBackup/CreateBackup.vue +195 -195
- package/components/common/pages/backups/modals/createBackup/New.vue +267 -267
- package/components/common/pages/backups/modals/createBackup/configuration/Configuration.vue +29 -29
- package/components/common/pages/backups/modals/createBackup/datastores/Datastores.vue +34 -34
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/new/TableView.vue +1 -1
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/old/TableView.vue +95 -95
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/old/lib/config/keys.ts +14 -14
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/old/lib/config/table.ts +127 -127
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/old/lib/models/types.ts +10 -10
- package/components/common/pages/backups/modals/createBackup/disks/Disks.vue +34 -34
- package/components/common/pages/backups/modals/createBackup/disks/tableView/new/TableView.vue +2 -2
- package/components/common/pages/backups/modals/createBackup/disks/tableView/old/TableView.vue +119 -119
- package/components/common/pages/backups/modals/createBackup/disks/tableView/old/lib/config/keys.ts +12 -12
- package/components/common/pages/backups/modals/createBackup/disks/tableView/old/lib/config/table.ts +125 -125
- package/components/common/pages/backups/modals/createBackup/disks/tableView/old/lib/models/types.ts +10 -10
- package/components/common/pages/backups/modals/createBackup/general/General.vue +33 -33
- package/components/common/pages/backups/modals/createBackup/general/GeneralNew.vue +1 -1
- package/components/common/pages/backups/modals/createBackup/lib/config/steps.ts +123 -123
- package/components/common/pages/backups/modals/createBackup/lib/config/strategyOptions.ts +13 -13
- package/components/common/pages/backups/modals/createBackup/lib/validation/validations.ts +1 -1
- package/package.json +1 -1
package/components/common/pages/backups/modals/createBackup/disks/tableView/old/TableView.vue
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
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
|
-
v-model:page-size="pagination.pageSize"
|
|
8
|
-
v-model:page="pagination.page"
|
|
9
|
-
class="data-table"
|
|
10
|
-
type="checkbox"
|
|
11
|
-
test-id="disks-table"
|
|
12
|
-
:head-items="headItems"
|
|
13
|
-
:body-items="bodyItems"
|
|
14
|
-
:total-items="props.totalItems"
|
|
15
|
-
:total-pages="props.totalPages"
|
|
16
|
-
:items-per-page="itemsPerPage"
|
|
17
|
-
:loading="loading"
|
|
18
|
-
hide-pagination
|
|
19
|
-
server-off
|
|
20
|
-
/>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</template>
|
|
24
|
-
|
|
25
|
-
<script lang="ts" setup>
|
|
26
|
-
import type {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
import type {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
|
|
40
|
-
const props = defineProps<{
|
|
41
|
-
dataTable: UI_I_Pvm['disk_devices']
|
|
42
|
-
loading: boolean
|
|
43
|
-
totalItems: number
|
|
44
|
-
totalPages: number
|
|
45
|
-
}>()
|
|
46
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
47
|
-
|
|
48
|
-
const selectedRows = defineModel<UI_I_CreateBackupFormDiskDevice[]>('selected', { required: true })
|
|
49
|
-
|
|
50
|
-
const pagination = ref<UI_I_Pagination>({
|
|
51
|
-
page: 1,
|
|
52
|
-
pageSize: 100,
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
const selectedRowsLocal = ref<string[]>(
|
|
56
|
-
selectedRows.value?.map((item) => item.location) || []
|
|
57
|
-
)
|
|
58
|
-
watch(
|
|
59
|
-
selectedRowsLocal,
|
|
60
|
-
(newValue) => {
|
|
61
|
-
const selected: UI_I_CreateBackupFormDiskDevice[] = []
|
|
62
|
-
bodyItems.value.forEach((row) => {
|
|
63
|
-
if (newValue.includes(row[0].id + '')) {
|
|
64
|
-
selected.push(row[0].data)
|
|
65
|
-
}
|
|
66
|
-
})
|
|
67
|
-
selectedRows.value = selected
|
|
68
|
-
},
|
|
69
|
-
{ deep: true }
|
|
70
|
-
)
|
|
71
|
-
|
|
72
|
-
const columnKeys = ref<UI_I_ColumnKey[]>(table.columnKeys(localization.value))
|
|
73
|
-
|
|
74
|
-
const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
75
|
-
table.headItems(localization.value)
|
|
76
|
-
)
|
|
77
|
-
|
|
78
|
-
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
79
|
-
let result: UI_I_BodyItem[][] = []
|
|
80
|
-
if (props.dataTable.length) {
|
|
81
|
-
result = table.bodyItems(props.dataTable)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return result
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
// ToDo проверить почему опусташает selectedRows
|
|
88
|
-
|
|
89
|
-
// watch(
|
|
90
|
-
// bodyItems,
|
|
91
|
-
// () => {
|
|
92
|
-
// setTimeout(() => {
|
|
93
|
-
// selectedRows.value = []
|
|
94
|
-
// }, 0)
|
|
95
|
-
// },
|
|
96
|
-
// { deep: true, immediate: true }
|
|
97
|
-
// )
|
|
98
|
-
</script>
|
|
99
|
-
|
|
100
|
-
<style lang="scss" scoped>
|
|
101
|
-
.data-table-view {
|
|
102
|
-
height: inherit;
|
|
103
|
-
margin-bottom: 10px;
|
|
104
|
-
margin-right: 10px;
|
|
105
|
-
|
|
106
|
-
&__inner {
|
|
107
|
-
height: inherit;
|
|
108
|
-
}
|
|
109
|
-
:deep(.data-table) {
|
|
110
|
-
height: inherit;
|
|
111
|
-
.datagrid-outer-wrapper {
|
|
112
|
-
height: inherit;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
.vm-icon {
|
|
117
|
-
margin-right: 5px;
|
|
118
|
-
}
|
|
119
|
-
</style>
|
|
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
|
+
v-model:page-size="pagination.pageSize"
|
|
8
|
+
v-model:page="pagination.page"
|
|
9
|
+
class="data-table"
|
|
10
|
+
type="checkbox"
|
|
11
|
+
test-id="disks-table"
|
|
12
|
+
:head-items="headItems"
|
|
13
|
+
:body-items="bodyItems"
|
|
14
|
+
:total-items="props.totalItems"
|
|
15
|
+
:total-pages="props.totalPages"
|
|
16
|
+
:items-per-page="itemsPerPage"
|
|
17
|
+
:loading="loading"
|
|
18
|
+
hide-pagination
|
|
19
|
+
server-off
|
|
20
|
+
/>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<script lang="ts" setup>
|
|
26
|
+
import type {UI_I_Pagination} from "~/lib/models/table/interfaces";
|
|
27
|
+
import type {
|
|
28
|
+
UI_I_HeadItem,
|
|
29
|
+
UI_I_ColumnKey,
|
|
30
|
+
UI_I_BodyItem,
|
|
31
|
+
} from '~/components/atoms/table/dataGrid/lib/models/interfaces'
|
|
32
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
33
|
+
import type {
|
|
34
|
+
UI_I_CreateBackupFormDiskDevice,
|
|
35
|
+
UI_I_Pvm
|
|
36
|
+
} from "~/components/common/pages/backups/modals/lib/models/interfaces";
|
|
37
|
+
import { itemsPerPage } from '~/components/atoms/table/dataGrid/lib/config/itemsPerPage'
|
|
38
|
+
import * as table from '~/components/common/pages/backups/modals/createBackup/disks/tableView/old/lib/config/table'
|
|
39
|
+
|
|
40
|
+
const props = defineProps<{
|
|
41
|
+
dataTable: UI_I_Pvm['disk_devices']
|
|
42
|
+
loading: boolean
|
|
43
|
+
totalItems: number
|
|
44
|
+
totalPages: number
|
|
45
|
+
}>()
|
|
46
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
47
|
+
|
|
48
|
+
const selectedRows = defineModel<UI_I_CreateBackupFormDiskDevice[]>('selected', { required: true })
|
|
49
|
+
|
|
50
|
+
const pagination = ref<UI_I_Pagination>({
|
|
51
|
+
page: 1,
|
|
52
|
+
pageSize: 100,
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
const selectedRowsLocal = ref<string[]>(
|
|
56
|
+
selectedRows.value?.map((item) => item.location) || []
|
|
57
|
+
)
|
|
58
|
+
watch(
|
|
59
|
+
selectedRowsLocal,
|
|
60
|
+
(newValue) => {
|
|
61
|
+
const selected: UI_I_CreateBackupFormDiskDevice[] = []
|
|
62
|
+
bodyItems.value.forEach((row) => {
|
|
63
|
+
if (newValue.includes(row[0].id + '')) {
|
|
64
|
+
selected.push(row[0].data)
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
selectedRows.value = selected
|
|
68
|
+
},
|
|
69
|
+
{ deep: true }
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
const columnKeys = ref<UI_I_ColumnKey[]>(table.columnKeys(localization.value))
|
|
73
|
+
|
|
74
|
+
const headItems = computed<UI_I_HeadItem[]>(() =>
|
|
75
|
+
table.headItems(localization.value)
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
const bodyItems = computed<UI_I_BodyItem[][]>(() => {
|
|
79
|
+
let result: UI_I_BodyItem[][] = []
|
|
80
|
+
if (props.dataTable.length) {
|
|
81
|
+
result = table.bodyItems(props.dataTable)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return result
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
// ToDo проверить почему опусташает selectedRows
|
|
88
|
+
|
|
89
|
+
// watch(
|
|
90
|
+
// bodyItems,
|
|
91
|
+
// () => {
|
|
92
|
+
// setTimeout(() => {
|
|
93
|
+
// selectedRows.value = []
|
|
94
|
+
// }, 0)
|
|
95
|
+
// },
|
|
96
|
+
// { deep: true, immediate: true }
|
|
97
|
+
// )
|
|
98
|
+
</script>
|
|
99
|
+
|
|
100
|
+
<style lang="scss" scoped>
|
|
101
|
+
.data-table-view {
|
|
102
|
+
height: inherit;
|
|
103
|
+
margin-bottom: 10px;
|
|
104
|
+
margin-right: 10px;
|
|
105
|
+
|
|
106
|
+
&__inner {
|
|
107
|
+
height: inherit;
|
|
108
|
+
}
|
|
109
|
+
:deep(.data-table) {
|
|
110
|
+
height: inherit;
|
|
111
|
+
.datagrid-outer-wrapper {
|
|
112
|
+
height: inherit;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
.vm-icon {
|
|
117
|
+
margin-right: 5px;
|
|
118
|
+
}
|
|
119
|
+
</style>
|
package/components/common/pages/backups/modals/createBackup/disks/tableView/old/lib/config/keys.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { UI_T_DiskTableKeysTuple } from '~/components/common/pages/backups/modals/createBackup/disks/tableView/old/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
|
-
]
|
|
1
|
+
import type { UI_T_DiskTableKeysTuple } from '~/components/common/pages/backups/modals/createBackup/disks/tableView/old/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/old/lib/config/table.ts
CHANGED
|
@@ -1,125 +1,125 @@
|
|
|
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 { UI_I_Pvm } 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/createBackup/disks/tableView/old/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_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_Pvm['disk_devices'][0], key) => {
|
|
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
|
-
testId: `disk-table-item-${key}`,
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
key: 'col1',
|
|
78
|
-
text: disk[tableKeys[1]],
|
|
79
|
-
id: disk.source,
|
|
80
|
-
testId: `disk-table-item-${key}`,
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
key: 'col2',
|
|
84
|
-
text: disk[tableKeys[2]],
|
|
85
|
-
id: disk.source,
|
|
86
|
-
testId: `disk-table-item-${key}`,
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
key: 'col3',
|
|
90
|
-
text: disk[tableKeys[3]],
|
|
91
|
-
id: disk.source,
|
|
92
|
-
testId: `disk-table-item-${key}`,
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
key: 'col4',
|
|
96
|
-
text: $binary.round(disk[tableKeys[4]], false, lang),
|
|
97
|
-
id: disk.source,
|
|
98
|
-
testId: `disk-table-item-${key}`,
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
key: 'col5',
|
|
102
|
-
text: $binary.round(
|
|
103
|
-
disk[tableKeys[4]] - disk[tableKeys[6]],
|
|
104
|
-
false,
|
|
105
|
-
lang
|
|
106
|
-
),
|
|
107
|
-
id: disk.source,
|
|
108
|
-
testId: `disk-table-item-${key}`,
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
key: 'col6',
|
|
112
|
-
text: $binary.round(disk[tableKeys[6]], false, lang),
|
|
113
|
-
id: disk.source,
|
|
114
|
-
testId: `disk-table-item-${key}`,
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
key: 'col7',
|
|
118
|
-
text: disk[tableKeys[7]],
|
|
119
|
-
id: disk.source,
|
|
120
|
-
testId: `disk-table-item-${key}`,
|
|
121
|
-
},
|
|
122
|
-
])
|
|
123
|
-
})
|
|
124
|
-
return bodyItems
|
|
125
|
-
}
|
|
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 { UI_I_Pvm } 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/createBackup/disks/tableView/old/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_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_Pvm['disk_devices'][0], key) => {
|
|
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
|
+
testId: `disk-table-item-${key}`,
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
key: 'col1',
|
|
78
|
+
text: disk[tableKeys[1]],
|
|
79
|
+
id: disk.source,
|
|
80
|
+
testId: `disk-table-item-${key}`,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
key: 'col2',
|
|
84
|
+
text: disk[tableKeys[2]],
|
|
85
|
+
id: disk.source,
|
|
86
|
+
testId: `disk-table-item-${key}`,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
key: 'col3',
|
|
90
|
+
text: disk[tableKeys[3]],
|
|
91
|
+
id: disk.source,
|
|
92
|
+
testId: `disk-table-item-${key}`,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
key: 'col4',
|
|
96
|
+
text: $binary.round(disk[tableKeys[4]], false, lang),
|
|
97
|
+
id: disk.source,
|
|
98
|
+
testId: `disk-table-item-${key}`,
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
key: 'col5',
|
|
102
|
+
text: $binary.round(
|
|
103
|
+
disk[tableKeys[4]] - disk[tableKeys[6]],
|
|
104
|
+
false,
|
|
105
|
+
lang
|
|
106
|
+
),
|
|
107
|
+
id: disk.source,
|
|
108
|
+
testId: `disk-table-item-${key}`,
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
key: 'col6',
|
|
112
|
+
text: $binary.round(disk[tableKeys[6]], false, lang),
|
|
113
|
+
id: disk.source,
|
|
114
|
+
testId: `disk-table-item-${key}`,
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
key: 'col7',
|
|
118
|
+
text: disk[tableKeys[7]],
|
|
119
|
+
id: disk.source,
|
|
120
|
+
testId: `disk-table-item-${key}`,
|
|
121
|
+
},
|
|
122
|
+
])
|
|
123
|
+
})
|
|
124
|
+
return bodyItems
|
|
125
|
+
}
|
package/components/common/pages/backups/modals/createBackup/disks/tableView/old/lib/models/types.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export type UI_T_DiskTableKeysTuple = [
|
|
2
|
-
'source',
|
|
3
|
-
'device_type',
|
|
4
|
-
'bus',
|
|
5
|
-
'target',
|
|
6
|
-
'capacity_mb',
|
|
7
|
-
'used_mb',
|
|
8
|
-
'free_mb',
|
|
9
|
-
'volume_path',
|
|
10
|
-
]
|
|
1
|
+
export type UI_T_DiskTableKeysTuple = [
|
|
2
|
+
'source',
|
|
3
|
+
'device_type',
|
|
4
|
+
'bus',
|
|
5
|
+
'target',
|
|
6
|
+
'capacity_mb',
|
|
7
|
+
'used_mb',
|
|
8
|
+
'free_mb',
|
|
9
|
+
'volume_path',
|
|
10
|
+
]
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<common-pages-backups-modals-create-backup-general-new
|
|
3
|
-
v-if="isNewView"
|
|
4
|
-
v-model="model"
|
|
5
|
-
:messages-fields="props.messagesFields"
|
|
6
|
-
/>
|
|
7
|
-
|
|
8
|
-
<common-pages-backups-modals-create-backup-general-old
|
|
9
|
-
v-else
|
|
10
|
-
v-model="model"
|
|
11
|
-
:show="props.show"
|
|
12
|
-
/>
|
|
13
|
-
</template>
|
|
14
|
-
|
|
15
|
-
<script lang="ts" setup>
|
|
16
|
-
import type { UI_I_ErrorFields } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
|
|
17
|
-
import type {
|
|
18
|
-
import type {
|
|
19
|
-
|
|
20
|
-
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
21
|
-
|
|
22
|
-
const props = defineProps<{
|
|
23
|
-
show: boolean
|
|
24
|
-
messagesFields?: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
25
|
-
}>()
|
|
26
|
-
|
|
27
|
-
const { $store }: any = useNuxtApp()
|
|
28
|
-
|
|
29
|
-
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<style lang="scss" scoped>
|
|
33
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<common-pages-backups-modals-create-backup-general-new
|
|
3
|
+
v-if="isNewView"
|
|
4
|
+
v-model="model"
|
|
5
|
+
:messages-fields="props.messagesFields"
|
|
6
|
+
/>
|
|
7
|
+
|
|
8
|
+
<common-pages-backups-modals-create-backup-general-old
|
|
9
|
+
v-else
|
|
10
|
+
v-model="model"
|
|
11
|
+
:show="props.show"
|
|
12
|
+
/>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script lang="ts" setup>
|
|
16
|
+
import type { UI_I_ErrorFields } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
|
|
17
|
+
import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
|
|
18
|
+
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
19
|
+
|
|
20
|
+
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
21
|
+
|
|
22
|
+
const props = defineProps<{
|
|
23
|
+
show: boolean
|
|
24
|
+
messagesFields?: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
25
|
+
}>()
|
|
26
|
+
|
|
27
|
+
const { $store }: any = useNuxtApp()
|
|
28
|
+
|
|
29
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<style lang="scss" scoped>
|
|
33
|
+
</style>
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
<script setup lang="ts">
|
|
40
40
|
|
|
41
41
|
import type { UI_I_ErrorFields } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
|
|
42
|
-
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
43
42
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
44
43
|
import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
|
|
44
|
+
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
45
45
|
|
|
46
46
|
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
47
47
|
|