bfg-common 1.3.221 → 1.3.222
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.
|
@@ -15,8 +15,7 @@ import {
|
|
|
15
15
|
|
|
16
16
|
export const networkEditDataFunc = (
|
|
17
17
|
networkData: UI_I_EditFieldsData,
|
|
18
|
-
|
|
19
|
-
switchId: string = ''
|
|
18
|
+
initialData: UI_I_ModalsInitialData
|
|
20
19
|
): UI_I_NetworkEditSendData => {
|
|
21
20
|
const { vlanId, networkLabel } =
|
|
22
21
|
networkData.properties as UI_I_PropertiesFields
|
|
@@ -40,10 +39,24 @@ export const networkEditDataFunc = (
|
|
|
40
39
|
const vlan: number =
|
|
41
40
|
vlanId === 'None (0)' ? 0 : vlanId === 'All (4095)' ? 4095 : Number(vlanId)
|
|
42
41
|
|
|
43
|
-
const security: API_UI_I_Security = {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
const security: API_UI_I_Security = {}
|
|
43
|
+
|
|
44
|
+
if (promiscuousMode.checked) {
|
|
45
|
+
security.promiscuous = promiscuousMode.selected
|
|
46
|
+
} else {
|
|
47
|
+
security.promiscuous_computed = promiscuousMode.selected
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (forgedTransmits.checked) {
|
|
51
|
+
security.forged_transmits = forgedTransmits.selected
|
|
52
|
+
} else {
|
|
53
|
+
security.forged_transmits_computed = forgedTransmits.selected
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (macAddressChanges.checked) {
|
|
57
|
+
security.mac_change = macAddressChanges.selected
|
|
58
|
+
} else {
|
|
59
|
+
security.mac_change_computed = macAddressChanges.selected
|
|
47
60
|
}
|
|
48
61
|
|
|
49
62
|
const shaping = {
|
|
@@ -54,17 +67,36 @@ export const networkEditDataFunc = (
|
|
|
54
67
|
burst_size: burstSize,
|
|
55
68
|
}
|
|
56
69
|
|
|
57
|
-
const teaming: API_UI_I_Teaming = {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
70
|
+
const teaming: API_UI_I_Teaming = {}
|
|
71
|
+
|
|
72
|
+
if (loadBalancing.checked) {
|
|
73
|
+
teaming.mode = loadBalancing.selected
|
|
74
|
+
} else {
|
|
75
|
+
teaming.mode_computed = loadBalancing.selected
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (networkFailureDetection.checked) {
|
|
79
|
+
teaming.link_detection_mode = networkFailureDetection.selected
|
|
80
|
+
} else {
|
|
81
|
+
teaming.link_detection_mode_computed = networkFailureDetection.selected
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (notifySwitches.checked) {
|
|
85
|
+
teaming.notify_switches = notifySwitches.selected
|
|
86
|
+
} else {
|
|
87
|
+
teaming.notify_switches_computed = notifySwitches.selected
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (failback.checked) {
|
|
91
|
+
teaming.failback = failback.selected
|
|
92
|
+
} else {
|
|
93
|
+
teaming.failback_computed = failback.selected
|
|
62
94
|
}
|
|
63
95
|
|
|
64
96
|
return {
|
|
65
|
-
id,
|
|
97
|
+
id: initialData.id || '',
|
|
66
98
|
name: networkLabel,
|
|
67
|
-
switch:
|
|
99
|
+
switch: initialData.switch_name || '',
|
|
68
100
|
nics: {
|
|
69
101
|
active,
|
|
70
102
|
standby,
|