bfg-common 1.5.514 → 1.5.516
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 +5 -3
- package/assets/localization/local_en.json +6 -4
- package/assets/localization/local_hy.json +5 -3
- package/assets/localization/local_kk.json +5 -3
- package/assets/localization/local_ru.json +5 -3
- package/assets/localization/local_zh.json +5 -3
- package/components/atoms/sortableView/SortableView.vue +2 -2
- package/components/common/browse/blocks/lib/models/types.ts +1 -1
- package/components/common/browse/lib/models/interfaces.ts +5 -5
- package/components/common/diagramMain/modals/lib/config/portModal.ts +251 -251
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/network/Contents.vue +497 -497
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/pages/backups/modals/createBackup/CreateBackup.vue +196 -379
- package/components/common/pages/backups/modals/createBackup/New.vue +267 -0
- package/components/common/pages/backups/modals/createBackup/Old.vue +142 -0
- package/components/common/pages/backups/modals/createBackup/configuration/Configuration.vue +29 -29
- package/components/common/pages/backups/modals/createBackup/configuration/ConfigurationNew.vue +218 -0
- package/components/common/pages/backups/modals/createBackup/configuration/ConfigurationOld.vue +29 -0
- package/components/common/pages/backups/modals/createBackup/configuration/backupWindow/BackupWindow.vue +29 -29
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/MaxBandwidth.vue +69 -69
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
- package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue +38 -38
- package/components/common/pages/backups/modals/createBackup/datastores/Datastores.vue +34 -59
- package/components/common/pages/backups/modals/createBackup/datastores/DatastoresNew.vue +23 -0
- package/components/common/pages/backups/modals/createBackup/datastores/DatastoresOld.vue +33 -0
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/new/TableView.vue +134 -0
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/new/lib/config/table.ts +219 -0
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/new/lib/models/enums.ts +15 -0
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/new/lib/models/interfaces.ts +5 -0
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/{TableView.vue → old/TableView.vue} +95 -95
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/{lib → old/lib}/config/keys.ts +14 -14
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/{lib → old/lib}/config/table.ts +127 -127
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/{lib → old/lib}/models/types.ts +10 -10
- package/components/common/pages/backups/modals/createBackup/disks/Disks.vue +34 -28
- package/components/common/pages/backups/modals/createBackup/disks/DisksNew.vue +22 -0
- package/components/common/pages/backups/modals/createBackup/disks/DisksOld.vue +28 -0
- package/components/common/pages/backups/modals/createBackup/disks/tableView/new/TableView.vue +131 -0
- package/components/common/pages/backups/modals/createBackup/disks/tableView/new/lib/config/table.ts +178 -0
- package/components/common/pages/backups/modals/createBackup/disks/tableView/{TableView.vue → old/TableView.vue} +119 -108
- package/components/common/pages/backups/modals/createBackup/disks/tableView/{lib → old/lib}/config/keys.ts +12 -12
- package/components/common/pages/backups/modals/createBackup/disks/tableView/{lib → old/lib}/config/table.ts +125 -125
- package/components/common/pages/backups/modals/createBackup/disks/tableView/{lib → old/lib}/models/types.ts +10 -10
- package/components/common/pages/backups/modals/createBackup/general/General.vue +33 -141
- package/components/common/pages/backups/modals/createBackup/general/GeneralNew.vue +128 -0
- package/components/common/pages/backups/modals/createBackup/general/GeneralOld.vue +66 -0
- package/components/common/pages/backups/modals/createBackup/lib/config/readyToCompleteOptions.ts +59 -0
- package/components/common/pages/backups/modals/createBackup/lib/config/steps.ts +123 -117
- package/components/common/pages/backups/modals/createBackup/lib/config/strategyOptions.ts +13 -12
- package/components/common/pages/backups/modals/createBackup/lib/models/interfaces.ts +8 -8
- package/components/common/pages/backups/modals/createBackup/lib/validation/validations.ts +145 -0
- package/package.json +1 -1
|
@@ -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,141 +1,33 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
35
|
-
|
|
36
|
-
const props = defineProps<{
|
|
37
|
-
show: boolean
|
|
38
|
-
generalSubmit: null | Function
|
|
39
|
-
}>()
|
|
40
|
-
const emits = defineEmits<{
|
|
41
|
-
(event: 'check-name', value: UI_I_NameCheck): void
|
|
42
|
-
}>()
|
|
43
|
-
|
|
44
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
45
|
-
|
|
46
|
-
watch(
|
|
47
|
-
() => props.generalSubmit,
|
|
48
|
-
(newValue) => {
|
|
49
|
-
newValue && submit(newValue)
|
|
50
|
-
}
|
|
51
|
-
)
|
|
52
|
-
const submit = async (cb: Function): Promise<void> => {
|
|
53
|
-
const name = model.value.name
|
|
54
|
-
|
|
55
|
-
if (name !== '') {
|
|
56
|
-
const isNameValid = await checkNameIsValid(name)
|
|
57
|
-
if (!isNameValid) {
|
|
58
|
-
// @ts-ignore
|
|
59
|
-
cb(false)
|
|
60
|
-
return
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
onRemoveValidationErrors()
|
|
65
|
-
// @ts-ignore
|
|
66
|
-
cb(true)
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
const checkNameIsValid = async (name: string): Promise<boolean> => {
|
|
70
|
-
return new Promise((resolve) => {
|
|
71
|
-
emits('check-name', {
|
|
72
|
-
name,
|
|
73
|
-
cb: (error): void => {
|
|
74
|
-
const status = error?.statusCode || 200
|
|
75
|
-
switch (status) {
|
|
76
|
-
case 400: // Empty name
|
|
77
|
-
showValidationErrors([
|
|
78
|
-
localization.value.common.emptyNameValidationDescription,
|
|
79
|
-
])
|
|
80
|
-
resolve(false)
|
|
81
|
-
break
|
|
82
|
-
case 405: // Invalid kind
|
|
83
|
-
showValidationErrors([
|
|
84
|
-
localization.value.common.kindValidationDescription,
|
|
85
|
-
])
|
|
86
|
-
resolve(false)
|
|
87
|
-
break
|
|
88
|
-
case 406: // Invalid name
|
|
89
|
-
showValidationErrors([
|
|
90
|
-
localization.value.common.nameValidationDescription,
|
|
91
|
-
])
|
|
92
|
-
resolve(false)
|
|
93
|
-
break
|
|
94
|
-
case 409: // Name exist
|
|
95
|
-
showValidationErrors([
|
|
96
|
-
localization.value.common.vmNameExistInSelectedLocation,
|
|
97
|
-
])
|
|
98
|
-
resolve(false)
|
|
99
|
-
break
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
resolve(true)
|
|
103
|
-
},
|
|
104
|
-
})
|
|
105
|
-
})
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
const errors = ref<string[]>([])
|
|
109
|
-
const showValidationErrors = (data: string[]): void => {
|
|
110
|
-
errors.value = data
|
|
111
|
-
}
|
|
112
|
-
const onRemoveValidationErrors = (): void => {
|
|
113
|
-
errors.value = []
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
watch(
|
|
117
|
-
() => props.show,
|
|
118
|
-
(newValue) => {
|
|
119
|
-
if (!newValue) return
|
|
120
|
-
|
|
121
|
-
const input = document.getElementById('general-name')
|
|
122
|
-
if (!input) return
|
|
123
|
-
|
|
124
|
-
setTimeout(() => {
|
|
125
|
-
input.focus()
|
|
126
|
-
}, 0)
|
|
127
|
-
}
|
|
128
|
-
)
|
|
129
|
-
</script>
|
|
130
|
-
|
|
131
|
-
<style lang="scss" scoped>
|
|
132
|
-
.field {
|
|
133
|
-
label {
|
|
134
|
-
width: 216px;
|
|
135
|
-
}
|
|
136
|
-
input,
|
|
137
|
-
textarea {
|
|
138
|
-
width: 345px;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
</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_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
18
|
+
import type { UI_I_ArbitraryObject } from '~/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>
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="basics-step-row">
|
|
3
|
+
<div class="basics-step-row-title">
|
|
4
|
+
<span class="basics-step-row-title-text">
|
|
5
|
+
{{ localization.common.name }}
|
|
6
|
+
</span>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="basics-step-row-content">
|
|
9
|
+
<ui-input
|
|
10
|
+
id="vm-backup-name-input"
|
|
11
|
+
v-model="model.name"
|
|
12
|
+
:error="props.messagesFields?.name.field"
|
|
13
|
+
:placeholder="localization.common.name"
|
|
14
|
+
test-id="vm-backup-name-input"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div class="basics-step-line"></div>
|
|
20
|
+
|
|
21
|
+
<div class="basics-step-row">
|
|
22
|
+
<div class="basics-step-row-title">
|
|
23
|
+
<span class="basics-step-row-title-text">
|
|
24
|
+
{{ localization.common.description }} ({{ localization.common.optional }})
|
|
25
|
+
</span>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="basics-step-row-content">
|
|
28
|
+
<ui-textarea
|
|
29
|
+
id="vm-backup-name-input"
|
|
30
|
+
v-model="model.description"
|
|
31
|
+
:placeholder="localization.common.description"
|
|
32
|
+
test-id="vm-backup-name-input"
|
|
33
|
+
height="84"
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script setup lang="ts">
|
|
40
|
+
|
|
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
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
44
|
+
import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
|
|
45
|
+
|
|
46
|
+
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
47
|
+
|
|
48
|
+
const props = defineProps<{
|
|
49
|
+
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
50
|
+
}>()
|
|
51
|
+
|
|
52
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<style scoped lang="scss">
|
|
56
|
+
.basics-step {
|
|
57
|
+
padding: 16px 0 16px;
|
|
58
|
+
|
|
59
|
+
&-row {
|
|
60
|
+
min-height: 36px;
|
|
61
|
+
width: 100%;
|
|
62
|
+
display: flex;
|
|
63
|
+
column-gap: 16px;
|
|
64
|
+
align-items: center;
|
|
65
|
+
|
|
66
|
+
&-title {
|
|
67
|
+
padding-top: 8px;
|
|
68
|
+
max-width: 240px;
|
|
69
|
+
width: 100%;
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
column-gap: 8px;
|
|
73
|
+
font-weight: 400;
|
|
74
|
+
font-size: 13px;
|
|
75
|
+
line-height: 20px;
|
|
76
|
+
letter-spacing: 0;
|
|
77
|
+
vertical-align: middle;
|
|
78
|
+
align-self: flex-start;
|
|
79
|
+
color: var(--wizard-content-title);
|
|
80
|
+
white-space: nowrap;
|
|
81
|
+
text-overflow: ellipsis;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
|
|
84
|
+
&-text {
|
|
85
|
+
display: block;
|
|
86
|
+
white-space: nowrap;
|
|
87
|
+
text-overflow: ellipsis;
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&-content {
|
|
93
|
+
max-width: 480px;
|
|
94
|
+
width: 100%;
|
|
95
|
+
font-weight: 400;
|
|
96
|
+
font-size: 13px;
|
|
97
|
+
line-height: 20px;
|
|
98
|
+
letter-spacing: 0;
|
|
99
|
+
vertical-align: middle;
|
|
100
|
+
color: var(--wizard-content-value);
|
|
101
|
+
|
|
102
|
+
&-text {
|
|
103
|
+
display: flex;
|
|
104
|
+
column-gap: 8px;
|
|
105
|
+
align-items: center;
|
|
106
|
+
|
|
107
|
+
&-icon {
|
|
108
|
+
width: 20px;
|
|
109
|
+
min-width: 20px;
|
|
110
|
+
height: 20px;
|
|
111
|
+
min-height: 20px;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&-switch-container {
|
|
116
|
+
width: fit-content;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&-line {
|
|
122
|
+
height: 0;
|
|
123
|
+
width: 100%;
|
|
124
|
+
border-bottom: 1px solid var(--wizard-content-line);
|
|
125
|
+
margin: 16px 0;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
</style>
|
|
@@ -0,0 +1,66 @@
|
|
|
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 props = defineProps<{
|
|
36
|
+
show: boolean
|
|
37
|
+
}>()
|
|
38
|
+
|
|
39
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
40
|
+
|
|
41
|
+
watch(
|
|
42
|
+
() => props.show,
|
|
43
|
+
(newValue) => {
|
|
44
|
+
if (!newValue) return
|
|
45
|
+
|
|
46
|
+
const input = document.getElementById('general-name')
|
|
47
|
+
if (!input) return
|
|
48
|
+
|
|
49
|
+
setTimeout(() => {
|
|
50
|
+
input.focus()
|
|
51
|
+
}, 0)
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
</script>
|
|
55
|
+
|
|
56
|
+
<style lang="scss" scoped>
|
|
57
|
+
.field {
|
|
58
|
+
label {
|
|
59
|
+
width: 216px;
|
|
60
|
+
}
|
|
61
|
+
input,
|
|
62
|
+
textarea {
|
|
63
|
+
width: 345px;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
</style>
|
package/components/common/pages/backups/modals/createBackup/lib/config/readyToCompleteOptions.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
3
|
+
import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
|
|
4
|
+
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
5
|
+
|
|
6
|
+
export const readyToCompleteOptions = (backupForm: UI_I_CreateBackupForm, localization: UI_I_Localization, strategyOptions: UI_I_SelectInputItem[]): UI_I_TableInfoItem[] => {
|
|
7
|
+
const { $binary } = useNuxtApp()
|
|
8
|
+
|
|
9
|
+
const result = [
|
|
10
|
+
// General
|
|
11
|
+
{
|
|
12
|
+
label: localization.common.name,
|
|
13
|
+
value: backupForm.name,
|
|
14
|
+
iconClassName: 'icon-backup'
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
label: localization.common.description,
|
|
18
|
+
value: backupForm.description
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
// Disks
|
|
23
|
+
backupForm.disk_devices.forEach((disk_device, i) => {
|
|
24
|
+
result.push({
|
|
25
|
+
label: `${localization.common.disk} ${i + 1}`,
|
|
26
|
+
value: disk_device.location,
|
|
27
|
+
iconClassName: 'icon-vSphere-dsVmDisk'
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
// Datastores
|
|
32
|
+
result.push({
|
|
33
|
+
label: localization.common.datastore,
|
|
34
|
+
value: 'test',
|
|
35
|
+
iconClassName: 'vsphere-icon-datastore'
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
// Configuration
|
|
39
|
+
result.push({
|
|
40
|
+
label: localization.common.strategy,
|
|
41
|
+
value:
|
|
42
|
+
strategyOptions.find(
|
|
43
|
+
(option) => option.value === backupForm.strategy
|
|
44
|
+
)?.label || ''
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
const gbSizeByB = 1_073_741_824
|
|
48
|
+
const maxBandwidth =
|
|
49
|
+
backupForm.bandwidth_limit >= gbSizeByB
|
|
50
|
+
? $binary.bToGb(backupForm.bandwidth_limit) + ' Gbps'
|
|
51
|
+
: $binary.bToMb(backupForm.bandwidth_limit) + ' Mbps'
|
|
52
|
+
|
|
53
|
+
result.push({
|
|
54
|
+
label: localization.common.maxBandwidth,
|
|
55
|
+
value: maxBandwidth
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
return result
|
|
59
|
+
}
|
|
@@ -1,117 +1,123 @@
|
|
|
1
|
-
import type { UI_I_WizardStep } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
|
|
2
|
-
import { UI_E_WIZARD_STATUS } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/enums'
|
|
3
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
4
|
-
import type { UI_I_DynamicSteps } from '~/components/common/pages/backups/modals/createBackup/lib/models/interfaces'
|
|
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
|
-
|
|
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
|
-
dynamicSteps.
|
|
107
|
-
dynamicSteps.
|
|
108
|
-
dynamicSteps.
|
|
109
|
-
dynamicSteps.
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
1
|
+
import type { UI_I_WizardStep } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
|
|
2
|
+
import { UI_E_WIZARD_STATUS } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/enums'
|
|
3
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
4
|
+
import type { UI_I_DynamicSteps } from '~/components/common/pages/backups/modals/createBackup/lib/models/interfaces'
|
|
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: 'Specify a unique name and a description for the backup.',
|
|
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
|
+
|
|
64
|
+
subTitle: localization.common.selectStorageConfigurationDiskFiles2,
|
|
65
|
+
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
66
|
+
isValid: true,
|
|
67
|
+
fields: {
|
|
68
|
+
backup_storage: {
|
|
69
|
+
field: '',
|
|
70
|
+
alert: '',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
testId: 'create-backup-datastores',
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: dynamicSteps.configuration,
|
|
77
|
+
stepName: '',
|
|
78
|
+
title: localization.common.configuration,
|
|
79
|
+
subTitle: localization.common.configureBackupStrategyAndBandwidth,
|
|
80
|
+
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
81
|
+
isValid: true,
|
|
82
|
+
fields: {
|
|
83
|
+
bandWidth: {
|
|
84
|
+
field: '',
|
|
85
|
+
alert: '',
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
testId: 'create-backup-configuration',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: dynamicSteps.readyComplete,
|
|
92
|
+
stepName: '',
|
|
93
|
+
title: localization.common.readyComplete,
|
|
94
|
+
subTitle: localization.backup.backupCreationReview,
|
|
95
|
+
status: UI_E_WIZARD_STATUS.INACTIVE,
|
|
96
|
+
isValid: true,
|
|
97
|
+
testId: 'datastore-ready-complete',
|
|
98
|
+
fields: {},
|
|
99
|
+
},
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export const stepsSchemeInitial = (isScheduledTasks: boolean): number[][] => {
|
|
104
|
+
const resultWithOutScheduledTasks = [
|
|
105
|
+
dynamicSteps.general,
|
|
106
|
+
dynamicSteps.disks,
|
|
107
|
+
dynamicSteps.datastores,
|
|
108
|
+
dynamicSteps.configuration,
|
|
109
|
+
dynamicSteps.readyComplete,
|
|
110
|
+
]
|
|
111
|
+
const resultWithScheduledTasks = [
|
|
112
|
+
dynamicSteps.schedulingOptions,
|
|
113
|
+
dynamicSteps.general,
|
|
114
|
+
dynamicSteps.disks,
|
|
115
|
+
dynamicSteps.datastores,
|
|
116
|
+
dynamicSteps.configuration,
|
|
117
|
+
dynamicSteps.readyComplete,
|
|
118
|
+
]
|
|
119
|
+
|
|
120
|
+
return isScheduledTasks
|
|
121
|
+
? [resultWithScheduledTasks]
|
|
122
|
+
: [resultWithOutScheduledTasks]
|
|
123
|
+
}
|