bfg-common 1.3.216 → 1.3.217

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.
Files changed (44) hide show
  1. package/assets/localization/local_en.json +3 -1
  2. package/components/atoms/alert/Alert.vue +95 -95
  3. package/components/atoms/alert/Notification.vue +170 -170
  4. package/components/atoms/switch/Switch.vue +111 -111
  5. package/components/atoms/table/compact/Compact.vue +526 -526
  6. package/components/atoms/tooltip/Signpost.vue +225 -225
  7. package/components/common/diagramMain/lib/models/interfaces.ts +5 -5
  8. package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +6 -6
  9. package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +2 -9
  10. package/components/common/diagramMain/modals/editSettings/tabs/TrafficShaping.vue +4 -132
  11. package/components/common/diagramMain/modals/lib/config/index.ts +0 -2
  12. package/components/common/diagramMain/modals/lib/config/initial.ts +0 -62
  13. package/components/common/diagramMain/modals/lib/config/networkModal.ts +92 -165
  14. package/components/common/pages/Tasks.vue +120 -120
  15. package/components/common/recursionTree/RecursionTree.vue +203 -203
  16. package/components/common/vm/actions/add/Add.vue +575 -575
  17. package/components/common/vm/actions/clone/Clone.vue +518 -518
  18. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +269 -269
  19. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +693 -693
  20. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuModel.vue +220 -220
  21. package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +59 -59
  22. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +294 -294
  23. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +165 -165
  24. package/components/common/vm/actions/common/select/storage/lib/config/config.ts +166 -166
  25. package/components/common/vm/actions/editSettings/EditSettings.vue +313 -313
  26. package/components/common/weekSelect/WeekSelect.vue +112 -112
  27. package/components/common/weekSelect/lib/config/options.ts +10 -10
  28. package/components/common/wizards/network/add/Add.vue +17 -1
  29. package/components/common/wizards/network/add/validations/physicalAdapter.ts +70 -0
  30. package/composables/productNameLocal.ts +22 -22
  31. package/composables/useAppVersion.ts +21 -21
  32. package/composables/useEnvLanguage.ts +20 -20
  33. package/lib/utils/sendTask.ts +72 -72
  34. package/minify.js +146 -146
  35. package/package.json +1 -1
  36. package/public/spice-console/application/codec.js +257 -257
  37. package/public/spice-console/lib/rasterEngine.js +907 -907
  38. package/public/spice-console/network/spicechannel.js +369 -369
  39. package/store/main/lib/interfaces.ts +9 -9
  40. package/store/tasks/actions.ts +133 -133
  41. package/store/tasks/getters.ts +25 -25
  42. package/store/tasks/lib/models/interfaces.ts +18 -18
  43. package/store/tasks/mutations.ts +58 -58
  44. package/store/tasks/state.ts +16 -16
@@ -30,7 +30,7 @@
30
30
  {{ localization.override }}
31
31
  </label>
32
32
  </div>
33
- <div v-if="!props.isSwitch" class="flex-property-value-group">
33
+ <div class="flex-property-value-group">
34
34
  <div class="select">
35
35
  <select
36
36
  id="traffic-shaping-select"
@@ -47,23 +47,6 @@
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>
67
50
  </div>
68
51
  </div>
69
52
  </div>
@@ -93,10 +76,7 @@
93
76
  {{ localization.override }}
94
77
  </label>
95
78
  </div>
96
- <div
97
- v-if="!props.isSwitch"
98
- class="property-value-group tooltip-field-container"
99
- >
79
+ <div class="property-value-group tooltip-field-container">
100
80
  <atoms-tooltip-error
101
81
  :has-error="!!props.errorMessages.average"
102
82
  >
@@ -127,40 +107,6 @@
127
107
  </template>
128
108
  </atoms-tooltip-error>
129
109
  </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>
164
110
  </div>
165
111
  </div>
166
112
  </div>
@@ -190,10 +136,7 @@
190
136
  {{ localization.override }}
191
137
  </label>
192
138
  </div>
193
- <div
194
- v-if="!props.isSwitch"
195
- class="property-value-group tooltip-field-container"
196
- >
139
+ <div class="property-value-group tooltip-field-container">
197
140
  <atoms-tooltip-error
198
141
  :has-error="!!props.errorMessages.peak"
199
142
  >
@@ -224,40 +167,6 @@
224
167
  </template>
225
168
  </atoms-tooltip-error>
226
169
  </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>
261
170
  </div>
262
171
  </div>
263
172
  </div>
@@ -287,10 +196,7 @@
287
196
  {{ localization.override }}
288
197
  </label>
289
198
  </div>
290
- <div
291
- v-if="!props.isSwitch"
292
- class="property-value-group tooltip-field-container"
293
- >
199
+ <div class="property-value-group tooltip-field-container">
294
200
  <atoms-tooltip-error
295
201
  :has-error="!!props.errorMessages.burstSize"
296
202
  >
@@ -321,40 +227,6 @@
321
227
  </template>
322
228
  </atoms-tooltip-error>
323
229
  </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>
358
230
  </div>
359
231
  </div>
360
232
  </div>
@@ -16,7 +16,6 @@ export const {
16
16
  } = portModalConfig
17
17
  export const {
18
18
  teamingAndFailoverTemplateMakerFunc,
19
- teamingAndFailoverNetworkTemplateMakerFunc,
20
19
  networkViewSettingsModalTabsFunc,
21
20
  networkEditSettingsTabsFunc,
22
21
  networkViewSettingsFunc,
@@ -35,7 +34,6 @@ export const {
35
34
  securityFieldsInitialFunc,
36
35
  securityNetworkFieldsInitialFunc,
37
36
  teamingFailoverFieldsInitialFunc,
38
- teamingFailoverNetworkFieldsInitialFunc,
39
37
  ipvFourSettingsFields,
40
38
  } = initialConfig
41
39
  export const {
@@ -72,68 +72,6 @@ export const teamingFailoverFieldsInitialFunc = (
72
72
  return teaming
73
73
  }
74
74
 
75
- export const teamingFailoverNetworkFieldsInitialFunc = (
76
- isSwitch: boolean,
77
- initialData?: UI_I_ModalsInitialData
78
- ): UI_I_TeamingFailoverFields => {
79
- const teaming = {
80
- loadBalancing: {
81
- checked: isSwitch,
82
- selected: 'balance-tcp',
83
- },
84
- networkFailureDetection: {
85
- checked: isSwitch,
86
- selected: 'carier',
87
- },
88
- notifySwitches: {
89
- checked: isSwitch,
90
- selected: 'yes',
91
- },
92
- failback: {
93
- checked: isSwitch,
94
- selected: 'yes',
95
- },
96
- failoverOrder: {
97
- checked: isSwitch,
98
- },
99
- }
100
-
101
- initialData &&
102
- initialData.nicTeamingPolicy?.forEach(
103
- (sec: UI_I_NetworkSummaryPortletListItem) => {
104
- switch (sec.id) {
105
- case 'mode':
106
- teaming.loadBalancing = {
107
- checked: isSwitch || sec.initialValue.override,
108
- selected: sec.initialValue.value as string,
109
- }
110
- return true
111
- case 'link_detect':
112
- teaming.networkFailureDetection = {
113
- checked: isSwitch || sec.initialValue.override,
114
- selected: sec.initialValue.value as string,
115
- }
116
- return true
117
- case 'notify_switches':
118
- teaming.notifySwitches = {
119
- checked: isSwitch || sec.initialValue.override,
120
- selected: sec.initialValue.value as string,
121
- }
122
- return true
123
- case 'failback':
124
- teaming.failback = {
125
- checked: isSwitch || sec.initialValue.override,
126
- selected: sec.initialValue.value as string,
127
- }
128
- return true
129
- }
130
- }
131
- )
132
-
133
- teaming.failoverOrder.checked = initialData?.nics_override || false
134
-
135
- return teaming
136
- }
137
75
 
138
76
  export const securityFieldsInitialFunc = (
139
77
  isSwitch: boolean,
@@ -5,6 +5,11 @@ import {
5
5
  UI_I_OverrideValue,
6
6
  UI_I_TeamingAndFailoverTemplate,
7
7
  } from '~/components/common/diagramMain/lib/models/interfaces'
8
+ import {
9
+ UI_E_IYNOption,
10
+ UI_E_IBSTLoadBalancingMode,
11
+ UI_E_ICBLinkDetectionMode,
12
+ } from '~/components/common/diagramMain/lib/models/enums'
8
13
 
9
14
  export const networkViewSettingsModalTabsFunc = (
10
15
  localization: UI_I_Localization
@@ -35,106 +40,30 @@ export const networkViewSettingsFunc = (
35
40
  localization: UI_I_Localization,
36
41
  initialData: UI_I_ModalsInitialData
37
42
  ) => {
38
- const linkDetect: UI_I_OverrideValue = findInitialValue(
39
- initialData.nicTeamingPolicy,
40
- 'link_detect'
41
- )
42
-
43
- const failback: UI_I_OverrideValue = findInitialValue(
44
- initialData.nicTeamingPolicy,
45
- 'failback'
46
- )
47
-
48
- const loadBalancing: UI_I_OverrideValue = findInitialValue(
49
- initialData.nicTeamingPolicy,
50
- 'mode'
51
- )
52
-
53
- const notifySwitches: UI_I_OverrideValue = findInitialValue(
54
- initialData.nicTeamingPolicy,
55
- 'notify_switches'
56
- )
57
-
58
- const promiscuousMode: UI_I_OverrideValue = findInitialValue(
59
- initialData.securityPolicy,
60
- 'promiscuous_mode'
61
- )
62
-
63
- const macAddressChanges: UI_I_OverrideValue = findInitialValue(
64
- initialData.securityPolicy,
65
- 'mac_change'
66
- )
67
-
68
- const forgedTransmits: UI_I_OverrideValue = findInitialValue(
69
- initialData.securityPolicy,
70
- 'forged_transmits'
71
- )
72
-
73
- const promiscuousModeValue: string =
74
- promiscuousMode && promiscuousMode.value
75
- ? promiscuousMode.value === 'yes'
76
- ? localization.accept
77
- : localization.reject
78
- : '--'
43
+ const loadBalancing =
44
+ (
45
+ initialData.nicTeamingPolicy as UI_I_NetworkSummaryPortletListItem<UI_E_IBSTLoadBalancingMode>[]
46
+ )?.find(
47
+ (
48
+ teaming: UI_I_NetworkSummaryPortletListItem<UI_E_IBSTLoadBalancingMode>
49
+ ) => teaming.id === 'mode'
50
+ )?.value || UI_E_IBSTLoadBalancingMode.BACKUP
79
51
 
80
- const macAddressChangesValue: string =
81
- macAddressChanges && macAddressChanges.value
82
- ? macAddressChanges.value === 'yes'
83
- ? localization.accept
84
- : localization.reject
85
- : '--'
52
+ let loadBalancingValue: string
86
53
 
87
- const forgedTransmitsValue: string =
88
- forgedTransmits && forgedTransmits.value
89
- ? forgedTransmits.value === 'yes'
90
- ? localization.accept
91
- : localization.reject
92
- : '--'
93
-
94
- const averageBandwidthValue: string = initialData.shapingPolicy?.[0]
95
- .initialValue.value
96
- ? `${initialData.average_bw} ${localization.kbitS}`
97
- : '--'
98
-
99
- const peakBandwidthValue: string = initialData.shapingPolicy?.[0].initialValue
100
- .value
101
- ? `${initialData.peak_bw} ${localization.kbitS}`
102
- : '--'
103
-
104
- const burstSizeValue: string = initialData.shapingPolicy?.[0].initialValue
105
- .value
106
- ? `${initialData.burst_size} ${localization.kb}`
107
- : '--'
108
-
109
- const loadBalancingValue: string = loadBalancing
110
- ? (loadBalancing.value === 'balance-tcp' &&
111
- localization.routeBasedIpHash) ||
112
- (loadBalancing.value === 'balance-slb' &&
113
- localization.routeBasedSourceMacHash) ||
114
- (loadBalancing.value === 'active-backup' &&
115
- localization.useExplicitFailoverOrder) ||
116
- '--'
117
- : '--'
118
-
119
- const networkFailureDetectionValue: string =
120
- (linkDetect &&
121
- linkDetect.value &&
122
- localization[linkDetect.value.toString()]) ||
123
- '--'
124
-
125
- const notifySwitchesValue: string =
126
- notifySwitches && notifySwitches.value
127
- ? notifySwitches.value === 'yes'
128
- ? localization.yes
129
- : localization.no
130
- : '--'
131
-
132
- const failbackValue: string =
133
- failback && failback.value
134
- ? failback.value === 'yes'
135
- ? localization.yes
136
- : localization.no
137
- : '--'
54
+ switch (loadBalancing) {
55
+ case UI_E_IBSTLoadBalancingMode.BACKUP:
56
+ loadBalancingValue = localization.useExplicitFailoverOrder
57
+ break
58
+ case UI_E_IBSTLoadBalancingMode.SLB:
59
+ loadBalancingValue = localization.routeBasedSourceMacHash
60
+ break
61
+ case UI_E_IBSTLoadBalancingMode.TCP:
62
+ loadBalancingValue = localization.routeBasedIpHash
63
+ break
64
+ default:
65
+ loadBalancingValue = '--'
66
+ }
138
67
 
139
68
  return [
140
69
  {
@@ -159,15 +88,39 @@ export const networkViewSettingsFunc = (
159
88
  rows: [
160
89
  {
161
90
  name: localization.promiscuousMode,
162
- value: promiscuousModeValue,
91
+ value:
92
+ (
93
+ initialData.securityPolicy as UI_I_NetworkSummaryPortletListItem<UI_E_IYNOption>[]
94
+ )?.find(
95
+ (sec: UI_I_NetworkSummaryPortletListItem<UI_E_IYNOption>) =>
96
+ sec.id === 'promiscuous_mode'
97
+ )?.initialValue?.value === UI_E_IYNOption.YES
98
+ ? localization.accept
99
+ : localization.reject,
163
100
  },
164
101
  {
165
102
  name: localization.macAddressChanges,
166
- value: macAddressChangesValue,
103
+ value:
104
+ (
105
+ initialData.securityPolicy as UI_I_NetworkSummaryPortletListItem<UI_E_IYNOption>[]
106
+ )?.find(
107
+ (sec: UI_I_NetworkSummaryPortletListItem<UI_E_IYNOption>) =>
108
+ sec.id === 'mac_change'
109
+ )?.initialValue?.value === UI_E_IYNOption.YES
110
+ ? localization.accept
111
+ : localization.reject,
167
112
  },
168
113
  {
169
114
  name: localization.forgedTransmits,
170
- value: forgedTransmitsValue,
115
+ value:
116
+ (
117
+ initialData.securityPolicy as UI_I_NetworkSummaryPortletListItem<UI_E_IYNOption>[]
118
+ )?.find(
119
+ (sec: UI_I_NetworkSummaryPortletListItem<UI_E_IYNOption>) =>
120
+ sec.id === 'forged_transmits'
121
+ )?.initialValue?.value === UI_E_IYNOption.YES
122
+ ? localization.accept
123
+ : localization.reject,
171
124
  },
172
125
  ],
173
126
  },
@@ -178,15 +131,21 @@ export const networkViewSettingsFunc = (
178
131
  rows: [
179
132
  {
180
133
  name: localization.averageBandwidth,
181
- value: averageBandwidthValue,
134
+ value: initialData.shapingPolicy?.[0].initialValue.value
135
+ ? `${initialData.average_bw} ${localization.kbitS}`
136
+ : '--',
182
137
  },
183
138
  {
184
139
  name: localization.peakBandwidth,
185
- value: peakBandwidthValue,
140
+ value: initialData.shapingPolicy?.[0].initialValue.value
141
+ ? `${initialData.peak_bw} ${localization.kbitS}`
142
+ : '--',
186
143
  },
187
144
  {
188
145
  name: localization.burstSize,
189
- value: burstSizeValue,
146
+ value: initialData.shapingPolicy?.[0].initialValue.value
147
+ ? `${initialData.burst_size} ${localization.kb}`
148
+ : '--',
190
149
  },
191
150
  ],
192
151
  },
@@ -201,15 +160,40 @@ export const networkViewSettingsFunc = (
201
160
  },
202
161
  {
203
162
  name: localization.networkFailureDetection,
204
- value: networkFailureDetectionValue,
163
+ value:
164
+ (
165
+ initialData.nicTeamingPolicy as UI_I_NetworkSummaryPortletListItem<UI_E_ICBLinkDetectionMode>[]
166
+ )?.find(
167
+ (
168
+ teaming: UI_I_NetworkSummaryPortletListItem<UI_E_ICBLinkDetectionMode>
169
+ ) => teaming.id === 'link_detect'
170
+ )?.value === 1
171
+ ? localization.linkStatusOnly
172
+ : localization.beaconProbing,
205
173
  },
206
174
  {
207
175
  name: localization.notifySwitches,
208
- value: notifySwitchesValue,
176
+ value:
177
+ (
178
+ initialData.nicTeamingPolicy as UI_I_NetworkSummaryPortletListItem<UI_E_IYNOption>[]
179
+ )?.find(
180
+ (teaming: UI_I_NetworkSummaryPortletListItem<UI_E_IYNOption>) =>
181
+ teaming.id === 'notify_switches'
182
+ )?.value === UI_E_IYNOption.YES
183
+ ? localization.yes
184
+ : localization.no,
209
185
  },
210
186
  {
211
187
  name: localization.failback,
212
- value: failbackValue,
188
+ value:
189
+ (
190
+ initialData.nicTeamingPolicy as UI_I_NetworkSummaryPortletListItem<UI_E_IYNOption>[]
191
+ )?.find(
192
+ (teaming: UI_I_NetworkSummaryPortletListItem<UI_E_IYNOption>) =>
193
+ teaming.id === 'failback'
194
+ )?.value === UI_E_IYNOption.YES
195
+ ? localization.yes
196
+ : localization.no,
213
197
  },
214
198
  {
215
199
  name: localization.activeAdapters,
@@ -342,61 +326,4 @@ export const teamingAndFailoverTemplateMakerFunc = (
342
326
  },
343
327
  ],
344
328
  },
345
- ]
346
-
347
- export const teamingAndFailoverNetworkTemplateMakerFunc = (
348
- localization: UI_I_Localization
349
- ): UI_I_TeamingAndFailoverTemplate[] => [
350
- {
351
- key: 'loadBalancing',
352
- options: [
353
- {
354
- value: 'balance-tcp',
355
- text: localization.routeBasedIpHash,
356
- },
357
- {
358
- value: 'balance-slb',
359
- text: localization.routeBasedSourceMacHash,
360
- },
361
- {
362
- value: 'active-backup',
363
- text: localization.useExplicitFailoverOrder,
364
- },
365
- ],
366
- },
367
- {
368
- key: 'networkFailureDetection',
369
- options: [
370
- {
371
- value: 'carier',
372
- text: localization.linkStatusOnly,
373
- },
374
- ],
375
- },
376
- {
377
- key: 'notifySwitches',
378
- options: [
379
- {
380
- value: 'no',
381
- text: localization.no,
382
- },
383
- {
384
- value: 'yes',
385
- text: localization.yes,
386
- },
387
- ],
388
- },
389
- {
390
- key: 'failback',
391
- options: [
392
- {
393
- value: 'no',
394
- text: localization.no,
395
- },
396
- {
397
- value: 'yes',
398
- text: localization.yes,
399
- },
400
- ],
401
- },
402
- ]
329
+ ]