bfg-common 1.3.191 → 1.3.192
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/common/diagramMain/Diagram.vue +2 -2
- package/components/common/diagramMain/DiagramMain.vue +4 -7
- package/components/common/diagramMain/lib/config/index.ts +2 -2
- package/components/common/diagramMain/lib/models/interfaces.ts +18 -27
- package/components/common/diagramMain/lib/utils/utils.ts +8 -7
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +8 -8
- package/package.json +1 -1
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
import {
|
|
66
66
|
UI_I_Adapter,
|
|
67
67
|
UI_I_AdaptersWithPositions,
|
|
68
|
-
|
|
68
|
+
UI_I_DiagramData,
|
|
69
69
|
UI_I_ModalsInitialData,
|
|
70
70
|
UI_I_NetworksWithPositions,
|
|
71
71
|
UI_I_SelectedAdapter,
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
import { UI_E_PositionsY } from '~/components/common/diagramMain/lib/models/enums'
|
|
76
76
|
|
|
77
77
|
const props = defineProps<{
|
|
78
|
-
diagramData:
|
|
78
|
+
diagramData: UI_I_DiagramData
|
|
79
79
|
isShowDiagram: boolean
|
|
80
80
|
inPortlet: boolean
|
|
81
81
|
networksWithPositions: UI_I_NetworksWithPositions[]
|
|
@@ -240,6 +240,8 @@ import {
|
|
|
240
240
|
UI_I_ToggleDiagramAdaptersPayload,
|
|
241
241
|
UI_I_ToggleDiagramPortsPayload,
|
|
242
242
|
UI_I_PortToggleFlag,
|
|
243
|
+
UI_I_DiagramData,
|
|
244
|
+
UI_I_SwitchAdapters,
|
|
243
245
|
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
244
246
|
import {
|
|
245
247
|
UI_I_ArbitraryObject,
|
|
@@ -280,21 +282,16 @@ import {
|
|
|
280
282
|
countAdaptersHeight,
|
|
281
283
|
getAdaptersPositions,
|
|
282
284
|
} from '~/components/common/diagramMain/lib/utils/utils'
|
|
283
|
-
import {
|
|
284
|
-
UI_I_DiagramDataFull,
|
|
285
|
-
UI_I_NetworkFull,
|
|
286
|
-
UI_I_SwitchAdapters,
|
|
287
|
-
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
288
285
|
|
|
289
286
|
const props = withDefaults(
|
|
290
287
|
defineProps<{
|
|
291
|
-
diagramData:
|
|
288
|
+
diagramData: UI_I_DiagramData
|
|
292
289
|
inPortlet?: boolean
|
|
293
290
|
standardSwitchesInitial?: UI_I_Switch[]
|
|
294
291
|
hostName?: string
|
|
295
292
|
adapters?: UI_I_SwitchAdapters
|
|
296
293
|
freeAdapters?: UI_I_Adapter[]
|
|
297
|
-
networksList?:
|
|
294
|
+
networksList?: UI_I_Network[]
|
|
298
295
|
isDarkMode: boolean
|
|
299
296
|
}>(),
|
|
300
297
|
{
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
UI_I_Adapter,
|
|
3
3
|
UI_I_ModalsInitialData,
|
|
4
|
-
|
|
4
|
+
UI_I_Network,
|
|
5
5
|
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
6
6
|
import * as initial from '~/components/common/diagramMain/lib/config/initial'
|
|
7
7
|
|
|
8
8
|
export const dataForSelectedNetworkFunc = (
|
|
9
|
-
network:
|
|
9
|
+
network: UI_I_Network
|
|
10
10
|
): UI_I_ModalsInitialData => ({
|
|
11
11
|
networkLabel: network.title,
|
|
12
12
|
vlanId: network.vlanId === '--' ? 0 : network.vlanId,
|
|
@@ -97,7 +97,18 @@ export interface UI_I_NetworkSummaryPortletListItem<
|
|
|
97
97
|
initialValue: UI_I_OverrideValue<T>
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
|
|
101
|
+
export interface UI_I_NetworkInfo {
|
|
102
|
+
average_bw: number
|
|
103
|
+
burst_size: number
|
|
104
|
+
nicTeamingPolicy: UI_I_NetworkSummaryPortletListItem[]
|
|
105
|
+
nics_override: boolean
|
|
106
|
+
peak_bw: number
|
|
107
|
+
securityPolicy: UI_I_NetworkSummaryPortletListItem[]
|
|
108
|
+
shapingPolicy: UI_I_NetworkSummaryPortletListItem[]
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface UI_I_Network extends UI_I_NetworkInfo {
|
|
101
112
|
activeAdapters: string[]
|
|
102
113
|
id: string
|
|
103
114
|
networkType: UI_E_NetworkType
|
|
@@ -111,28 +122,16 @@ export interface UI_I_Network {
|
|
|
111
122
|
vlanId?: number | string
|
|
112
123
|
}
|
|
113
124
|
|
|
114
|
-
export interface UI_I_NetworkInfo {
|
|
115
|
-
average_bw: number
|
|
116
|
-
burst_size: number
|
|
117
|
-
nicTeamingPolicy: UI_I_NetworkSummaryPortletListItem[]
|
|
118
|
-
nics_override: boolean
|
|
119
|
-
peak_bw: number
|
|
120
|
-
securityPolicy: UI_I_NetworkSummaryPortletListItem[]
|
|
121
|
-
shapingPolicy: UI_I_NetworkSummaryPortletListItem[]
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export interface UI_I_NetworkFull extends UI_I_Network, UI_I_NetworkInfo {}
|
|
125
|
-
|
|
126
125
|
export interface UI_I_SwitchInfo extends UI_I_NetworkInfo {
|
|
127
126
|
mtu: number
|
|
128
127
|
num_ports: string
|
|
129
|
-
activeAdapters: UI_I_Adapter[]
|
|
130
|
-
standbyAdapters: UI_I_Adapter[]
|
|
131
|
-
unusedAdapters: UI_I_Adapter[]
|
|
128
|
+
activeAdapters: UI_I_Adapter[] | string[]
|
|
129
|
+
standbyAdapters: UI_I_Adapter[] | string[]
|
|
130
|
+
unusedAdapters: UI_I_Adapter[] | string[]
|
|
132
131
|
switch_name: string
|
|
133
132
|
}
|
|
134
133
|
|
|
135
|
-
export interface UI_I_NetworkFullWithPositions extends
|
|
134
|
+
export interface UI_I_NetworkFullWithPositions extends UI_I_Network {
|
|
136
135
|
portsCount: number
|
|
137
136
|
portsHeight: number
|
|
138
137
|
networkHeight: number
|
|
@@ -145,19 +144,11 @@ export interface UI_I_NetworkFullWithPositions extends UI_I_NetworkFull {
|
|
|
145
144
|
}
|
|
146
145
|
|
|
147
146
|
export interface UI_I_DiagramData {
|
|
148
|
-
diagramName: string
|
|
149
147
|
id: string
|
|
150
|
-
networks: UI_I_Network[] | null
|
|
151
|
-
networking?: UI_I_SwitchInfo
|
|
152
|
-
physicalAdapters: UI_I_PhysicalAdapters | null
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export interface UI_I_DiagramDataFull extends UI_I_DiagramData {
|
|
156
|
-
networks: UI_I_NetworkFull[]
|
|
157
148
|
diagramName: string
|
|
158
|
-
|
|
149
|
+
networks: UI_I_Network[]
|
|
150
|
+
networking?: UI_I_SwitchInfo
|
|
159
151
|
physicalAdapters: UI_I_PhysicalAdapters | null
|
|
160
|
-
networking: UI_I_SwitchInfo
|
|
161
152
|
}
|
|
162
153
|
|
|
163
154
|
export interface UI_I_AdaptersWithPositions {
|
|
@@ -4,12 +4,11 @@ import {
|
|
|
4
4
|
UI_I_NetworksWithPositions,
|
|
5
5
|
UI_I_AdaptersWithPositions,
|
|
6
6
|
UI_I_SelectedSwitchPositions,
|
|
7
|
-
|
|
7
|
+
UI_I_DiagramData,
|
|
8
8
|
UI_I_AdaptersHeight,
|
|
9
9
|
UI_I_Adapter,
|
|
10
10
|
UI_I_AdaptersPositions,
|
|
11
11
|
UI_I_AdapterStatus,
|
|
12
|
-
UI_I_NetworkFull,
|
|
13
12
|
API_UI_I_SwitchItem,
|
|
14
13
|
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
15
14
|
import {
|
|
@@ -161,7 +160,7 @@ export const getSelectPortDataFunc = (
|
|
|
161
160
|
}
|
|
162
161
|
|
|
163
162
|
export const countAdaptersHeight = (
|
|
164
|
-
diagramData:
|
|
163
|
+
diagramData: UI_I_DiagramData | null
|
|
165
164
|
): UI_I_AdaptersHeight => {
|
|
166
165
|
const toggle: boolean = !!diagramData?.physicalAdapters?.toggle
|
|
167
166
|
const adaptersCount: number =
|
|
@@ -182,7 +181,7 @@ export const countAdaptersHeight = (
|
|
|
182
181
|
}
|
|
183
182
|
|
|
184
183
|
export const getAdaptersPositions = (
|
|
185
|
-
diagramData:
|
|
184
|
+
diagramData: UI_I_DiagramData | null,
|
|
186
185
|
height: number
|
|
187
186
|
): UI_I_AdaptersPositions => {
|
|
188
187
|
const titlePosition: number =
|
|
@@ -220,13 +219,15 @@ export const getAdaptersPositions = (
|
|
|
220
219
|
}
|
|
221
220
|
|
|
222
221
|
export const makeSwitchSendData = (
|
|
223
|
-
data:
|
|
222
|
+
data: UI_I_DiagramData,
|
|
224
223
|
adapterStatus: UI_I_AdapterStatus
|
|
225
|
-
): API_UI_I_SwitchItem => {
|
|
224
|
+
): API_UI_I_SwitchItem | void => {
|
|
225
|
+
if(!data.networking) return
|
|
226
|
+
|
|
226
227
|
return {
|
|
227
228
|
id: data.id,
|
|
228
229
|
mtu: data.networking.mtu,
|
|
229
|
-
networks: data.networks.map((network:
|
|
230
|
+
networks: data.networks.map((network: UI_I_Network) => network.title),
|
|
230
231
|
nics: adapterStatus,
|
|
231
232
|
security: {
|
|
232
233
|
promiscuous: data.networking.securityPolicy[0].value,
|
package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
<script setup lang="ts">
|
|
48
48
|
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
49
49
|
import {
|
|
50
|
-
|
|
50
|
+
UI_I_Network,
|
|
51
51
|
UI_I_VmkernelAdapterTableData,
|
|
52
52
|
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
53
53
|
import {
|
|
@@ -79,8 +79,8 @@ const props = withDefaults(
|
|
|
79
79
|
defineProps<{
|
|
80
80
|
show: boolean
|
|
81
81
|
switchName?: string
|
|
82
|
-
networksList?:
|
|
83
|
-
switchNetworks?:
|
|
82
|
+
networksList?: UI_I_Network[]
|
|
83
|
+
switchNetworks?: UI_I_Network[]
|
|
84
84
|
isDarkMode: boolean
|
|
85
85
|
}>(),
|
|
86
86
|
{
|
|
@@ -219,18 +219,18 @@ watch(
|
|
|
219
219
|
|
|
220
220
|
watch(
|
|
221
221
|
() => props.switchNetworks,
|
|
222
|
-
(netsOnSwitch:
|
|
222
|
+
(netsOnSwitch: UI_I_Network[]) => {
|
|
223
223
|
const vmKernelNetworksIdOnSwitch = netsOnSwitch
|
|
224
|
-
.filter((net:
|
|
225
|
-
.map((net:
|
|
224
|
+
.filter((net: UI_I_Network) => net.networkType === '1')
|
|
225
|
+
.map((net: UI_I_Network) => net.id)
|
|
226
226
|
|
|
227
227
|
filteredNetworksList.value = props.networksList
|
|
228
228
|
.filter(
|
|
229
|
-
(net:
|
|
229
|
+
(net: UI_I_Network) =>
|
|
230
230
|
net.networkType === '1' &&
|
|
231
231
|
!vmKernelNetworksIdOnSwitch.includes(net.id)
|
|
232
232
|
)
|
|
233
|
-
.map((net:
|
|
233
|
+
.map((net: UI_I_Network, index: number) => ({
|
|
234
234
|
name: net.sysx?.name || '',
|
|
235
235
|
networkLabel: net.title,
|
|
236
236
|
switch: net.switchName || '',
|