bfg-common 1.3.133 → 1.3.134
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/components/atoms/DiagramIcon.vue +16 -0
- package/components/atoms/wizard/Wizard.vue +1 -1
- package/components/common/diagramMain/Diagram.vue +1 -0
- package/components/common/diagramMain/lib/models/interfaces.ts +18 -17
- package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +31 -8
- package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +9 -2
- package/components/common/diagramMain/modals/editSettings/tabs/TrafficShaping.vue +139 -10
- package/components/common/diagramMain/modals/lib/config/index.ts +4 -2
- package/components/common/diagramMain/modals/lib/config/initial.ts +158 -5
- package/components/common/diagramMain/modals/lib/config/networkModal.ts +128 -69
- package/components/common/diagramMain/modals/lib/config/switchModal.ts +48 -23
- package/components/common/diagramMain/network/Network.vue +2 -0
- package/components/common/diagramMain/port/Port.vue +6 -1
- package/components/common/diagramMain/port/Ports.vue +7 -1
- package/package.json +1 -1
|
@@ -29,6 +29,22 @@
|
|
|
29
29
|
</svg>
|
|
30
30
|
</template>
|
|
31
31
|
<template v-else-if="props.name === 'outline-port'">
|
|
32
|
+
<svg
|
|
33
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
34
|
+
width="14"
|
|
35
|
+
height="14"
|
|
36
|
+
viewBox="-1 -1 14 14"
|
|
37
|
+
>
|
|
38
|
+
<g>
|
|
39
|
+
<path fill="#fff" d="M.5 11.5V.5h9v2h2v7h-2v2h-9z" />
|
|
40
|
+
<path
|
|
41
|
+
d="M9 1v2h2v6H9v2H1V1h8m1-1H0v12h10v-2h2V2h-2V0z"
|
|
42
|
+
fill="#36708c"
|
|
43
|
+
/>
|
|
44
|
+
</g>
|
|
45
|
+
</svg>
|
|
46
|
+
</template>
|
|
47
|
+
<template v-else-if="props.name === 'outline-port-dark-mode'">
|
|
32
48
|
<svg
|
|
33
49
|
xmlns="http://www.w3.org/2000/svg"
|
|
34
50
|
width="14"
|
|
@@ -83,12 +83,12 @@ export interface UI_I_Sysx {
|
|
|
83
83
|
|
|
84
84
|
export interface UI_I_OverrideValue {
|
|
85
85
|
override: boolean
|
|
86
|
-
value: string | boolean
|
|
86
|
+
value: string | number | boolean
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
export interface UI_I_NetworkSummaryPortletListItem {
|
|
90
90
|
label: string
|
|
91
|
-
value: string
|
|
91
|
+
value: string | number
|
|
92
92
|
id: string
|
|
93
93
|
initialValue: UI_I_OverrideValue
|
|
94
94
|
}
|
|
@@ -211,39 +211,40 @@ export interface UI_I_ToggleDiagramAdaptersPayload {
|
|
|
211
211
|
export interface UI_I_SecurityFields {
|
|
212
212
|
promiscuousMode: {
|
|
213
213
|
checked: boolean
|
|
214
|
-
selected: string
|
|
214
|
+
selected: string | number
|
|
215
215
|
}
|
|
216
216
|
macAddressChanges: {
|
|
217
217
|
checked: boolean
|
|
218
|
-
selected: string
|
|
218
|
+
selected: string | number
|
|
219
219
|
}
|
|
220
220
|
forgedTransmits: {
|
|
221
221
|
checked: boolean
|
|
222
|
-
selected: string
|
|
222
|
+
selected: string | number
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
export interface UI_I_TeamingFailoverFields {
|
|
227
227
|
loadBalancing: {
|
|
228
|
-
checked:
|
|
229
|
-
selected: string
|
|
228
|
+
checked: boolean
|
|
229
|
+
selected: string | number
|
|
230
230
|
}
|
|
231
231
|
networkFailureDetection: {
|
|
232
|
-
checked:
|
|
233
|
-
selected: string
|
|
232
|
+
checked: boolean
|
|
233
|
+
selected: string | number
|
|
234
234
|
}
|
|
235
235
|
notifySwitches: {
|
|
236
|
-
checked:
|
|
237
|
-
selected: string
|
|
236
|
+
checked: boolean
|
|
237
|
+
selected: string | number
|
|
238
238
|
}
|
|
239
239
|
failback: {
|
|
240
|
-
checked:
|
|
241
|
-
selected: string
|
|
240
|
+
checked: boolean
|
|
241
|
+
selected: string | number
|
|
242
242
|
}
|
|
243
243
|
failoverOrder: {
|
|
244
|
-
checked:
|
|
244
|
+
checked: boolean
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
+
|
|
247
248
|
export interface UI_I_TeamingFailoverWithAdaptersFields
|
|
248
249
|
extends UI_I_TeamingFailoverFields {
|
|
249
250
|
adapters: UI_I_AdapterStatus
|
|
@@ -252,7 +253,7 @@ export interface UI_I_TeamingFailoverWithAdaptersFields
|
|
|
252
253
|
export interface UI_I_TrafficShapingFields {
|
|
253
254
|
status: {
|
|
254
255
|
checked: boolean
|
|
255
|
-
selected: string
|
|
256
|
+
selected: string | number
|
|
256
257
|
}
|
|
257
258
|
average: number
|
|
258
259
|
peak: number
|
|
@@ -417,7 +418,7 @@ export interface API_UI_I_SwitchAdapters {
|
|
|
417
418
|
export interface UI_I_TeamingAndFailoverTemplate {
|
|
418
419
|
key: string
|
|
419
420
|
options: {
|
|
420
|
-
value: string
|
|
421
|
+
value: string | number
|
|
421
422
|
text: string
|
|
422
423
|
}[]
|
|
423
424
|
}
|
|
@@ -463,7 +464,7 @@ export interface UI_I_ModalTabs {
|
|
|
463
464
|
export interface API_UI_I_Security {
|
|
464
465
|
forged_transmits: UI_T_YNIOption
|
|
465
466
|
mac_change: UI_T_YNIOption
|
|
466
|
-
|
|
467
|
+
promiscuous: UI_T_YNIOption
|
|
467
468
|
}
|
|
468
469
|
export interface API_UI_I_Shaping {
|
|
469
470
|
enabled: boolean
|
|
@@ -32,10 +32,16 @@
|
|
|
32
32
|
:disabled="!fieldsValues.promiscuousMode.checked"
|
|
33
33
|
name="selectName"
|
|
34
34
|
>
|
|
35
|
-
<option
|
|
35
|
+
<option
|
|
36
|
+
:value="props.isSwitch ? 2 : 'no'"
|
|
37
|
+
:label="localization.reject"
|
|
38
|
+
>
|
|
36
39
|
{{ localization.reject }}
|
|
37
40
|
</option>
|
|
38
|
-
<option
|
|
41
|
+
<option
|
|
42
|
+
:value="props.isSwitch ? 1 : 'yes'"
|
|
43
|
+
:label="localization.accept"
|
|
44
|
+
>
|
|
39
45
|
{{ localization.accept }}
|
|
40
46
|
</option>
|
|
41
47
|
</select>
|
|
@@ -76,10 +82,16 @@
|
|
|
76
82
|
:disabled="!fieldsValues.macAddressChanges.checked"
|
|
77
83
|
name="selectName"
|
|
78
84
|
>
|
|
79
|
-
<option
|
|
85
|
+
<option
|
|
86
|
+
:value="props.isSwitch ? 2 : 'no'"
|
|
87
|
+
:label="localization.reject"
|
|
88
|
+
>
|
|
80
89
|
{{ localization.reject }}
|
|
81
90
|
</option>
|
|
82
|
-
<option
|
|
91
|
+
<option
|
|
92
|
+
:value="props.isSwitch ? 1 : 'yes'"
|
|
93
|
+
:label="localization.accept"
|
|
94
|
+
>
|
|
83
95
|
{{ localization.accept }}
|
|
84
96
|
</option>
|
|
85
97
|
</select>
|
|
@@ -120,10 +132,16 @@
|
|
|
120
132
|
:disabled="!fieldsValues.forgedTransmits.checked"
|
|
121
133
|
name="selectName"
|
|
122
134
|
>
|
|
123
|
-
<option
|
|
135
|
+
<option
|
|
136
|
+
:value="props.isSwitch ? 2 : 'no'"
|
|
137
|
+
:label="localization.reject"
|
|
138
|
+
>
|
|
124
139
|
{{ localization.reject }}
|
|
125
140
|
</option>
|
|
126
|
-
<option
|
|
141
|
+
<option
|
|
142
|
+
:value="props.isSwitch ? 1 : 'yes'"
|
|
143
|
+
:label="localization.accept"
|
|
144
|
+
>
|
|
127
145
|
{{ localization.accept }}
|
|
128
146
|
</option>
|
|
129
147
|
</select>
|
|
@@ -145,7 +163,10 @@ import {
|
|
|
145
163
|
UI_I_ModalsInitialData,
|
|
146
164
|
UI_I_SecurityFields,
|
|
147
165
|
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
148
|
-
import {
|
|
166
|
+
import {
|
|
167
|
+
securityFieldsInitialFunc,
|
|
168
|
+
securityNetworkFieldsInitialFunc,
|
|
169
|
+
} from '~/components/common/diagramMain/modals/lib/config'
|
|
149
170
|
|
|
150
171
|
// Props from up
|
|
151
172
|
const props = withDefaults(
|
|
@@ -162,7 +183,9 @@ const props = withDefaults(
|
|
|
162
183
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
163
184
|
|
|
164
185
|
const fieldsValues = ref<UI_I_SecurityFields>(
|
|
165
|
-
|
|
186
|
+
props.isSwitch
|
|
187
|
+
? securityFieldsInitialFunc(props.isSwitch, props.initialData)
|
|
188
|
+
: securityNetworkFieldsInitialFunc(props.isSwitch, props.initialData)
|
|
166
189
|
)
|
|
167
190
|
|
|
168
191
|
const emits = defineEmits<{
|
|
@@ -103,7 +103,9 @@ import {
|
|
|
103
103
|
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
104
104
|
import {
|
|
105
105
|
teamingFailoverFieldsInitialFunc,
|
|
106
|
+
teamingFailoverNetworkFieldsInitialFunc,
|
|
106
107
|
teamingAndFailoverTemplateMakerFunc,
|
|
108
|
+
teamingAndFailoverNetworkTemplateMakerFunc,
|
|
107
109
|
} from '~/components/common/diagramMain/modals/lib/config'
|
|
108
110
|
|
|
109
111
|
// Props from up
|
|
@@ -127,11 +129,16 @@ const localization = computed<UI_I_Localization>(() => useLocal())
|
|
|
127
129
|
|
|
128
130
|
// Making fields template
|
|
129
131
|
const teamingAndFailoverTemplate = computed<UI_I_TeamingAndFailoverTemplate[]>(
|
|
130
|
-
() =>
|
|
132
|
+
() =>
|
|
133
|
+
props.isSwitch
|
|
134
|
+
? teamingAndFailoverTemplateMakerFunc(localization.value)
|
|
135
|
+
: teamingAndFailoverNetworkTemplateMakerFunc(localization.value)
|
|
131
136
|
)
|
|
132
137
|
// Temporary data for this component
|
|
133
138
|
const fieldsValues = ref<UI_I_TeamingFailoverFields>(
|
|
134
|
-
|
|
139
|
+
props.isSwitch
|
|
140
|
+
? teamingFailoverFieldsInitialFunc(props.isSwitch, props.initialData)
|
|
141
|
+
: teamingFailoverNetworkFieldsInitialFunc(props.isSwitch, props.initialData)
|
|
135
142
|
)
|
|
136
143
|
|
|
137
144
|
const emits = defineEmits<{
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
{{ localization.override }}
|
|
31
31
|
</label>
|
|
32
32
|
</div>
|
|
33
|
-
<div class="flex-property-value-group">
|
|
33
|
+
<div v-if="!props.isSwitch" class="flex-property-value-group">
|
|
34
34
|
<div class="select">
|
|
35
35
|
<select
|
|
36
36
|
id="traffic-shaping-select"
|
|
@@ -47,6 +47,23 @@
|
|
|
47
47
|
</select>
|
|
48
48
|
</div>
|
|
49
49
|
</div>
|
|
50
|
+
<div v-else class="flex-property-value-group">
|
|
51
|
+
<div class="select">
|
|
52
|
+
<select
|
|
53
|
+
id="traffic-shaping-select"
|
|
54
|
+
v-model.number="fieldsValues.status.selected"
|
|
55
|
+
:disabled="!fieldsValues.status.checked"
|
|
56
|
+
name="selectName"
|
|
57
|
+
>
|
|
58
|
+
<option :label="localization.enabled" value="1">
|
|
59
|
+
{{ localization.enabled }}
|
|
60
|
+
</option>
|
|
61
|
+
<option :label="localization.disabled" value="0">
|
|
62
|
+
{{ localization.disabled }}
|
|
63
|
+
</option>
|
|
64
|
+
</select>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
50
67
|
</div>
|
|
51
68
|
</div>
|
|
52
69
|
</div>
|
|
@@ -76,7 +93,10 @@
|
|
|
76
93
|
{{ localization.override }}
|
|
77
94
|
</label>
|
|
78
95
|
</div>
|
|
79
|
-
<div
|
|
96
|
+
<div
|
|
97
|
+
v-if="!props.isSwitch"
|
|
98
|
+
class="property-value-group tooltip-field-container"
|
|
99
|
+
>
|
|
80
100
|
<atoms-tooltip-error
|
|
81
101
|
:has-error="!!props.errorMessages.average"
|
|
82
102
|
>
|
|
@@ -107,6 +127,40 @@
|
|
|
107
127
|
</template>
|
|
108
128
|
</atoms-tooltip-error>
|
|
109
129
|
</div>
|
|
130
|
+
<div
|
|
131
|
+
v-else
|
|
132
|
+
class="property-value-group tooltip-field-container"
|
|
133
|
+
>
|
|
134
|
+
<atoms-tooltip-error
|
|
135
|
+
:has-error="!!props.errorMessages.average"
|
|
136
|
+
>
|
|
137
|
+
<template #elem>
|
|
138
|
+
<input
|
|
139
|
+
id="average"
|
|
140
|
+
v-model="fieldsValues.average"
|
|
141
|
+
type="number"
|
|
142
|
+
:disabled="
|
|
143
|
+
!fieldsValues.status.checked ||
|
|
144
|
+
fieldsValues.status.selected === 0
|
|
145
|
+
"
|
|
146
|
+
name="average"
|
|
147
|
+
:class="[
|
|
148
|
+
'tooltip-field',
|
|
149
|
+
{
|
|
150
|
+
'danger-not-valid':
|
|
151
|
+
fieldsValues.status.checked &&
|
|
152
|
+
fieldsValues.status.selected !== 0 &&
|
|
153
|
+
props.errorMessages.average,
|
|
154
|
+
},
|
|
155
|
+
]"
|
|
156
|
+
@click.stop
|
|
157
|
+
/>
|
|
158
|
+
</template>
|
|
159
|
+
<template #content>
|
|
160
|
+
{{ props.errorMessages.average }}
|
|
161
|
+
</template>
|
|
162
|
+
</atoms-tooltip-error>
|
|
163
|
+
</div>
|
|
110
164
|
</div>
|
|
111
165
|
</div>
|
|
112
166
|
</div>
|
|
@@ -136,7 +190,10 @@
|
|
|
136
190
|
{{ localization.override }}
|
|
137
191
|
</label>
|
|
138
192
|
</div>
|
|
139
|
-
<div
|
|
193
|
+
<div
|
|
194
|
+
v-if="!props.isSwitch"
|
|
195
|
+
class="property-value-group tooltip-field-container"
|
|
196
|
+
>
|
|
140
197
|
<atoms-tooltip-error
|
|
141
198
|
:has-error="!!props.errorMessages.peak"
|
|
142
199
|
>
|
|
@@ -167,6 +224,40 @@
|
|
|
167
224
|
</template>
|
|
168
225
|
</atoms-tooltip-error>
|
|
169
226
|
</div>
|
|
227
|
+
<div
|
|
228
|
+
v-else
|
|
229
|
+
class="property-value-group tooltip-field-container"
|
|
230
|
+
>
|
|
231
|
+
<atoms-tooltip-error
|
|
232
|
+
:has-error="!!props.errorMessages.peak"
|
|
233
|
+
>
|
|
234
|
+
<template #elem>
|
|
235
|
+
<input
|
|
236
|
+
id="peak"
|
|
237
|
+
v-model="fieldsValues.peak"
|
|
238
|
+
type="number"
|
|
239
|
+
:disabled="
|
|
240
|
+
!fieldsValues.status.checked ||
|
|
241
|
+
fieldsValues.status.selected === 0
|
|
242
|
+
"
|
|
243
|
+
name="peak"
|
|
244
|
+
:class="[
|
|
245
|
+
'tooltip-field',
|
|
246
|
+
{
|
|
247
|
+
'danger-not-valid':
|
|
248
|
+
fieldsValues.status.checked &&
|
|
249
|
+
fieldsValues.status.selected !== 0 &&
|
|
250
|
+
props.errorMessages.peak,
|
|
251
|
+
},
|
|
252
|
+
]"
|
|
253
|
+
@click.stop
|
|
254
|
+
/>
|
|
255
|
+
</template>
|
|
256
|
+
<template #content>
|
|
257
|
+
{{ props.errorMessages.peak }}
|
|
258
|
+
</template>
|
|
259
|
+
</atoms-tooltip-error>
|
|
260
|
+
</div>
|
|
170
261
|
</div>
|
|
171
262
|
</div>
|
|
172
263
|
</div>
|
|
@@ -196,7 +287,10 @@
|
|
|
196
287
|
{{ localization.override }}
|
|
197
288
|
</label>
|
|
198
289
|
</div>
|
|
199
|
-
<div
|
|
290
|
+
<div
|
|
291
|
+
v-if="!props.isSwitch"
|
|
292
|
+
class="property-value-group tooltip-field-container"
|
|
293
|
+
>
|
|
200
294
|
<atoms-tooltip-error
|
|
201
295
|
:has-error="!!props.errorMessages.burstSize"
|
|
202
296
|
>
|
|
@@ -227,6 +321,40 @@
|
|
|
227
321
|
</template>
|
|
228
322
|
</atoms-tooltip-error>
|
|
229
323
|
</div>
|
|
324
|
+
<div
|
|
325
|
+
v-else
|
|
326
|
+
class="property-value-group tooltip-field-container"
|
|
327
|
+
>
|
|
328
|
+
<atoms-tooltip-error
|
|
329
|
+
:has-error="!!props.errorMessages.burstSize"
|
|
330
|
+
>
|
|
331
|
+
<template #elem>
|
|
332
|
+
<input
|
|
333
|
+
id="burst-size"
|
|
334
|
+
v-model="fieldsValues.burstSize"
|
|
335
|
+
type="number"
|
|
336
|
+
:disabled="
|
|
337
|
+
!fieldsValues.status.checked ||
|
|
338
|
+
fieldsValues.status.selected === 0
|
|
339
|
+
"
|
|
340
|
+
name="burst-size"
|
|
341
|
+
:class="[
|
|
342
|
+
'tooltip-field',
|
|
343
|
+
{
|
|
344
|
+
'danger-not-valid':
|
|
345
|
+
fieldsValues.status.checked &&
|
|
346
|
+
fieldsValues.status.selected !== 0 &&
|
|
347
|
+
props.errorMessages.burstSize,
|
|
348
|
+
},
|
|
349
|
+
]"
|
|
350
|
+
@click.stop
|
|
351
|
+
/>
|
|
352
|
+
</template>
|
|
353
|
+
<template #content>
|
|
354
|
+
{{ props.errorMessages.burstSize }}
|
|
355
|
+
</template>
|
|
356
|
+
</atoms-tooltip-error>
|
|
357
|
+
</div>
|
|
230
358
|
</div>
|
|
231
359
|
</div>
|
|
232
360
|
</div>
|
|
@@ -246,7 +374,10 @@ import {
|
|
|
246
374
|
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
247
375
|
import { UI_T_TrafficShapingFieldName } from '~/components/common/diagramMain/lib/models/types'
|
|
248
376
|
import { validationMessagesArrayFunc } from '~/components/common/diagramMain/modals/lib/utils'
|
|
249
|
-
import {
|
|
377
|
+
import {
|
|
378
|
+
trafficShapingFieldsInitialFunc,
|
|
379
|
+
trafficShapingNetworkFieldsInitialFunc,
|
|
380
|
+
} from '~/components/common/diagramMain/modals/lib/config'
|
|
250
381
|
|
|
251
382
|
// Props from up
|
|
252
383
|
const props = withDefaults(
|
|
@@ -279,11 +410,9 @@ const isShowErrorMessage = computed<boolean>(
|
|
|
279
410
|
)
|
|
280
411
|
|
|
281
412
|
const fieldsValues = ref<UI_I_TrafficShapingFields>(
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
burst_size: props.initialData?.burst_size || 0,
|
|
286
|
-
})
|
|
413
|
+
props.isSwitch
|
|
414
|
+
? trafficShapingFieldsInitialFunc(props.isSwitch, props.initialData)
|
|
415
|
+
: trafficShapingNetworkFieldsInitialFunc(props.isSwitch, props.initialData)
|
|
287
416
|
)
|
|
288
417
|
|
|
289
418
|
// Validation
|
|
@@ -4,9 +4,7 @@ import * as adapterModalConfig from './adapterModal'
|
|
|
4
4
|
import * as vCenterModalConfig from './vCenterModal'
|
|
5
5
|
import * as initialConfig from './initial'
|
|
6
6
|
import * as switchModalConfig from './switchModal'
|
|
7
|
-
import * as validationData from './validation'
|
|
8
7
|
import * as vmKernelAdapterData from './vmKernelAdapter'
|
|
9
|
-
// import * as temporaryData from './temporaryData'
|
|
10
8
|
import * as diagramConfig from './diagramConfig'
|
|
11
9
|
|
|
12
10
|
export const {
|
|
@@ -18,6 +16,7 @@ export const {
|
|
|
18
16
|
} = portModalConfig
|
|
19
17
|
export const {
|
|
20
18
|
teamingAndFailoverTemplateMakerFunc,
|
|
19
|
+
teamingAndFailoverNetworkTemplateMakerFunc,
|
|
21
20
|
networkViewSettingsModalTabsFunc,
|
|
22
21
|
networkEditSettingsTabsFunc,
|
|
23
22
|
networkViewSettingsFunc,
|
|
@@ -32,8 +31,11 @@ export const { vCenterViewSettingsFunc, vCenterPopupFieldsFunc } =
|
|
|
32
31
|
vCenterModalConfig
|
|
33
32
|
export const {
|
|
34
33
|
trafficShapingFieldsInitialFunc,
|
|
34
|
+
trafficShapingNetworkFieldsInitialFunc,
|
|
35
35
|
securityFieldsInitialFunc,
|
|
36
|
+
securityNetworkFieldsInitialFunc,
|
|
36
37
|
teamingFailoverFieldsInitialFunc,
|
|
38
|
+
teamingFailoverNetworkFieldsInitialFunc,
|
|
37
39
|
ipvFourSettingsFields,
|
|
38
40
|
} = initialConfig
|
|
39
41
|
export const {
|
|
@@ -12,6 +12,69 @@ import {
|
|
|
12
12
|
export const teamingFailoverFieldsInitialFunc = (
|
|
13
13
|
isSwitch: boolean,
|
|
14
14
|
initialData?: UI_I_ModalsInitialData
|
|
15
|
+
): UI_I_TeamingFailoverFields => {
|
|
16
|
+
const teaming = {
|
|
17
|
+
loadBalancing: {
|
|
18
|
+
checked: isSwitch,
|
|
19
|
+
selected: 3,
|
|
20
|
+
},
|
|
21
|
+
networkFailureDetection: {
|
|
22
|
+
checked: isSwitch,
|
|
23
|
+
selected: 1,
|
|
24
|
+
},
|
|
25
|
+
notifySwitches: {
|
|
26
|
+
checked: isSwitch,
|
|
27
|
+
selected: 1,
|
|
28
|
+
},
|
|
29
|
+
failback: {
|
|
30
|
+
checked: isSwitch,
|
|
31
|
+
selected: 1,
|
|
32
|
+
},
|
|
33
|
+
failoverOrder: {
|
|
34
|
+
checked: isSwitch,
|
|
35
|
+
},
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
initialData &&
|
|
39
|
+
initialData.nicTeamingPolicy?.forEach(
|
|
40
|
+
(sec: UI_I_NetworkSummaryPortletListItem) => {
|
|
41
|
+
switch (sec.id) {
|
|
42
|
+
case 'mode':
|
|
43
|
+
teaming.loadBalancing = {
|
|
44
|
+
checked: isSwitch || sec.initialValue.override,
|
|
45
|
+
selected: sec.initialValue.value as number,
|
|
46
|
+
}
|
|
47
|
+
return true
|
|
48
|
+
case 'link_detect':
|
|
49
|
+
teaming.networkFailureDetection = {
|
|
50
|
+
checked: isSwitch || sec.initialValue.override,
|
|
51
|
+
selected: sec.initialValue.value as number,
|
|
52
|
+
}
|
|
53
|
+
return true
|
|
54
|
+
case 'notify_switches':
|
|
55
|
+
teaming.notifySwitches = {
|
|
56
|
+
checked: isSwitch || sec.initialValue.override,
|
|
57
|
+
selected: sec.initialValue.value as number,
|
|
58
|
+
}
|
|
59
|
+
return true
|
|
60
|
+
case 'failback':
|
|
61
|
+
teaming.failback = {
|
|
62
|
+
checked: isSwitch || sec.initialValue.override,
|
|
63
|
+
selected: sec.initialValue.value as number,
|
|
64
|
+
}
|
|
65
|
+
return true
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
teaming.failoverOrder.checked = initialData?.nics_override || false
|
|
71
|
+
|
|
72
|
+
return teaming
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export const teamingFailoverNetworkFieldsInitialFunc = (
|
|
76
|
+
isSwitch: boolean,
|
|
77
|
+
initialData?: UI_I_ModalsInitialData
|
|
15
78
|
): UI_I_TeamingFailoverFields => {
|
|
16
79
|
const teaming = {
|
|
17
80
|
loadBalancing: {
|
|
@@ -75,6 +138,54 @@ export const teamingFailoverFieldsInitialFunc = (
|
|
|
75
138
|
export const securityFieldsInitialFunc = (
|
|
76
139
|
isSwitch: boolean,
|
|
77
140
|
initialData?: UI_I_ModalsInitialData
|
|
141
|
+
): UI_I_SecurityFields => {
|
|
142
|
+
const security: UI_I_SecurityFields = {
|
|
143
|
+
promiscuousMode: {
|
|
144
|
+
checked: isSwitch,
|
|
145
|
+
selected: 1,
|
|
146
|
+
},
|
|
147
|
+
macAddressChanges: {
|
|
148
|
+
checked: isSwitch,
|
|
149
|
+
selected: 1,
|
|
150
|
+
},
|
|
151
|
+
forgedTransmits: {
|
|
152
|
+
checked: isSwitch,
|
|
153
|
+
selected: 1,
|
|
154
|
+
},
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
initialData &&
|
|
158
|
+
initialData.securityPolicy?.forEach(
|
|
159
|
+
(sec: UI_I_NetworkSummaryPortletListItem) => {
|
|
160
|
+
switch (sec.id) {
|
|
161
|
+
case 'promiscuous_mode':
|
|
162
|
+
security.promiscuousMode = {
|
|
163
|
+
checked: isSwitch || sec.initialValue.override,
|
|
164
|
+
selected: sec.initialValue.value as number,
|
|
165
|
+
}
|
|
166
|
+
return true
|
|
167
|
+
case 'mac_change':
|
|
168
|
+
security.macAddressChanges = {
|
|
169
|
+
checked: isSwitch || sec.initialValue.override,
|
|
170
|
+
selected: sec.initialValue.value as number,
|
|
171
|
+
}
|
|
172
|
+
return true
|
|
173
|
+
case 'forged_transmits':
|
|
174
|
+
security.forgedTransmits = {
|
|
175
|
+
checked: isSwitch || sec.initialValue.override,
|
|
176
|
+
selected: sec.initialValue.value as number,
|
|
177
|
+
}
|
|
178
|
+
return true
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
return security
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export const securityNetworkFieldsInitialFunc = (
|
|
187
|
+
isSwitch: boolean,
|
|
188
|
+
initialData?: UI_I_ModalsInitialData
|
|
78
189
|
): UI_I_SecurityFields => {
|
|
79
190
|
const security: UI_I_SecurityFields = {
|
|
80
191
|
promiscuousMode: {
|
|
@@ -121,8 +232,50 @@ export const securityFieldsInitialFunc = (
|
|
|
121
232
|
}
|
|
122
233
|
export const trafficShapingFieldsInitialFunc = (
|
|
123
234
|
isSwitch: boolean,
|
|
124
|
-
initialData: UI_I_ModalsInitialData
|
|
125
|
-
|
|
235
|
+
initialData: UI_I_ModalsInitialData
|
|
236
|
+
): UI_I_TrafficShapingFields => {
|
|
237
|
+
const trafficShapingInitialValue = initialData?.shapingPolicy?.find(
|
|
238
|
+
(sec: UI_I_NetworkSummaryPortletListItem) => sec.id === 'shaping_enabled'
|
|
239
|
+
)?.initialValue as UI_I_OverrideValue
|
|
240
|
+
|
|
241
|
+
let trafficShaping: UI_I_TrafficShapingFields = {
|
|
242
|
+
status: {
|
|
243
|
+
checked: isSwitch,
|
|
244
|
+
selected: 0,
|
|
245
|
+
},
|
|
246
|
+
average: 100000,
|
|
247
|
+
peak: 100000,
|
|
248
|
+
burstSize: 102400,
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
initialData &&
|
|
252
|
+
initialData.shapingPolicy?.forEach(
|
|
253
|
+
(sec: UI_I_NetworkSummaryPortletListItem) => {
|
|
254
|
+
switch (sec.id) {
|
|
255
|
+
case 'shaping_enabled':
|
|
256
|
+
trafficShaping.status = {
|
|
257
|
+
checked: isSwitch || trafficShapingInitialValue?.override,
|
|
258
|
+
selected: trafficShapingInitialValue?.value ? 1 : 0,
|
|
259
|
+
}
|
|
260
|
+
return true
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
initialData &&
|
|
266
|
+
(trafficShaping = {
|
|
267
|
+
...trafficShaping,
|
|
268
|
+
average: initialData?.average_bw || 0,
|
|
269
|
+
peak: initialData?.average_bw || 0,
|
|
270
|
+
burstSize: initialData?.average_bw || 0,
|
|
271
|
+
})
|
|
272
|
+
|
|
273
|
+
return trafficShaping
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export const trafficShapingNetworkFieldsInitialFunc = (
|
|
277
|
+
isSwitch: boolean,
|
|
278
|
+
initialData: UI_I_ModalsInitialData
|
|
126
279
|
): UI_I_TrafficShapingFields => {
|
|
127
280
|
const trafficShapingInitialValue = initialData?.shapingPolicy?.find(
|
|
128
281
|
(sec: UI_I_NetworkSummaryPortletListItem) => sec.id === 'shaping_enabled'
|
|
@@ -155,9 +308,9 @@ export const trafficShapingFieldsInitialFunc = (
|
|
|
155
308
|
initialData &&
|
|
156
309
|
(trafficShaping = {
|
|
157
310
|
...trafficShaping,
|
|
158
|
-
average:
|
|
159
|
-
peak:
|
|
160
|
-
burstSize:
|
|
311
|
+
average: initialData?.average_bw || 0,
|
|
312
|
+
peak: initialData?.average_bw || 0,
|
|
313
|
+
burstSize: initialData?.average_bw || 0,
|
|
161
314
|
})
|
|
162
315
|
|
|
163
316
|
return trafficShaping
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from '~/components/common/diagramMain/lib/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,117 @@ 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.value
|
|
96
|
+
? `${initialData.average_bw} ${localization.kbitS}`
|
|
97
|
+
: '--'
|
|
98
98
|
|
|
99
99
|
const peakBandwidthValue: string = initialData.shapingPolicy?.[0].initialValue
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
.value
|
|
101
|
+
? `${initialData.peak_bw} ${localization.kbitS}`
|
|
102
|
+
: '--'
|
|
102
103
|
|
|
103
104
|
const burstSizeValue: string = initialData.shapingPolicy?.[0].initialValue
|
|
104
|
-
|
|
105
|
-
|
|
105
|
+
.value
|
|
106
|
+
? `${initialData.burst_size} ${localization.kb}`
|
|
107
|
+
: '--'
|
|
106
108
|
|
|
107
109
|
const loadBalancingValue: string = loadBalancing
|
|
108
|
-
|
|
109
|
-
|
|
110
|
+
? (loadBalancing.value === 'balance-tcp' &&
|
|
111
|
+
localization.routeBasedIpHash) ||
|
|
110
112
|
(loadBalancing.value === 'balance-slb' &&
|
|
111
|
-
|
|
113
|
+
localization.routeBasedSourceMacHash) ||
|
|
112
114
|
(loadBalancing.value === 'active-backup' &&
|
|
113
|
-
|
|
115
|
+
localization.useExplicitFailoverOrder) ||
|
|
114
116
|
'--'
|
|
115
|
-
|
|
117
|
+
: '--'
|
|
116
118
|
|
|
117
119
|
const networkFailureDetectionValue: string =
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
(linkDetect &&
|
|
121
|
+
linkDetect.value &&
|
|
122
|
+
localization[linkDetect.value.toString()]) ||
|
|
123
|
+
'--'
|
|
122
124
|
|
|
123
125
|
const notifySwitchesValue: string =
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
notifySwitches && notifySwitches.value
|
|
127
|
+
? notifySwitches.value === 'yes'
|
|
128
|
+
? localization.yes
|
|
129
|
+
: localization.no
|
|
130
|
+
: '--'
|
|
129
131
|
|
|
130
132
|
const failbackValue: string =
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
failback && failback.value
|
|
134
|
+
? failback.value === 'yes'
|
|
135
|
+
? localization.yes
|
|
136
|
+
: localization.no
|
|
137
|
+
: '--'
|
|
136
138
|
|
|
137
139
|
return [
|
|
138
140
|
{
|
|
@@ -227,7 +229,7 @@ export const networkViewSettingsFunc = (
|
|
|
227
229
|
}
|
|
228
230
|
|
|
229
231
|
export const networkEditSettingsTabsFunc = (
|
|
230
|
-
|
|
232
|
+
localization: UI_I_Localization
|
|
231
233
|
) => [
|
|
232
234
|
{
|
|
233
235
|
value: '1',
|
|
@@ -248,10 +250,10 @@ export const networkEditSettingsTabsFunc = (
|
|
|
248
250
|
]
|
|
249
251
|
|
|
250
252
|
export const networkPopupFieldsFunc = (
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
253
|
+
localization: UI_I_Localization,
|
|
254
|
+
_networkType: string,
|
|
255
|
+
id: string,
|
|
256
|
+
inPortlet = false
|
|
255
257
|
) => {
|
|
256
258
|
const formatedId = id.replaceAll('=', '_')
|
|
257
259
|
|
|
@@ -286,7 +288,64 @@ export const networkPopupFieldsFunc = (
|
|
|
286
288
|
}
|
|
287
289
|
|
|
288
290
|
export const teamingAndFailoverTemplateMakerFunc = (
|
|
289
|
-
|
|
291
|
+
localization: UI_I_Localization
|
|
292
|
+
): UI_I_TeamingAndFailoverTemplate[] => [
|
|
293
|
+
{
|
|
294
|
+
key: 'loadBalancing',
|
|
295
|
+
options: [
|
|
296
|
+
{
|
|
297
|
+
value: 3,
|
|
298
|
+
text: localization.routeBasedIpHash,
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
value: 2,
|
|
302
|
+
text: localization.routeBasedSourceMacHash,
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
value: 1,
|
|
306
|
+
text: localization.useExplicitFailoverOrder,
|
|
307
|
+
},
|
|
308
|
+
],
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
key: 'networkFailureDetection',
|
|
312
|
+
options: [
|
|
313
|
+
{
|
|
314
|
+
value: 1,
|
|
315
|
+
text: localization.linkStatusOnly,
|
|
316
|
+
},
|
|
317
|
+
],
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
key: 'notifySwitches',
|
|
321
|
+
options: [
|
|
322
|
+
{
|
|
323
|
+
value: 2,
|
|
324
|
+
text: localization.no,
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
value: 1,
|
|
328
|
+
text: localization.yes,
|
|
329
|
+
},
|
|
330
|
+
],
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
key: 'failback',
|
|
334
|
+
options: [
|
|
335
|
+
{
|
|
336
|
+
value: 2,
|
|
337
|
+
text: localization.no,
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
value: 1,
|
|
341
|
+
text: localization.yes,
|
|
342
|
+
},
|
|
343
|
+
],
|
|
344
|
+
},
|
|
345
|
+
]
|
|
346
|
+
|
|
347
|
+
export const teamingAndFailoverNetworkTemplateMakerFunc = (
|
|
348
|
+
localization: UI_I_Localization
|
|
290
349
|
): UI_I_TeamingAndFailoverTemplate[] => [
|
|
291
350
|
{
|
|
292
351
|
key: 'loadBalancing',
|
|
@@ -24,7 +24,9 @@ export const switchEditSettingsTabsFunc = (localization: UI_I_Localization) => [
|
|
|
24
24
|
},
|
|
25
25
|
]
|
|
26
26
|
|
|
27
|
-
export const switchViewSettingsModalTabsFunc = (
|
|
27
|
+
export const switchViewSettingsModalTabsFunc = (
|
|
28
|
+
localization: UI_I_Localization
|
|
29
|
+
) => [
|
|
28
30
|
{
|
|
29
31
|
text: localization.all,
|
|
30
32
|
value: 0,
|
|
@@ -43,9 +45,25 @@ export const switchViewSettingsFunc = (
|
|
|
43
45
|
localization: UI_I_Localization,
|
|
44
46
|
initialData: UI_I_ModalsInitialData
|
|
45
47
|
) => {
|
|
46
|
-
const
|
|
47
|
-
(teaming) => teaming.id === '
|
|
48
|
-
|
|
48
|
+
const loadBalancing =
|
|
49
|
+
initialData.nicTeamingPolicy?.find((teaming) => teaming.id === 'mode')
|
|
50
|
+
?.value || 1
|
|
51
|
+
|
|
52
|
+
let loadBalancingValue: string
|
|
53
|
+
|
|
54
|
+
switch (loadBalancing) {
|
|
55
|
+
case 1:
|
|
56
|
+
loadBalancingValue = localization.useExplicitFailoverOrder
|
|
57
|
+
break
|
|
58
|
+
case 2:
|
|
59
|
+
loadBalancingValue = localization.routeBasedSourceMacHash
|
|
60
|
+
break
|
|
61
|
+
case 3:
|
|
62
|
+
loadBalancingValue = localization.routeBasedIpHash
|
|
63
|
+
break
|
|
64
|
+
default:
|
|
65
|
+
loadBalancingValue = '--'
|
|
66
|
+
}
|
|
49
67
|
|
|
50
68
|
return [
|
|
51
69
|
{
|
|
@@ -74,7 +92,7 @@ export const switchViewSettingsFunc = (
|
|
|
74
92
|
initialData.securityPolicy?.find(
|
|
75
93
|
(sec: UI_I_NetworkSummaryPortletListItem) =>
|
|
76
94
|
sec.id === 'promiscuous_mode'
|
|
77
|
-
)?.initialValue ===
|
|
95
|
+
)?.initialValue?.value === 1
|
|
78
96
|
? localization.accept
|
|
79
97
|
: localization.reject,
|
|
80
98
|
},
|
|
@@ -82,8 +100,9 @@ export const switchViewSettingsFunc = (
|
|
|
82
100
|
name: localization.macAddressChanges,
|
|
83
101
|
value:
|
|
84
102
|
initialData.securityPolicy?.find(
|
|
85
|
-
(sec: UI_I_NetworkSummaryPortletListItem) =>
|
|
86
|
-
|
|
103
|
+
(sec: UI_I_NetworkSummaryPortletListItem) =>
|
|
104
|
+
sec.id === 'mac_change'
|
|
105
|
+
)?.initialValue?.value === 1
|
|
87
106
|
? localization.accept
|
|
88
107
|
: localization.reject,
|
|
89
108
|
},
|
|
@@ -93,7 +112,7 @@ export const switchViewSettingsFunc = (
|
|
|
93
112
|
initialData.securityPolicy?.find(
|
|
94
113
|
(sec: UI_I_NetworkSummaryPortletListItem) =>
|
|
95
114
|
sec.id === 'forged_transmits'
|
|
96
|
-
)?.initialValue ===
|
|
115
|
+
)?.initialValue?.value === 1
|
|
97
116
|
? localization.accept
|
|
98
117
|
: localization.reject,
|
|
99
118
|
},
|
|
@@ -106,19 +125,19 @@ export const switchViewSettingsFunc = (
|
|
|
106
125
|
rows: [
|
|
107
126
|
{
|
|
108
127
|
name: localization.averageBandwidth,
|
|
109
|
-
value: initialData.shapingPolicy?.[0].initialValue
|
|
128
|
+
value: initialData.shapingPolicy?.[0].initialValue.value
|
|
110
129
|
? `${initialData.average_bw} ${localization.kbitS}`
|
|
111
130
|
: '--',
|
|
112
131
|
},
|
|
113
132
|
{
|
|
114
133
|
name: localization.peakBandwidth,
|
|
115
|
-
value: initialData.shapingPolicy?.[0].initialValue
|
|
134
|
+
value: initialData.shapingPolicy?.[0].initialValue.value
|
|
116
135
|
? `${initialData.peak_bw} ${localization.kbitS}`
|
|
117
136
|
: '--',
|
|
118
137
|
},
|
|
119
138
|
{
|
|
120
139
|
name: localization.burstSize,
|
|
121
|
-
value: initialData.shapingPolicy?.[0].initialValue
|
|
140
|
+
value: initialData.shapingPolicy?.[0].initialValue.value
|
|
122
141
|
? `${initialData.burst_size} ${localization.kb}`
|
|
123
142
|
: '--',
|
|
124
143
|
},
|
|
@@ -131,28 +150,34 @@ export const switchViewSettingsFunc = (
|
|
|
131
150
|
rows: [
|
|
132
151
|
{
|
|
133
152
|
name: localization.loadBalancing,
|
|
134
|
-
value:
|
|
135
|
-
(teaming) => teaming.id === 'mode'
|
|
136
|
-
)?.value,
|
|
153
|
+
value: loadBalancingValue,
|
|
137
154
|
},
|
|
138
155
|
{
|
|
139
156
|
name: localization.networkFailureDetection,
|
|
140
157
|
value:
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
158
|
+
initialData.nicTeamingPolicy?.find(
|
|
159
|
+
(teaming) => teaming.id === 'link_detect'
|
|
160
|
+
)?.value === 1
|
|
161
|
+
? localization.linkStatusOnly
|
|
162
|
+
: localization.beaconProbing,
|
|
144
163
|
},
|
|
145
164
|
{
|
|
146
165
|
name: localization.notifySwitches,
|
|
147
|
-
value:
|
|
148
|
-
(
|
|
149
|
-
|
|
166
|
+
value:
|
|
167
|
+
initialData.nicTeamingPolicy?.find(
|
|
168
|
+
(teaming) => teaming.id === 'notify_switches'
|
|
169
|
+
)?.value === 1
|
|
170
|
+
? localization.yes
|
|
171
|
+
: localization.no,
|
|
150
172
|
},
|
|
151
173
|
{
|
|
152
174
|
name: localization.failback,
|
|
153
|
-
value:
|
|
154
|
-
(
|
|
155
|
-
|
|
175
|
+
value:
|
|
176
|
+
initialData.nicTeamingPolicy?.find(
|
|
177
|
+
(teaming) => teaming.id === 'failback'
|
|
178
|
+
)?.value === 1
|
|
179
|
+
? localization.yes
|
|
180
|
+
: localization.no,
|
|
156
181
|
},
|
|
157
182
|
{
|
|
158
183
|
name: localization.activeAdapters,
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
:network="props.network"
|
|
37
37
|
:selected-port="props.selectedPort"
|
|
38
38
|
:selected-adapter="props.selectedAdapter"
|
|
39
|
+
:is-dark-mode="props.isDarkMode"
|
|
39
40
|
@select-port="onSelectPort"
|
|
40
41
|
@show-modal="onShowModal"
|
|
41
42
|
/>
|
|
@@ -59,6 +60,7 @@ const props = defineProps<{
|
|
|
59
60
|
selectedNetwork: string
|
|
60
61
|
inPortlet: boolean
|
|
61
62
|
isVisibleLine: boolean
|
|
63
|
+
isDarkMode: boolean
|
|
62
64
|
}>()
|
|
63
65
|
|
|
64
66
|
const isNetworkConnectedSelectedAdapter = computed<boolean>(
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
/>
|
|
116
116
|
<atoms-diagram-icon
|
|
117
117
|
v-if="isVCenter || (isVMPortsGroup && !props.port.isActive)"
|
|
118
|
-
name="
|
|
118
|
+
:name="inactivePortIconName"
|
|
119
119
|
/>
|
|
120
120
|
</div>
|
|
121
121
|
</foreignObject>
|
|
@@ -142,6 +142,7 @@ const props = defineProps<{
|
|
|
142
142
|
port: UI_I_Port & { portPosition: number }
|
|
143
143
|
selectedPort: UI_I_SelectedPort
|
|
144
144
|
selectedAdapter: UI_I_SelectedAdapter
|
|
145
|
+
isDarkMode: boolean
|
|
145
146
|
}>()
|
|
146
147
|
|
|
147
148
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
@@ -155,6 +156,10 @@ const emits = defineEmits<{
|
|
|
155
156
|
): void
|
|
156
157
|
}>()
|
|
157
158
|
|
|
159
|
+
const inactivePortIconName = computed<string>(
|
|
160
|
+
() => `outline-port${props.isDarkMode ? '-dark-mode' : ''}`
|
|
161
|
+
)
|
|
162
|
+
|
|
158
163
|
const portTitlePosition = computed<number>(() => props.port.portPosition - 5)
|
|
159
164
|
|
|
160
165
|
const isVmKernel = computed<boolean>(
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
<common-diagram-main-port
|
|
6
6
|
:network="props.network"
|
|
7
7
|
:port="port"
|
|
8
|
+
:is-dark-mode="props.isDarkMode"
|
|
8
9
|
:selected-port="props.selectedPort"
|
|
9
10
|
:selected-adapter="props.selectedAdapter"
|
|
10
11
|
@select-port="onSelectPort"
|
|
@@ -27,11 +28,16 @@ const props = defineProps<{
|
|
|
27
28
|
network: UI_I_NetworkFullWithPositions
|
|
28
29
|
selectedPort: UI_I_SelectedPort
|
|
29
30
|
selectedAdapter: UI_I_SelectedAdapter
|
|
31
|
+
isDarkMode: boolean
|
|
30
32
|
}>()
|
|
31
33
|
|
|
32
34
|
const emits = defineEmits<{
|
|
33
35
|
(event: 'select-port', networkId: string, portId: string): void
|
|
34
|
-
(
|
|
36
|
+
(
|
|
37
|
+
event: 'show-modal',
|
|
38
|
+
value: string,
|
|
39
|
+
properties?: UI_I_ModalsInitialData
|
|
40
|
+
): void
|
|
35
41
|
}>()
|
|
36
42
|
|
|
37
43
|
const onSelectPort = (networkId: string, portId: string) =>
|