bfg-common 1.3.83 → 1.3.85
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.
|
@@ -210,9 +210,9 @@
|
|
|
210
210
|
<common-diagram-main-modals-migrate-vmkernel-adapter
|
|
211
211
|
v-if="isShowMigrateVmkernelAdapterModal"
|
|
212
212
|
:show="isShowMigrateVmkernelAdapterModal"
|
|
213
|
-
:switch-name="diagramData.id"
|
|
213
|
+
:switch-name="props.diagramData.id"
|
|
214
214
|
:networks-list="props.networksList"
|
|
215
|
-
:switch-networks="diagramData.networks"
|
|
215
|
+
:switch-networks="props.diagramData.networks"
|
|
216
216
|
:is-dark-mode="props.isDarkMode"
|
|
217
217
|
@check-network-label="onCheckNetworkLabel"
|
|
218
218
|
@hide="onHideMigrateVmkernelAdapterModal"
|
|
@@ -237,10 +237,14 @@ import {
|
|
|
237
237
|
UI_I_SwitchLine,
|
|
238
238
|
UI_I_ToggleDiagramAdaptersPayload,
|
|
239
239
|
UI_I_ToggleDiagramPortsPayload,
|
|
240
|
+
UI_I_PortToggleFlag,
|
|
240
241
|
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
241
|
-
import { UI_I_ArbitraryObject, UI_I_Localization } from '~/lib/models/interfaces'
|
|
242
242
|
import {
|
|
243
|
-
|
|
243
|
+
UI_I_ArbitraryObject,
|
|
244
|
+
UI_I_Localization,
|
|
245
|
+
} from '~/lib/models/interfaces'
|
|
246
|
+
import {
|
|
247
|
+
UI_I_AddNetworkingSecondOrThirdSchemeDataSend,
|
|
244
248
|
UI_I_AddNetworkingZeroOrFirstSchemeDataSend,
|
|
245
249
|
UI_I_Switch,
|
|
246
250
|
} from '~/components/common/wizards/network/add/lib/models/interfaces'
|
|
@@ -323,7 +327,7 @@ watch(
|
|
|
323
327
|
|
|
324
328
|
const onValidateBeforeSending = (
|
|
325
329
|
networkData:
|
|
326
|
-
|
|
|
330
|
+
| UI_I_AddNetworkingSecondOrThirdSchemeDataSend
|
|
327
331
|
| UI_I_AddNetworkingZeroOrFirstSchemeDataSend,
|
|
328
332
|
type: string,
|
|
329
333
|
setValidation: (err_arg: UI_I_ArbitraryObject<string>) => void
|
|
@@ -564,7 +568,7 @@ const onGetFreeAdapters = (cb: () => void) => {
|
|
|
564
568
|
}
|
|
565
569
|
const onSendNetworkData = (
|
|
566
570
|
networkData:
|
|
567
|
-
|
|
|
571
|
+
| UI_I_AddNetworkingSecondOrThirdSchemeDataSend
|
|
568
572
|
| UI_I_AddNetworkingZeroOrFirstSchemeDataSend,
|
|
569
573
|
type: string,
|
|
570
574
|
hideSendNetworkDataLoader: () => void,
|
|
@@ -720,10 +724,18 @@ const countNetworksPositions = (): UI_I_NetworksWithPositions[] => {
|
|
|
720
724
|
const networksWithPositions = ref<UI_I_NetworksWithPositions[]>(
|
|
721
725
|
countNetworksPositions()
|
|
722
726
|
)
|
|
727
|
+
|
|
728
|
+
const isPortToggled = ref<UI_I_PortToggleFlag>({
|
|
729
|
+
value: false,
|
|
730
|
+
id: '',
|
|
731
|
+
})
|
|
732
|
+
|
|
723
733
|
watch(
|
|
724
734
|
() => props.diagramData?.networks,
|
|
725
735
|
() => {
|
|
726
736
|
networksWithPositions.value = countNetworksPositions()
|
|
737
|
+
|
|
738
|
+
isPortToggled.value.value && handlePortTogle()
|
|
727
739
|
},
|
|
728
740
|
{ deep: true }
|
|
729
741
|
)
|
|
@@ -795,17 +807,21 @@ const onSelectAdapter = (adapterId: string): void => {
|
|
|
795
807
|
let selectedAdapterPosition: number | null =
|
|
796
808
|
adaptersWithPositions.value.adapters?.find((ad) => ad.id === adapterId)
|
|
797
809
|
?.adapterPosition || null
|
|
810
|
+
|
|
798
811
|
selectedAdapterPosition !== null &&
|
|
799
812
|
(selectedAdapterPosition += 7.5) &&
|
|
800
813
|
pos?.push(selectedAdapterPosition)
|
|
801
814
|
|
|
802
815
|
pos = pos?.sort((y1, y2) => y1 - y2)
|
|
816
|
+
|
|
803
817
|
if (pos) {
|
|
818
|
+
console.log('pos', pos)
|
|
804
819
|
selectedSwitchLineY.value = {
|
|
805
820
|
y1: pos[0],
|
|
806
821
|
y2: pos[pos.length - 1],
|
|
807
822
|
}
|
|
808
823
|
}
|
|
824
|
+
|
|
809
825
|
selectedAdapter.value = {
|
|
810
826
|
adapterId,
|
|
811
827
|
connectedPorts:
|
|
@@ -837,7 +853,7 @@ const emits = defineEmits<{
|
|
|
837
853
|
(
|
|
838
854
|
event: 'send-add-networking-data',
|
|
839
855
|
secondSchemeData:
|
|
840
|
-
|
|
|
856
|
+
| UI_I_AddNetworkingSecondOrThirdSchemeDataSend
|
|
841
857
|
| UI_I_AddNetworkingZeroOrFirstSchemeDataSend,
|
|
842
858
|
type: string,
|
|
843
859
|
hideSendNetworkDataLoader: () => void,
|
|
@@ -846,10 +862,10 @@ const emits = defineEmits<{
|
|
|
846
862
|
(
|
|
847
863
|
event: 'add-networking-data-validate',
|
|
848
864
|
networkData:
|
|
849
|
-
|
|
|
865
|
+
| UI_I_AddNetworkingSecondOrThirdSchemeDataSend
|
|
850
866
|
| UI_I_AddNetworkingZeroOrFirstSchemeDataSend,
|
|
851
867
|
type: string,
|
|
852
|
-
setValidation: (err_arg: UI_I_ArbitraryObject<string>) => void
|
|
868
|
+
setValidation: (err_arg: UI_I_ArbitraryObject<string>) => void
|
|
853
869
|
): void
|
|
854
870
|
(
|
|
855
871
|
event: 'check-network-label',
|
|
@@ -887,24 +903,46 @@ const onTogglePorts = (
|
|
|
887
903
|
isToggle,
|
|
888
904
|
diagramId,
|
|
889
905
|
})
|
|
906
|
+
|
|
907
|
+
isPortToggled.value = {
|
|
908
|
+
value: true,
|
|
909
|
+
id: id,
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
const handlePortTogle = () => {
|
|
890
914
|
selectedPort.value.portId !== '-1' &&
|
|
891
915
|
onSelectPort(selectedPort.value.networkId, selectedPort.value.portId)
|
|
916
|
+
|
|
892
917
|
selectedAdapter.value.adapterId !== '-1' &&
|
|
893
918
|
onSelectAdapter(selectedAdapter.value.adapterId)
|
|
919
|
+
|
|
894
920
|
selectedNetwork.value !== '-1' && onSelectNetwork(selectedNetwork.value)
|
|
895
|
-
|
|
921
|
+
|
|
922
|
+
hasPortAndNetwork(selectedPort.value, isPortToggled.value.id) &&
|
|
923
|
+
resetSelection()
|
|
924
|
+
|
|
925
|
+
isPortToggled.value = {
|
|
926
|
+
value: false,
|
|
927
|
+
id: '',
|
|
928
|
+
}
|
|
896
929
|
}
|
|
897
930
|
|
|
898
931
|
const onToggleAdapters = (): void => {
|
|
899
932
|
const newState = !adaptersWithPositions.value.toggle
|
|
933
|
+
|
|
900
934
|
const payload: Omit<UI_I_ToggleDiagramAdaptersPayload, 'paths'> = {
|
|
901
935
|
isToggle: newState,
|
|
902
936
|
diagramId: props.diagramData?.id || '',
|
|
903
937
|
}
|
|
938
|
+
|
|
904
939
|
emits('toggle-adapters', payload)
|
|
940
|
+
|
|
905
941
|
selectedPort.value.portId !== '-1' &&
|
|
906
942
|
onSelectPort(selectedPort.value.networkId, selectedPort.value.portId)
|
|
943
|
+
|
|
907
944
|
selectedAdapter.value.adapterId !== '-1' && resetSelection()
|
|
945
|
+
|
|
908
946
|
selectedNetwork.value !== '-1' && onSelectNetwork(selectedNetwork.value)
|
|
909
947
|
}
|
|
910
948
|
|
|
@@ -25,10 +25,6 @@ export interface UI_I_Adapter {
|
|
|
25
25
|
status: string
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
export interface UI_I_AdapterWithStatus {
|
|
29
|
-
adapterName: string
|
|
30
|
-
status: string
|
|
31
|
-
}
|
|
32
28
|
export interface UI_I_PhysicalAdapters {
|
|
33
29
|
toggle: boolean
|
|
34
30
|
adapters: UI_I_Adapter[]
|
|
@@ -258,11 +254,6 @@ export interface UI_I_TrafficShapingFields {
|
|
|
258
254
|
peak: number
|
|
259
255
|
burstSize: number
|
|
260
256
|
}
|
|
261
|
-
export interface UI_I_TrafficShapingErrorFields {
|
|
262
|
-
average: string
|
|
263
|
-
peak: string
|
|
264
|
-
burstSize: string
|
|
265
|
-
}
|
|
266
257
|
|
|
267
258
|
export interface UI_I_IpvFourSettingsFields {
|
|
268
259
|
ipv4Settings: string
|
|
@@ -562,3 +553,8 @@ export interface UI_I_MigrationVmkernelAdapterReadyComplete {
|
|
|
562
553
|
}
|
|
563
554
|
vlanId: string
|
|
564
555
|
}
|
|
556
|
+
|
|
557
|
+
export interface UI_I_PortToggleFlag {
|
|
558
|
+
value: boolean
|
|
559
|
+
id: string
|
|
560
|
+
}
|