bfg-common 1.3.273 → 1.3.274
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.
- package/components/common/diagramMain/Diagram.vue +1 -0
- package/components/common/diagramMain/DiagramMain.vue +1 -0
- package/components/common/diagramMain/Header.vue +7 -6
- package/components/common/diagramMain/adapter/Adapter.vue +2 -0
- package/components/common/diagramMain/adapter/AdapterItem.vue +4 -6
- package/components/common/diagramMain/adapter/AdapterItems.vue +0 -1
- package/components/common/diagramMain/adapter/Contents.vue +1 -1
- package/components/common/diagramMain/lib/models/interfaces.ts +6 -0
- package/components/common/diagramMain/modals/lib/config/adapterModal.ts +2 -2
- package/components/common/diagramMain/modals/lib/config/diagramConfig.ts +5 -4
- package/components/common/diagramMain/modals/lib/config/networkModal.ts +4 -6
- package/components/common/diagramMain/modals/lib/config/portModal.ts +4 -4
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +2 -2
- package/components/common/diagramMain/network/Contents.vue +4 -4
- package/components/common/diagramMain/port/Port.vue +10 -4
- package/components/common/wizards/network/add/lib/models/interfaces.ts +1 -0
- package/package.json +1 -1
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
:selected-network="props.selectedNetwork"
|
|
27
27
|
:is-visible-line="hasActiveAdapter"
|
|
28
28
|
:is-dark-mode="props.isDarkMode"
|
|
29
|
+
:test-id="props.diagramData.testId"
|
|
29
30
|
@toggle-adapters="onToggleAdapters"
|
|
30
31
|
@select-adapter="onSelectAdapter"
|
|
31
32
|
@show-modal="onShowModal"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
open: props.isShowDiagram,
|
|
11
11
|
},
|
|
12
12
|
]"
|
|
13
|
-
data-id="
|
|
13
|
+
:data-id="`${props.testId}-toggle-icon`"
|
|
14
14
|
@click="onToggleDiagram"
|
|
15
15
|
/>
|
|
16
16
|
<a>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<span class="vertical-separator"></span>
|
|
25
25
|
<button
|
|
26
26
|
id="add-networking-button"
|
|
27
|
-
data-id="add-networking-button"
|
|
27
|
+
:data-id="`${props.testId}-add-networking-button`"
|
|
28
28
|
type="button"
|
|
29
29
|
@click="onShowModal('add-networking', props.diagramName)"
|
|
30
30
|
>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
</button>
|
|
33
33
|
<button
|
|
34
34
|
id="switch-edit-button"
|
|
35
|
-
data-id="
|
|
35
|
+
:data-id="`${props.testId}-edit-button`"
|
|
36
36
|
type="button"
|
|
37
37
|
@click="onShowModal('switch-edit')"
|
|
38
38
|
>
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
</button>
|
|
41
41
|
<button
|
|
42
42
|
id="switch-manage-physical-adapters-button"
|
|
43
|
-
data-id="
|
|
43
|
+
:data-id="`${props.testId}-manage-physical-adapters-button`"
|
|
44
44
|
type="button"
|
|
45
45
|
@click="onShowModal('switch-manage-physical-adapters')"
|
|
46
46
|
>
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
popup-class="diagram-main-actions__popup"
|
|
52
52
|
:close-after-click="true"
|
|
53
53
|
:items="switchMainNavigation"
|
|
54
|
-
test-id="
|
|
54
|
+
:test-id="`${props.testId}-actions-toggle`"
|
|
55
55
|
@change="onShowModal"
|
|
56
56
|
/>
|
|
57
57
|
</div>
|
|
@@ -73,6 +73,7 @@ const props = defineProps<{
|
|
|
73
73
|
inPortlet: boolean
|
|
74
74
|
isShowDiagram: boolean
|
|
75
75
|
diagramName: string
|
|
76
|
+
testId: string
|
|
76
77
|
}>()
|
|
77
78
|
|
|
78
79
|
const emits = defineEmits<{
|
|
@@ -87,7 +88,7 @@ const emits = defineEmits<{
|
|
|
87
88
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
88
89
|
|
|
89
90
|
const switchMainNavigation = computed<UI_I_NavigationItem[]>(() =>
|
|
90
|
-
switchMainNavigationFunc(localization.value)
|
|
91
|
+
switchMainNavigationFunc(localization.value, props.testId)
|
|
91
92
|
)
|
|
92
93
|
|
|
93
94
|
const onToggleDiagram = () => emits('toggle-diagram')
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<common-diagram-main-adapter-contents
|
|
9
9
|
:adapters-with-positions="props.adaptersWithPositions"
|
|
10
|
+
:test-id="props.testId"
|
|
10
11
|
@toggle-adapters="onToggleAdapters"
|
|
11
12
|
/>
|
|
12
13
|
|
|
@@ -55,6 +56,7 @@ const props = defineProps<{
|
|
|
55
56
|
isVisibleLine: boolean
|
|
56
57
|
networksCount: number
|
|
57
58
|
isDarkMode: boolean
|
|
59
|
+
testId: string
|
|
58
60
|
}>()
|
|
59
61
|
|
|
60
62
|
const isOpenedAdapterBlockAndNoSelectedNetwork = computed<boolean>(
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
|
|
23
23
|
<a
|
|
24
24
|
:id="`adapter-${props.adapter.id}`"
|
|
25
|
-
:data-id="`${props.testId}-select`"
|
|
25
|
+
:data-id="`${props.adapter.testId}-select`"
|
|
26
26
|
data-title="adapter-name"
|
|
27
27
|
cursor="pointer"
|
|
28
28
|
class="adapter-name"
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
popup-class="diagram-actions__popup"
|
|
92
92
|
:close-after-click="true"
|
|
93
93
|
:items="adapterPopupFields"
|
|
94
|
-
:test-id="
|
|
94
|
+
:test-id="props.adapter.testId"
|
|
95
95
|
@change="(value) => onShowModal(value, adapterProperties)"
|
|
96
96
|
/>
|
|
97
97
|
</div>
|
|
@@ -142,7 +142,6 @@ const props = defineProps<{
|
|
|
142
142
|
selectedAdapter: UI_I_SelectedAdapter
|
|
143
143
|
networksCount: number
|
|
144
144
|
isDarkMode: boolean
|
|
145
|
-
testId?: string
|
|
146
145
|
}>()
|
|
147
146
|
|
|
148
147
|
const emits = defineEmits<{
|
|
@@ -156,9 +155,8 @@ const emits = defineEmits<{
|
|
|
156
155
|
|
|
157
156
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
158
157
|
|
|
159
|
-
const adapterPopupFields =
|
|
160
|
-
localization.value,
|
|
161
|
-
props.adapter.id
|
|
158
|
+
const adapterPopupFields = computed(() =>
|
|
159
|
+
adapterPopupFieldsFunc(localization.value, props.adapter.testId)
|
|
162
160
|
)
|
|
163
161
|
|
|
164
162
|
const adapterProperties = dataForSelectedAdapterFunc(props.adapter)
|
|
@@ -14,11 +14,13 @@ export interface UI_I_Port {
|
|
|
14
14
|
macAddress?: string
|
|
15
15
|
adapter?: string
|
|
16
16
|
isActive?: boolean
|
|
17
|
+
testId: string
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export interface UI_I_Adapter {
|
|
20
21
|
name: string
|
|
21
22
|
id: string
|
|
23
|
+
testId: string
|
|
22
24
|
fullName: string
|
|
23
25
|
state: UI_I_State
|
|
24
26
|
adapter: string
|
|
@@ -66,6 +68,7 @@ export interface UI_I_SelectedAdapter {
|
|
|
66
68
|
|
|
67
69
|
export interface UI_I_Sysx {
|
|
68
70
|
id: string
|
|
71
|
+
testId: string
|
|
69
72
|
state: UI_I_State
|
|
70
73
|
index: UI_I_ListIndex
|
|
71
74
|
switch: string
|
|
@@ -143,6 +146,7 @@ export interface UI_I_Network extends UI_I_NetworkInfo {
|
|
|
143
146
|
toggle: boolean
|
|
144
147
|
unusedAdapters?: string[]
|
|
145
148
|
vlanId?: number | string
|
|
149
|
+
testId: string
|
|
146
150
|
}
|
|
147
151
|
|
|
148
152
|
export interface UI_I_SwitchInfo extends UI_I_NetworkInfo {
|
|
@@ -168,6 +172,7 @@ export interface UI_I_NetworkFullWithPositions extends UI_I_Network {
|
|
|
168
172
|
|
|
169
173
|
export interface UI_I_DiagramData {
|
|
170
174
|
id: string
|
|
175
|
+
testId: string
|
|
171
176
|
diagramName: string
|
|
172
177
|
networks: UI_I_Network[]
|
|
173
178
|
networking?: UI_I_SwitchInfo
|
|
@@ -424,6 +429,7 @@ export interface UI_I_ModalsInitialData<T = string | number | boolean> {
|
|
|
424
429
|
export interface UI_I_SwitchAdapterItem {
|
|
425
430
|
name: string
|
|
426
431
|
id: string
|
|
432
|
+
testId: string
|
|
427
433
|
fullName: string
|
|
428
434
|
state: UI_I_State
|
|
429
435
|
adapter: string
|
|
@@ -116,11 +116,11 @@ export const adapterViewSettingsFunc = (
|
|
|
116
116
|
|
|
117
117
|
export const adapterPopupFieldsFunc = (
|
|
118
118
|
localization: UI_I_Localization,
|
|
119
|
-
|
|
119
|
+
testId: string
|
|
120
120
|
) => [
|
|
121
121
|
{
|
|
122
122
|
text: localization.viewSettings,
|
|
123
123
|
value: 'adapter-view-settings',
|
|
124
|
-
testId:
|
|
124
|
+
testId: `${testId}-view`,
|
|
125
125
|
},
|
|
126
126
|
]
|
|
@@ -2,21 +2,22 @@ import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
|
2
2
|
import { UI_I_NavigationItem } from '~/components/common/diagramMain/lib/models/interfaces'
|
|
3
3
|
|
|
4
4
|
export const switchMainNavigationFunc = (
|
|
5
|
-
localization: UI_I_Localization
|
|
5
|
+
localization: UI_I_Localization,
|
|
6
|
+
testId: string
|
|
6
7
|
): UI_I_NavigationItem[] => [
|
|
7
8
|
{
|
|
8
9
|
text: localization.migrateVmKernelAdapter,
|
|
9
10
|
value: 'migrate-vmkernel-adapter',
|
|
10
|
-
testId:
|
|
11
|
+
testId: `${testId}-migrate-vm-kernel-adapter`,
|
|
11
12
|
},
|
|
12
13
|
{
|
|
13
14
|
text: localization.viewSettings,
|
|
14
15
|
value: 'switch-view-settings',
|
|
15
|
-
testId:
|
|
16
|
+
testId: `${testId}-view-settings`,
|
|
16
17
|
},
|
|
17
18
|
{
|
|
18
19
|
text: localization.remove,
|
|
19
20
|
value: 'switch-remove',
|
|
20
|
-
testId:
|
|
21
|
+
testId: `${testId}-remove`,
|
|
21
22
|
},
|
|
22
23
|
]
|
|
@@ -236,16 +236,14 @@ export const networkEditSettingsTabsFunc = (
|
|
|
236
236
|
export const networkPopupFieldsFunc = (
|
|
237
237
|
localization: UI_I_Localization,
|
|
238
238
|
_networkType: string,
|
|
239
|
-
|
|
239
|
+
testId: string,
|
|
240
240
|
inPortlet = false
|
|
241
241
|
) => {
|
|
242
|
-
const formatedId = id.replaceAll('=', '_')
|
|
243
|
-
|
|
244
242
|
const inPortletConfig = [
|
|
245
243
|
{
|
|
246
244
|
text: localization.viewSettings,
|
|
247
245
|
value: 'network-view-settings',
|
|
248
|
-
testId:
|
|
246
|
+
testId: `${testId}-view`,
|
|
249
247
|
},
|
|
250
248
|
// {
|
|
251
249
|
// text: localization.editSettings,
|
|
@@ -257,13 +255,13 @@ export const networkPopupFieldsFunc = (
|
|
|
257
255
|
{
|
|
258
256
|
text: localization.editSettings,
|
|
259
257
|
value: 'network-edit-settings',
|
|
260
|
-
testId:
|
|
258
|
+
testId: `${testId}-edit`,
|
|
261
259
|
},
|
|
262
260
|
{ separate: true },
|
|
263
261
|
{
|
|
264
262
|
text: localization.remove,
|
|
265
263
|
value: 'network-port-remove',
|
|
266
|
-
testId:
|
|
264
|
+
testId: `${testId}-remove`,
|
|
267
265
|
// networkType === '1' ? 'network-vkernel-remove' : 'network-port-remove',
|
|
268
266
|
},
|
|
269
267
|
]
|
|
@@ -160,23 +160,23 @@ export const portEditSettingsTabsFunc = (localization: UI_I_Localization) => [
|
|
|
160
160
|
|
|
161
161
|
export const portPopupFieldsFunc = (
|
|
162
162
|
localization: UI_I_Localization,
|
|
163
|
-
|
|
163
|
+
testId: string
|
|
164
164
|
) => [
|
|
165
165
|
{
|
|
166
166
|
text: localization.viewSettings,
|
|
167
167
|
value: 'port-view-settings',
|
|
168
|
-
testId:
|
|
168
|
+
testId: `${testId}-view`,
|
|
169
169
|
},
|
|
170
170
|
{
|
|
171
171
|
text: localization.editSettings,
|
|
172
172
|
value: 'port-edit-settings',
|
|
173
|
-
testId:
|
|
173
|
+
testId: `${testId}-edit`,
|
|
174
174
|
},
|
|
175
175
|
{ separate: true },
|
|
176
176
|
{
|
|
177
177
|
text: localization.remove,
|
|
178
178
|
value: 'port-remove',
|
|
179
|
-
testId:
|
|
179
|
+
testId: `${testId}-remove`,
|
|
180
180
|
},
|
|
181
181
|
]
|
|
182
182
|
|
|
@@ -24,11 +24,11 @@ export const vCenterViewSettingsFunc = (
|
|
|
24
24
|
|
|
25
25
|
export const vCenterPopupFieldsFunc = (
|
|
26
26
|
localization: UI_I_Localization,
|
|
27
|
-
|
|
27
|
+
testId: string
|
|
28
28
|
) => [
|
|
29
29
|
{
|
|
30
30
|
text: localization.viewSettings,
|
|
31
31
|
value: 'v-center-view-settings',
|
|
32
|
-
testId:
|
|
32
|
+
testId: `${testId}-view`,
|
|
33
33
|
},
|
|
34
34
|
]
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
<a
|
|
14
14
|
:id="`network-${props.network.id}`"
|
|
15
|
-
:data-id="`${props.testId}-link`"
|
|
15
|
+
:data-id="`${props.network.testId}-link`"
|
|
16
16
|
style="text-decoration: none"
|
|
17
17
|
cursor="pointer"
|
|
18
18
|
data-title="network-name-link"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
popup-class="diagram-actions__popup"
|
|
53
53
|
:close-after-click="true"
|
|
54
54
|
:items="networkPopupFields"
|
|
55
|
-
:test-id="
|
|
55
|
+
:test-id="`${props.network.testId}`"
|
|
56
56
|
@change="(value: string) => onShowModal(value, dataForSelectedNetwork)"
|
|
57
57
|
/>
|
|
58
58
|
</div>
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
x="24"
|
|
89
89
|
:y="portsArrowPosition"
|
|
90
90
|
cursor="pointer"
|
|
91
|
-
:data-id="`${props.testId}-toggle-ports`"
|
|
91
|
+
:data-id="`${props.network.testId}-toggle-ports`"
|
|
92
92
|
@click="
|
|
93
93
|
onTogglePorts(props.network.id, !props.network.toggle, props.diagramId)
|
|
94
94
|
"
|
|
@@ -168,7 +168,7 @@ const networkPopupFields = computed(() =>
|
|
|
168
168
|
networkPopupFieldsFunc(
|
|
169
169
|
localization.value,
|
|
170
170
|
props.network.networkType,
|
|
171
|
-
props.network.
|
|
171
|
+
props.network.testId,
|
|
172
172
|
props.inPortlet
|
|
173
173
|
)
|
|
174
174
|
)
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<a
|
|
23
23
|
:id="testId"
|
|
24
24
|
data-title="port-vm-name"
|
|
25
|
-
data-id="port-
|
|
25
|
+
:data-id="`${props.network.testId}-${props.port.testId}-select`"
|
|
26
26
|
cursor="pointer"
|
|
27
27
|
@click="onSelectPort(props.network.id, props.port.id)"
|
|
28
28
|
>
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
popup-class="diagram-actions__popup"
|
|
115
115
|
:close-after-click="true"
|
|
116
116
|
:items="navigationItems"
|
|
117
|
-
:test-id="`${testId}
|
|
117
|
+
:test-id="`${testId}`"
|
|
118
118
|
@change="onShowModalWithTypeCheck"
|
|
119
119
|
/>
|
|
120
120
|
</div>
|
|
@@ -218,8 +218,14 @@ const macAddressPosition = computed<number>(() => props.port.portPosition + 16)
|
|
|
218
218
|
|
|
219
219
|
const navigationItems = computed(() =>
|
|
220
220
|
isVCenter.value || isVMPortsGroup.value
|
|
221
|
-
? vCenterPopupFieldsFunc(
|
|
222
|
-
|
|
221
|
+
? vCenterPopupFieldsFunc(
|
|
222
|
+
localization.value,
|
|
223
|
+
`${props.network.testId}-${props.port.testId}`
|
|
224
|
+
)
|
|
225
|
+
: portPopupFieldsFunc(
|
|
226
|
+
localization.value,
|
|
227
|
+
`${props.network.testId}-${props.port.testId}`
|
|
228
|
+
)
|
|
223
229
|
)
|
|
224
230
|
|
|
225
231
|
const showHighlightLine = computed(
|