bfg-common 1.2.88 → 1.2.90
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.
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from '~/components/common/diagramMain/models/interfaces'
|
|
8
8
|
|
|
9
9
|
export const networkViewSettingsModalTabsFunc = (
|
|
10
|
-
|
|
10
|
+
localization: UI_I_Localization
|
|
11
11
|
) => [
|
|
12
12
|
{
|
|
13
13
|
text: localization.all,
|
|
@@ -24,115 +24,115 @@ export const networkViewSettingsModalTabsFunc = (
|
|
|
24
24
|
]
|
|
25
25
|
|
|
26
26
|
const findInitialValue = (
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
source: UI_I_NetworkSummaryPortletListItem[] | undefined,
|
|
28
|
+
id: string
|
|
29
29
|
): UI_I_OverrideValue =>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
source?.find(
|
|
31
|
+
(sourceItem: UI_I_NetworkSummaryPortletListItem) => sourceItem.id === id
|
|
32
|
+
)?.initialValue as UI_I_OverrideValue
|
|
33
33
|
|
|
34
34
|
export const networkViewSettingsFunc = (
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
localization: UI_I_Localization,
|
|
36
|
+
initialData: UI_I_ModalsInitialData
|
|
37
37
|
) => {
|
|
38
38
|
const linkDetect: UI_I_OverrideValue = findInitialValue(
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
initialData.nicTeamingPolicy,
|
|
40
|
+
'link_detect'
|
|
41
41
|
)
|
|
42
42
|
|
|
43
43
|
const failback: UI_I_OverrideValue = findInitialValue(
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
initialData.nicTeamingPolicy,
|
|
45
|
+
'failback'
|
|
46
46
|
)
|
|
47
47
|
|
|
48
48
|
const loadBalancing: UI_I_OverrideValue = findInitialValue(
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
initialData.nicTeamingPolicy,
|
|
50
|
+
'mode'
|
|
51
51
|
)
|
|
52
52
|
|
|
53
53
|
const notifySwitches: UI_I_OverrideValue = findInitialValue(
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
initialData.nicTeamingPolicy,
|
|
55
|
+
'notify_switches'
|
|
56
56
|
)
|
|
57
57
|
|
|
58
58
|
const promiscuousMode: UI_I_OverrideValue = findInitialValue(
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
initialData.securityPolicy,
|
|
60
|
+
'promiscuous_mode'
|
|
61
61
|
)
|
|
62
62
|
|
|
63
63
|
const macAddressChanges: UI_I_OverrideValue = findInitialValue(
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
initialData.securityPolicy,
|
|
65
|
+
'mac_change'
|
|
66
66
|
)
|
|
67
67
|
|
|
68
68
|
const forgedTransmits: UI_I_OverrideValue = findInitialValue(
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
initialData.securityPolicy,
|
|
70
|
+
'forged_transmits'
|
|
71
71
|
)
|
|
72
72
|
|
|
73
73
|
const promiscuousModeValue: string =
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
promiscuousMode && promiscuousMode.value
|
|
75
|
+
? promiscuousMode.value === 'yes'
|
|
76
|
+
? localization.accept
|
|
77
|
+
: localization.reject
|
|
78
|
+
: '--'
|
|
79
79
|
|
|
80
80
|
const macAddressChangesValue: string =
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
macAddressChanges && macAddressChanges.value
|
|
82
|
+
? macAddressChanges.value === 'yes'
|
|
83
|
+
? localization.accept
|
|
84
|
+
: localization.reject
|
|
85
|
+
: '--'
|
|
86
86
|
|
|
87
87
|
const forgedTransmitsValue: string =
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
88
|
+
forgedTransmits && forgedTransmits.value
|
|
89
|
+
? forgedTransmits.value === 'yes'
|
|
90
|
+
? localization.accept
|
|
91
|
+
: localization.reject
|
|
92
|
+
: '--'
|
|
93
93
|
|
|
94
94
|
const averageBandwidthValue: string = initialData.shapingPolicy?.[0]
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
.initialValue
|
|
96
|
+
? `${initialData.average_bw} ${localization.kbitS}`
|
|
97
|
+
: '--'
|
|
98
98
|
|
|
99
99
|
const peakBandwidthValue: string = initialData.shapingPolicy?.[0].initialValue
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
? `${initialData.peak_bw} ${localization.kbitS}`
|
|
101
|
+
: '--'
|
|
102
102
|
|
|
103
103
|
const burstSizeValue: string = initialData.shapingPolicy?.[0].initialValue
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
? `${initialData.burst_size} ${localization.kb}`
|
|
105
|
+
: '--'
|
|
106
106
|
|
|
107
107
|
const loadBalancingValue: string = loadBalancing
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
? (loadBalancing.value === 'balance-tcp' &&
|
|
109
|
+
localization.routeBasedIpHash) ||
|
|
110
110
|
(loadBalancing.value === 'balance-slb' &&
|
|
111
|
-
|
|
111
|
+
localization.routeBasedSourceMacHash) ||
|
|
112
112
|
(loadBalancing.value === 'active-backup' &&
|
|
113
|
-
|
|
113
|
+
localization.useExplicitFailoverOrder) ||
|
|
114
114
|
'--'
|
|
115
|
-
|
|
115
|
+
: '--'
|
|
116
116
|
|
|
117
117
|
const networkFailureDetectionValue: string =
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
(linkDetect &&
|
|
119
|
+
linkDetect.value &&
|
|
120
|
+
localization[linkDetect.value.toString()]) ||
|
|
121
|
+
'--'
|
|
122
122
|
|
|
123
123
|
const notifySwitchesValue: string =
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
124
|
+
notifySwitches && notifySwitches.value
|
|
125
|
+
? notifySwitches.value === 'yes'
|
|
126
|
+
? localization.yes
|
|
127
|
+
: localization.no
|
|
128
|
+
: '--'
|
|
129
129
|
|
|
130
130
|
const failbackValue: string =
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
131
|
+
failback && failback.value
|
|
132
|
+
? failback.value === 'yes'
|
|
133
|
+
? localization.yes
|
|
134
|
+
: localization.no
|
|
135
|
+
: '--'
|
|
136
136
|
|
|
137
137
|
return [
|
|
138
138
|
{
|
|
@@ -227,7 +227,7 @@ export const networkViewSettingsFunc = (
|
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
export const networkEditSettingsTabsFunc = (
|
|
230
|
-
|
|
230
|
+
localization: UI_I_Localization
|
|
231
231
|
) => [
|
|
232
232
|
{
|
|
233
233
|
value: '1',
|
|
@@ -248,18 +248,18 @@ export const networkEditSettingsTabsFunc = (
|
|
|
248
248
|
]
|
|
249
249
|
|
|
250
250
|
export const networkPopupFieldsFunc = (
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
251
|
+
localization: UI_I_Localization,
|
|
252
|
+
_networkType: string,
|
|
253
|
+
id: string,
|
|
254
|
+
inPortlet = false
|
|
255
255
|
) => {
|
|
256
|
-
const
|
|
256
|
+
const formatedId = id.replaceAll('=', '_')
|
|
257
257
|
|
|
258
258
|
const inPortletConfig = [
|
|
259
259
|
{
|
|
260
260
|
text: localization.viewSettings,
|
|
261
261
|
value: 'network-view-settings',
|
|
262
|
-
testId: `network-view-${
|
|
262
|
+
testId: `network-view-${formatedId}`,
|
|
263
263
|
},
|
|
264
264
|
// {
|
|
265
265
|
// text: localization.editSettings,
|
|
@@ -271,13 +271,13 @@ export const networkPopupFieldsFunc = (
|
|
|
271
271
|
{
|
|
272
272
|
text: localization.editSettings,
|
|
273
273
|
value: 'network-edit-settings',
|
|
274
|
-
testId: `network-edit-${
|
|
274
|
+
testId: `network-edit-${formatedId}`,
|
|
275
275
|
},
|
|
276
276
|
{ separate: true },
|
|
277
277
|
{
|
|
278
278
|
text: localization.remove,
|
|
279
279
|
value: 'network-port-remove',
|
|
280
|
-
testId: `network-remove-${
|
|
280
|
+
testId: `network-remove-${formatedId}`,
|
|
281
281
|
// networkType === '1' ? 'network-vkernel-remove' : 'network-port-remove',
|
|
282
282
|
},
|
|
283
283
|
]
|
|
@@ -286,7 +286,7 @@ export const networkPopupFieldsFunc = (
|
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
export const teamingAndFailoverTemplateMakerFunc = (
|
|
289
|
-
|
|
289
|
+
localization: UI_I_Localization
|
|
290
290
|
): UI_I_TeamingAndFailoverTemplate[] => [
|
|
291
291
|
{
|
|
292
292
|
key: 'loadBalancing',
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</foreignObject>
|
|
12
12
|
|
|
13
13
|
<a
|
|
14
|
-
:id="testId"
|
|
14
|
+
:id="`network-${testId}`"
|
|
15
15
|
cursor="pointer"
|
|
16
16
|
data-title="network-name-link"
|
|
17
17
|
@click="onSelectNetwork(props.network.id)"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
popup-class="diagram-actions__popup"
|
|
45
45
|
:close-after-click="true"
|
|
46
46
|
:items="networkPopupFields"
|
|
47
|
-
:test-id="
|
|
47
|
+
:test-id="`network-${testId}-toggle`"
|
|
48
48
|
@change="(value: string) => onShowModal(value, dataForSelectedNetwork)"
|
|
49
49
|
/>
|
|
50
50
|
</div>
|
|
@@ -152,17 +152,17 @@ const emits = defineEmits<{
|
|
|
152
152
|
|
|
153
153
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
154
154
|
|
|
155
|
+
const testId = computed<string>(() => props.network.id.replaceAll('=', '_'))
|
|
156
|
+
|
|
155
157
|
const networkPopupFields = computed(() =>
|
|
156
158
|
networkPopupFieldsFunc(
|
|
157
159
|
localization.value,
|
|
158
160
|
props.network.networkType,
|
|
159
|
-
props.network.
|
|
161
|
+
props.network.id,
|
|
160
162
|
props.inPortlet
|
|
161
163
|
)
|
|
162
164
|
)
|
|
163
165
|
|
|
164
|
-
const testId = computed<string>(() => `network-${props.network.title.replace(' ', '_')}`)
|
|
165
|
-
|
|
166
166
|
const dataForSelectedNetwork = computed<UI_I_ModalsInitialData>(() =>
|
|
167
167
|
dataForSelectedNetworkFunc(props.network)
|
|
168
168
|
)
|
package/package.json
CHANGED