bfg-common 1.4.580 → 1.4.581

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.
@@ -1,194 +1,194 @@
1
- import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
2
-
3
- export const adapterItemPositionsFunc = (
4
- isNewView: boolean,
5
- adapterIconPosition: number,
6
- adapterCarrier: boolean,
7
- adapterPosition: number,
8
- adapterSelectionPosition: number,
9
- adapterActionIconPosition: number
10
- ): UI_I_ArbitraryObject<number> =>
11
- isNewView
12
- ? {
13
- x1: 386,
14
- x2: 363.3,
15
- blockX: 436.5,
16
- adapterX: 498.5,
17
- adapterWidth: 178,
18
- adapterIconSize: 20,
19
- adapterIconX: 470.5,
20
- adapterIconY: adapterCarrier
21
- ? adapterIconPosition + 0.7
22
- : adapterIconPosition + 0.5,
23
-
24
- adapterSecondIconSize: 16,
25
- adapterSecondIconX: 392.5,
26
- adapterSecondIconY: adapterPosition - 1,
27
- errorIconX: 450.5,
28
- errorIconY: adapterSelectionPosition + 1.5,
29
- actionY: adapterActionIconPosition + 1.5,
30
- actionX: 690.5,
31
- }
32
- : {
33
- x1: 391.5,
34
- x2: 362.5,
35
- blockX: 430.5,
36
- adapterX: 482,
37
- adapterWidth: 198,
38
- adapterIconSize: 18,
39
- adapterIconX: 462,
40
- adapterIconY: adapterIconPosition,
41
- adapterSecondIconSize: 18,
42
- adapterSecondIconX: 396,
43
- adapterSecondIconY: adapterPosition,
44
- errorIconX: 447,
45
- errorIconY: adapterSelectionPosition,
46
- actionY: adapterActionIconPosition,
47
- actionX: 682,
48
- }
49
-
50
- export const adapterContentPositionsFunc = (
51
- isNewView: boolean
52
- ): UI_I_ArbitraryObject<number> =>
53
- isNewView
54
- ? {
55
- arrowIconSize: 20,
56
- arrowIconX: 442.5,
57
- adapterTextX: 470.5,
58
- }
59
- : {
60
- arrowIconSize: 18,
61
- arrowIconX: 438,
62
- adapterTextX: 462,
63
- }
64
-
65
- export const adapterLinesPositionsFunc = (
66
- isNewView: boolean,
67
- firstNetworkY: number,
68
- lastNetworkY: number,
69
- adaptersConnectLineY: number
70
- ): UI_I_ArbitraryObject<number> =>
71
- isNewView
72
- ? {
73
- x1: 386,
74
- x2:
75
- firstNetworkY > adaptersConnectLineY ||
76
- lastNetworkY < adaptersConnectLineY
77
- ? 364.5
78
- : 362.5,
79
- }
80
- : {
81
- x1: 391.5,
82
- x2: 362.5,
83
- }
84
-
85
- export const networkContentPositionsFunc = (
86
- isNewView: boolean,
87
- networkPortsPosition: number,
88
- networkTitlePosition: number
89
- ): UI_I_ArbitraryObject<number> =>
90
- isNewView
91
- ? {
92
- blockX: 12.5,
93
- portsY: networkPortsPosition + 1,
94
- x1: 339,
95
- x2: 361.7,
96
- networkIconSize: 20,
97
- networkIconY: networkTitlePosition - 2,
98
- networkIconX: 16,
99
- networkTitleX: 44,
100
- contentX: 44,
101
- arrowX: 44,
102
- arrowSize: 16,
103
- portX: 68,
104
- actionY: networkTitlePosition + 1.5,
105
- actionX: 266.5,
106
- portsArrowPosition: networkPortsPosition - 0.5,
107
- }
108
- : {
109
- blockX: 18.5,
110
- portsY: networkPortsPosition,
111
- x1: 334,
112
- x2: 362.5,
113
- networkIconSize: 18,
114
- networkIconY: networkTitlePosition,
115
- networkIconX: 26,
116
- networkTitleX: 50,
117
- contentX: 26,
118
- arrowX: 24,
119
- arrowSize: 18,
120
- portX: 42,
121
- actionY: networkTitlePosition,
122
- actionX: 270,
123
- portsArrowPosition: networkPortsPosition - 1,
124
- }
125
-
126
- export const networkLinesPositionsFunc = (
127
- isNewView: boolean,
128
- shortLine: boolean
129
- ): UI_I_ArbitraryObject<number> =>
130
- isNewView
131
- ? {
132
- x1: 339,
133
- x2: shortLine ? 360.5 : 362.5,
134
- xHighlight2: 361.7 || 362.5,
135
- }
136
- : {
137
- x1: 332.5,
138
- x2: 362.5,
139
- xHighlight2: 362.5,
140
- }
141
-
142
- export const portPositionsFunc = (
143
- isNewView: boolean,
144
- navCollapsePosition: number,
145
- portStatusIconPosition: number
146
- ): UI_I_ArbitraryObject<number> =>
147
- isNewView
148
- ? {
149
- x1: 339,
150
- x2: 361.7,
151
- blockX: 12.5,
152
- portX: 50,
153
- portWidth: 182,
154
- playIconSize: 16,
155
- playIconX: 242.5,
156
- playIconY: navCollapsePosition + 1.4,
157
- actionY: navCollapsePosition + 1.5,
158
- actionX: 266.5,
159
- portSecondIconSize: 16,
160
- portSecondIconX: 316.5,
161
- portSecondIconY: portStatusIconPosition + 1.5,
162
- }
163
- : {
164
- x1: 334,
165
- x2: 362.5,
166
- blockX: 18.5,
167
- portX: 22,
168
- portWidth: 226,
169
- playIconSize: 18,
170
- playIconX: 250,
171
- playIconY: navCollapsePosition,
172
- actionY: navCollapsePosition,
173
- actionX: 270,
174
- portSecondIconSize: 18,
175
- portSecondIconX: 314,
176
- portSecondIconY: portStatusIconPosition,
177
- }
178
-
179
- export const switchPositionsFunc = (
180
- isNewView: boolean
181
- ): UI_I_ArbitraryObject<number> =>
182
- isNewView
183
- ? {
184
- rw: 104,
185
- rx: 310.5,
186
- lx: 362.5,
187
- radius: 6,
188
- }
189
- : {
190
- rw: 100,
191
- rx: 312.5,
192
- lx: 362.5,
193
- radius: 0,
194
- }
1
+ import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
2
+
3
+ export const adapterItemPositionsFunc = (
4
+ isNewView: boolean,
5
+ adapterIconPosition: number,
6
+ adapterCarrier: boolean,
7
+ adapterPosition: number,
8
+ adapterSelectionPosition: number,
9
+ adapterActionIconPosition: number
10
+ ): UI_I_ArbitraryObject<number> =>
11
+ isNewView
12
+ ? {
13
+ x1: 386,
14
+ x2: 363.3,
15
+ blockX: 436.5,
16
+ adapterX: 498.5,
17
+ adapterWidth: 178,
18
+ adapterIconSize: 20,
19
+ adapterIconX: 470.5,
20
+ adapterIconY: adapterCarrier
21
+ ? adapterIconPosition + 0.7
22
+ : adapterIconPosition + 0.5,
23
+
24
+ adapterSecondIconSize: 16,
25
+ adapterSecondIconX: 392.5,
26
+ adapterSecondIconY: adapterPosition - 1,
27
+ errorIconX: 450.5,
28
+ errorIconY: adapterSelectionPosition + 1.5,
29
+ actionY: adapterActionIconPosition + 1.5,
30
+ actionX: 690.5,
31
+ }
32
+ : {
33
+ x1: 391.5,
34
+ x2: 362.5,
35
+ blockX: 430.5,
36
+ adapterX: 482,
37
+ adapterWidth: 198,
38
+ adapterIconSize: 18,
39
+ adapterIconX: 462,
40
+ adapterIconY: adapterIconPosition,
41
+ adapterSecondIconSize: 18,
42
+ adapterSecondIconX: 396,
43
+ adapterSecondIconY: adapterPosition,
44
+ errorIconX: 447,
45
+ errorIconY: adapterSelectionPosition,
46
+ actionY: adapterActionIconPosition,
47
+ actionX: 682,
48
+ }
49
+
50
+ export const adapterContentPositionsFunc = (
51
+ isNewView: boolean
52
+ ): UI_I_ArbitraryObject<number> =>
53
+ isNewView
54
+ ? {
55
+ arrowIconSize: 20,
56
+ arrowIconX: 442.5,
57
+ adapterTextX: 470.5,
58
+ }
59
+ : {
60
+ arrowIconSize: 18,
61
+ arrowIconX: 438,
62
+ adapterTextX: 462,
63
+ }
64
+
65
+ export const adapterLinesPositionsFunc = (
66
+ isNewView: boolean,
67
+ firstNetworkY: number,
68
+ lastNetworkY: number,
69
+ adaptersConnectLineY: number
70
+ ): UI_I_ArbitraryObject<number> =>
71
+ isNewView
72
+ ? {
73
+ x1: 386,
74
+ x2:
75
+ firstNetworkY > adaptersConnectLineY ||
76
+ lastNetworkY < adaptersConnectLineY
77
+ ? 364.5
78
+ : 362.5,
79
+ }
80
+ : {
81
+ x1: 391.5,
82
+ x2: 362.5,
83
+ }
84
+
85
+ export const networkContentPositionsFunc = (
86
+ isNewView: boolean,
87
+ networkPortsPosition: number,
88
+ networkTitlePosition: number
89
+ ): UI_I_ArbitraryObject<number> =>
90
+ isNewView
91
+ ? {
92
+ blockX: 12.5,
93
+ portsY: networkPortsPosition + 1,
94
+ x1: 339,
95
+ x2: 361.7,
96
+ networkIconSize: 20,
97
+ networkIconY: networkTitlePosition - 2,
98
+ networkIconX: 16,
99
+ networkTitleX: 44,
100
+ contentX: 44,
101
+ arrowX: 44,
102
+ arrowSize: 16,
103
+ portX: 68,
104
+ actionY: networkTitlePosition + 1.5,
105
+ actionX: 266.5,
106
+ portsArrowPosition: networkPortsPosition - 0.5,
107
+ }
108
+ : {
109
+ blockX: 18.5,
110
+ portsY: networkPortsPosition,
111
+ x1: 334,
112
+ x2: 362.5,
113
+ networkIconSize: 18,
114
+ networkIconY: networkTitlePosition,
115
+ networkIconX: 26,
116
+ networkTitleX: 50,
117
+ contentX: 26,
118
+ arrowX: 24,
119
+ arrowSize: 18,
120
+ portX: 42,
121
+ actionY: networkTitlePosition,
122
+ actionX: 270,
123
+ portsArrowPosition: networkPortsPosition - 1,
124
+ }
125
+
126
+ export const networkLinesPositionsFunc = (
127
+ isNewView: boolean,
128
+ shortLine: boolean
129
+ ): UI_I_ArbitraryObject<number> =>
130
+ isNewView
131
+ ? {
132
+ x1: 339,
133
+ x2: shortLine ? 360.5 : 362.5,
134
+ xHighlight2: 361.7 || 362.5,
135
+ }
136
+ : {
137
+ x1: 332.5,
138
+ x2: 362.5,
139
+ xHighlight2: 362.5,
140
+ }
141
+
142
+ export const portPositionsFunc = (
143
+ isNewView: boolean,
144
+ navCollapsePosition: number,
145
+ portStatusIconPosition: number
146
+ ): UI_I_ArbitraryObject<number> =>
147
+ isNewView
148
+ ? {
149
+ x1: 339,
150
+ x2: 361.7,
151
+ blockX: 12.5,
152
+ portX: 50,
153
+ portWidth: 182,
154
+ playIconSize: 16,
155
+ playIconX: 242.5,
156
+ playIconY: navCollapsePosition + 1.4,
157
+ actionY: navCollapsePosition + 1.5,
158
+ actionX: 266.5,
159
+ portSecondIconSize: 16,
160
+ portSecondIconX: 316.5,
161
+ portSecondIconY: portStatusIconPosition + 1.5,
162
+ }
163
+ : {
164
+ x1: 334,
165
+ x2: 362.5,
166
+ blockX: 18.5,
167
+ portX: 22,
168
+ portWidth: 226,
169
+ playIconSize: 18,
170
+ playIconX: 250,
171
+ playIconY: navCollapsePosition,
172
+ actionY: navCollapsePosition,
173
+ actionX: 270,
174
+ portSecondIconSize: 18,
175
+ portSecondIconX: 314,
176
+ portSecondIconY: portStatusIconPosition,
177
+ }
178
+
179
+ export const switchPositionsFunc = (
180
+ isNewView: boolean
181
+ ): UI_I_ArbitraryObject<number> =>
182
+ isNewView
183
+ ? {
184
+ rw: 104,
185
+ rx: 310.5,
186
+ lx: 362.5,
187
+ radius: 6,
188
+ }
189
+ : {
190
+ rw: 100,
191
+ rx: 312.5,
192
+ lx: 362.5,
193
+ radius: 0,
194
+ }
@@ -1,45 +1,45 @@
1
- export const enum UI_E_NetworkType {
2
- VMkernel = '1',
3
- VMPortsGroup = '2',
4
- VCenter = '3',
5
- }
6
-
7
- export const enum UI_E_PositionsY {
8
- DIAGRAM_TOP = 1.5,
9
- DIAGRAM_BOTTOM = 1.5,
10
- BETWEEN_RECTS = 16,
11
- TITLE_FROM_RECT_TOP = 9.5,
12
- VLAN_FROM_RECT_TOP = 35.5,
13
- PORTS_FROM_RECT_TOP = 57.5,
14
- ADAPTER_FROM_RECT_TOP = 35.5,
15
- SINGLE_PORT_HEIGHT = 22,
16
- SINGLE_V_CENTER_HEIGHT = 32,
17
- SINGLE_ADAPTER_HEIGHT = 22,
18
- SPACE_FROM_RECT_BOTTOM = 2.5,
19
- }
20
-
21
- export enum UI_E_MigrationValidationFields {
22
- SELECT_ADAPTER_VM = 'vm',
23
-
24
- CONNECTION_SETTINGS_NETWORK = 'name',
25
- CONNECTION_SETTINGS_VLAN = 'vlan',
26
- }
27
-
28
- export enum UI_E_IYNOption {
29
- INHERIT,
30
- YES,
31
- NO,
32
- }
33
-
34
- export enum UI_E_ICBLinkDetectionMode {
35
- INHERIT,
36
- CARIER,
37
- BEAKON,
38
- }
39
-
40
- export enum UI_E_IBSTLoadBalancingMode {
41
- INHERIT,
42
- BACKUP,
43
- SLB,
44
- TCP,
1
+ export const enum UI_E_NetworkType {
2
+ VMkernel = '1',
3
+ VMPortsGroup = '2',
4
+ VCenter = '3',
5
+ }
6
+
7
+ export const enum UI_E_PositionsY {
8
+ DIAGRAM_TOP = 1.5,
9
+ DIAGRAM_BOTTOM = 1.5,
10
+ BETWEEN_RECTS = 16,
11
+ TITLE_FROM_RECT_TOP = 9.5,
12
+ VLAN_FROM_RECT_TOP = 35.5,
13
+ PORTS_FROM_RECT_TOP = 57.5,
14
+ ADAPTER_FROM_RECT_TOP = 35.5,
15
+ SINGLE_PORT_HEIGHT = 22,
16
+ SINGLE_V_CENTER_HEIGHT = 32,
17
+ SINGLE_ADAPTER_HEIGHT = 22,
18
+ SPACE_FROM_RECT_BOTTOM = 2.5,
19
+ }
20
+
21
+ export enum UI_E_MigrationValidationFields {
22
+ SELECT_ADAPTER_VM = 'vm',
23
+
24
+ CONNECTION_SETTINGS_NETWORK = 'name',
25
+ CONNECTION_SETTINGS_VLAN = 'vlan',
26
+ }
27
+
28
+ export enum UI_E_IYNOption {
29
+ INHERIT,
30
+ YES,
31
+ NO,
32
+ }
33
+
34
+ export enum UI_E_ICBLinkDetectionMode {
35
+ INHERIT,
36
+ CARIER,
37
+ BEAKON,
38
+ }
39
+
40
+ export enum UI_E_IBSTLoadBalancingMode {
41
+ INHERIT,
42
+ BACKUP,
43
+ SLB,
44
+ TCP,
45
45
  }