bfg-common 1.5.733 → 1.5.736
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/add/steps/typeMode/tooltip/Tooltip.vue +33 -33
- package/components/common/pages/backups/modals/createBackup/CreateBackup.vue +6 -10
- package/components/common/pages/backups/modals/createBackup/Old.vue +8 -10
- 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 +6 -0
- package/components/common/pages/backups/modals/createBackup/datastores/DatastoresOld.vue +22 -2
- package/components/common/pages/backups/modals/createBackup/disks/Disks.vue +6 -0
- package/components/common/pages/backups/modals/createBackup/disks/DisksOld.vue +22 -1
- package/components/common/pages/backups/modals/createBackup/general/General.vue +7 -1
- package/components/common/pages/backups/modals/createBackup/general/GeneralOld.vue +17 -0
- package/components/common/pages/backups/modals/createBackup/lib/models/interfaces.ts +8 -8
- package/components/common/pages/backups/modals/createBackup/lib/validation/validations.ts +0 -8
- package/components/common/vm/snapshots/DetailView.vue +90 -0
- package/components/common/vm/snapshots/Old.vue +71 -0
- package/components/common/vm/snapshots/Snapshots.vue +82 -0
- package/components/common/vm/snapshots/lib/models/types.ts +11 -0
- package/components/common/vm/snapshots/modals/confirm/Confirm.vue +48 -0
- package/components/common/vm/snapshots/modals/confirm/New.vue +113 -0
- package/components/common/vm/snapshots/modals/confirm/Old.vue +140 -0
- package/components/common/vm/snapshots/modals/confirm/lib/config/modalTexts.ts +30 -0
- package/components/common/vm/snapshots/modals/confirm/lib/models/enums.ts +19 -0
- package/components/common/vm/snapshots/new/New.vue +389 -0
- package/components/common/vm/snapshots/new/contextMenuView/ContextMenuView.vue +96 -0
- package/components/common/vm/snapshots/new/contextMenuView/lib/config/contextMenuItems.ts +34 -0
- package/components/common/vm/snapshots/new/lib/models/interfaces.ts +12 -0
- package/components/common/vm/snapshots/new/lib/utils/contextMenu.ts +29 -0
- package/components/common/vm/snapshots/new/lib/utils/details.ts +48 -0
- package/components/common/vm/snapshots/tools/Tools.vue +56 -0
- package/components/common/vm/snapshots/tools/lib/config/tabsPannel.ts +39 -0
- package/components/common/wizards/datastore/add/steps/typeMode/tooltip/Tooltip.vue +33 -33
- package/package.json +1 -1
- package/store/inventory/modules/snapshots/lib/models/interfaces.ts +45 -0
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
id="type-select-help-icon"
|
|
4
|
-
class="signpost-container relative flex cursor-pointer"
|
|
5
|
-
>
|
|
6
|
-
<atoms-the-icon
|
|
7
|
-
data-id="toggle-type-select-help-icon"
|
|
8
|
-
fill="#0072a3"
|
|
9
|
-
width="24px"
|
|
10
|
-
height="24px"
|
|
11
|
-
name="info-circle"
|
|
12
|
-
@click="isShowTypeHelp = !isShowTypeHelp"
|
|
13
|
-
/>
|
|
14
|
-
<atoms-tooltip-signpost
|
|
15
|
-
v-if="isShowTypeHelp"
|
|
16
|
-
elem-id="type-select-help-icon"
|
|
17
|
-
test-id="select-datastore-type"
|
|
18
|
-
@hide="isShowTypeHelp = false"
|
|
19
|
-
>
|
|
20
|
-
<p class="help-desc">
|
|
21
|
-
{{ localization.common.datastoreTypeHelpDesc }}
|
|
22
|
-
</p>
|
|
23
|
-
</atoms-tooltip-signpost>
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
<script setup lang="ts">
|
|
27
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
28
|
-
|
|
29
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
30
|
-
|
|
31
|
-
const isShowTypeHelp = ref<boolean>(false)
|
|
32
|
-
</script>
|
|
33
|
-
<style scoped lang="scss"></style>
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
id="type-select-help-icon"
|
|
4
|
+
class="signpost-container relative flex cursor-pointer"
|
|
5
|
+
>
|
|
6
|
+
<atoms-the-icon
|
|
7
|
+
data-id="toggle-type-select-help-icon"
|
|
8
|
+
fill="#0072a3"
|
|
9
|
+
width="24px"
|
|
10
|
+
height="24px"
|
|
11
|
+
name="info-circle"
|
|
12
|
+
@click="isShowTypeHelp = !isShowTypeHelp"
|
|
13
|
+
/>
|
|
14
|
+
<atoms-tooltip-signpost
|
|
15
|
+
v-if="isShowTypeHelp"
|
|
16
|
+
elem-id="type-select-help-icon"
|
|
17
|
+
test-id="select-datastore-type"
|
|
18
|
+
@hide="isShowTypeHelp = false"
|
|
19
|
+
>
|
|
20
|
+
<p class="help-desc">
|
|
21
|
+
{{ localization.common.datastoreTypeHelpDesc }}
|
|
22
|
+
</p>
|
|
23
|
+
</atoms-tooltip-signpost>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
<script setup lang="ts">
|
|
27
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
28
|
+
|
|
29
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
30
|
+
|
|
31
|
+
const isShowTypeHelp = ref<boolean>(false)
|
|
32
|
+
</script>
|
|
33
|
+
<style scoped lang="scss"></style>
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
:selected-scheme="selectedScheme"
|
|
29
29
|
:alert-messages="alertMessages"
|
|
30
30
|
:title="title"
|
|
31
|
-
:alert-errors="errors"
|
|
32
31
|
:is-scheduled-tasks="props.isScheduledTasks"
|
|
33
32
|
:is-edit-scheduled-tasks="props.isEditScheduledTasks"
|
|
34
33
|
:target="props.target"
|
|
@@ -74,10 +73,11 @@ import {
|
|
|
74
73
|
import type {UI_I_NameCheck} from "~/components/common/pages/backups/modals/restore/name/lib/models/interfaces";
|
|
75
74
|
import type {UI_I_SelectInputItem} from "~/components/common/select/input/lib/models/interfaces";
|
|
76
75
|
import type {UI_I_TableInfoItem} from "~/components/atoms/table/info/lib/models/interfaces";
|
|
76
|
+
import type {UI_I_ScheduleNewTasksForm} from "~/components/common/pages/scheduledTasks/modals/lib/models/interfaces";
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
const backupForm = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
80
|
-
const schedulerForm = defineModel('schedulerForm', { required: true })
|
|
80
|
+
const schedulerForm = defineModel<UI_I_ScheduleNewTasksForm>('schedulerForm', { required: true })
|
|
81
81
|
|
|
82
82
|
const props = defineProps<{
|
|
83
83
|
isEdit?: boolean // ToDo проверить на использование
|
|
@@ -152,13 +152,13 @@ const validationFunc = async (
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
if (wizard.isValidateForStep(dynamicSteps.disks, currentStep.id, nextStep.id)) {
|
|
155
|
-
const disksValidation = checkDisks(value, backupForm.value, wizard, localization.value
|
|
155
|
+
const disksValidation = checkDisks(value, backupForm.value, wizard, localization.value)
|
|
156
156
|
value = disksValidation.newValue
|
|
157
157
|
stepHasError = disksValidation.stepHasError
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
if (wizard.isValidateForStep(dynamicSteps.datastores, currentStep.id, nextStep.id)) {
|
|
161
|
-
const datastoreValidation = checkDatastore(value, backupForm.value, wizard, localization.value
|
|
161
|
+
const datastoreValidation = checkDatastore(value, backupForm.value, wizard, localization.value)
|
|
162
162
|
value = datastoreValidation.newValue
|
|
163
163
|
stepHasError = datastoreValidation.stepHasError
|
|
164
164
|
}
|
|
@@ -176,12 +176,8 @@ const validationFunc = async (
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
errors.value = data
|
|
182
|
-
}
|
|
183
|
-
const onRemoveValidationErrors = (): void => {
|
|
184
|
-
errors.value = []
|
|
179
|
+
const onRemoveValidationErrors = (stepId: number): void => {
|
|
180
|
+
wizard.hideAlertMessagesByStepId(stepId)
|
|
185
181
|
}
|
|
186
182
|
|
|
187
183
|
const strategyOptions = ref<UI_I_SelectInputItem[]>(
|
|
@@ -12,14 +12,6 @@
|
|
|
12
12
|
@submit="onFinish"
|
|
13
13
|
>
|
|
14
14
|
<template #modalBody="{ selectedStep }">
|
|
15
|
-
<atoms-alert
|
|
16
|
-
v-show="props.alertErrors.length"
|
|
17
|
-
status="alert-danger"
|
|
18
|
-
:items="props.alertErrors"
|
|
19
|
-
test-id="create-backup-alert"
|
|
20
|
-
@remove="emits('remove-validation-errors')"
|
|
21
|
-
/>
|
|
22
|
-
|
|
23
15
|
<common-pages-scheduled-tasks-modals-common-new-task-form
|
|
24
16
|
v-show="selectedStep.id === dynamicSteps.schedulingOptions"
|
|
25
17
|
v-model="modelSchedulerTask"
|
|
@@ -31,6 +23,9 @@
|
|
|
31
23
|
v-show="selectedStep.id === dynamicSteps.general"
|
|
32
24
|
v-model="model"
|
|
33
25
|
:show="selectedStep.id === dynamicSteps.general"
|
|
26
|
+
:messages-fields="selectedStep.fields"
|
|
27
|
+
:alert-messages="props.alertMessages[dynamicSteps.general]"
|
|
28
|
+
@remove-validation-errors="emits('remove-validation-errors', $event)"
|
|
34
29
|
/>
|
|
35
30
|
|
|
36
31
|
<common-pages-backups-modals-create-backup-disks
|
|
@@ -38,6 +33,8 @@
|
|
|
38
33
|
v-model="model"
|
|
39
34
|
:disks="props.disks"
|
|
40
35
|
:disks-loading="props.disksLoading"
|
|
36
|
+
:alert-messages="props.alertMessages[dynamicSteps.disks]"
|
|
37
|
+
@remove-validation-errors="emits('remove-validation-errors', $event)"
|
|
41
38
|
/>
|
|
42
39
|
|
|
43
40
|
<common-pages-backups-modals-create-backup-datastores
|
|
@@ -45,6 +42,8 @@
|
|
|
45
42
|
v-model="model"
|
|
46
43
|
:datastore-table="props.datastoreTable"
|
|
47
44
|
:datastore-table-loading="props.datastoreTableLoading"
|
|
45
|
+
:alert-messages="props.alertMessages[dynamicSteps.datastores]"
|
|
46
|
+
@remove-validation-errors="emits('remove-validation-errors', $event)"
|
|
48
47
|
/>
|
|
49
48
|
|
|
50
49
|
<common-pages-backups-modals-create-backup-configuration
|
|
@@ -98,13 +97,12 @@ const props = defineProps<{
|
|
|
98
97
|
disksLoading: boolean
|
|
99
98
|
datastoreTable: UI_I_BackupDatastoreTable | null
|
|
100
99
|
datastoreTableLoading: boolean
|
|
101
|
-
alertErrors: string[]
|
|
102
100
|
readyToCompleteData: UI_I_TableInfoItem[]
|
|
103
101
|
}>()
|
|
104
102
|
|
|
105
103
|
const emits = defineEmits<{
|
|
106
104
|
(event: 'change-step-create-backup', value: UI_I_WizardStep[]): void
|
|
107
|
-
(event: 'remove-validation-errors'): void
|
|
105
|
+
(event: 'remove-validation-errors', value: number): void
|
|
108
106
|
(event: 'finish'): void
|
|
109
107
|
(event: 'hide'): void
|
|
110
108
|
}>()
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<atoms-stack-block
|
|
3
|
-
:has-children="false"
|
|
4
|
-
test-id="backup-window-stack-block"
|
|
5
|
-
>
|
|
6
|
-
<template #stackBlockKey>
|
|
7
|
-
<span>{{ localization.common.backupWindow }}</span>
|
|
8
|
-
</template>
|
|
9
|
-
<template #stackBlockContent>
|
|
10
|
-
<input
|
|
11
|
-
v-model="model.start_window_min"
|
|
12
|
-
data-id="hours-input"
|
|
13
|
-
type="number"
|
|
14
|
-
class="hrs"
|
|
15
|
-
/>
|
|
16
|
-
</template>
|
|
17
|
-
</atoms-stack-block>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script lang="ts" setup>
|
|
21
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
22
|
-
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
23
|
-
|
|
24
|
-
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
25
|
-
|
|
26
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
27
|
-
</script>
|
|
28
|
-
|
|
29
|
-
<style lang="scss" scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<atoms-stack-block
|
|
3
|
+
:has-children="false"
|
|
4
|
+
test-id="backup-window-stack-block"
|
|
5
|
+
>
|
|
6
|
+
<template #stackBlockKey>
|
|
7
|
+
<span>{{ localization.common.backupWindow }}</span>
|
|
8
|
+
</template>
|
|
9
|
+
<template #stackBlockContent>
|
|
10
|
+
<input
|
|
11
|
+
v-model="model.start_window_min"
|
|
12
|
+
data-id="hours-input"
|
|
13
|
+
type="number"
|
|
14
|
+
class="hrs"
|
|
15
|
+
/>
|
|
16
|
+
</template>
|
|
17
|
+
</atoms-stack-block>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script lang="ts" setup>
|
|
21
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
22
|
+
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
23
|
+
|
|
24
|
+
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
25
|
+
|
|
26
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<style lang="scss" scoped></style>
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<atoms-stack-block
|
|
3
|
-
:has-children="false"
|
|
4
|
-
test-id="backup-max-bandwidth-stack-block"
|
|
5
|
-
>
|
|
6
|
-
<template #stackBlockKey>
|
|
7
|
-
<span>{{ localization.common.maxBandwidth }}</span>
|
|
8
|
-
</template>
|
|
9
|
-
<template #stackBlockContent>
|
|
10
|
-
<div class="flex-align-center">
|
|
11
|
-
<input
|
|
12
|
-
v-model="maxBindwidthLocal"
|
|
13
|
-
data-id="mbps-input"
|
|
14
|
-
type="number"
|
|
15
|
-
class="mbps"
|
|
16
|
-
/>
|
|
17
|
-
|
|
18
|
-
<common-select-input
|
|
19
|
-
v-model="selectedType"
|
|
20
|
-
:data="maxBandwidthOptionsLocal"
|
|
21
|
-
test-id="backup-max-bandwidth-type"
|
|
22
|
-
class="ml-1"
|
|
23
|
-
/>
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
</atoms-stack-block>
|
|
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
|
-
import type { UI_T_BandwidthOption } from '~/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/models/types'
|
|
33
|
-
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
34
|
-
import { maxBandwidthOptions } from '~/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options'
|
|
35
|
-
|
|
36
|
-
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
37
|
-
|
|
38
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
39
|
-
const { $binary }: any = useNuxtApp()
|
|
40
|
-
|
|
41
|
-
const maxBandwidthOptionsLocal =
|
|
42
|
-
ref<UI_I_SelectInputItem[]>(maxBandwidthOptions)
|
|
43
|
-
|
|
44
|
-
const maxBindwidthLocal = computed<number>({
|
|
45
|
-
get() {
|
|
46
|
-
return selectedType.value === 1
|
|
47
|
-
? $binary.bToGb(model.value.bandwidth_limit)
|
|
48
|
-
: $binary.bToMb(model.value.bandwidth_limit)
|
|
49
|
-
},
|
|
50
|
-
set(newValue: number) {
|
|
51
|
-
model.value.bandwidth_limit =
|
|
52
|
-
selectedType.value === 1
|
|
53
|
-
? $binary.gbToB(newValue)
|
|
54
|
-
: $binary.mbToB(newValue)
|
|
55
|
-
},
|
|
56
|
-
})
|
|
57
|
-
|
|
58
|
-
const selectedType = ref<UI_T_BandwidthOption>(0)
|
|
59
|
-
watch(selectedType, (newValue) => {
|
|
60
|
-
if (newValue === 1) model.value.bandwidth_limit *= 1_024
|
|
61
|
-
else model.value.bandwidth_limit /= 1_024
|
|
62
|
-
})
|
|
63
|
-
</script>
|
|
64
|
-
|
|
65
|
-
<style lang="scss" scoped>
|
|
66
|
-
#backup-transaction-logs {
|
|
67
|
-
margin: 4px 4px 0 0;
|
|
68
|
-
}
|
|
69
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<atoms-stack-block
|
|
3
|
+
:has-children="false"
|
|
4
|
+
test-id="backup-max-bandwidth-stack-block"
|
|
5
|
+
>
|
|
6
|
+
<template #stackBlockKey>
|
|
7
|
+
<span>{{ localization.common.maxBandwidth }}</span>
|
|
8
|
+
</template>
|
|
9
|
+
<template #stackBlockContent>
|
|
10
|
+
<div class="flex-align-center">
|
|
11
|
+
<input
|
|
12
|
+
v-model="maxBindwidthLocal"
|
|
13
|
+
data-id="mbps-input"
|
|
14
|
+
type="number"
|
|
15
|
+
class="mbps"
|
|
16
|
+
/>
|
|
17
|
+
|
|
18
|
+
<common-select-input
|
|
19
|
+
v-model="selectedType"
|
|
20
|
+
:data="maxBandwidthOptionsLocal"
|
|
21
|
+
test-id="backup-max-bandwidth-type"
|
|
22
|
+
class="ml-1"
|
|
23
|
+
/>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
</atoms-stack-block>
|
|
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
|
+
import type { UI_T_BandwidthOption } from '~/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/models/types'
|
|
33
|
+
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
34
|
+
import { maxBandwidthOptions } from '~/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options'
|
|
35
|
+
|
|
36
|
+
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
37
|
+
|
|
38
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
39
|
+
const { $binary }: any = useNuxtApp()
|
|
40
|
+
|
|
41
|
+
const maxBandwidthOptionsLocal =
|
|
42
|
+
ref<UI_I_SelectInputItem[]>(maxBandwidthOptions)
|
|
43
|
+
|
|
44
|
+
const maxBindwidthLocal = computed<number>({
|
|
45
|
+
get() {
|
|
46
|
+
return selectedType.value === 1
|
|
47
|
+
? $binary.bToGb(model.value.bandwidth_limit)
|
|
48
|
+
: $binary.bToMb(model.value.bandwidth_limit)
|
|
49
|
+
},
|
|
50
|
+
set(newValue: number) {
|
|
51
|
+
model.value.bandwidth_limit =
|
|
52
|
+
selectedType.value === 1
|
|
53
|
+
? $binary.gbToB(newValue)
|
|
54
|
+
: $binary.mbToB(newValue)
|
|
55
|
+
},
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
const selectedType = ref<UI_T_BandwidthOption>(0)
|
|
59
|
+
watch(selectedType, (newValue) => {
|
|
60
|
+
if (newValue === 1) model.value.bandwidth_limit *= 1_024
|
|
61
|
+
else model.value.bandwidth_limit /= 1_024
|
|
62
|
+
})
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<style lang="scss" scoped>
|
|
66
|
+
#backup-transaction-logs {
|
|
67
|
+
margin: 4px 4px 0 0;
|
|
68
|
+
}
|
|
69
|
+
</style>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {UI_I_SelectInputItem} from "~/components/common/select/input/lib/models/interfaces";
|
|
2
|
-
|
|
3
|
-
export const maxBandwidthOptions: UI_I_SelectInputItem[] = [
|
|
4
|
-
{ label: 'Mbps', value: 0 },
|
|
5
|
-
{ label: 'Gbps', value: 1 },
|
|
6
|
-
]
|
|
1
|
+
import type {UI_I_SelectInputItem} from "~/components/common/select/input/lib/models/interfaces";
|
|
2
|
+
|
|
3
|
+
export const maxBandwidthOptions: UI_I_SelectInputItem[] = [
|
|
4
|
+
{ label: 'Mbps', value: 0 },
|
|
5
|
+
{ label: 'Gbps', value: 1 },
|
|
6
|
+
]
|
package/components/common/pages/backups/modals/createBackup/configuration/strategy/Strategy.vue
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<atoms-stack-block
|
|
3
|
-
:has-children="false"
|
|
4
|
-
test-id="backup-strategy-stack-block"
|
|
5
|
-
>
|
|
6
|
-
<template #stackBlockKey>
|
|
7
|
-
<span>{{ localization.common.strategy }}</span>
|
|
8
|
-
</template>
|
|
9
|
-
<template #stackBlockContent>
|
|
10
|
-
<common-select-input
|
|
11
|
-
v-model="model.strategy"
|
|
12
|
-
:data="strategyOptions"
|
|
13
|
-
test-id="backup-strategy"
|
|
14
|
-
/>
|
|
15
|
-
</template>
|
|
16
|
-
</atoms-stack-block>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script lang="ts" setup>
|
|
20
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
21
|
-
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
22
|
-
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
23
|
-
import { strategyOptionsFunc } from '~/components/common/pages/backups/modals/createBackup/lib/config/strategyOptions'
|
|
24
|
-
|
|
25
|
-
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
26
|
-
|
|
27
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
28
|
-
|
|
29
|
-
const strategyOptions = ref<UI_I_SelectInputItem[]>(
|
|
30
|
-
strategyOptionsFunc(localization.value)
|
|
31
|
-
)
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
<style lang="scss" scoped>
|
|
35
|
-
#backup-transaction-logs {
|
|
36
|
-
margin: 4px 4px 0 0;
|
|
37
|
-
}
|
|
38
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<atoms-stack-block
|
|
3
|
+
:has-children="false"
|
|
4
|
+
test-id="backup-strategy-stack-block"
|
|
5
|
+
>
|
|
6
|
+
<template #stackBlockKey>
|
|
7
|
+
<span>{{ localization.common.strategy }}</span>
|
|
8
|
+
</template>
|
|
9
|
+
<template #stackBlockContent>
|
|
10
|
+
<common-select-input
|
|
11
|
+
v-model="model.strategy"
|
|
12
|
+
:data="strategyOptions"
|
|
13
|
+
test-id="backup-strategy"
|
|
14
|
+
/>
|
|
15
|
+
</template>
|
|
16
|
+
</atoms-stack-block>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script lang="ts" setup>
|
|
20
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
21
|
+
import type { UI_I_CreateBackupForm } from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
22
|
+
import type { UI_I_SelectInputItem } from '~/components/common/select/input/lib/models/interfaces'
|
|
23
|
+
import { strategyOptionsFunc } from '~/components/common/pages/backups/modals/createBackup/lib/config/strategyOptions'
|
|
24
|
+
|
|
25
|
+
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
26
|
+
|
|
27
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
28
|
+
|
|
29
|
+
const strategyOptions = ref<UI_I_SelectInputItem[]>(
|
|
30
|
+
strategyOptionsFunc(localization.value)
|
|
31
|
+
)
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<style lang="scss" scoped>
|
|
35
|
+
#backup-transaction-logs {
|
|
36
|
+
margin: 4px 4px 0 0;
|
|
37
|
+
}
|
|
38
|
+
</style>
|
|
@@ -10,6 +10,8 @@
|
|
|
10
10
|
v-model="model"
|
|
11
11
|
:datastore-table="props.datastoreTable"
|
|
12
12
|
:datastore-table-loading="props.datastoreTableLoading"
|
|
13
|
+
:alert-messages="props.alertMessages"
|
|
14
|
+
@remove-validation-errors="emits('remove-validation-errors', $event)"
|
|
13
15
|
/>
|
|
14
16
|
</template>
|
|
15
17
|
|
|
@@ -23,6 +25,10 @@ const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
|
23
25
|
const props = defineProps<{
|
|
24
26
|
datastoreTable: UI_I_BackupDatastoreTable | null
|
|
25
27
|
datastoreTableLoading: boolean
|
|
28
|
+
alertMessages: string[]
|
|
29
|
+
}>()
|
|
30
|
+
const emits = defineEmits<{
|
|
31
|
+
(event: 'remove-validation-errors', value: number): void
|
|
26
32
|
}>()
|
|
27
33
|
|
|
28
34
|
const { $store }: any = useNuxtApp()
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="datastores h-full">
|
|
3
|
+
<atoms-alert
|
|
4
|
+
v-show="props.alertMessages.length"
|
|
5
|
+
status="alert-danger"
|
|
6
|
+
:items="props.alertMessages"
|
|
7
|
+
test-id="create-backup-datastores-alert"
|
|
8
|
+
@remove="onRemoveErrors"
|
|
9
|
+
/>
|
|
10
|
+
|
|
3
11
|
<common-pages-backups-modals-create-backup-datastores-table-view-old-table-view
|
|
4
12
|
v-model:selected="model.backup_storage"
|
|
5
13
|
:data-table="props.datastoreTable?.items || []"
|
|
6
14
|
:total-items="props.datastoreTable?.total_items || 0"
|
|
7
15
|
:total-pages="props.datastoreTable?.total_pages || 1"
|
|
8
16
|
:loading="props.datastoreTableLoading"
|
|
17
|
+
class="datastores-table"
|
|
9
18
|
/>
|
|
10
19
|
</div>
|
|
11
20
|
</template>
|
|
@@ -15,17 +24,28 @@ import type {
|
|
|
15
24
|
UI_I_BackupDatastoreTable,
|
|
16
25
|
UI_I_CreateBackupForm
|
|
17
26
|
} from '~/components/common/pages/backups/modals/lib/models/interfaces'
|
|
27
|
+
import { dynamicSteps } from '~/components/common/pages/backups/modals/createBackup/lib/config/steps'
|
|
28
|
+
|
|
29
|
+
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
18
30
|
|
|
19
31
|
const props = defineProps<{
|
|
20
32
|
datastoreTable: UI_I_BackupDatastoreTable | null
|
|
21
33
|
datastoreTableLoading: boolean
|
|
34
|
+
alertMessages: string[]
|
|
35
|
+
}>()
|
|
36
|
+
const emits = defineEmits<{
|
|
37
|
+
(event: 'remove-validation-errors', value: number): void
|
|
22
38
|
}>()
|
|
23
39
|
|
|
24
|
-
const
|
|
25
|
-
|
|
40
|
+
const onRemoveErrors = (): void => {
|
|
41
|
+
emits('remove-validation-errors', dynamicSteps.datastores)
|
|
42
|
+
}
|
|
26
43
|
</script>
|
|
27
44
|
|
|
28
45
|
<style lang="scss" scoped>
|
|
46
|
+
.datastores-table {
|
|
47
|
+
margin-top: 5px;
|
|
48
|
+
}
|
|
29
49
|
.backups-table-content {
|
|
30
50
|
height: 100%;
|
|
31
51
|
padding: 0 10px 10px 10px;
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
v-model="model"
|
|
5
5
|
:disks="props.disks"
|
|
6
6
|
:disks-loading="props.disksLoading"
|
|
7
|
+
:alert-messages="props.alertMessages"
|
|
8
|
+
@remove-validation-errors="emits('remove-validation-errors', $event)"
|
|
7
9
|
/>
|
|
8
10
|
<common-pages-backups-modals-create-backup-disks-new
|
|
9
11
|
v-else
|
|
@@ -24,6 +26,10 @@ const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
|
24
26
|
const props = defineProps<{
|
|
25
27
|
disks: UI_I_Pvm['disk_devices']
|
|
26
28
|
disksLoading: boolean
|
|
29
|
+
alertMessages: string[]
|
|
30
|
+
}>()
|
|
31
|
+
const emits = defineEmits<{
|
|
32
|
+
(event: 'remove-validation-errors', value: number): void
|
|
27
33
|
}>()
|
|
28
34
|
|
|
29
35
|
const { $store }: any = useNuxtApp()
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="disks h-full">
|
|
3
|
+
<atoms-alert
|
|
4
|
+
v-show="props.alertMessages.length"
|
|
5
|
+
status="alert-danger"
|
|
6
|
+
:items="props.alertMessages"
|
|
7
|
+
test-id="create-backup-disks-alert"
|
|
8
|
+
@remove="onRemoveErrors"
|
|
9
|
+
/>
|
|
10
|
+
|
|
3
11
|
<common-pages-backups-modals-create-backup-disks-table-view-old-table-view
|
|
4
12
|
v-model:selected="model.disk_devices"
|
|
5
13
|
:data-table="props.disks"
|
|
6
14
|
:loading="props.disksLoading"
|
|
7
15
|
:total-items="props.disks.length"
|
|
8
16
|
:total-pages="1"
|
|
17
|
+
class="disks-table"
|
|
9
18
|
/>
|
|
10
19
|
</div>
|
|
11
20
|
</template>
|
|
@@ -15,14 +24,26 @@ import type {
|
|
|
15
24
|
UI_I_CreateBackupForm,
|
|
16
25
|
UI_I_Pvm
|
|
17
26
|
} from "~/components/common/pages/backups/modals/lib/models/interfaces";
|
|
27
|
+
import { dynamicSteps } from '~/components/common/pages/backups/modals/createBackup/lib/config/steps'
|
|
18
28
|
|
|
19
29
|
const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
20
30
|
|
|
21
31
|
const props = defineProps<{
|
|
22
32
|
disks: UI_I_Pvm['disk_devices']
|
|
23
33
|
disksLoading: boolean
|
|
34
|
+
alertMessages: string[]
|
|
35
|
+
}>()
|
|
36
|
+
const emits = defineEmits<{
|
|
37
|
+
(event: 'remove-validation-errors', value: number): void
|
|
24
38
|
}>()
|
|
25
39
|
|
|
40
|
+
const onRemoveErrors = (): void => {
|
|
41
|
+
emits('remove-validation-errors', dynamicSteps.disks)
|
|
42
|
+
}
|
|
26
43
|
</script>
|
|
27
44
|
|
|
28
|
-
<style lang="scss" scoped
|
|
45
|
+
<style lang="scss" scoped>
|
|
46
|
+
.disks-table {
|
|
47
|
+
margin-top: 5px;
|
|
48
|
+
}
|
|
49
|
+
</style>
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
v-else
|
|
10
10
|
v-model="model"
|
|
11
11
|
:show="props.show"
|
|
12
|
+
:alert-messages="props.alertMessages"
|
|
13
|
+
@remove-validation-errors="emits('remove-validation-errors', $event)"
|
|
12
14
|
/>
|
|
13
15
|
</template>
|
|
14
16
|
|
|
@@ -21,7 +23,11 @@ const model = defineModel<UI_I_CreateBackupForm>({ required: true })
|
|
|
21
23
|
|
|
22
24
|
const props = defineProps<{
|
|
23
25
|
show: boolean
|
|
24
|
-
messagesFields
|
|
26
|
+
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
27
|
+
alertMessages: string[]
|
|
28
|
+
}>()
|
|
29
|
+
const emits = defineEmits<{
|
|
30
|
+
(event: 'remove-validation-errors', value: number): void
|
|
25
31
|
}>()
|
|
26
32
|
|
|
27
33
|
const { $store }: any = useNuxtApp()
|