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,147 +1,147 @@
|
|
|
1
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
-
import type {
|
|
3
|
-
UI_I_ModalsInitialData,
|
|
4
|
-
UI_I_ViewSettingsFields,
|
|
5
|
-
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
6
|
-
import { getNicSpeed } from '~/components/common/diagramMain/modals/lib/utils/index'
|
|
7
|
-
|
|
8
|
-
export const adapterViewSettingsModalTabsFunc = (
|
|
9
|
-
localization: UI_I_Localization
|
|
10
|
-
) => [
|
|
11
|
-
{
|
|
12
|
-
text: localization.common.all,
|
|
13
|
-
value: 0,
|
|
14
|
-
testId: 'tab-item-all',
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
text: localization.common.properties,
|
|
18
|
-
value: 1,
|
|
19
|
-
testId: 'tab-item-properties',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
text: localization.common.cdp,
|
|
23
|
-
value: 2,
|
|
24
|
-
testId: 'tab-item-cdp',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
text: localization.common.lldp,
|
|
28
|
-
value: 3,
|
|
29
|
-
testId: 'tab-item-lldp',
|
|
30
|
-
},
|
|
31
|
-
]
|
|
32
|
-
|
|
33
|
-
export const adapterViewSettingsFunc = (
|
|
34
|
-
localization: UI_I_Localization,
|
|
35
|
-
initialData: UI_I_ModalsInitialData,
|
|
36
|
-
isNewView: boolean = false
|
|
37
|
-
): UI_I_ViewSettingsFields[] => [
|
|
38
|
-
{
|
|
39
|
-
title: isNewView ? localization.common.properties : '',
|
|
40
|
-
id: 1,
|
|
41
|
-
type: 1,
|
|
42
|
-
rows: [
|
|
43
|
-
{
|
|
44
|
-
name: localization.common.adapter,
|
|
45
|
-
value: initialData?.adapter?.trim(),
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
name: localization.common.name,
|
|
49
|
-
value: initialData?.name,
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
name: localization.common.location,
|
|
53
|
-
value: `PCI ${initialData?.pciAddress}`,
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
name: localization.common.driver,
|
|
57
|
-
value: initialData?.driver,
|
|
58
|
-
},
|
|
59
|
-
],
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
title: localization.common.status,
|
|
63
|
-
id: 2,
|
|
64
|
-
type: 1,
|
|
65
|
-
rows: [
|
|
66
|
-
{
|
|
67
|
-
name: localization.common.status,
|
|
68
|
-
value: initialData?.carrier
|
|
69
|
-
? localization.common.connected
|
|
70
|
-
: localization.common.disconnected,
|
|
71
|
-
color: initialData?.carrier,
|
|
72
|
-
status: true,
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
name: localization.common.actualSpeedDuplex,
|
|
76
|
-
value: initialData?.carrier
|
|
77
|
-
? `${getNicSpeed(initialData?.speed || 0, localization)}, ${
|
|
78
|
-
initialData?.duplex
|
|
79
|
-
} Duplex`
|
|
80
|
-
: localization.common.down,
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
name: localization.common.configuredSpeedDuplex,
|
|
84
|
-
value: initialData?.carrier
|
|
85
|
-
? `${getNicSpeed(initialData?.speed || 0, localization)}, ${
|
|
86
|
-
initialData?.duplex
|
|
87
|
-
} Duplex`
|
|
88
|
-
: localization.common.autoNegotiate,
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
name: localization.common.networks,
|
|
92
|
-
value:
|
|
93
|
-
initialData?.networks && initialData?.networks?.length > 0
|
|
94
|
-
? initialData?.networks.map((network: string) => network.trim())
|
|
95
|
-
: localization.common.noNetworks,
|
|
96
|
-
},
|
|
97
|
-
],
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
title: localization.common.srIov,
|
|
101
|
-
id: 3,
|
|
102
|
-
type: 1,
|
|
103
|
-
rows: [
|
|
104
|
-
{
|
|
105
|
-
name: localization.common.status,
|
|
106
|
-
value: !initialData?.srIov ? localization.common.notSupported : '--',
|
|
107
|
-
color: initialData?.srIov,
|
|
108
|
-
status: true,
|
|
109
|
-
},
|
|
110
|
-
],
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
title: localization.common.ciscoDiscoveryProtocol,
|
|
114
|
-
id: 4,
|
|
115
|
-
type: 2,
|
|
116
|
-
rows: !initialData?.cdp ? [] : [],
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
title: localization.common.linkLayerDiscoveryProtocol,
|
|
120
|
-
id: 5,
|
|
121
|
-
type: 3,
|
|
122
|
-
rows: !initialData?.lldp ? [] : [],
|
|
123
|
-
},
|
|
124
|
-
]
|
|
125
|
-
|
|
126
|
-
export const adapterPopupFieldsFunc = (
|
|
127
|
-
localization: UI_I_Localization,
|
|
128
|
-
testId: string
|
|
129
|
-
) => [
|
|
130
|
-
{
|
|
131
|
-
text: localization.common.viewSettings,
|
|
132
|
-
value: 'adapter-view-settings',
|
|
133
|
-
testId: `${testId}-view`,
|
|
134
|
-
},
|
|
135
|
-
]
|
|
136
|
-
|
|
137
|
-
export const adapterPopupFieldsNewFunc = (
|
|
138
|
-
localization: UI_I_Localization,
|
|
139
|
-
testId: string
|
|
140
|
-
) => [
|
|
141
|
-
{
|
|
142
|
-
text: localization.common.viewSettings,
|
|
143
|
-
value: 'adapter-view-settings',
|
|
144
|
-
iconName: 'password-hide',
|
|
145
|
-
testId: `${testId}-view`,
|
|
146
|
-
},
|
|
147
|
-
]
|
|
1
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
2
|
+
import type {
|
|
3
|
+
UI_I_ModalsInitialData,
|
|
4
|
+
UI_I_ViewSettingsFields,
|
|
5
|
+
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
6
|
+
import { getNicSpeed } from '~/components/common/diagramMain/modals/lib/utils/index'
|
|
7
|
+
|
|
8
|
+
export const adapterViewSettingsModalTabsFunc = (
|
|
9
|
+
localization: UI_I_Localization
|
|
10
|
+
) => [
|
|
11
|
+
{
|
|
12
|
+
text: localization.common.all,
|
|
13
|
+
value: 0,
|
|
14
|
+
testId: 'tab-item-all',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
text: localization.common.properties,
|
|
18
|
+
value: 1,
|
|
19
|
+
testId: 'tab-item-properties',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
text: localization.common.cdp,
|
|
23
|
+
value: 2,
|
|
24
|
+
testId: 'tab-item-cdp',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
text: localization.common.lldp,
|
|
28
|
+
value: 3,
|
|
29
|
+
testId: 'tab-item-lldp',
|
|
30
|
+
},
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
export const adapterViewSettingsFunc = (
|
|
34
|
+
localization: UI_I_Localization,
|
|
35
|
+
initialData: UI_I_ModalsInitialData,
|
|
36
|
+
isNewView: boolean = false
|
|
37
|
+
): UI_I_ViewSettingsFields[] => [
|
|
38
|
+
{
|
|
39
|
+
title: isNewView ? localization.common.properties : '',
|
|
40
|
+
id: 1,
|
|
41
|
+
type: 1,
|
|
42
|
+
rows: [
|
|
43
|
+
{
|
|
44
|
+
name: localization.common.adapter,
|
|
45
|
+
value: initialData?.adapter?.trim(),
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: localization.common.name,
|
|
49
|
+
value: initialData?.name,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: localization.common.location,
|
|
53
|
+
value: `PCI ${initialData?.pciAddress}`,
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: localization.common.driver,
|
|
57
|
+
value: initialData?.driver,
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
title: localization.common.status,
|
|
63
|
+
id: 2,
|
|
64
|
+
type: 1,
|
|
65
|
+
rows: [
|
|
66
|
+
{
|
|
67
|
+
name: localization.common.status,
|
|
68
|
+
value: initialData?.carrier
|
|
69
|
+
? localization.common.connected
|
|
70
|
+
: localization.common.disconnected,
|
|
71
|
+
color: initialData?.carrier,
|
|
72
|
+
status: true,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: localization.common.actualSpeedDuplex,
|
|
76
|
+
value: initialData?.carrier
|
|
77
|
+
? `${getNicSpeed(initialData?.speed || 0, localization)}, ${
|
|
78
|
+
initialData?.duplex
|
|
79
|
+
} Duplex`
|
|
80
|
+
: localization.common.down,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: localization.common.configuredSpeedDuplex,
|
|
84
|
+
value: initialData?.carrier
|
|
85
|
+
? `${getNicSpeed(initialData?.speed || 0, localization)}, ${
|
|
86
|
+
initialData?.duplex
|
|
87
|
+
} Duplex`
|
|
88
|
+
: localization.common.autoNegotiate,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: localization.common.networks,
|
|
92
|
+
value:
|
|
93
|
+
initialData?.networks && initialData?.networks?.length > 0
|
|
94
|
+
? initialData?.networks.map((network: string) => network.trim())
|
|
95
|
+
: localization.common.noNetworks,
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
title: localization.common.srIov,
|
|
101
|
+
id: 3,
|
|
102
|
+
type: 1,
|
|
103
|
+
rows: [
|
|
104
|
+
{
|
|
105
|
+
name: localization.common.status,
|
|
106
|
+
value: !initialData?.srIov ? localization.common.notSupported : '--',
|
|
107
|
+
color: initialData?.srIov,
|
|
108
|
+
status: true,
|
|
109
|
+
},
|
|
110
|
+
],
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
title: localization.common.ciscoDiscoveryProtocol,
|
|
114
|
+
id: 4,
|
|
115
|
+
type: 2,
|
|
116
|
+
rows: !initialData?.cdp ? [] : [],
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
title: localization.common.linkLayerDiscoveryProtocol,
|
|
120
|
+
id: 5,
|
|
121
|
+
type: 3,
|
|
122
|
+
rows: !initialData?.lldp ? [] : [],
|
|
123
|
+
},
|
|
124
|
+
]
|
|
125
|
+
|
|
126
|
+
export const adapterPopupFieldsFunc = (
|
|
127
|
+
localization: UI_I_Localization,
|
|
128
|
+
testId: string
|
|
129
|
+
) => [
|
|
130
|
+
{
|
|
131
|
+
text: localization.common.viewSettings,
|
|
132
|
+
value: 'adapter-view-settings',
|
|
133
|
+
testId: `${testId}-view`,
|
|
134
|
+
},
|
|
135
|
+
]
|
|
136
|
+
|
|
137
|
+
export const adapterPopupFieldsNewFunc = (
|
|
138
|
+
localization: UI_I_Localization,
|
|
139
|
+
testId: string
|
|
140
|
+
) => [
|
|
141
|
+
{
|
|
142
|
+
text: localization.common.viewSettings,
|
|
143
|
+
value: 'adapter-view-settings',
|
|
144
|
+
iconName: 'password-hide',
|
|
145
|
+
testId: `${testId}-view`,
|
|
146
|
+
},
|
|
147
|
+
]
|
|
@@ -1,180 +1,180 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
UI_I_TeamingFailoverFields,
|
|
3
|
-
UI_I_SecurityFields,
|
|
4
|
-
UI_I_TrafficShapingFields,
|
|
5
|
-
UI_I_IpvFourSettingsFields,
|
|
6
|
-
UI_I_ModalsInitialData,
|
|
7
|
-
UI_I_NetworkSummaryPortletListItem,
|
|
8
|
-
UI_I_OverrideValue,
|
|
9
|
-
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
10
|
-
|
|
11
|
-
export const teamingFailoverFieldsInitialFunc = (
|
|
12
|
-
isSwitch: boolean,
|
|
13
|
-
initialData?: UI_I_ModalsInitialData
|
|
14
|
-
): UI_I_TeamingFailoverFields => {
|
|
15
|
-
const teaming = {
|
|
16
|
-
loadBalancing: {
|
|
17
|
-
checked: isSwitch,
|
|
18
|
-
selected: 3,
|
|
19
|
-
},
|
|
20
|
-
networkFailureDetection: {
|
|
21
|
-
checked: isSwitch,
|
|
22
|
-
selected: 1,
|
|
23
|
-
},
|
|
24
|
-
notifySwitches: {
|
|
25
|
-
checked: isSwitch,
|
|
26
|
-
selected: 1,
|
|
27
|
-
},
|
|
28
|
-
failback: {
|
|
29
|
-
checked: isSwitch,
|
|
30
|
-
selected: 1,
|
|
31
|
-
},
|
|
32
|
-
failoverOrder: {
|
|
33
|
-
checked: isSwitch,
|
|
34
|
-
},
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
initialData &&
|
|
38
|
-
initialData.nicTeamingPolicy?.forEach(
|
|
39
|
-
(sec: UI_I_NetworkSummaryPortletListItem) => {
|
|
40
|
-
switch (sec.id) {
|
|
41
|
-
case 'mode':
|
|
42
|
-
teaming.loadBalancing = {
|
|
43
|
-
checked: isSwitch || sec.initialValue.override,
|
|
44
|
-
selected: sec.initialValue.value as number,
|
|
45
|
-
}
|
|
46
|
-
return true
|
|
47
|
-
case 'link_detect':
|
|
48
|
-
teaming.networkFailureDetection = {
|
|
49
|
-
checked: isSwitch || sec.initialValue.override,
|
|
50
|
-
selected: sec.initialValue.value as number,
|
|
51
|
-
}
|
|
52
|
-
return true
|
|
53
|
-
case 'notify_switches':
|
|
54
|
-
teaming.notifySwitches = {
|
|
55
|
-
checked: isSwitch || sec.initialValue.override,
|
|
56
|
-
selected: sec.initialValue.value as number,
|
|
57
|
-
}
|
|
58
|
-
return true
|
|
59
|
-
case 'failback':
|
|
60
|
-
teaming.failback = {
|
|
61
|
-
checked: isSwitch || sec.initialValue.override,
|
|
62
|
-
selected: sec.initialValue.value as number,
|
|
63
|
-
}
|
|
64
|
-
return true
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
teaming.failoverOrder.checked = initialData?.nics_override || false
|
|
70
|
-
|
|
71
|
-
return teaming
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export const securityFieldsInitialFunc = (
|
|
75
|
-
isSwitch: boolean,
|
|
76
|
-
initialData?: UI_I_ModalsInitialData
|
|
77
|
-
): UI_I_SecurityFields => {
|
|
78
|
-
const security: UI_I_SecurityFields = {
|
|
79
|
-
promiscuousMode: {
|
|
80
|
-
checked: isSwitch,
|
|
81
|
-
selected: 1,
|
|
82
|
-
},
|
|
83
|
-
macAddressChanges: {
|
|
84
|
-
checked: isSwitch,
|
|
85
|
-
selected: 1,
|
|
86
|
-
},
|
|
87
|
-
forgedTransmits: {
|
|
88
|
-
checked: isSwitch,
|
|
89
|
-
selected: 1,
|
|
90
|
-
},
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
initialData &&
|
|
94
|
-
initialData.securityPolicy?.forEach(
|
|
95
|
-
(sec: UI_I_NetworkSummaryPortletListItem) => {
|
|
96
|
-
switch (sec.id) {
|
|
97
|
-
case 'promiscuous_mode':
|
|
98
|
-
security.promiscuousMode = {
|
|
99
|
-
checked: isSwitch || sec.initialValue.override,
|
|
100
|
-
selected: sec.initialValue.value as number,
|
|
101
|
-
}
|
|
102
|
-
return true
|
|
103
|
-
case 'mac_change':
|
|
104
|
-
security.macAddressChanges = {
|
|
105
|
-
checked: isSwitch || sec.initialValue.override,
|
|
106
|
-
selected: sec.initialValue.value as number,
|
|
107
|
-
}
|
|
108
|
-
return true
|
|
109
|
-
case 'forged_transmits':
|
|
110
|
-
security.forgedTransmits = {
|
|
111
|
-
checked: isSwitch || sec.initialValue.override,
|
|
112
|
-
selected: sec.initialValue.value as number,
|
|
113
|
-
}
|
|
114
|
-
return true
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
)
|
|
118
|
-
|
|
119
|
-
return security
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export const trafficShapingFieldsInitialFunc = (
|
|
123
|
-
isSwitch: boolean,
|
|
124
|
-
initialData: UI_I_ModalsInitialData
|
|
125
|
-
): UI_I_TrafficShapingFields => {
|
|
126
|
-
const trafficShapingInitialValue = initialData?.shapingPolicy?.find(
|
|
127
|
-
(sec: UI_I_NetworkSummaryPortletListItem) => sec.id === 'shaping_enabled'
|
|
128
|
-
)?.initialValue as UI_I_OverrideValue
|
|
129
|
-
|
|
130
|
-
let trafficShaping: UI_I_TrafficShapingFields = {
|
|
131
|
-
status: {
|
|
132
|
-
checked: isSwitch,
|
|
133
|
-
selected: 0,
|
|
134
|
-
},
|
|
135
|
-
average: 100000,
|
|
136
|
-
peak: 100000,
|
|
137
|
-
burstSize: 102400,
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
initialData &&
|
|
141
|
-
initialData.shapingPolicy?.forEach(
|
|
142
|
-
(sec: UI_I_NetworkSummaryPortletListItem) => {
|
|
143
|
-
switch (sec.id) {
|
|
144
|
-
case 'shaping_enabled':
|
|
145
|
-
trafficShaping.status = {
|
|
146
|
-
checked: isSwitch || trafficShapingInitialValue?.override,
|
|
147
|
-
selected: trafficShapingInitialValue?.value ? 1 : 0,
|
|
148
|
-
}
|
|
149
|
-
return true
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
)
|
|
153
|
-
|
|
154
|
-
initialData &&
|
|
155
|
-
(trafficShaping = {
|
|
156
|
-
...trafficShaping,
|
|
157
|
-
average: initialData?.average_bw || 0,
|
|
158
|
-
peak: initialData?.average_bw || 0,
|
|
159
|
-
burstSize: initialData?.average_bw || 0,
|
|
160
|
-
})
|
|
161
|
-
|
|
162
|
-
return trafficShaping
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
export const ipvFourSettingsFields: UI_I_IpvFourSettingsFields = {
|
|
166
|
-
ipv4Settings: '1',
|
|
167
|
-
ipv4Address: '10.10.101.16',
|
|
168
|
-
subnetMask: '255.255.255.0',
|
|
169
|
-
defaultGateway: {
|
|
170
|
-
checked: true,
|
|
171
|
-
value: '10.10.101.1',
|
|
172
|
-
},
|
|
173
|
-
}
|
|
174
|
-
// tcp_config: {
|
|
175
|
-
// auto: false
|
|
176
|
-
// gateway: ''
|
|
177
|
-
// gateway_override: false
|
|
178
|
-
// ipv4: '10.10.101.5'
|
|
179
|
-
// net_mask: '255.255.255.0'
|
|
180
|
-
// }
|
|
1
|
+
import type {
|
|
2
|
+
UI_I_TeamingFailoverFields,
|
|
3
|
+
UI_I_SecurityFields,
|
|
4
|
+
UI_I_TrafficShapingFields,
|
|
5
|
+
UI_I_IpvFourSettingsFields,
|
|
6
|
+
UI_I_ModalsInitialData,
|
|
7
|
+
UI_I_NetworkSummaryPortletListItem,
|
|
8
|
+
UI_I_OverrideValue,
|
|
9
|
+
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
10
|
+
|
|
11
|
+
export const teamingFailoverFieldsInitialFunc = (
|
|
12
|
+
isSwitch: boolean,
|
|
13
|
+
initialData?: UI_I_ModalsInitialData
|
|
14
|
+
): UI_I_TeamingFailoverFields => {
|
|
15
|
+
const teaming = {
|
|
16
|
+
loadBalancing: {
|
|
17
|
+
checked: isSwitch,
|
|
18
|
+
selected: 3,
|
|
19
|
+
},
|
|
20
|
+
networkFailureDetection: {
|
|
21
|
+
checked: isSwitch,
|
|
22
|
+
selected: 1,
|
|
23
|
+
},
|
|
24
|
+
notifySwitches: {
|
|
25
|
+
checked: isSwitch,
|
|
26
|
+
selected: 1,
|
|
27
|
+
},
|
|
28
|
+
failback: {
|
|
29
|
+
checked: isSwitch,
|
|
30
|
+
selected: 1,
|
|
31
|
+
},
|
|
32
|
+
failoverOrder: {
|
|
33
|
+
checked: isSwitch,
|
|
34
|
+
},
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
initialData &&
|
|
38
|
+
initialData.nicTeamingPolicy?.forEach(
|
|
39
|
+
(sec: UI_I_NetworkSummaryPortletListItem) => {
|
|
40
|
+
switch (sec.id) {
|
|
41
|
+
case 'mode':
|
|
42
|
+
teaming.loadBalancing = {
|
|
43
|
+
checked: isSwitch || sec.initialValue.override,
|
|
44
|
+
selected: sec.initialValue.value as number,
|
|
45
|
+
}
|
|
46
|
+
return true
|
|
47
|
+
case 'link_detect':
|
|
48
|
+
teaming.networkFailureDetection = {
|
|
49
|
+
checked: isSwitch || sec.initialValue.override,
|
|
50
|
+
selected: sec.initialValue.value as number,
|
|
51
|
+
}
|
|
52
|
+
return true
|
|
53
|
+
case 'notify_switches':
|
|
54
|
+
teaming.notifySwitches = {
|
|
55
|
+
checked: isSwitch || sec.initialValue.override,
|
|
56
|
+
selected: sec.initialValue.value as number,
|
|
57
|
+
}
|
|
58
|
+
return true
|
|
59
|
+
case 'failback':
|
|
60
|
+
teaming.failback = {
|
|
61
|
+
checked: isSwitch || sec.initialValue.override,
|
|
62
|
+
selected: sec.initialValue.value as number,
|
|
63
|
+
}
|
|
64
|
+
return true
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
teaming.failoverOrder.checked = initialData?.nics_override || false
|
|
70
|
+
|
|
71
|
+
return teaming
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export const securityFieldsInitialFunc = (
|
|
75
|
+
isSwitch: boolean,
|
|
76
|
+
initialData?: UI_I_ModalsInitialData
|
|
77
|
+
): UI_I_SecurityFields => {
|
|
78
|
+
const security: UI_I_SecurityFields = {
|
|
79
|
+
promiscuousMode: {
|
|
80
|
+
checked: isSwitch,
|
|
81
|
+
selected: 1,
|
|
82
|
+
},
|
|
83
|
+
macAddressChanges: {
|
|
84
|
+
checked: isSwitch,
|
|
85
|
+
selected: 1,
|
|
86
|
+
},
|
|
87
|
+
forgedTransmits: {
|
|
88
|
+
checked: isSwitch,
|
|
89
|
+
selected: 1,
|
|
90
|
+
},
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
initialData &&
|
|
94
|
+
initialData.securityPolicy?.forEach(
|
|
95
|
+
(sec: UI_I_NetworkSummaryPortletListItem) => {
|
|
96
|
+
switch (sec.id) {
|
|
97
|
+
case 'promiscuous_mode':
|
|
98
|
+
security.promiscuousMode = {
|
|
99
|
+
checked: isSwitch || sec.initialValue.override,
|
|
100
|
+
selected: sec.initialValue.value as number,
|
|
101
|
+
}
|
|
102
|
+
return true
|
|
103
|
+
case 'mac_change':
|
|
104
|
+
security.macAddressChanges = {
|
|
105
|
+
checked: isSwitch || sec.initialValue.override,
|
|
106
|
+
selected: sec.initialValue.value as number,
|
|
107
|
+
}
|
|
108
|
+
return true
|
|
109
|
+
case 'forged_transmits':
|
|
110
|
+
security.forgedTransmits = {
|
|
111
|
+
checked: isSwitch || sec.initialValue.override,
|
|
112
|
+
selected: sec.initialValue.value as number,
|
|
113
|
+
}
|
|
114
|
+
return true
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
return security
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export const trafficShapingFieldsInitialFunc = (
|
|
123
|
+
isSwitch: boolean,
|
|
124
|
+
initialData: UI_I_ModalsInitialData
|
|
125
|
+
): UI_I_TrafficShapingFields => {
|
|
126
|
+
const trafficShapingInitialValue = initialData?.shapingPolicy?.find(
|
|
127
|
+
(sec: UI_I_NetworkSummaryPortletListItem) => sec.id === 'shaping_enabled'
|
|
128
|
+
)?.initialValue as UI_I_OverrideValue
|
|
129
|
+
|
|
130
|
+
let trafficShaping: UI_I_TrafficShapingFields = {
|
|
131
|
+
status: {
|
|
132
|
+
checked: isSwitch,
|
|
133
|
+
selected: 0,
|
|
134
|
+
},
|
|
135
|
+
average: 100000,
|
|
136
|
+
peak: 100000,
|
|
137
|
+
burstSize: 102400,
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
initialData &&
|
|
141
|
+
initialData.shapingPolicy?.forEach(
|
|
142
|
+
(sec: UI_I_NetworkSummaryPortletListItem) => {
|
|
143
|
+
switch (sec.id) {
|
|
144
|
+
case 'shaping_enabled':
|
|
145
|
+
trafficShaping.status = {
|
|
146
|
+
checked: isSwitch || trafficShapingInitialValue?.override,
|
|
147
|
+
selected: trafficShapingInitialValue?.value ? 1 : 0,
|
|
148
|
+
}
|
|
149
|
+
return true
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
initialData &&
|
|
155
|
+
(trafficShaping = {
|
|
156
|
+
...trafficShaping,
|
|
157
|
+
average: initialData?.average_bw || 0,
|
|
158
|
+
peak: initialData?.average_bw || 0,
|
|
159
|
+
burstSize: initialData?.average_bw || 0,
|
|
160
|
+
})
|
|
161
|
+
|
|
162
|
+
return trafficShaping
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export const ipvFourSettingsFields: UI_I_IpvFourSettingsFields = {
|
|
166
|
+
ipv4Settings: '1',
|
|
167
|
+
ipv4Address: '10.10.101.16',
|
|
168
|
+
subnetMask: '255.255.255.0',
|
|
169
|
+
defaultGateway: {
|
|
170
|
+
checked: true,
|
|
171
|
+
value: '10.10.101.1',
|
|
172
|
+
},
|
|
173
|
+
}
|
|
174
|
+
// tcp_config: {
|
|
175
|
+
// auto: false
|
|
176
|
+
// gateway: ''
|
|
177
|
+
// gateway_override: false
|
|
178
|
+
// ipv4: '10.10.101.5'
|
|
179
|
+
// net_mask: '255.255.255.0'
|
|
180
|
+
// }
|