bfg-common 1.5.233 → 1.5.234

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 (29) hide show
  1. package/components/atoms/nav/NavBar.vue +2 -4
  2. package/components/atoms/tabs/Tabs.vue +8 -10
  3. package/components/common/browse/blocks/lib/models/types.ts +1 -1
  4. package/components/common/browse/lib/models/interfaces.ts +5 -5
  5. package/components/common/context/recursion/RecursionNew.vue +18 -2
  6. package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
  7. package/components/common/diagramMain/lib/config/initial.ts +50 -50
  8. package/components/common/diagramMain/lib/models/types.ts +21 -21
  9. package/components/common/diagramMain/lib/utils/utils.ts +331 -331
  10. package/components/common/diagramMain/modals/editSettings/ConfirmTeamingSettingsModal.vue +40 -40
  11. package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +214 -214
  12. package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +189 -189
  13. package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +163 -163
  14. package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +175 -175
  15. package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +346 -346
  16. package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
  17. package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
  18. package/components/common/diagramMain/modals/lib/mappers/mappers.ts +87 -87
  19. package/components/common/diagramMain/modals/lib/utils/index.ts +24 -24
  20. package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
  21. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +169 -169
  22. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
  23. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +14 -14
  24. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +137 -137
  25. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +52 -52
  26. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
  27. package/components/common/diagramMain/port/Ports.vue +47 -47
  28. package/components/common/tools/Actions.vue +1 -1
  29. package/package.json +2 -2
@@ -66,8 +66,6 @@ const setTriggerElementWidth = (): void => {
66
66
  : 0
67
67
  }
68
68
 
69
- const spaceForCollapseBtn = ref<number>(60)
70
-
71
69
  let outputSize = (): void => {
72
70
  const el = document.getElementById(id.value)
73
71
  if (!el) return
@@ -80,7 +78,7 @@ let outputSize = (): void => {
80
78
  const elItemsMarginRight = parseInt(getComputedStyle(elItems[0]).marginRight)
81
79
  const childrenMarginY = elItemsMarginLeft + elItemsMarginRight
82
80
 
83
- let childrenWidth = spaceForCollapseBtn.value
81
+ let childrenWidth = 0
84
82
  let count = 0
85
83
  for (let i = 0; i < elItems.length; i++) {
86
84
  childrenWidth += elItems[i].clientWidth + childrenMarginY
@@ -96,7 +94,7 @@ let outputSize = (): void => {
96
94
  if (element) {
97
95
  element.style.paddingRight =
98
96
  collapsedItems.value.length && !props.notCollapse
99
- ? `${spaceForCollapseBtn.value}px`
97
+ ? `${triggerElementWidth}px`
100
98
  : ''
101
99
  }
102
100
  }
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <nav :id="id" class="btn-group">
3
- <ul class="nav" :style="{ paddingRight: spaceForCollapseBtn + 'px' }">
3
+ <ul class="nav">
4
4
  <li
5
5
  v-for="(item, key) in props.items"
6
6
  :key="item.path"
@@ -94,8 +94,6 @@ const setTriggerElementWidth = (): void => {
94
94
  }
95
95
  }
96
96
 
97
- const spaceForCollapseBtn = ref<number>(60)
98
-
99
97
  const outputSize = (): void => {
100
98
  const el = document.getElementById(id.value)
101
99
  if (!el) return
@@ -106,7 +104,7 @@ const outputSize = (): void => {
106
104
  const elItemsMarginRight = parseInt(getComputedStyle(elItems[0]).marginRight)
107
105
  const childrenMarginY = elItemsMarginLeft + elItemsMarginRight
108
106
 
109
- let childrenWidth = spaceForCollapseBtn.value
107
+ let childrenWidth = 0
110
108
  let count = 0
111
109
  setTriggerElementWidth()
112
110
  for (let i = 0; i < elItems.length; i++) {
@@ -121,12 +119,12 @@ const outputSize = (): void => {
121
119
 
122
120
  visibleCount.value = count
123
121
 
124
- // const element = document.querySelector(`#${id.value} ul`)
125
- // if (element) {
126
- // element.style.paddingRight = collapsedItems.value.length
127
- // ? `${triggerElementWidth}px`
128
- // : ''
129
- // }
122
+ const element = document.querySelector(`#${id.value} ul`)
123
+ if (element) {
124
+ element.style.paddingRight = collapsedItems.value.length
125
+ ? `${triggerElementWidth}px`
126
+ : ''
127
+ }
130
128
  }
131
129
 
132
130
  const id = ref<string>(`tabs-${useUniqueId()}`)
@@ -1 +1 @@
1
- export type UI_T_BlocksWidth = [number, number, number]
1
+ export type UI_T_BlocksWidth = [number, number, number]
@@ -1,5 +1,5 @@
1
- export interface UI_I_FileInfo {
2
- type: string
3
- title: string
4
- value: string | number
5
- }
1
+ export interface UI_I_FileInfo {
2
+ type: string
3
+ title: string
4
+ value: string | number
5
+ }
@@ -18,7 +18,12 @@
18
18
  @mouseleave="emits('toggle-items', [item, false, $event])"
19
19
  >
20
20
  <span
21
- class="context-link"
21
+ :class="[
22
+ 'context-link',
23
+ {
24
+ 'without-children': allInBlockWithoutChildren,
25
+ },
26
+ ]"
22
27
  :style="item.style"
23
28
  :data-id="`${item.testId}-context-link`"
24
29
  @mousedown="emits('select-item', item)"
@@ -68,6 +73,13 @@ const emits = defineEmits<{
68
73
  value: [UI_I_ContextMenuItem, boolean, I_HTMLLiElement]
69
74
  ): void
70
75
  }>()
76
+
77
+ const allInBlockWithoutChildren = computed<boolean>(
78
+ () =>
79
+ !props.items.filter(
80
+ (item: UI_I_ContextMenuItem) => item.items && item.items.length > 0
81
+ ).length
82
+ )
71
83
  </script>
72
84
 
73
85
  <style>
@@ -203,6 +215,10 @@ const emits = defineEmits<{
203
215
  border-radius: 4px;
204
216
  padding: 6px 24px 6px 8px;
205
217
 
218
+ &.without-children {
219
+ padding: 6px 10px 6px 8px;
220
+ }
221
+
206
222
  .menu-item-text {
207
223
  flex: 1 1 0;
208
224
  font-size: 13px;
@@ -230,7 +246,7 @@ const emits = defineEmits<{
230
246
 
231
247
  .shortcut {
232
248
  color: #9da6ad;
233
- padding-left: 10px;
249
+ padding-left: 16px;
234
250
  }
235
251
  }
236
252
 
@@ -1,61 +1,61 @@
1
- <template>
2
- <g data-title="adapter-items-group">
3
- <template v-if="props.adaptersWithPositions.toggle">
4
- <template
5
- v-for="(adapter, key) in props.adaptersWithPositions.adapters"
6
- :key="adapter.id"
7
- >
8
- <common-diagram-main-adapter-item
9
- :adapter="adapter"
10
- :selected-port="props.selectedPort"
11
- :selected-adapter="props.selectedAdapter"
12
- :networks-count="props.networksCount"
13
- :is-dark-mode="props.isDarkMode"
14
- :networks-with-positions="props.networksWithPositions"
15
- @select-adapter="onSelectAdapter"
16
- @show-modal="onShowModal"
17
- />
18
- </template>
19
- </template>
20
- </g>
21
- </template>
22
-
23
- <script setup lang="ts">
24
- import {
25
- UI_I_AdaptersWithPositions,
26
- UI_I_ModalsInitialData,
27
- UI_I_SelectedAdapter,
28
- UI_I_SelectedPort,
29
- UI_I_NetworksWithPositions,
30
- } from '~/components/common/diagramMain/lib/models/interfaces'
31
-
32
- const props = defineProps<{
33
- adaptersWithPositions: UI_I_AdaptersWithPositions
34
- networksWithPositions: UI_I_NetworksWithPositions[]
35
- selectedPort: UI_I_SelectedPort
36
- selectedAdapter: UI_I_SelectedAdapter
37
- networksCount: number
38
- isDarkMode: boolean
39
- }>()
40
-
41
- const emits = defineEmits<{
42
- (event: 'select-adapter', adapterId: string): void
43
- (
44
- event: 'show-modal',
45
- value: string,
46
- properties?: UI_I_ModalsInitialData
47
- ): void
48
- }>()
49
-
50
- const onSelectAdapter = (adapterId: string): void => {
51
- emits('select-adapter', adapterId)
52
- }
53
- const onShowModal = (
54
- value: string,
55
- properties?: UI_I_ModalsInitialData
56
- ): void => {
57
- emits('show-modal', value, properties)
58
- }
59
- </script>
60
-
61
- <style scoped lang="scss"></style>
1
+ <template>
2
+ <g data-title="adapter-items-group">
3
+ <template v-if="props.adaptersWithPositions.toggle">
4
+ <template
5
+ v-for="(adapter, key) in props.adaptersWithPositions.adapters"
6
+ :key="adapter.id"
7
+ >
8
+ <common-diagram-main-adapter-item
9
+ :adapter="adapter"
10
+ :selected-port="props.selectedPort"
11
+ :selected-adapter="props.selectedAdapter"
12
+ :networks-count="props.networksCount"
13
+ :is-dark-mode="props.isDarkMode"
14
+ :networks-with-positions="props.networksWithPositions"
15
+ @select-adapter="onSelectAdapter"
16
+ @show-modal="onShowModal"
17
+ />
18
+ </template>
19
+ </template>
20
+ </g>
21
+ </template>
22
+
23
+ <script setup lang="ts">
24
+ import {
25
+ UI_I_AdaptersWithPositions,
26
+ UI_I_ModalsInitialData,
27
+ UI_I_SelectedAdapter,
28
+ UI_I_SelectedPort,
29
+ UI_I_NetworksWithPositions,
30
+ } from '~/components/common/diagramMain/lib/models/interfaces'
31
+
32
+ const props = defineProps<{
33
+ adaptersWithPositions: UI_I_AdaptersWithPositions
34
+ networksWithPositions: UI_I_NetworksWithPositions[]
35
+ selectedPort: UI_I_SelectedPort
36
+ selectedAdapter: UI_I_SelectedAdapter
37
+ networksCount: number
38
+ isDarkMode: boolean
39
+ }>()
40
+
41
+ const emits = defineEmits<{
42
+ (event: 'select-adapter', adapterId: string): void
43
+ (
44
+ event: 'show-modal',
45
+ value: string,
46
+ properties?: UI_I_ModalsInitialData
47
+ ): void
48
+ }>()
49
+
50
+ const onSelectAdapter = (adapterId: string): void => {
51
+ emits('select-adapter', adapterId)
52
+ }
53
+ const onShowModal = (
54
+ value: string,
55
+ properties?: UI_I_ModalsInitialData
56
+ ): void => {
57
+ emits('show-modal', value, properties)
58
+ }
59
+ </script>
60
+
61
+ <style scoped lang="scss"></style>
@@ -1,50 +1,50 @@
1
- import type {
2
- UI_I_AdapterStatus,
3
- UI_I_MainRectHeights,
4
- UI_I_SelectedAdapter,
5
- UI_I_SelectedPort,
6
- UI_I_SwitchLine,
7
- UI_I_NetworkPositionsConst,
8
- } from '~/components/common/diagramMain/lib/models/interfaces'
9
-
10
- export const managePhysicalAdapterStatusInitial: UI_I_AdapterStatus = {
11
- active: [],
12
- standby: [],
13
- unused: [],
14
- }
15
-
16
- export const mainRectHeightsInitial: UI_I_MainRectHeights = {
17
- networksHeight: 0,
18
- adaptersHeight: 0,
19
- }
20
-
21
- export const switchLineInitial: UI_I_SwitchLine = {
22
- y1: 0,
23
- y2: 0,
24
- ay: 0,
25
- }
26
-
27
- export const selectedPortInitial: UI_I_SelectedPort = {
28
- networkId: '-1',
29
- portId: '-1',
30
- activeAdapters: [],
31
- }
32
-
33
- export const selectedAdapterInitial: UI_I_SelectedAdapter = {
34
- adapterId: '-1',
35
- connectedPorts: [],
36
- }
37
-
38
- export const selectedSwitchLineYInitial: UI_I_SwitchLine = {
39
- y1: 0,
40
- y2: 0,
41
- }
42
-
43
- export const NETWORK_POSITIONS: UI_I_NetworkPositionsConst = {
44
- EMPTY_PORTS_PADDING_BOTTOM: 7.5,
45
- FROM_VLAN_ID_TO_GROUP_NAME: 22,
46
- VMS_AND_PORTS_HEIGHT: 22,
47
- V_CENTER_HEIGHT: 32,
48
- BETWEEN_VMS_AND_PORTS: 7.5,
49
- BETWEEN_V_CENTERS: 12.5,
50
- } as const
1
+ import type {
2
+ UI_I_AdapterStatus,
3
+ UI_I_MainRectHeights,
4
+ UI_I_SelectedAdapter,
5
+ UI_I_SelectedPort,
6
+ UI_I_SwitchLine,
7
+ UI_I_NetworkPositionsConst,
8
+ } from '~/components/common/diagramMain/lib/models/interfaces'
9
+
10
+ export const managePhysicalAdapterStatusInitial: UI_I_AdapterStatus = {
11
+ active: [],
12
+ standby: [],
13
+ unused: [],
14
+ }
15
+
16
+ export const mainRectHeightsInitial: UI_I_MainRectHeights = {
17
+ networksHeight: 0,
18
+ adaptersHeight: 0,
19
+ }
20
+
21
+ export const switchLineInitial: UI_I_SwitchLine = {
22
+ y1: 0,
23
+ y2: 0,
24
+ ay: 0,
25
+ }
26
+
27
+ export const selectedPortInitial: UI_I_SelectedPort = {
28
+ networkId: '-1',
29
+ portId: '-1',
30
+ activeAdapters: [],
31
+ }
32
+
33
+ export const selectedAdapterInitial: UI_I_SelectedAdapter = {
34
+ adapterId: '-1',
35
+ connectedPorts: [],
36
+ }
37
+
38
+ export const selectedSwitchLineYInitial: UI_I_SwitchLine = {
39
+ y1: 0,
40
+ y2: 0,
41
+ }
42
+
43
+ export const NETWORK_POSITIONS: UI_I_NetworkPositionsConst = {
44
+ EMPTY_PORTS_PADDING_BOTTOM: 7.5,
45
+ FROM_VLAN_ID_TO_GROUP_NAME: 22,
46
+ VMS_AND_PORTS_HEIGHT: 22,
47
+ V_CENTER_HEIGHT: 32,
48
+ BETWEEN_VMS_AND_PORTS: 7.5,
49
+ BETWEEN_V_CENTERS: 12.5,
50
+ } as const
@@ -1,21 +1,21 @@
1
- import type {
2
- UI_I_Adapter,
3
- UI_I_AdapterWithError,
4
- } from '~/components/common/diagramMain/lib/models/interfaces'
5
-
6
- export type UI_T_AdapterStatusNames = 'active' | 'standby' | 'unused'
7
- export type UI_T_PropertiesFieldName = 'vlanId' | 'networkLabel'
8
- export type UI_T_TrafficShapingFieldName = 'average' | 'peak' | 'burstSize'
9
- export type UI_T_PortPropertiesFieldName = 'mtu'
10
-
11
- export type UI_T_LoadBalancingMode =
12
- | 'inherit'
13
- | 'active-backup'
14
- | 'balance-slb'
15
- | 'balance-tcp'
16
- export type UI_T_IYN = 'inherit' | 'yes' | 'no'
17
- export type UI_T_Carier = 'inherit' | 'carier' | 'beakon'
18
-
19
- export type UI_T_Adapters = (UI_I_Adapter | UI_I_AdapterWithError) & {
20
- adapterPosition: number
21
- }
1
+ import type {
2
+ UI_I_Adapter,
3
+ UI_I_AdapterWithError,
4
+ } from '~/components/common/diagramMain/lib/models/interfaces'
5
+
6
+ export type UI_T_AdapterStatusNames = 'active' | 'standby' | 'unused'
7
+ export type UI_T_PropertiesFieldName = 'vlanId' | 'networkLabel'
8
+ export type UI_T_TrafficShapingFieldName = 'average' | 'peak' | 'burstSize'
9
+ export type UI_T_PortPropertiesFieldName = 'mtu'
10
+
11
+ export type UI_T_LoadBalancingMode =
12
+ | 'inherit'
13
+ | 'active-backup'
14
+ | 'balance-slb'
15
+ | 'balance-tcp'
16
+ export type UI_T_IYN = 'inherit' | 'yes' | 'no'
17
+ export type UI_T_Carier = 'inherit' | 'carier' | 'beakon'
18
+
19
+ export type UI_T_Adapters = (UI_I_Adapter | UI_I_AdapterWithError) & {
20
+ adapterPosition: number
21
+ }