bfg-common 1.6.76 → 1.6.78
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 +1 -14
- package/assets/localization/local_en.json +1 -14
- package/assets/localization/local_hy.json +1 -14
- package/assets/localization/local_kk.json +1 -14
- package/assets/localization/local_ru.json +1 -14
- package/assets/localization/local_zh.json +1 -14
- package/components/atoms/dropdown/dropdown/Dropdown.vue +170 -170
- package/components/atoms/dropdown/dropdown/lib/models/interfaces.ts +10 -10
- package/components/common/adapterManager/AdapterManager.vue +473 -473
- package/components/common/adapterManager/AdapterManagerOld.vue +498 -498
- package/components/common/adapterManager/addAdapterModal/AddAdapterModal.vue +70 -70
- package/components/common/adapterManager/addAdapterModal/AddAdapterModalNew.vue +110 -110
- package/components/common/adapterManager/addAdapterModal/AddAdapterModalOld.vue +531 -531
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModal.vue +32 -32
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalNew.vue +37 -37
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalOld.vue +73 -73
- package/components/common/adapterManager/lib/config/index.ts +19 -19
- package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModal.vue +31 -31
- package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModalNew.vue +34 -34
- package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModalOld.vue +57 -57
- package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModal.vue +31 -31
- package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModalNew.vue +34 -34
- package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModalOld.vue +57 -57
- package/components/common/adapterManager/ui/actions/AddAdapterButton.vue +34 -34
- package/components/common/adapterManager/ui/actions/RemoveAdapterButton.vue +41 -41
- package/components/common/adapterManager/ui/actions/VerticalSeparator.vue +10 -10
- package/components/common/adapterManager/ui/actions/bar/BarOld.vue +95 -95
- package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButton.vue +28 -28
- package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButtonNew.vue +76 -76
- package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButtonOld.vue +33 -33
- package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButton.vue +28 -28
- package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButtonNew.vue +77 -77
- package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButtonOld.vue +33 -33
- package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapter.vue +24 -24
- package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapterNew.vue +18 -18
- package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapterOld.vue +38 -38
- package/components/common/adapterManager/ui/secondTitle/SecondTitle.vue +31 -31
- package/components/common/adapterManager/ui/secondTitle/SecondTitleNew.vue +51 -51
- package/components/common/adapterManager/ui/secondTitle/SecondTitleOld.vue +35 -35
- package/components/common/adapterManager/ui/table/Table.vue +88 -88
- package/components/common/adapterManager/ui/table/TableNew.vue +137 -137
- package/components/common/adapterManager/ui/table/TableOld.vue +141 -141
- package/components/common/adapterManager/ui/table/adapters/Adapters.vue +44 -44
- package/components/common/adapterManager/ui/table/adapters/AdaptersNew.vue +187 -187
- package/components/common/adapterManager/ui/table/adapters/AdaptersOld.vue +87 -87
- package/components/common/adapterManager/ui/table/header/Header.vue +57 -57
- package/components/common/adapterManager/ui/table/header/HeaderNew.vue +81 -81
- package/components/common/adapterManager/ui/table/header/HeaderOld.vue +79 -79
- package/components/common/adapterManager/ui/table/lib/models/types.ts +1 -1
- package/components/common/certificate/Certificate.vue +6 -16
- package/components/common/certificate/{Info/Old.vue → CertificateInfo.vue} +34 -6
- package/components/common/certificate/{tools/Tools.vue → Tools.vue} +23 -18
- package/components/common/certificate/lib/config/tabsPannel.ts +22 -0
- package/components/common/diagramMain/adapter/Adapter.vue +123 -123
- package/components/common/diagramMain/adapter/AdapterItem.vue +438 -438
- package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
- package/components/common/diagramMain/adapter/Contents.vue +212 -212
- package/components/common/diagramMain/adapter/Lines.vue +81 -81
- package/components/common/diagramMain/adapter/block/Block.vue +27 -27
- package/components/common/diagramMain/adapter/block/BlockNew.vue +58 -58
- package/components/common/diagramMain/adapter/block/BlockOld.vue +50 -50
- package/components/common/diagramMain/adapter/secondBlock/SecondBlock.vue +27 -27
- package/components/common/diagramMain/adapter/secondBlock/SecondBlockNew.vue +60 -60
- package/components/common/diagramMain/adapter/secondBlock/SecondBlockOld.vue +51 -51
- package/components/common/diagramMain/highlights/Highlights.vue +151 -151
- package/components/common/diagramMain/highlights/HighlightsNew.vue +124 -124
- package/components/common/diagramMain/highlights/HighlightsOld.vue +107 -107
- package/components/common/diagramMain/lib/config/index.ts +81 -81
- package/components/common/diagramMain/lib/config/initial.ts +50 -50
- package/components/common/diagramMain/lib/config/positions.ts +194 -194
- package/components/common/diagramMain/lib/models/enums.ts +44 -44
- package/components/common/diagramMain/lib/models/interfaces.ts +760 -760
- package/components/common/diagramMain/lib/models/types.ts +21 -21
- package/components/common/diagramMain/lib/utils/utils.ts +331 -331
- package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +331 -331
- package/components/common/diagramMain/modals/Modals.vue +483 -483
- package/components/common/diagramMain/modals/lib/config/adapterModal.ts +147 -147
- package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
- package/components/common/diagramMain/modals/lib/config/networkModal.ts +405 -405
- package/components/common/diagramMain/modals/lib/config/portModal.ts +253 -253
- package/components/common/diagramMain/modals/lib/config/switchModal.ts +245 -245
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
- package/components/common/diagramMain/modals/lib/mappers/mappers.ts +88 -88
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +541 -541
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +170 -170
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/VmkernelAdapterReadyComplete.vue +49 -49
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +19 -19
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +137 -137
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +52 -52
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
- package/components/common/diagramMain/modals/remove/RemoveModal.vue +82 -82
- package/components/common/diagramMain/modals/remove/RemoveModalNew.vue +106 -106
- package/components/common/diagramMain/modals/remove/RemoveModalOld.vue +241 -241
- package/components/common/diagramMain/modals/viewSettings/info/Info.vue +57 -57
- package/components/common/diagramMain/modals/viewSettings/info/InfoNew.vue +174 -174
- package/components/common/diagramMain/modals/viewSettings/info/InfoOld.vue +141 -141
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettings.vue +45 -45
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsNew.vue +323 -323
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsOld.vue +203 -203
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModal.vue +60 -60
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModalNew.vue +50 -50
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModalOld.vue +70 -70
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/lib/models/interfaces.ts +48 -48
- package/components/common/diagramMain/network/Contents.vue +497 -497
- package/components/common/diagramMain/network/Lines.vue +107 -107
- package/components/common/diagramMain/network/Network.vue +141 -141
- package/components/common/diagramMain/network/block/Block.vue +37 -37
- package/components/common/diagramMain/network/block/BlockNew.vue +68 -68
- package/components/common/diagramMain/network/block/BlockOld.vue +64 -64
- package/components/common/diagramMain/network/noNetwork/NoNetwork.vue +12 -12
- package/components/common/diagramMain/network/noNetwork/NoNetworkNew.vue +89 -89
- package/components/common/diagramMain/network/noNetwork/NoNetworkOld.vue +61 -61
- package/components/common/diagramMain/network/secondBlock/SecondBlock.vue +41 -41
- package/components/common/diagramMain/network/secondBlock/SecondBlockNew.vue +64 -64
- package/components/common/diagramMain/network/secondBlock/SecondBlockOld.vue +60 -60
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/diagramMain/port/Ports.vue +47 -47
- package/components/common/diagramMain/switch/Switch.vue +180 -180
- package/components/common/diagramMain/switch/SwitchSelected.vue +111 -111
- package/components/common/monitor/advanced/table/tableOld/TableOld.vue +93 -93
- package/components/common/monitor/utilization/lib/models/enums.ts +4 -4
- package/components/common/split/horizontal/New.vue +1 -1
- package/components/common/split/horizontal/Old.vue +1 -1
- package/package.json +2 -2
- package/components/common/certificate/Info/Info.vue +0 -61
- package/components/common/certificate/Info/new/New.vue +0 -285
- package/components/common/certificate/Info/new/lib/config/index.ts +0 -59
- package/components/common/certificate/Info/new/lib/models/interfaces.ts +0 -3
- package/components/common/certificate/Info/new/lib/utils/index.ts +0 -10
- package/components/common/certificate/Old.vue +0 -27
- package/components/common/certificate/new/New.vue +0 -30
- package/components/common/certificate/new/Skeleton.vue +0 -155
- package/components/common/certificate/tools/New.vue +0 -48
- package/components/common/certificate/tools/Old.vue +0 -39
- package/components/common/certificate/tools/lib/config/tabsPannel.ts +0 -20
|
@@ -1,137 +1,137 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
UI_I_AsyncCheckReturn,
|
|
3
|
-
UI_I_ValidationReturn,
|
|
4
|
-
UI_I_WizardStep,
|
|
5
|
-
} from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
|
|
6
|
-
import type Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
|
|
7
|
-
import type { UI_I_ConnectionSettings } from '~/components/common/wizards/network/add/lib/models/interfaces'
|
|
8
|
-
import type { UI_I_MigrateVmkernelAdapterEmits } from '~/components/common/diagramMain/lib/models/interfaces'
|
|
9
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
10
|
-
import { UI_E_MigrationValidationFields } from '~/components/common/diagramMain/lib/models/enums'
|
|
11
|
-
import { checkVlanId } from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common'
|
|
12
|
-
|
|
13
|
-
export const validateVlanIdConnectionSettingsLocal = (
|
|
14
|
-
localization: UI_I_Localization,
|
|
15
|
-
data: UI_I_ConnectionSettings,
|
|
16
|
-
wizard: Wizard
|
|
17
|
-
): void => {
|
|
18
|
-
wizard.validateFieldLocal(
|
|
19
|
-
1,
|
|
20
|
-
UI_E_MigrationValidationFields.CONNECTION_SETTINGS_VLAN,
|
|
21
|
-
checkVlanId(data.vlanId, localization),
|
|
22
|
-
localization.common.vlanIdInvalidMessage,
|
|
23
|
-
localization.common.vlanIdInvalidMessage
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const validateNetworkConnectionSettingsLocal = (
|
|
28
|
-
localization: UI_I_Localization,
|
|
29
|
-
data: UI_I_ConnectionSettings,
|
|
30
|
-
wizard: Wizard
|
|
31
|
-
): void => {
|
|
32
|
-
wizard.validateFieldLocal(
|
|
33
|
-
1,
|
|
34
|
-
UI_E_MigrationValidationFields.CONNECTION_SETTINGS_NETWORK,
|
|
35
|
-
data.networkLabel === '',
|
|
36
|
-
localization.common.networkLabelInvalidMessage,
|
|
37
|
-
localization.common.networkLabelInvalidMessage
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export const checkConnectionSettingsSync = (
|
|
42
|
-
localization: UI_I_Localization,
|
|
43
|
-
data: UI_I_ConnectionSettings,
|
|
44
|
-
wizard: Wizard,
|
|
45
|
-
value: UI_I_WizardStep[]
|
|
46
|
-
): UI_I_ValidationReturn => {
|
|
47
|
-
let stepHasError = false
|
|
48
|
-
|
|
49
|
-
if (checkVlanId(data.vlanId, localization)) {
|
|
50
|
-
stepHasError = wizard.setValidation(
|
|
51
|
-
1,
|
|
52
|
-
UI_E_MigrationValidationFields.CONNECTION_SETTINGS_VLAN,
|
|
53
|
-
{
|
|
54
|
-
fieldMessage: localization.common.vlanIdInvalidMessage,
|
|
55
|
-
alertMessage: localization.common.vlanIdInvalidMessage,
|
|
56
|
-
}
|
|
57
|
-
)
|
|
58
|
-
} else if (
|
|
59
|
-
wizard.hasMessage(
|
|
60
|
-
1,
|
|
61
|
-
UI_E_MigrationValidationFields.CONNECTION_SETTINGS_VLAN
|
|
62
|
-
)
|
|
63
|
-
) {
|
|
64
|
-
value = wizard.removeValidation(
|
|
65
|
-
1,
|
|
66
|
-
UI_E_MigrationValidationFields.CONNECTION_SETTINGS_VLAN,
|
|
67
|
-
value
|
|
68
|
-
)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return {
|
|
72
|
-
newValue: value,
|
|
73
|
-
stepHasError,
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
const checkNetwork = async (
|
|
78
|
-
label: string,
|
|
79
|
-
localization: UI_I_Localization,
|
|
80
|
-
emits: UI_I_MigrateVmkernelAdapterEmits
|
|
81
|
-
): Promise<UI_I_AsyncCheckReturn> => {
|
|
82
|
-
if (label) {
|
|
83
|
-
return new Promise((resolve, _reject) =>
|
|
84
|
-
emits('check-network-label', label, (message: string) => {
|
|
85
|
-
if (message === '') {
|
|
86
|
-
resolve({
|
|
87
|
-
isValid: true,
|
|
88
|
-
message: '',
|
|
89
|
-
})
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (message !== '') {
|
|
93
|
-
resolve({
|
|
94
|
-
isValid: false,
|
|
95
|
-
message,
|
|
96
|
-
})
|
|
97
|
-
}
|
|
98
|
-
})
|
|
99
|
-
)
|
|
100
|
-
} else {
|
|
101
|
-
return {
|
|
102
|
-
isValid: false,
|
|
103
|
-
message: localization.common.networkLabelInvalidMessage,
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export const checkNetworkAsync = async (
|
|
109
|
-
value: UI_I_WizardStep[],
|
|
110
|
-
label: string,
|
|
111
|
-
stepId: number,
|
|
112
|
-
fieldName: string,
|
|
113
|
-
emits: UI_I_MigrateVmkernelAdapterEmits,
|
|
114
|
-
localization: UI_I_Localization,
|
|
115
|
-
wizard: Wizard
|
|
116
|
-
): Promise<UI_I_ValidationReturn> => {
|
|
117
|
-
let stepHasError = false
|
|
118
|
-
|
|
119
|
-
const labelValidation: {
|
|
120
|
-
isValid: boolean
|
|
121
|
-
message: string
|
|
122
|
-
} = await checkNetwork(label, localization, emits)
|
|
123
|
-
|
|
124
|
-
if (!labelValidation.isValid) {
|
|
125
|
-
stepHasError = wizard.setValidation(stepId, fieldName, {
|
|
126
|
-
fieldMessage: labelValidation.message,
|
|
127
|
-
alertMessage: labelValidation.message,
|
|
128
|
-
})
|
|
129
|
-
} else if (wizard.hasMessage(stepId, fieldName)) {
|
|
130
|
-
value = wizard.removeValidation(stepId, fieldName, value)
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
return {
|
|
134
|
-
newValue: value,
|
|
135
|
-
stepHasError,
|
|
136
|
-
}
|
|
137
|
-
}
|
|
1
|
+
import type {
|
|
2
|
+
UI_I_AsyncCheckReturn,
|
|
3
|
+
UI_I_ValidationReturn,
|
|
4
|
+
UI_I_WizardStep,
|
|
5
|
+
} from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
|
|
6
|
+
import type Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
|
|
7
|
+
import type { UI_I_ConnectionSettings } from '~/components/common/wizards/network/add/lib/models/interfaces'
|
|
8
|
+
import type { UI_I_MigrateVmkernelAdapterEmits } from '~/components/common/diagramMain/lib/models/interfaces'
|
|
9
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
10
|
+
import { UI_E_MigrationValidationFields } from '~/components/common/diagramMain/lib/models/enums'
|
|
11
|
+
import { checkVlanId } from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common'
|
|
12
|
+
|
|
13
|
+
export const validateVlanIdConnectionSettingsLocal = (
|
|
14
|
+
localization: UI_I_Localization,
|
|
15
|
+
data: UI_I_ConnectionSettings,
|
|
16
|
+
wizard: Wizard
|
|
17
|
+
): void => {
|
|
18
|
+
wizard.validateFieldLocal(
|
|
19
|
+
1,
|
|
20
|
+
UI_E_MigrationValidationFields.CONNECTION_SETTINGS_VLAN,
|
|
21
|
+
checkVlanId(data.vlanId, localization),
|
|
22
|
+
localization.common.vlanIdInvalidMessage,
|
|
23
|
+
localization.common.vlanIdInvalidMessage
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const validateNetworkConnectionSettingsLocal = (
|
|
28
|
+
localization: UI_I_Localization,
|
|
29
|
+
data: UI_I_ConnectionSettings,
|
|
30
|
+
wizard: Wizard
|
|
31
|
+
): void => {
|
|
32
|
+
wizard.validateFieldLocal(
|
|
33
|
+
1,
|
|
34
|
+
UI_E_MigrationValidationFields.CONNECTION_SETTINGS_NETWORK,
|
|
35
|
+
data.networkLabel === '',
|
|
36
|
+
localization.common.networkLabelInvalidMessage,
|
|
37
|
+
localization.common.networkLabelInvalidMessage
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const checkConnectionSettingsSync = (
|
|
42
|
+
localization: UI_I_Localization,
|
|
43
|
+
data: UI_I_ConnectionSettings,
|
|
44
|
+
wizard: Wizard,
|
|
45
|
+
value: UI_I_WizardStep[]
|
|
46
|
+
): UI_I_ValidationReturn => {
|
|
47
|
+
let stepHasError = false
|
|
48
|
+
|
|
49
|
+
if (checkVlanId(data.vlanId, localization)) {
|
|
50
|
+
stepHasError = wizard.setValidation(
|
|
51
|
+
1,
|
|
52
|
+
UI_E_MigrationValidationFields.CONNECTION_SETTINGS_VLAN,
|
|
53
|
+
{
|
|
54
|
+
fieldMessage: localization.common.vlanIdInvalidMessage,
|
|
55
|
+
alertMessage: localization.common.vlanIdInvalidMessage,
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
} else if (
|
|
59
|
+
wizard.hasMessage(
|
|
60
|
+
1,
|
|
61
|
+
UI_E_MigrationValidationFields.CONNECTION_SETTINGS_VLAN
|
|
62
|
+
)
|
|
63
|
+
) {
|
|
64
|
+
value = wizard.removeValidation(
|
|
65
|
+
1,
|
|
66
|
+
UI_E_MigrationValidationFields.CONNECTION_SETTINGS_VLAN,
|
|
67
|
+
value
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return {
|
|
72
|
+
newValue: value,
|
|
73
|
+
stepHasError,
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const checkNetwork = async (
|
|
78
|
+
label: string,
|
|
79
|
+
localization: UI_I_Localization,
|
|
80
|
+
emits: UI_I_MigrateVmkernelAdapterEmits
|
|
81
|
+
): Promise<UI_I_AsyncCheckReturn> => {
|
|
82
|
+
if (label) {
|
|
83
|
+
return new Promise((resolve, _reject) =>
|
|
84
|
+
emits('check-network-label', label, (message: string) => {
|
|
85
|
+
if (message === '') {
|
|
86
|
+
resolve({
|
|
87
|
+
isValid: true,
|
|
88
|
+
message: '',
|
|
89
|
+
})
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (message !== '') {
|
|
93
|
+
resolve({
|
|
94
|
+
isValid: false,
|
|
95
|
+
message,
|
|
96
|
+
})
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
)
|
|
100
|
+
} else {
|
|
101
|
+
return {
|
|
102
|
+
isValid: false,
|
|
103
|
+
message: localization.common.networkLabelInvalidMessage,
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export const checkNetworkAsync = async (
|
|
109
|
+
value: UI_I_WizardStep[],
|
|
110
|
+
label: string,
|
|
111
|
+
stepId: number,
|
|
112
|
+
fieldName: string,
|
|
113
|
+
emits: UI_I_MigrateVmkernelAdapterEmits,
|
|
114
|
+
localization: UI_I_Localization,
|
|
115
|
+
wizard: Wizard
|
|
116
|
+
): Promise<UI_I_ValidationReturn> => {
|
|
117
|
+
let stepHasError = false
|
|
118
|
+
|
|
119
|
+
const labelValidation: {
|
|
120
|
+
isValid: boolean
|
|
121
|
+
message: string
|
|
122
|
+
} = await checkNetwork(label, localization, emits)
|
|
123
|
+
|
|
124
|
+
if (!labelValidation.isValid) {
|
|
125
|
+
stepHasError = wizard.setValidation(stepId, fieldName, {
|
|
126
|
+
fieldMessage: labelValidation.message,
|
|
127
|
+
alertMessage: labelValidation.message,
|
|
128
|
+
})
|
|
129
|
+
} else if (wizard.hasMessage(stepId, fieldName)) {
|
|
130
|
+
value = wizard.removeValidation(stepId, fieldName, value)
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return {
|
|
134
|
+
newValue: value,
|
|
135
|
+
stepHasError,
|
|
136
|
+
}
|
|
137
|
+
}
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import type { UI_I_WizardStep, UI_I_ValidationReturn } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
|
|
2
|
-
import type Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
|
|
3
|
-
import type { UI_I_SelectVmkernelAdapter } from '~/components/common/wizards/network/add/lib/models/interfaces'
|
|
4
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
5
|
-
import { UI_E_MigrationValidationFields } from '~/components/common/diagramMain/lib/models/enums'
|
|
6
|
-
|
|
7
|
-
export const validateSelectedVmLocal = (
|
|
8
|
-
localization: UI_I_Localization,
|
|
9
|
-
data: UI_I_SelectVmkernelAdapter,
|
|
10
|
-
wizard: Wizard
|
|
11
|
-
): void => {
|
|
12
|
-
wizard.validateFieldLocal(
|
|
13
|
-
0,
|
|
14
|
-
'vm',
|
|
15
|
-
data.vm === '',
|
|
16
|
-
'',
|
|
17
|
-
localization.common.noVmKernelNetworkAdapterSelectedForMigration
|
|
18
|
-
)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const checkSelectedVmSync = (
|
|
22
|
-
localization: UI_I_Localization,
|
|
23
|
-
data: UI_I_SelectVmkernelAdapter,
|
|
24
|
-
wizard: Wizard,
|
|
25
|
-
value: UI_I_WizardStep[]
|
|
26
|
-
): UI_I_ValidationReturn => {
|
|
27
|
-
let stepHasError = false
|
|
28
|
-
|
|
29
|
-
if (data.vm === '') {
|
|
30
|
-
stepHasError = wizard.setValidation(
|
|
31
|
-
0,
|
|
32
|
-
UI_E_MigrationValidationFields.SELECT_ADAPTER_VM,
|
|
33
|
-
{
|
|
34
|
-
fieldMessage: '',
|
|
35
|
-
alertMessage: localization.common.noVmKernelNetworkAdapterSelectedForMigration,
|
|
36
|
-
}
|
|
37
|
-
)
|
|
38
|
-
} else if (
|
|
39
|
-
wizard.hasMessage(0, UI_E_MigrationValidationFields.SELECT_ADAPTER_VM)
|
|
40
|
-
) {
|
|
41
|
-
value = wizard.removeValidation(
|
|
42
|
-
0,
|
|
43
|
-
UI_E_MigrationValidationFields.SELECT_ADAPTER_VM,
|
|
44
|
-
value
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return {
|
|
49
|
-
newValue: value,
|
|
50
|
-
stepHasError,
|
|
51
|
-
}
|
|
52
|
-
}
|
|
1
|
+
import type { UI_I_WizardStep, UI_I_ValidationReturn } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
|
|
2
|
+
import type Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
|
|
3
|
+
import type { UI_I_SelectVmkernelAdapter } from '~/components/common/wizards/network/add/lib/models/interfaces'
|
|
4
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
5
|
+
import { UI_E_MigrationValidationFields } from '~/components/common/diagramMain/lib/models/enums'
|
|
6
|
+
|
|
7
|
+
export const validateSelectedVmLocal = (
|
|
8
|
+
localization: UI_I_Localization,
|
|
9
|
+
data: UI_I_SelectVmkernelAdapter,
|
|
10
|
+
wizard: Wizard
|
|
11
|
+
): void => {
|
|
12
|
+
wizard.validateFieldLocal(
|
|
13
|
+
0,
|
|
14
|
+
'vm',
|
|
15
|
+
data.vm === '',
|
|
16
|
+
'',
|
|
17
|
+
localization.common.noVmKernelNetworkAdapterSelectedForMigration
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const checkSelectedVmSync = (
|
|
22
|
+
localization: UI_I_Localization,
|
|
23
|
+
data: UI_I_SelectVmkernelAdapter,
|
|
24
|
+
wizard: Wizard,
|
|
25
|
+
value: UI_I_WizardStep[]
|
|
26
|
+
): UI_I_ValidationReturn => {
|
|
27
|
+
let stepHasError = false
|
|
28
|
+
|
|
29
|
+
if (data.vm === '') {
|
|
30
|
+
stepHasError = wizard.setValidation(
|
|
31
|
+
0,
|
|
32
|
+
UI_E_MigrationValidationFields.SELECT_ADAPTER_VM,
|
|
33
|
+
{
|
|
34
|
+
fieldMessage: '',
|
|
35
|
+
alertMessage: localization.common.noVmKernelNetworkAdapterSelectedForMigration,
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
} else if (
|
|
39
|
+
wizard.hasMessage(0, UI_E_MigrationValidationFields.SELECT_ADAPTER_VM)
|
|
40
|
+
) {
|
|
41
|
+
value = wizard.removeValidation(
|
|
42
|
+
0,
|
|
43
|
+
UI_E_MigrationValidationFields.SELECT_ADAPTER_VM,
|
|
44
|
+
value
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
newValue: value,
|
|
50
|
+
stepHasError,
|
|
51
|
+
}
|
|
52
|
+
}
|
package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
validateVlanIdConnectionSettingsLocal,
|
|
3
|
-
validateNetworkConnectionSettingsLocal,
|
|
4
|
-
checkConnectionSettingsSync,
|
|
5
|
-
checkNetworkAsync,
|
|
6
|
-
} from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings'
|
|
7
|
-
import {
|
|
8
|
-
checkSelectedVmSync,
|
|
9
|
-
validateSelectedVmLocal,
|
|
10
|
-
} from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter'
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
validateVlanIdConnectionSettingsLocal,
|
|
14
|
-
validateNetworkConnectionSettingsLocal,
|
|
15
|
-
checkConnectionSettingsSync,
|
|
16
|
-
checkNetworkAsync,
|
|
17
|
-
checkSelectedVmSync,
|
|
18
|
-
validateSelectedVmLocal,
|
|
19
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
validateVlanIdConnectionSettingsLocal,
|
|
3
|
+
validateNetworkConnectionSettingsLocal,
|
|
4
|
+
checkConnectionSettingsSync,
|
|
5
|
+
checkNetworkAsync,
|
|
6
|
+
} from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings'
|
|
7
|
+
import {
|
|
8
|
+
checkSelectedVmSync,
|
|
9
|
+
validateSelectedVmLocal,
|
|
10
|
+
} from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter'
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
validateVlanIdConnectionSettingsLocal,
|
|
14
|
+
validateNetworkConnectionSettingsLocal,
|
|
15
|
+
checkConnectionSettingsSync,
|
|
16
|
+
checkNetworkAsync,
|
|
17
|
+
checkSelectedVmSync,
|
|
18
|
+
validateSelectedVmLocal,
|
|
19
|
+
}
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<common-diagram-main-modals-remove-modal-new
|
|
3
|
-
v-if="isNewView"
|
|
4
|
-
:id="props.id"
|
|
5
|
-
:label="props.label"
|
|
6
|
-
:modal-name="props.modalName"
|
|
7
|
-
:view-name="props.viewName"
|
|
8
|
-
:title="props.title"
|
|
9
|
-
:show="props.show"
|
|
10
|
-
:is-show-loader="props.isShowLoader"
|
|
11
|
-
:type="props.type"
|
|
12
|
-
:switch-name="props.switchName"
|
|
13
|
-
:host-name="props.hostName"
|
|
14
|
-
:network-type="props.networkType"
|
|
15
|
-
:project="props.project"
|
|
16
|
-
@remove="onRemove"
|
|
17
|
-
@hide="onHideModal"
|
|
18
|
-
/>
|
|
19
|
-
<common-diagram-main-modals-remove-modal-old
|
|
20
|
-
v-else
|
|
21
|
-
:id="props.id"
|
|
22
|
-
:label="props.label"
|
|
23
|
-
:modal-name="props.modalName"
|
|
24
|
-
:view-name="props.viewName"
|
|
25
|
-
:title="props.title"
|
|
26
|
-
:show="props.show"
|
|
27
|
-
:is-show-loader="props.isShowLoader"
|
|
28
|
-
:type="props.type"
|
|
29
|
-
:network-type="props.networkType"
|
|
30
|
-
:project="props.project"
|
|
31
|
-
@remove="onRemove"
|
|
32
|
-
@hide="onHideModal"
|
|
33
|
-
/>
|
|
34
|
-
</template>
|
|
35
|
-
|
|
36
|
-
<script setup lang="ts">
|
|
37
|
-
import type { UI_T_Project } from '~/lib/models/types'
|
|
38
|
-
|
|
39
|
-
// Props from up
|
|
40
|
-
const props = withDefaults(
|
|
41
|
-
defineProps<{
|
|
42
|
-
show: boolean
|
|
43
|
-
modalName: string
|
|
44
|
-
viewName: string
|
|
45
|
-
title: string
|
|
46
|
-
type: string
|
|
47
|
-
id?: string
|
|
48
|
-
isShowLoader?: boolean
|
|
49
|
-
label?: string
|
|
50
|
-
switchName?: string
|
|
51
|
-
hostName?: string
|
|
52
|
-
networkType: string
|
|
53
|
-
project: UI_T_Project
|
|
54
|
-
}>(),
|
|
55
|
-
{
|
|
56
|
-
id: '',
|
|
57
|
-
isShowLoader: false,
|
|
58
|
-
label: '',
|
|
59
|
-
switchName: '',
|
|
60
|
-
hostName: '',
|
|
61
|
-
}
|
|
62
|
-
)
|
|
63
|
-
|
|
64
|
-
// Modal hiding
|
|
65
|
-
const emits = defineEmits<{
|
|
66
|
-
(event: 'hide'): void
|
|
67
|
-
(event: 'remove', id: string, type: string): void
|
|
68
|
-
}>()
|
|
69
|
-
|
|
70
|
-
const { $store }: any = useNuxtApp()
|
|
71
|
-
|
|
72
|
-
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
73
|
-
|
|
74
|
-
const onRemove = (id: string, type: string) => {
|
|
75
|
-
emits('remove', id, type)
|
|
76
|
-
}
|
|
77
|
-
const onHideModal = (): void => {
|
|
78
|
-
emits('hide')
|
|
79
|
-
}
|
|
80
|
-
</script>
|
|
81
|
-
|
|
82
|
-
<style scoped lang="scss"></style>
|
|
1
|
+
<template>
|
|
2
|
+
<common-diagram-main-modals-remove-modal-new
|
|
3
|
+
v-if="isNewView"
|
|
4
|
+
:id="props.id"
|
|
5
|
+
:label="props.label"
|
|
6
|
+
:modal-name="props.modalName"
|
|
7
|
+
:view-name="props.viewName"
|
|
8
|
+
:title="props.title"
|
|
9
|
+
:show="props.show"
|
|
10
|
+
:is-show-loader="props.isShowLoader"
|
|
11
|
+
:type="props.type"
|
|
12
|
+
:switch-name="props.switchName"
|
|
13
|
+
:host-name="props.hostName"
|
|
14
|
+
:network-type="props.networkType"
|
|
15
|
+
:project="props.project"
|
|
16
|
+
@remove="onRemove"
|
|
17
|
+
@hide="onHideModal"
|
|
18
|
+
/>
|
|
19
|
+
<common-diagram-main-modals-remove-modal-old
|
|
20
|
+
v-else
|
|
21
|
+
:id="props.id"
|
|
22
|
+
:label="props.label"
|
|
23
|
+
:modal-name="props.modalName"
|
|
24
|
+
:view-name="props.viewName"
|
|
25
|
+
:title="props.title"
|
|
26
|
+
:show="props.show"
|
|
27
|
+
:is-show-loader="props.isShowLoader"
|
|
28
|
+
:type="props.type"
|
|
29
|
+
:network-type="props.networkType"
|
|
30
|
+
:project="props.project"
|
|
31
|
+
@remove="onRemove"
|
|
32
|
+
@hide="onHideModal"
|
|
33
|
+
/>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script setup lang="ts">
|
|
37
|
+
import type { UI_T_Project } from '~/lib/models/types'
|
|
38
|
+
|
|
39
|
+
// Props from up
|
|
40
|
+
const props = withDefaults(
|
|
41
|
+
defineProps<{
|
|
42
|
+
show: boolean
|
|
43
|
+
modalName: string
|
|
44
|
+
viewName: string
|
|
45
|
+
title: string
|
|
46
|
+
type: string
|
|
47
|
+
id?: string
|
|
48
|
+
isShowLoader?: boolean
|
|
49
|
+
label?: string
|
|
50
|
+
switchName?: string
|
|
51
|
+
hostName?: string
|
|
52
|
+
networkType: string
|
|
53
|
+
project: UI_T_Project
|
|
54
|
+
}>(),
|
|
55
|
+
{
|
|
56
|
+
id: '',
|
|
57
|
+
isShowLoader: false,
|
|
58
|
+
label: '',
|
|
59
|
+
switchName: '',
|
|
60
|
+
hostName: '',
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
// Modal hiding
|
|
65
|
+
const emits = defineEmits<{
|
|
66
|
+
(event: 'hide'): void
|
|
67
|
+
(event: 'remove', id: string, type: string): void
|
|
68
|
+
}>()
|
|
69
|
+
|
|
70
|
+
const { $store }: any = useNuxtApp()
|
|
71
|
+
|
|
72
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
73
|
+
|
|
74
|
+
const onRemove = (id: string, type: string) => {
|
|
75
|
+
emits('remove', id, type)
|
|
76
|
+
}
|
|
77
|
+
const onHideModal = (): void => {
|
|
78
|
+
emits('hide')
|
|
79
|
+
}
|
|
80
|
+
</script>
|
|
81
|
+
|
|
82
|
+
<style scoped lang="scss"></style>
|