bfg-common 1.4.113 → 1.4.114
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/scss/common/icons/icons-5.scss +28 -4
- package/components/common/layout/theHeader/TheHeaderNew.vue +12 -2
- package/components/common/layout/theHeader/ThemeSwitch.vue +8 -1
- package/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +8 -2
- package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +7 -1
- package/components/common/select/input/lib/models/interfaces.ts +0 -1
- package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +4 -3
- package/package.json +2 -2
- package/components/common/wizards/vmNew/common/computeResource/TreeView.vue +0 -61
- package/components/common/wizards/vmNew/common/tooltip/Tooltip.vue +0 -84
- package/components/common/wizards/vmNew/common/validation/compatibility/Compatibility.vue +0 -62
- package/components/common/wizards/vmNew/common/validation/lib/models/enums.ts +0 -5
- package/components/common/wizards/vmNew/migrate/Migrate.vue +0 -235
- package/components/common/wizards/vmNew/migrate/lib/config/constructDataReady.ts +0 -100
- package/components/common/wizards/vmNew/migrate/lib/config/steps.ts +0 -82
- package/components/common/wizards/vmNew/migrate/lib/models/enums.ts +0 -6
- package/components/common/wizards/vmNew/migrate/lib/models/interfaces.ts +0 -32
- package/components/common/wizards/vmNew/migrate/lib/utils.ts +0 -0
- package/components/common/wizards/vmNew/migrate/lib/validations.ts +0 -29
- package/components/common/wizards/vmNew/migrate/select/computeResource/ComputeResource.vue +0 -219
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/config/tabsPannel.ts +0 -28
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/models/enums.ts +0 -6
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/models/interfaces.ts +0 -30
- package/components/common/wizards/vmNew/migrate/select/computeResource/lib/models/types.ts +0 -12
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/TableView.vue +0 -143
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/clusterTable.ts +0 -113
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/hostTable.ts +0 -124
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/resourcePoolTable.ts +0 -115
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/tableKeys.ts +0 -65
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/config/vappsTable.ts +0 -66
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/models/interfaces.ts +0 -50
- package/components/common/wizards/vmNew/migrate/select/computeResource/tableView/lib/models/types.ts +0 -60
- package/components/common/wizards/vmNew/migrate/select/network/Network.vue +0 -125
- package/components/common/wizards/vmNew/migrate/select/network/table/network/Network.vue +0 -114
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/advancedTable.ts +0 -78
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/basicTable.ts +0 -70
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/config/tableKeys.ts +0 -13
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/models/interfaces.ts +0 -12
- package/components/common/wizards/vmNew/migrate/select/network/table/network/lib/models/types.ts +0 -21
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/UseAt.vue +0 -54
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/config/tableKeys.ts +0 -7
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/config/useAtTable.ts +0 -47
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/models/interfaces.ts +0 -1
- package/components/common/wizards/vmNew/migrate/select/network/table/useAt/lib/models/types.ts +0 -5
- package/components/common/wizards/vmNew/migrate/select/priority/Priority.vue +0 -39
- package/components/common/wizards/vmNew/migrate/select/priority/lib/config/typeOptions.ts +0 -21
- package/components/common/wizards/vmNew/migrate/select/priority/lib/models/types.ts +0 -1
- package/components/common/wizards/vmNew/migrate/select/storage/Storage.vue +0 -206
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/Batch.vue +0 -58
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/config/virtualDiskFormat.ts +0 -30
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/table/Table.vue +0 -118
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/table/lib/config/datastoreTable.ts +0 -177
- package/components/common/wizards/vmNew/migrate/select/storage/configure/batch/table/lib/models/types.ts +0 -15
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/Disk.vue +0 -68
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/Table.vue +0 -74
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/config/diskTable.ts +0 -135
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/config/tableKeys.ts +0 -15
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/models/interfaces.ts +0 -24
- package/components/common/wizards/vmNew/migrate/select/storage/configure/disk/table/lib/models/types.ts +0 -13
- package/components/common/wizards/vmNew/migrate/select/storage/lib/config/tabsPannel.ts +0 -20
- package/components/common/wizards/vmNew/migrate/select/storage/lib/models/enums.ts +0 -6
- package/components/common/wizards/vmNew/migrate/select/storage/lib/models/interfaces.ts +0 -14
- package/components/common/wizards/vmNew/migrate/select/storage/lib/models/types.ts +0 -9
- package/components/common/wizards/vmNew/migrate/select/storage/policy/Policy.vue +0 -84
- package/components/common/wizards/vmNew/migrate/select/storage/selectedPerDisk/SelectedPerDisk.vue +0 -88
- package/components/common/wizards/vmNew/migrate/select/targetServer/lib/config/tabsPannel.ts +0 -18
- package/components/common/wizards/vmNew/migrate/select/targetServer/lib/models/types.ts +0 -1
- package/components/common/wizards/vmNew/migrate/select/targetServer/new/New.vue +0 -294
- package/components/common/wizards/vmNew/migrate/select/targetServer/new/lib/config/defaultForm.ts +0 -36
- package/components/common/wizards/vmNew/migrate/select/targetServer/new/lib/models/interfaces.ts +0 -13
- package/components/common/wizards/vmNew/migrate/select/targetServer/saved/Saved.vue +0 -27
- package/components/common/wizards/vmNew/migrate/select/targetServer/targetServer.vue +0 -41
- package/components/common/wizards/vmNew/migrate/select/type/Type.vue +0 -27
- package/components/common/wizards/vmNew/migrate/select/type/lib/config/typeOptions.ts +0 -41
- package/components/common/wizards/vmNew/migrate/select/type/lib/models/interfaces.ts +0 -5
- package/components/common/wizards/vmNew/migrate/select/type/lib/models/types.ts +0 -5
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<section class="storage-policy clr-flex-row">
|
|
3
|
-
<label
|
|
4
|
-
for="storage-locator-disk-policy-label"
|
|
5
|
-
class="clr-col-3 clr-control-label"
|
|
6
|
-
>
|
|
7
|
-
{{ localization.common.vmStoragePolicy }}
|
|
8
|
-
</label>
|
|
9
|
-
<div
|
|
10
|
-
class="mt-0 clr-form-control btn btn-outline-primary dropdown-toggle storage-policy__select-wrapper"
|
|
11
|
-
>
|
|
12
|
-
<select
|
|
13
|
-
id="storage-locator-disk-policy-label"
|
|
14
|
-
v-model="selectedVmStoragePolicy"
|
|
15
|
-
data-id="storage-locator-disk-policy-select"
|
|
16
|
-
class="storage-locator-disk-format-label"
|
|
17
|
-
>
|
|
18
|
-
<option
|
|
19
|
-
v-for="option in configuredSpeedOptions"
|
|
20
|
-
:key="option.value"
|
|
21
|
-
:value="option.value"
|
|
22
|
-
>
|
|
23
|
-
{{ option.text }}
|
|
24
|
-
</option>
|
|
25
|
-
</select>
|
|
26
|
-
</div>
|
|
27
|
-
</section>
|
|
28
|
-
</template>
|
|
29
|
-
|
|
30
|
-
<script lang="ts" setup>
|
|
31
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
32
|
-
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
33
|
-
|
|
34
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
35
|
-
|
|
36
|
-
const selectedVmStoragePolicy = ref<string>('keep-existing-storage-policies')
|
|
37
|
-
|
|
38
|
-
const configuredSpeedOptions = computed<UI_I_OptionItem[]>(() => {
|
|
39
|
-
return [
|
|
40
|
-
{
|
|
41
|
-
text: 'Keep existing VM storage policies',
|
|
42
|
-
value: 'keep-existing-storage-policies',
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
text: 'Datastore Default',
|
|
46
|
-
value: 'datastore-default',
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
text: 'Management Storage Policy - Large',
|
|
50
|
-
value: 'management-storage-policy-large',
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
text: 'Management Storage Policy - Regular',
|
|
54
|
-
value: 'management-storage-policy-regular',
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
text: 'vSAN Default Storage Policy',
|
|
58
|
-
value: 'vsan-default-storage-policy',
|
|
59
|
-
},
|
|
60
|
-
]
|
|
61
|
-
})
|
|
62
|
-
</script>
|
|
63
|
-
|
|
64
|
-
<style lang="scss" scoped>
|
|
65
|
-
@import 'assets/scss/common/mixins.scss';
|
|
66
|
-
.storage-policy {
|
|
67
|
-
@include flex($align: center);
|
|
68
|
-
margin-top: 2px;
|
|
69
|
-
&__select-wrapper {
|
|
70
|
-
margin-left: 25px;
|
|
71
|
-
height: 24px;
|
|
72
|
-
min-width: 420px;
|
|
73
|
-
& > select {
|
|
74
|
-
width: 100%;
|
|
75
|
-
height: 100%;
|
|
76
|
-
text-align: center;
|
|
77
|
-
border: none;
|
|
78
|
-
&:focus-visible {
|
|
79
|
-
outline: none;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
</style>
|
package/components/common/wizards/vmNew/migrate/select/storage/selectedPerDisk/SelectedPerDisk.vue
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="selected-per-disk">
|
|
3
|
-
<atoms-the-icon
|
|
4
|
-
data-id="go-back-icon"
|
|
5
|
-
class="icon-arrow"
|
|
6
|
-
name="arrow"
|
|
7
|
-
@click="onGoBack"
|
|
8
|
-
></atoms-the-icon>
|
|
9
|
-
|
|
10
|
-
<div>
|
|
11
|
-
<span class="icon vsphere-icon-vm"></span>
|
|
12
|
-
</div>
|
|
13
|
-
|
|
14
|
-
<span v-if="normalizedData.length === 1">{{ normalizedData[0] }}</span>
|
|
15
|
-
|
|
16
|
-
<div v-else class="selected-per-disk__all-objects">
|
|
17
|
-
<span>
|
|
18
|
-
{{ localization.common.allSelectedObjects }}
|
|
19
|
-
</span>
|
|
20
|
-
<common-wizards-vm-common-tooltip>
|
|
21
|
-
<template #content>
|
|
22
|
-
<div v-for="(item, key) in normalizedData" :key="key">
|
|
23
|
-
{{ item }}
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
</common-wizards-vm-common-tooltip>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</template>
|
|
30
|
-
|
|
31
|
-
<script lang="ts" setup>
|
|
32
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
33
|
-
import type { UI_T_VmMigrateSelectStorageTab } from '~/components/common/wizards/vm/migrate/select/storage/lib/models/types'
|
|
34
|
-
|
|
35
|
-
const props = defineProps<{
|
|
36
|
-
modelValue: boolean
|
|
37
|
-
activeTab: UI_T_VmMigrateSelectStorageTab
|
|
38
|
-
connectedStorageIdLocal: string
|
|
39
|
-
data: any[]
|
|
40
|
-
}>()
|
|
41
|
-
const emits = defineEmits<{
|
|
42
|
-
(event: 'update:model-value', value: boolean): void
|
|
43
|
-
(event: 'update:active-tab', value: UI_T_VmMigrateSelectStorageTab): void
|
|
44
|
-
(event: 'update:connected-storage-id-local', value: string): void
|
|
45
|
-
}>()
|
|
46
|
-
|
|
47
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
48
|
-
|
|
49
|
-
const normalizedData = computed<string[]>(() =>
|
|
50
|
-
props.data.map((item) => `${item.virtual_machine} | ${item.file}`)
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
const onGoBack = (): void => {
|
|
54
|
-
emits('update:model-value', false)
|
|
55
|
-
emits('update:connected-storage-id-local', '')
|
|
56
|
-
activeTabValue.value = 'configure-disk'
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const activeTabValue = computed<UI_T_VmMigrateSelectStorageTab>({
|
|
60
|
-
get() {
|
|
61
|
-
return props.activeTab
|
|
62
|
-
},
|
|
63
|
-
set(newValue: UI_T_VmMigrateSelectStorageTab) {
|
|
64
|
-
emits('update:active-tab', newValue)
|
|
65
|
-
},
|
|
66
|
-
})
|
|
67
|
-
</script>
|
|
68
|
-
|
|
69
|
-
<style lang="scss" scoped>
|
|
70
|
-
@import 'assets/scss/common/mixins.scss';
|
|
71
|
-
.selected-per-disk {
|
|
72
|
-
@include flex($align: center);
|
|
73
|
-
.icon {
|
|
74
|
-
display: block;
|
|
75
|
-
}
|
|
76
|
-
.icon-arrow {
|
|
77
|
-
width: 16px;
|
|
78
|
-
height: 16px;
|
|
79
|
-
margin: 0 20px 0 15px;
|
|
80
|
-
transform: rotate(270deg);
|
|
81
|
-
fill: #0079b8;
|
|
82
|
-
cursor: pointer;
|
|
83
|
-
}
|
|
84
|
-
&__all-objects {
|
|
85
|
-
@include flex($align: center);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
</style>
|
package/components/common/wizards/vmNew/migrate/select/targetServer/lib/config/tabsPannel.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
3
|
-
export const vmMigrateSelectTargetServerTabsFunc = (
|
|
4
|
-
localization: UI_I_Localization
|
|
5
|
-
): UI_I_CollapseNavItem[] => {
|
|
6
|
-
return [
|
|
7
|
-
{
|
|
8
|
-
text: localization.common.savedVCenterServers,
|
|
9
|
-
value: 'saved-servers',
|
|
10
|
-
disabled: false,
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
text: localization.common.newVCenterServer,
|
|
14
|
-
value: 'new-server',
|
|
15
|
-
disabled: false,
|
|
16
|
-
},
|
|
17
|
-
]
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type T_SelectTargetServerTab = 'new-server' | 'saved-servers'
|
|
@@ -1,294 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="new-server">
|
|
3
|
-
<div>
|
|
4
|
-
<div class="clr-form-control clr-row">
|
|
5
|
-
<label for="" class="clr-control-label clr-col-md-4">
|
|
6
|
-
{{ localization.common.vCenterServerAddress }}
|
|
7
|
-
</label>
|
|
8
|
-
|
|
9
|
-
<div
|
|
10
|
-
class="clr-control-container"
|
|
11
|
-
:class="nameErrorText && 'clr-error'"
|
|
12
|
-
>
|
|
13
|
-
<div class="flex-align-center">
|
|
14
|
-
<input
|
|
15
|
-
id="configuration-name-input"
|
|
16
|
-
v-model="form.name.value"
|
|
17
|
-
data-id="configuration-name-input"
|
|
18
|
-
type="text"
|
|
19
|
-
class="clr-input"
|
|
20
|
-
@blur="onBlurInputName"
|
|
21
|
-
@input="onInputName"
|
|
22
|
-
/>
|
|
23
|
-
<atoms-the-icon class="error-icon" name="info-circle" />
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<div class="clr-subtext ng-star-inserted">
|
|
27
|
-
{{ nameErrorText }}
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<div class="clr-form-control clr-row">
|
|
33
|
-
<label class="clr-control-label clr-col-md-4">
|
|
34
|
-
{{ localization.common.username }}
|
|
35
|
-
</label>
|
|
36
|
-
|
|
37
|
-
<div
|
|
38
|
-
class="clr-control-container"
|
|
39
|
-
:class="folderErrorText && 'clr-error'"
|
|
40
|
-
>
|
|
41
|
-
<div class="flex-align-center">
|
|
42
|
-
<input
|
|
43
|
-
id="configuration-folder-input"
|
|
44
|
-
v-model="form.folder.value"
|
|
45
|
-
data-id="configuration-folder-input"
|
|
46
|
-
type="text"
|
|
47
|
-
class="clr-input"
|
|
48
|
-
@blur="onBlurInputFolder"
|
|
49
|
-
@input="onInputFolder"
|
|
50
|
-
/>
|
|
51
|
-
<atoms-the-icon class="error-icon" name="info-circle" />
|
|
52
|
-
</div>
|
|
53
|
-
|
|
54
|
-
<div v-if="folderErrorText" class="clr-subtext">
|
|
55
|
-
{{ folderErrorText }}
|
|
56
|
-
</div>
|
|
57
|
-
<div v-else class="clr-subtext">example@domain.local</div>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
<div class="nd-mt-0 clr-form-control clr-row">
|
|
62
|
-
<label class="clr-control-label clr-col-md-4">
|
|
63
|
-
{{ localization.common.password }}
|
|
64
|
-
</label>
|
|
65
|
-
|
|
66
|
-
<div
|
|
67
|
-
class="clr-control-container"
|
|
68
|
-
:class="serverErrorText && 'clr-error'"
|
|
69
|
-
>
|
|
70
|
-
<div class="flex-align-center input-action-wrapper">
|
|
71
|
-
<input
|
|
72
|
-
id="configuration-folder-input"
|
|
73
|
-
v-model="form.server.value"
|
|
74
|
-
data-id="configuration-folder-input"
|
|
75
|
-
type="text"
|
|
76
|
-
class="clr-input"
|
|
77
|
-
@blur="onBlurInputServer"
|
|
78
|
-
@input="onInputServer"
|
|
79
|
-
/>
|
|
80
|
-
<atoms-the-icon class="error-icon" name="info-circle" />
|
|
81
|
-
</div>
|
|
82
|
-
<div v-if="serverErrorText" class="clr-subtext">
|
|
83
|
-
{{ serverErrorText }}
|
|
84
|
-
</div>
|
|
85
|
-
<div v-else class="clr-subtext">Password</div>
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
</div>
|
|
89
|
-
|
|
90
|
-
<div class="clr-form-control clr-row mt-1">
|
|
91
|
-
<label for="" class="clr-control-label clr-col-md-4">
|
|
92
|
-
{{ localization.common.saveVCenterServerAddress }}
|
|
93
|
-
</label>
|
|
94
|
-
|
|
95
|
-
<input
|
|
96
|
-
v-model="accessMode"
|
|
97
|
-
data-id="access-mode-checkbox"
|
|
98
|
-
type="checkbox"
|
|
99
|
-
/>
|
|
100
|
-
</div>
|
|
101
|
-
|
|
102
|
-
<button
|
|
103
|
-
class="btn btn-primary btn-sm mt-2 clr-col-md-2"
|
|
104
|
-
:disabled="true"
|
|
105
|
-
data-id="sign-in-button"
|
|
106
|
-
@click="onSignIn"
|
|
107
|
-
>
|
|
108
|
-
{{ localization.common.login }}
|
|
109
|
-
</button>
|
|
110
|
-
</div>
|
|
111
|
-
</template>
|
|
112
|
-
|
|
113
|
-
<script lang="ts" setup>
|
|
114
|
-
import type { UI_I_ValidationTouchResult } from '~/lib/models/plugins/validation/interfaces'
|
|
115
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
116
|
-
import type { UI_I_TargetServerData, UI_I_FormValidationTargetServer } from '~/components/common/wizards/vm/migrate/select/targetServer/new/lib/models/interfaces'
|
|
117
|
-
import { checkValidityName } from '~/components/common/wizards/datastore/add/lib/utils'
|
|
118
|
-
import { defaultFormFunc } from '~/components/common/wizards/vm/migrate/select/targetServer/new/lib/config/defaultForm'
|
|
119
|
-
|
|
120
|
-
const props = defineProps<{
|
|
121
|
-
nfsConfigurationSubmit: number
|
|
122
|
-
}>()
|
|
123
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
124
|
-
const emits = defineEmits<{
|
|
125
|
-
(event: 'loading', value: boolean): void
|
|
126
|
-
(event: 'next', value: UI_I_TargetServerData): void
|
|
127
|
-
}>()
|
|
128
|
-
const { $validation } = useNuxtApp()
|
|
129
|
-
|
|
130
|
-
const validation = $validation.call({})
|
|
131
|
-
const defaultForm: UI_I_FormValidationTargetServer = defaultFormFunc(
|
|
132
|
-
localization.value
|
|
133
|
-
)
|
|
134
|
-
const form = ref<UI_I_FormValidationTargetServer>(useDeepCopy(defaultForm))
|
|
135
|
-
const setForm = (): void => {
|
|
136
|
-
form.value = useDeepCopy(defaultForm)
|
|
137
|
-
validation.setForm(form)
|
|
138
|
-
}
|
|
139
|
-
setForm()
|
|
140
|
-
|
|
141
|
-
const validForm = ref<UI_I_ValidationTouchResult | null>(null)
|
|
142
|
-
|
|
143
|
-
/* Validation for Name input */
|
|
144
|
-
const isInitNameValidation = ref<boolean>(false)
|
|
145
|
-
const onBlurInputName = (): void => {
|
|
146
|
-
validForm.value = validation.touch()
|
|
147
|
-
isInitNameValidation.value = true
|
|
148
|
-
}
|
|
149
|
-
const onInputName = (): void => {
|
|
150
|
-
validForm.value = validation.touch()
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
const nameErrorText = computed<string>(() => {
|
|
154
|
-
if (!isInitNameValidation.value) return ''
|
|
155
|
-
return validForm.value?.errors?.name?.[0] || ''
|
|
156
|
-
})
|
|
157
|
-
/* Validation Name input end */
|
|
158
|
-
|
|
159
|
-
/* Validation for Folder input */
|
|
160
|
-
const isInitFolderValidation = ref<boolean>(false)
|
|
161
|
-
const onBlurInputFolder = (): void => {
|
|
162
|
-
validForm.value = validation.touch()
|
|
163
|
-
isInitFolderValidation.value = true
|
|
164
|
-
}
|
|
165
|
-
const onInputFolder = (): void => {
|
|
166
|
-
validForm.value = validation.touch()
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
const folderErrorText = computed<string>(() => {
|
|
170
|
-
if (!isInitFolderValidation.value) return ''
|
|
171
|
-
return validForm.value?.errors?.folder?.[0] || ''
|
|
172
|
-
})
|
|
173
|
-
/* Validation Folder input end */
|
|
174
|
-
|
|
175
|
-
/* Validation for Server input */
|
|
176
|
-
const isInitServerValidation = ref<boolean>(false)
|
|
177
|
-
const onBlurInputServer = (): void => {
|
|
178
|
-
validForm.value = validation.touch()
|
|
179
|
-
isInitServerValidation.value = true
|
|
180
|
-
}
|
|
181
|
-
const onInputServer = (): void => {
|
|
182
|
-
validForm.value = validation.touch()
|
|
183
|
-
isInitServerValidation.value = true
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
const serverErrorText = computed<string>(() => {
|
|
187
|
-
// if (!isInitServerValidation.value || dataServers.value.length) return ''
|
|
188
|
-
if (!isInitServerValidation.value) return ''
|
|
189
|
-
return validForm.value?.errors?.server?.[0] || ''
|
|
190
|
-
})
|
|
191
|
-
|
|
192
|
-
/* Validation Folder Server end */
|
|
193
|
-
|
|
194
|
-
const accessMode = ref<boolean>(false)
|
|
195
|
-
|
|
196
|
-
const onSignIn = (): void => {}
|
|
197
|
-
|
|
198
|
-
const resetValidation = (): void => {
|
|
199
|
-
isInitNameValidation.value =
|
|
200
|
-
isInitFolderValidation.value =
|
|
201
|
-
isInitServerValidation.value =
|
|
202
|
-
false
|
|
203
|
-
validForm.value = null
|
|
204
|
-
errors.value = []
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
watch(
|
|
208
|
-
() => props.nfsConfigurationSubmit,
|
|
209
|
-
() => {
|
|
210
|
-
submit()
|
|
211
|
-
}
|
|
212
|
-
)
|
|
213
|
-
const submit = async (): Promise<void> => {
|
|
214
|
-
const { name, server, folder } = form.value
|
|
215
|
-
|
|
216
|
-
validForm.value = validation.touch()
|
|
217
|
-
isInitNameValidation.value =
|
|
218
|
-
isInitFolderValidation.value =
|
|
219
|
-
isInitServerValidation.value =
|
|
220
|
-
true
|
|
221
|
-
|
|
222
|
-
if (nameErrorText.value || folderErrorText.value || serverErrorText.value) {
|
|
223
|
-
return
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
emits('loading', true)
|
|
227
|
-
|
|
228
|
-
const { valid, msg } = await checkValidityName(name.value)
|
|
229
|
-
|
|
230
|
-
emits('loading', false)
|
|
231
|
-
|
|
232
|
-
if (!valid) {
|
|
233
|
-
showValidationErrors(msg)
|
|
234
|
-
return
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
resetValidation()
|
|
238
|
-
|
|
239
|
-
const configurationData: UI_I_TargetServerData = {
|
|
240
|
-
name: name.value,
|
|
241
|
-
folder: folder.value,
|
|
242
|
-
server: server.value,
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
emits('next', configurationData)
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
const errors = ref<string[]>([])
|
|
249
|
-
|
|
250
|
-
const showValidationErrors = (errorText: string): void => {
|
|
251
|
-
errors.value = [errorText]
|
|
252
|
-
}
|
|
253
|
-
</script>
|
|
254
|
-
|
|
255
|
-
<style lang="scss" scoped>
|
|
256
|
-
@import 'assets/scss/common/mixins.scss';
|
|
257
|
-
.new-server {
|
|
258
|
-
@include flex($dir: column, $just: space-between);
|
|
259
|
-
height: 100%;
|
|
260
|
-
margin-top: 25px;
|
|
261
|
-
|
|
262
|
-
.clr-form-control {
|
|
263
|
-
margin-top: 0;
|
|
264
|
-
display: flex;
|
|
265
|
-
flex-direction: row;
|
|
266
|
-
|
|
267
|
-
.clr-control-container {
|
|
268
|
-
min-height: 48px;
|
|
269
|
-
&.clr-error {
|
|
270
|
-
.clr-subtext,
|
|
271
|
-
.error-icon {
|
|
272
|
-
display: block;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
.error-icon {
|
|
276
|
-
display: none;
|
|
277
|
-
}
|
|
278
|
-
.error-icon {
|
|
279
|
-
fill: #db2100;
|
|
280
|
-
width: 24px;
|
|
281
|
-
height: 24px;
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
.flex-align-center {
|
|
287
|
-
&.input-action-wrapper {
|
|
288
|
-
width: 260px;
|
|
289
|
-
}
|
|
290
|
-
input {
|
|
291
|
-
width: 210px;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
294
|
-
</style>
|
package/components/common/wizards/vmNew/migrate/select/targetServer/new/lib/config/defaultForm.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type { UI_I_FormValidationTargetServer } from '~/components/common/wizards/vm/migrate/select/targetServer/new/lib/models/interfaces'
|
|
3
|
-
|
|
4
|
-
export const defaultFormFunc = (
|
|
5
|
-
localization: UI_I_Localization
|
|
6
|
-
): UI_I_FormValidationTargetServer => {
|
|
7
|
-
return {
|
|
8
|
-
name: {
|
|
9
|
-
value: '',
|
|
10
|
-
validations: [
|
|
11
|
-
{
|
|
12
|
-
value: 'required',
|
|
13
|
-
errorText: localization.common.fieldRequired,
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
},
|
|
17
|
-
folder: {
|
|
18
|
-
value: '',
|
|
19
|
-
validations: [
|
|
20
|
-
{
|
|
21
|
-
value: 'required',
|
|
22
|
-
errorText: localization.common.fieldRequired,
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
},
|
|
26
|
-
server: {
|
|
27
|
-
value: '',
|
|
28
|
-
validations: [
|
|
29
|
-
{
|
|
30
|
-
value: 'required',
|
|
31
|
-
errorText: localization.common.fieldRequired,
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
},
|
|
35
|
-
}
|
|
36
|
-
}
|
package/components/common/wizards/vmNew/migrate/select/targetServer/new/lib/models/interfaces.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { UI_I_Validation } from '~/lib/models/plugins/validation/interfaces'
|
|
2
|
-
|
|
3
|
-
export interface UI_I_FormValidationTargetServer {
|
|
4
|
-
name: UI_I_Validation
|
|
5
|
-
folder: UI_I_Validation
|
|
6
|
-
server: UI_I_Validation
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface UI_I_TargetServerData {
|
|
10
|
-
name: string
|
|
11
|
-
folder: string
|
|
12
|
-
server: string
|
|
13
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="saved-servers">
|
|
3
|
-
<atoms-alert
|
|
4
|
-
test-id="vm-migrate-saved-servers-alert"
|
|
5
|
-
status="alert-info"
|
|
6
|
-
:items="arrayErrorMessages"
|
|
7
|
-
hide-close-icon
|
|
8
|
-
/>
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script lang="ts" setup>
|
|
13
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
14
|
-
|
|
15
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
16
|
-
|
|
17
|
-
const arrayErrorMessages = ref<string[]>([])
|
|
18
|
-
|
|
19
|
-
const setErrorText = (): void => {
|
|
20
|
-
arrayErrorMessages.value = [
|
|
21
|
-
localization.value.common.noSavedVCenterServerAddressesFound,
|
|
22
|
-
]
|
|
23
|
-
}
|
|
24
|
-
setErrorText()
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<style lang="scss" scoped></style>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="target-server">
|
|
3
|
-
<atoms-tabs
|
|
4
|
-
v-model="activeTab"
|
|
5
|
-
test-id="migrate-select-target-server-tabs"
|
|
6
|
-
:items="selectStorageTabs"
|
|
7
|
-
size="small"
|
|
8
|
-
class="target-server__tabs"
|
|
9
|
-
/>
|
|
10
|
-
|
|
11
|
-
<common-wizards-vm-migrate-select-target-server-saved
|
|
12
|
-
v-if="activeTab === 'saved-servers'"
|
|
13
|
-
/>
|
|
14
|
-
|
|
15
|
-
<common-wizards-vm-migrate-select-target-server-new
|
|
16
|
-
v-if="activeTab === 'new-server'"
|
|
17
|
-
/>
|
|
18
|
-
</div>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script lang="ts" setup>
|
|
22
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
23
|
-
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
24
|
-
import type { T_SelectTargetServerTab } from '~/components/common/wizards/vm/migrate/select/targetServer/lib/models/types'
|
|
25
|
-
import { vmMigrateSelectTargetServerTabsFunc } from '~/components/common/wizards/vm/migrate/select/targetServer/lib/config/tabsPannel'
|
|
26
|
-
|
|
27
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
28
|
-
|
|
29
|
-
const activeTab = ref<T_SelectTargetServerTab>('new-server')
|
|
30
|
-
const selectStorageTabs = computed<UI_I_CollapseNavItem[]>(() =>
|
|
31
|
-
vmMigrateSelectTargetServerTabsFunc(localization.value)
|
|
32
|
-
)
|
|
33
|
-
</script>
|
|
34
|
-
|
|
35
|
-
<style lang="scss" scoped>
|
|
36
|
-
.target-server {
|
|
37
|
-
&__tabs {
|
|
38
|
-
width: 100%;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
</style>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<common-select-radio-group
|
|
3
|
-
v-model="selectedMigrateTypeLocal"
|
|
4
|
-
:options="vmMigrationTypes"
|
|
5
|
-
/>
|
|
6
|
-
</template>
|
|
7
|
-
|
|
8
|
-
<script lang="ts" setup>
|
|
9
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
|
10
|
-
import type { UI_I_VmMigrateTypeOption } from '~/components/common/wizards/vmNew/migrate/select/type/lib/models/interfaces'
|
|
11
|
-
import type { UI_T_VmMigrateType } from '~/components/common/wizards/vmNew/migrate/select/type/lib/models/types'
|
|
12
|
-
import { vmMigrateTypesFunc } from '~/components/common/wizards/vmNew/migrate/select/type/lib/config/typeOptions'
|
|
13
|
-
|
|
14
|
-
const props = defineProps<{
|
|
15
|
-
project: UI_T_Project
|
|
16
|
-
}>()
|
|
17
|
-
const selectedMigrateTypeLocal = defineModel<UI_T_VmMigrateType>({
|
|
18
|
-
required: true,
|
|
19
|
-
})
|
|
20
|
-
const localization = computed<any>(() => useLocal())
|
|
21
|
-
|
|
22
|
-
const vmMigrationTypes = ref<UI_I_VmMigrateTypeOption[]>(
|
|
23
|
-
vmMigrateTypesFunc(localization.value, props.project)
|
|
24
|
-
)
|
|
25
|
-
</script>
|
|
26
|
-
|
|
27
|
-
<style lang="scss" scoped></style>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
|
3
|
-
import type { UI_I_VmMigrateTypeOption } from '~/components/common/wizards/vm/migrate/select/type/lib/models/interfaces'
|
|
4
|
-
|
|
5
|
-
export const vmMigrateTypesFunc = (
|
|
6
|
-
localization: UI_I_Localization,
|
|
7
|
-
project: UI_T_Project
|
|
8
|
-
): UI_I_VmMigrateTypeOption[] => {
|
|
9
|
-
const options: UI_I_VmMigrateTypeOption[] = [
|
|
10
|
-
{
|
|
11
|
-
label: localization.common.changeComputeResourceOnly,
|
|
12
|
-
value: 'resource',
|
|
13
|
-
disabled: false,
|
|
14
|
-
description: localization.common.changeComputeResourceOnlyDesc,
|
|
15
|
-
permissions: ['sphere'],
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
label: localization.common.changeStorageOnly,
|
|
19
|
-
value: 'storage',
|
|
20
|
-
disabled: false,
|
|
21
|
-
description: localization.common.changeStorageOnlyDesc,
|
|
22
|
-
permissions: ['sphere', 'procurator'],
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
label: localization.common.changeBothComputeResourceStorage,
|
|
26
|
-
value: 'resource-storage',
|
|
27
|
-
disabled: false,
|
|
28
|
-
description: localization.common.changeBothComputeResourceStorageDesc,
|
|
29
|
-
permissions: ['sphere'],
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
label: localization.common.crossVCenterServerExport,
|
|
33
|
-
value: 'server',
|
|
34
|
-
disabled: false,
|
|
35
|
-
description: localization.common.crossVCenterServerExportDesc,
|
|
36
|
-
permissions: ['sphere'],
|
|
37
|
-
},
|
|
38
|
-
]
|
|
39
|
-
|
|
40
|
-
return options.filter((option) => option.permissions.includes(project))
|
|
41
|
-
}
|