bfg-common 1.1.44 → 1.1.45

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.
@@ -120,6 +120,40 @@ export const createSecondSchemeReadyCompleteFunc = (
120
120
  },
121
121
  ]
122
122
 
123
+ export const createThirdSchemeReadyCompleteFunc = (
124
+ connectionSettingsValues: UI_I_ConnectionSettings,
125
+ targetDeviceValues: UI_I_TargetDevice,
126
+ addedAdapters: string[],
127
+ localization: UI_I_Localization
128
+ ): UI_I_ReadyCompleteData[] => [
129
+ {
130
+ id: 0,
131
+ type: 0,
132
+ rows: [
133
+ {
134
+ name: localization.newStandardSwitch,
135
+ value: '--',
136
+ },
137
+ {
138
+ name: localization.virtualMachinePortGroup,
139
+ value: connectionSettingsValues.networkLabel,
140
+ },
141
+ {
142
+ name: localization.assignedAdapters,
143
+ value: addedAdapters.join(', '),
144
+ },
145
+ {
146
+ name: localization.switchMTU,
147
+ value: targetDeviceValues.mtu?.toString(),
148
+ },
149
+ {
150
+ name: localization.vlanId,
151
+ value: connectionSettingsValues.vlanId,
152
+ },
153
+ ],
154
+ },
155
+ ]
156
+
123
157
  const makeFirstColumnOfZeroAndFirstScheme = (
124
158
  targetDevice: UI_I_TargetDevice,
125
159
  portProperties: UI_I_PortProperties,
@@ -13,6 +13,7 @@ export const {
13
13
  createSecondSchemeReadyCompleteFunc,
14
14
  createZeroSchemeReadyCompleteFunc,
15
15
  createFirstSchemeReadyCompleteFunc,
16
+ createThirdSchemeReadyCompleteFunc,
16
17
  } = addNetworkingStepsConfig
17
18
  export const {
18
19
  servicesInitial,
@@ -41,6 +42,6 @@ export const {
41
42
  } = selectSwitches
42
43
 
43
44
  export const {
44
- addNetworkingSecondSchemeDataFunc,
45
45
  addNetworkingZeroOrFirstSchemeDataFunc,
46
+ addNetworkingSecondOrThirdSchemeDataFunc,
46
47
  } = sendData
@@ -3,22 +3,37 @@ import {
3
3
  UI_I_ConnectionSettings,
4
4
  UI_I_IpFourSettings,
5
5
  UI_I_PortProperties,
6
- UI_I_SecondSchemeData,
7
6
  UI_I_TargetDevice,
7
+ UI_I_AddNetworkingSecondOrThirdSchemeDataSend,
8
8
  } from '~/components/common/addNetworking/models/interfaces'
9
9
  import { UI_I_AdapterStatus } from '~/components/common/diagramMain/models/interfaces'
10
10
 
11
- export const addNetworkingSecondSchemeDataFunc = (
11
+ export const addNetworkingSecondOrThirdSchemeDataFunc = (
12
12
  connectionSettings: UI_I_ConnectionSettings,
13
13
  targetDevice: UI_I_TargetDevice,
14
- vlan: number
15
- ): UI_I_SecondSchemeData => {
16
- return {
17
- vlan,
18
- name: connectionSettings.networkLabel,
19
- switch: targetDevice.standardSwitch,
20
- }
21
- }
14
+ vlan: number,
15
+ isSecondScheme: boolean = false,
16
+ adapterStatus?: UI_I_AdapterStatus
17
+ ): UI_I_AddNetworkingSecondOrThirdSchemeDataSend =>
18
+ isSecondScheme
19
+ ? {
20
+ vlan,
21
+ name: connectionSettings.networkLabel,
22
+ switch: targetDevice.standardSwitch,
23
+ }
24
+ : {
25
+ vlan,
26
+ name: connectionSettings.networkLabel,
27
+ new_switch: {
28
+ mtu: targetDevice.selected === '3' ? targetDevice.mtu : undefined,
29
+ nics: {
30
+ active: adapterStatus?.active || [],
31
+ standby: adapterStatus?.standby || [],
32
+ unused: adapterStatus?.unused || [],
33
+ },
34
+ },
35
+ }
36
+
22
37
  export const addNetworkingZeroOrFirstSchemeDataFunc = (
23
38
  targetDevice: UI_I_TargetDevice,
24
39
  vlan: number,
@@ -1,7 +1,5 @@
1
1
  import { UI_E_StepStatus } from '~/components/common/addNetworking/models/enums'
2
2
  import { UI_T_TCP } from '~/components/common/addNetworking/models/types'
3
- import { addNetworkingSecondSchemeDataFunc } from '~/components/common/addNetworking/config/sendData'
4
- import { createSecondSchemeReadyCompleteFunc } from '~/components/common/addNetworking/config/addNetworkingSteps'
5
3
 
6
4
  export interface UI_I_Services {
7
5
  vMotion: boolean
@@ -121,11 +119,6 @@ export interface UI_I_PortPropertiesEnabledService {
121
119
  modelValue: string
122
120
  }
123
121
 
124
- export interface UI_I_AddNetworkingSecondSchemeDataSend {
125
- name: string
126
- vlan: number
127
- switch?: string
128
- }
129
122
  export interface UI_I_AddNetworkingZeroOrFirstSchemeDataSend {
130
123
  switch?: string
131
124
  new_switch?: {
@@ -178,10 +171,18 @@ export interface UI_I_BodyItems {
178
171
  id?: string
179
172
  }
180
173
 
181
- export interface UI_I_SecondSchemeData {
174
+ export interface UI_I_AddNetworkingSecondOrThirdSchemeDataSend {
182
175
  vlan: number
183
176
  name: string
184
- switch: string | undefined
177
+ switch?: string | undefined
178
+ new_switch?: {
179
+ mtu: number | undefined
180
+ nics: {
181
+ active: string[]
182
+ standby: string[]
183
+ unused: string[]
184
+ }
185
+ }
185
186
  }
186
187
 
187
188
  export interface UI_I_VlanIdData {
@@ -137,12 +137,7 @@
137
137
  </div>
138
138
 
139
139
  <div>
140
- <div
141
- :class="[
142
- 'radio',
143
- { 'disabled-on-time': props.connectionType === '1' },
144
- ]"
145
- >
140
+ <div class="radio">
146
141
  <input
147
142
  id="standard-switch"
148
143
  v-model="fields.selected"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.1.44",
4
+ "version": "1.1.45",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",