bfg-common 1.3.145 → 1.3.147
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/assets/localization/local_ru.json +1 -1
- package/components/common/diagramMain/DiagramMain.vue +4 -0
- package/components/common/diagramMain/Header.vue +68 -53
- package/components/common/wizards/network/add/Add.vue +3 -0
- package/components/common/wizards/network/add/steps/SelectedTargetDevice.vue +18 -19
- package/package.json +1 -1
|
@@ -758,7 +758,7 @@
|
|
|
758
758
|
"iommu": "I/O MMU",
|
|
759
759
|
"iommuUpper": "IOMMU",
|
|
760
760
|
"ip_address": "IP-адреса",
|
|
761
|
-
"ipAddress": "
|
|
761
|
+
"ipAddress": "IP адрес",
|
|
762
762
|
"iPAddressFQDN": "IP-адрес или полное доменное имя",
|
|
763
763
|
"ipFourAddressEmpty": "IP-адрес пуст. Введите действительный IP-адрес.",
|
|
764
764
|
"ipFourAddressInvalid": "IP-адрес недействителен. Введите действительный IP-адрес.",
|
|
@@ -201,6 +201,7 @@
|
|
|
201
201
|
:standard-switches-initial="props.standardSwitchesInitial"
|
|
202
202
|
:free-adapters="props.freeAdapters"
|
|
203
203
|
:is-dark-mode="props.isDarkMode"
|
|
204
|
+
:selected-switch-id="selectedSwitchId"
|
|
204
205
|
@check-network-label="onCheckNetworkLabel"
|
|
205
206
|
@get-existing-standard-switches="onGetExistingStandardSwitches"
|
|
206
207
|
@get-free-adapters="onGetFreeAdapters"
|
|
@@ -480,6 +481,8 @@ const onHideMigrateVmkernelAdapterModal = (): void => {
|
|
|
480
481
|
isShowMigrateVmkernelAdapterModal.value = false
|
|
481
482
|
}
|
|
482
483
|
|
|
484
|
+
const selectedSwitchId = ref<string>('')
|
|
485
|
+
|
|
483
486
|
const onShowModal = (
|
|
484
487
|
value: string,
|
|
485
488
|
properties: UI_I_ModalsInitialData
|
|
@@ -526,6 +529,7 @@ const onShowModal = (
|
|
|
526
529
|
break
|
|
527
530
|
case 'add-networking':
|
|
528
531
|
isShowAddNetworkingModal.value = true
|
|
532
|
+
selectedSwitchId.value = properties.switch_name
|
|
529
533
|
break
|
|
530
534
|
case 'switch-view-settings':
|
|
531
535
|
isShowSwitchViewSettingsModal.value = true
|
|
@@ -1,86 +1,96 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
<template v-if="!props.inPortlet">
|
|
3
|
+
<div class="diagram-header">
|
|
4
|
+
<div class="diagram-header-left">
|
|
5
|
+
<atoms-the-icon
|
|
6
|
+
name="angle"
|
|
7
|
+
:class="[
|
|
8
8
|
'diagram-header__arrow-icon',
|
|
9
9
|
{
|
|
10
10
|
open: props.isShowDiagram,
|
|
11
11
|
},
|
|
12
12
|
]"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
@click="onToggleDiagram"
|
|
14
|
+
/>
|
|
15
|
+
<a>
|
|
16
16
|
<span>
|
|
17
17
|
{{ localization.standardSwitch }}:
|
|
18
18
|
{{ props.diagramName }}
|
|
19
19
|
</span>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
20
|
+
</a>
|
|
21
|
+
</div>
|
|
22
|
+
<div v-if="props.isShowDiagram" class="diagram-header__btn-container">
|
|
23
|
+
<span class="vertical-separator"></span>
|
|
24
|
+
<button
|
|
25
|
+
id="add-networking-button"
|
|
26
|
+
type="button"
|
|
27
|
+
@click="onShowModal('add-networking', props.diagramName)"
|
|
28
|
+
>
|
|
29
|
+
{{ localization.addNetworking }}
|
|
30
|
+
</button>
|
|
31
|
+
<button
|
|
32
|
+
id="switch-edit-button"
|
|
33
|
+
type="button"
|
|
34
|
+
@click="onShowModal('switch-edit')"
|
|
35
|
+
>
|
|
36
|
+
{{ localization.edit }}
|
|
37
|
+
</button>
|
|
38
|
+
<button
|
|
39
|
+
id="switch-manage-physical-adapters-button"
|
|
40
|
+
type="button"
|
|
41
|
+
@click="onShowModal('switch-manage-physical-adapters')"
|
|
42
|
+
>
|
|
43
|
+
{{ localization.managePhysicalAdapters }}
|
|
44
|
+
</button>
|
|
45
|
+
<div class="diagram-main-actions-dots">
|
|
46
|
+
<atoms-collapse-nav
|
|
47
|
+
popup-class="diagram-main-actions__popup"
|
|
48
|
+
:close-after-click="true"
|
|
49
|
+
:items="switchMainNavigation"
|
|
50
|
+
@change="onShowModal"
|
|
51
|
+
/>
|
|
54
52
|
</div>
|
|
55
|
-
|
|
56
|
-
</
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
<hr class="horizontal-separator" />
|
|
56
|
+
</template>
|
|
57
57
|
</template>
|
|
58
58
|
|
|
59
59
|
<script setup lang="ts">
|
|
60
60
|
import { UI_I_Localization } from '~/lib/models/interfaces'
|
|
61
|
-
import {
|
|
61
|
+
import {
|
|
62
|
+
UI_I_NavigationItem,
|
|
63
|
+
UI_I_ModalsInitialData,
|
|
64
|
+
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
62
65
|
import { switchMainNavigationFunc } from '~/components/common/diagramMain/modals/lib/config'
|
|
63
66
|
|
|
64
67
|
const props = defineProps<{
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
inPortlet: boolean
|
|
69
|
+
isShowDiagram: boolean
|
|
70
|
+
diagramName: string
|
|
68
71
|
}>()
|
|
69
72
|
|
|
70
73
|
const emits = defineEmits<{
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
(event: 'toggle-diagram'): void
|
|
75
|
+
(
|
|
76
|
+
event: 'show-modal',
|
|
77
|
+
modalName: string,
|
|
78
|
+
properties?: UI_I_ModalsInitialData
|
|
79
|
+
): void
|
|
73
80
|
}>()
|
|
74
81
|
|
|
75
82
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
76
83
|
|
|
77
84
|
const switchMainNavigation = computed<UI_I_NavigationItem[]>(() =>
|
|
78
|
-
|
|
85
|
+
switchMainNavigationFunc(localization.value)
|
|
79
86
|
)
|
|
80
87
|
|
|
81
88
|
const onToggleDiagram = () => emits('toggle-diagram')
|
|
82
89
|
|
|
83
|
-
const onShowModal = (modalName: string) =>
|
|
90
|
+
const onShowModal = (modalName: string, diagramName?: string) =>
|
|
91
|
+
diagramName
|
|
92
|
+
? emits('show-modal', modalName, { switch_name: diagramName })
|
|
93
|
+
: emits('show-modal', modalName)
|
|
84
94
|
</script>
|
|
85
95
|
|
|
86
96
|
<style scoped lang="scss">
|
|
@@ -171,6 +181,11 @@ const onShowModal = (modalName: string) => emits('show-modal', modalName)
|
|
|
171
181
|
}
|
|
172
182
|
}
|
|
173
183
|
|
|
184
|
+
.diagram-main-actions-dots {
|
|
185
|
+
position: relative;
|
|
186
|
+
transform: translate(62px, -11px);
|
|
187
|
+
}
|
|
188
|
+
|
|
174
189
|
.horizontal-separator {
|
|
175
190
|
margin: 5px 10px 10px;
|
|
176
191
|
border-left: 0;
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
:standard-switches-initial="props.standardSwitchesInitial"
|
|
33
33
|
:messages-fields="selectedStep.fields"
|
|
34
34
|
:alert-messages="alertMessages[1]"
|
|
35
|
+
:selected-switch-id="props.selectedSwitchId"
|
|
35
36
|
@hide-alert="onHideAlert"
|
|
36
37
|
@change-target-device="onChangeTargetDevice"
|
|
37
38
|
/>
|
|
@@ -156,12 +157,14 @@ const props = withDefaults(
|
|
|
156
157
|
freeAdapters: UI_I_Adapter[]
|
|
157
158
|
project?: UI_T_Project
|
|
158
159
|
isDarkMode?: boolean
|
|
160
|
+
selectedSwitchId?: string
|
|
159
161
|
}>(),
|
|
160
162
|
{
|
|
161
163
|
standardSwitchesInitial: () => [],
|
|
162
164
|
freeAdapters: () => [],
|
|
163
165
|
project: 'procurator',
|
|
164
166
|
isDarkMode: false,
|
|
167
|
+
selectedSwitchId: '',
|
|
165
168
|
}
|
|
166
169
|
)
|
|
167
170
|
|
|
@@ -298,14 +298,20 @@ import { UI_I_ErrorFields } from '~/components/atoms/wizard/lib/models/interface
|
|
|
298
298
|
import type Wizard from '~/components/atoms/wizard/lib/utils/utils'
|
|
299
299
|
import { validateMtuTargetDeviceLocal } from '~/components/common/wizards/network/add/validations/validations'
|
|
300
300
|
|
|
301
|
-
const props =
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
301
|
+
const props = withDefaults(
|
|
302
|
+
defineProps<{
|
|
303
|
+
targetDevice: UI_I_TargetDevice
|
|
304
|
+
connectionType: string
|
|
305
|
+
standardSwitchesInitial: UI_I_Switch[]
|
|
306
|
+
alertMessages: string[]
|
|
307
|
+
messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
|
|
308
|
+
wizard: Wizard
|
|
309
|
+
selectedSwitchId?: string
|
|
310
|
+
}>(),
|
|
311
|
+
{
|
|
312
|
+
selectedSwitchId: '',
|
|
313
|
+
}
|
|
314
|
+
)
|
|
309
315
|
|
|
310
316
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
311
317
|
|
|
@@ -374,17 +380,10 @@ const onSelectNetwork = (_selectedNetworkId: string): void => {
|
|
|
374
380
|
fields.value.network = ''
|
|
375
381
|
}
|
|
376
382
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
(fields.value.standardSwitch =
|
|
382
|
-
newStandardSwitchesInitial?.sort((prev, next) =>
|
|
383
|
-
prev.name.localeCompare(next.name || '')
|
|
384
|
-
)[0]?.name || '')
|
|
385
|
-
},
|
|
386
|
-
{ deep: true, immediate: true }
|
|
387
|
-
)
|
|
383
|
+
onMounted(() => {
|
|
384
|
+
!fields.value.standardSwitch &&
|
|
385
|
+
(fields.value.standardSwitch = props.selectedSwitchId)
|
|
386
|
+
})
|
|
388
387
|
|
|
389
388
|
const onHideAlert = (): void => {
|
|
390
389
|
emits('hide-alert', 1)
|