bfg-common 1.3.190 → 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.
@@ -2311,8 +2311,9 @@
2311
2311
  "rule": "Правіла",
2312
2312
  "createBackup": "Стварыць рэзервовую копію",
2313
2313
  "restore": "Аднавіць",
2314
- "strategy": "Strategy",
2315
- "fullBackup": "Full backup",
2316
- "incrementalBackup": "Incremental backup",
2317
- "differentialBackup": "Differential backup"
2314
+ "strategy": "Стратэгія",
2315
+ "fullBackup": "Поўнае рэзервовае капіраванне",
2316
+ "incrementalBackup": "Інкрэментнае рэзервовае капіраванне",
2317
+ "differentialBackup": "Дыферэнцыяльнае рэзервовае капіраванне",
2318
+ "nameIsRequired": "Патрабуецца імя"
2318
2319
  }
@@ -2318,5 +2318,6 @@
2318
2318
  "strategy": "Strategy",
2319
2319
  "fullBackup": "Full backup",
2320
2320
  "incrementalBackup": "Incremental backup",
2321
- "differentialBackup": "Differential backup"
2321
+ "differentialBackup": "Differential backup",
2322
+ "nameIsRequired": "Name is required"
2322
2323
  }
@@ -2315,8 +2315,9 @@
2315
2315
  "rule": "Կանոն",
2316
2316
  "createBackup": "Ստեղծեք կրկնօրինակում",
2317
2317
  "restore": "Վերականգնել",
2318
- "strategy": "Strategy",
2319
- "fullBackup": "Full backup",
2320
- "incrementalBackup": "Incremental backup",
2321
- "differentialBackup": "Differential backup"
2318
+ "strategy": "Ստրատեգիա",
2319
+ "fullBackup": "Ամբողջական կրկնօրինակում",
2320
+ "incrementalBackup": "Աճող կրկնօրինակում",
2321
+ "differentialBackup": "Դիֆերենցիալ կրկնօրինակում",
2322
+ "nameIsRequired": "Անունը պարտադիր է"
2322
2323
  }
@@ -2314,8 +2314,9 @@
2314
2314
  "rule": "Ереже",
2315
2315
  "createBackup": "Сақтық көшірме жасау",
2316
2316
  "restore": "Қалпына келтіру",
2317
- "strategy": "Strategy",
2318
- "fullBackup": "Full backup",
2319
- "incrementalBackup": "Incremental backup",
2320
- "differentialBackup": "Differential backup"
2317
+ "strategy": "Стратегия",
2318
+ "fullBackup": "Толық сақтық көшірме",
2319
+ "incrementalBackup": "Қосымша сақтық көшірме",
2320
+ "differentialBackup": "Дифференциалды резервтік көшірме",
2321
+ "nameIsRequired": "Аты қажет"
2321
2322
  }
@@ -2320,8 +2320,9 @@
2320
2320
  "rule": "Правило",
2321
2321
  "createBackup": "Создать резервную копию",
2322
2322
  "restore": "Восстановить",
2323
- "strategy": "Strategy",
2323
+ "strategy": "Стратегия",
2324
2324
  "fullBackup": "Полный Бэкап",
2325
2325
  "incrementalBackup": "Инкрементальный",
2326
- "differentialBackup": "Дифференциальный"
2326
+ "differentialBackup": "Дифференциальный",
2327
+ "nameIsRequired": "Требуется имя"
2327
2328
  }
@@ -2314,8 +2314,9 @@
2314
2314
  "rule": "规则",
2315
2315
  "createBackup": "创建备份",
2316
2316
  "restore": "恢复",
2317
- "strategy": "Strategy",
2318
- "fullBackup": "Full backup",
2319
- "incrementalBackup": "Incremental backup",
2320
- "differentialBackup": "Differential backup"
2317
+ "strategy": "战略",
2318
+ "fullBackup": "完整备份",
2319
+ "incrementalBackup": "增量备份",
2320
+ "differentialBackup": "差异备份",
2321
+ "nameIsRequired": "姓名为必填项"
2321
2322
  }
@@ -65,7 +65,7 @@
65
65
  import {
66
66
  UI_I_Adapter,
67
67
  UI_I_AdaptersWithPositions,
68
- UI_I_DiagramDataFull,
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: UI_I_DiagramDataFull | null
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: UI_I_DiagramDataFull | null
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?: UI_I_NetworkFull[]
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
- UI_I_NetworkFull,
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: UI_I_NetworkFull
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
- export interface UI_I_Network {
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 UI_I_NetworkFull {
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
- id: string
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
- UI_I_DiagramDataFull,
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: UI_I_DiagramDataFull | null
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: UI_I_DiagramDataFull | null,
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: UI_I_DiagramDataFull,
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: UI_I_NetworkFull) => network.title),
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,
@@ -47,7 +47,7 @@
47
47
  <script setup lang="ts">
48
48
  import { UI_I_Localization } from '~/lib/models/interfaces'
49
49
  import {
50
- UI_I_NetworkFull,
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?: UI_I_NetworkFull[]
83
- switchNetworks?: UI_I_NetworkFull[]
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: UI_I_NetworkFull[]) => {
222
+ (netsOnSwitch: UI_I_Network[]) => {
223
223
  const vmKernelNetworksIdOnSwitch = netsOnSwitch
224
- .filter((net: UI_I_NetworkFull) => net.networkType === '1')
225
- .map((net: UI_I_NetworkFull) => net.id)
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: UI_I_NetworkFull) =>
229
+ (net: UI_I_Network) =>
230
230
  net.networkType === '1' &&
231
231
  !vmKernelNetworksIdOnSwitch.includes(net.id)
232
232
  )
233
- .map((net: UI_I_NetworkFull, index: number) => ({
233
+ .map((net: UI_I_Network, index: number) => ({
234
234
  name: net.sysx?.name || '',
235
235
  networkLabel: net.title,
236
236
  switch: net.switchName || '',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.3.190",
4
+ "version": "1.3.192",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",