bfg-common 1.6.76 → 1.6.78
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_be.json +1 -14
- package/assets/localization/local_en.json +1 -14
- package/assets/localization/local_hy.json +1 -14
- package/assets/localization/local_kk.json +1 -14
- package/assets/localization/local_ru.json +1 -14
- package/assets/localization/local_zh.json +1 -14
- package/components/atoms/dropdown/dropdown/Dropdown.vue +170 -170
- package/components/atoms/dropdown/dropdown/lib/models/interfaces.ts +10 -10
- package/components/common/adapterManager/AdapterManager.vue +473 -473
- package/components/common/adapterManager/AdapterManagerOld.vue +498 -498
- package/components/common/adapterManager/addAdapterModal/AddAdapterModal.vue +70 -70
- package/components/common/adapterManager/addAdapterModal/AddAdapterModalNew.vue +110 -110
- package/components/common/adapterManager/addAdapterModal/AddAdapterModalOld.vue +531 -531
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModal.vue +32 -32
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalNew.vue +37 -37
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalOld.vue +73 -73
- package/components/common/adapterManager/lib/config/index.ts +19 -19
- package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModal.vue +31 -31
- package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModalNew.vue +34 -34
- package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModalOld.vue +57 -57
- package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModal.vue +31 -31
- package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModalNew.vue +34 -34
- package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModalOld.vue +57 -57
- package/components/common/adapterManager/ui/actions/AddAdapterButton.vue +34 -34
- package/components/common/adapterManager/ui/actions/RemoveAdapterButton.vue +41 -41
- package/components/common/adapterManager/ui/actions/VerticalSeparator.vue +10 -10
- package/components/common/adapterManager/ui/actions/bar/BarOld.vue +95 -95
- package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButton.vue +28 -28
- package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButtonNew.vue +76 -76
- package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButtonOld.vue +33 -33
- package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButton.vue +28 -28
- package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButtonNew.vue +77 -77
- package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButtonOld.vue +33 -33
- package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapter.vue +24 -24
- package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapterNew.vue +18 -18
- package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapterOld.vue +38 -38
- package/components/common/adapterManager/ui/secondTitle/SecondTitle.vue +31 -31
- package/components/common/adapterManager/ui/secondTitle/SecondTitleNew.vue +51 -51
- package/components/common/adapterManager/ui/secondTitle/SecondTitleOld.vue +35 -35
- package/components/common/adapterManager/ui/table/Table.vue +88 -88
- package/components/common/adapterManager/ui/table/TableNew.vue +137 -137
- package/components/common/adapterManager/ui/table/TableOld.vue +141 -141
- package/components/common/adapterManager/ui/table/adapters/Adapters.vue +44 -44
- package/components/common/adapterManager/ui/table/adapters/AdaptersNew.vue +187 -187
- package/components/common/adapterManager/ui/table/adapters/AdaptersOld.vue +87 -87
- package/components/common/adapterManager/ui/table/header/Header.vue +57 -57
- package/components/common/adapterManager/ui/table/header/HeaderNew.vue +81 -81
- package/components/common/adapterManager/ui/table/header/HeaderOld.vue +79 -79
- package/components/common/adapterManager/ui/table/lib/models/types.ts +1 -1
- package/components/common/certificate/Certificate.vue +6 -16
- package/components/common/certificate/{Info/Old.vue → CertificateInfo.vue} +34 -6
- package/components/common/certificate/{tools/Tools.vue → Tools.vue} +23 -18
- package/components/common/certificate/lib/config/tabsPannel.ts +22 -0
- package/components/common/diagramMain/adapter/Adapter.vue +123 -123
- package/components/common/diagramMain/adapter/AdapterItem.vue +438 -438
- package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
- package/components/common/diagramMain/adapter/Contents.vue +212 -212
- package/components/common/diagramMain/adapter/Lines.vue +81 -81
- package/components/common/diagramMain/adapter/block/Block.vue +27 -27
- package/components/common/diagramMain/adapter/block/BlockNew.vue +58 -58
- package/components/common/diagramMain/adapter/block/BlockOld.vue +50 -50
- package/components/common/diagramMain/adapter/secondBlock/SecondBlock.vue +27 -27
- package/components/common/diagramMain/adapter/secondBlock/SecondBlockNew.vue +60 -60
- package/components/common/diagramMain/adapter/secondBlock/SecondBlockOld.vue +51 -51
- package/components/common/diagramMain/highlights/Highlights.vue +151 -151
- package/components/common/diagramMain/highlights/HighlightsNew.vue +124 -124
- package/components/common/diagramMain/highlights/HighlightsOld.vue +107 -107
- package/components/common/diagramMain/lib/config/index.ts +81 -81
- package/components/common/diagramMain/lib/config/initial.ts +50 -50
- package/components/common/diagramMain/lib/config/positions.ts +194 -194
- package/components/common/diagramMain/lib/models/enums.ts +44 -44
- package/components/common/diagramMain/lib/models/interfaces.ts +760 -760
- package/components/common/diagramMain/lib/models/types.ts +21 -21
- package/components/common/diagramMain/lib/utils/utils.ts +331 -331
- package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +331 -331
- package/components/common/diagramMain/modals/Modals.vue +483 -483
- package/components/common/diagramMain/modals/lib/config/adapterModal.ts +147 -147
- package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
- package/components/common/diagramMain/modals/lib/config/networkModal.ts +405 -405
- package/components/common/diagramMain/modals/lib/config/portModal.ts +253 -253
- package/components/common/diagramMain/modals/lib/config/switchModal.ts +245 -245
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
- package/components/common/diagramMain/modals/lib/mappers/mappers.ts +88 -88
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +541 -541
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +170 -170
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/VmkernelAdapterReadyComplete.vue +49 -49
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +19 -19
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +137 -137
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +52 -52
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
- package/components/common/diagramMain/modals/remove/RemoveModal.vue +82 -82
- package/components/common/diagramMain/modals/remove/RemoveModalNew.vue +106 -106
- package/components/common/diagramMain/modals/remove/RemoveModalOld.vue +241 -241
- package/components/common/diagramMain/modals/viewSettings/info/Info.vue +57 -57
- package/components/common/diagramMain/modals/viewSettings/info/InfoNew.vue +174 -174
- package/components/common/diagramMain/modals/viewSettings/info/InfoOld.vue +141 -141
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettings.vue +45 -45
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsNew.vue +323 -323
- package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsOld.vue +203 -203
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModal.vue +60 -60
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModalNew.vue +50 -50
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModalOld.vue +70 -70
- package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/lib/models/interfaces.ts +48 -48
- package/components/common/diagramMain/network/Contents.vue +497 -497
- package/components/common/diagramMain/network/Lines.vue +107 -107
- package/components/common/diagramMain/network/Network.vue +141 -141
- package/components/common/diagramMain/network/block/Block.vue +37 -37
- package/components/common/diagramMain/network/block/BlockNew.vue +68 -68
- package/components/common/diagramMain/network/block/BlockOld.vue +64 -64
- package/components/common/diagramMain/network/noNetwork/NoNetwork.vue +12 -12
- package/components/common/diagramMain/network/noNetwork/NoNetworkNew.vue +89 -89
- package/components/common/diagramMain/network/noNetwork/NoNetworkOld.vue +61 -61
- package/components/common/diagramMain/network/secondBlock/SecondBlock.vue +41 -41
- package/components/common/diagramMain/network/secondBlock/SecondBlockNew.vue +64 -64
- package/components/common/diagramMain/network/secondBlock/SecondBlockOld.vue +60 -60
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/diagramMain/port/Ports.vue +47 -47
- package/components/common/diagramMain/switch/Switch.vue +180 -180
- package/components/common/diagramMain/switch/SwitchSelected.vue +111 -111
- package/components/common/monitor/advanced/table/tableOld/TableOld.vue +93 -93
- package/components/common/monitor/utilization/lib/models/enums.ts +4 -4
- package/components/common/split/horizontal/New.vue +1 -1
- package/components/common/split/horizontal/Old.vue +1 -1
- package/package.json +2 -2
- package/components/common/certificate/Info/Info.vue +0 -61
- package/components/common/certificate/Info/new/New.vue +0 -285
- package/components/common/certificate/Info/new/lib/config/index.ts +0 -59
- package/components/common/certificate/Info/new/lib/models/interfaces.ts +0 -3
- package/components/common/certificate/Info/new/lib/utils/index.ts +0 -10
- package/components/common/certificate/Old.vue +0 -27
- package/components/common/certificate/new/New.vue +0 -30
- package/components/common/certificate/new/Skeleton.vue +0 -155
- package/components/common/certificate/tools/New.vue +0 -48
- package/components/common/certificate/tools/Old.vue +0 -39
- package/components/common/certificate/tools/lib/config/tabsPannel.ts +0 -20
|
@@ -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 type {
|
|
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 type {
|
|
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,212 +1,212 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<g data-title="adapter-block-contents">
|
|
3
|
-
<foreignObject
|
|
4
|
-
v-if="isShowArrow"
|
|
5
|
-
:data-id="`${props.testId}-adapters-toggle`"
|
|
6
|
-
data-title="adapter-toggle"
|
|
7
|
-
:width="positions.arrowIconSize"
|
|
8
|
-
:height="positions.arrowIconSize"
|
|
9
|
-
:x="positions.arrowIconX"
|
|
10
|
-
:y="arrawIconPosition"
|
|
11
|
-
:cursor="hasAdapters && 'pointer'"
|
|
12
|
-
@click="onToggleAdapters"
|
|
13
|
-
>
|
|
14
|
-
<div class="diagram-block__toggle">
|
|
15
|
-
<ui-icon
|
|
16
|
-
v-if="isNewView"
|
|
17
|
-
name="arrow"
|
|
18
|
-
width="20"
|
|
19
|
-
height="20"
|
|
20
|
-
:class="[
|
|
21
|
-
'virtual-switch__arrow-icon',
|
|
22
|
-
{
|
|
23
|
-
'is-new': isNewView,
|
|
24
|
-
open: hasAdapters ? props.adaptersWithPositions.toggle : false,
|
|
25
|
-
'without-adapters': !hasAdapters,
|
|
26
|
-
},
|
|
27
|
-
]"
|
|
28
|
-
/>
|
|
29
|
-
<atoms-the-icon
|
|
30
|
-
v-else
|
|
31
|
-
name="angle"
|
|
32
|
-
:class="[
|
|
33
|
-
'virtual-switch__arrow-icon',
|
|
34
|
-
{
|
|
35
|
-
open: props.adaptersWithPositions.toggle,
|
|
36
|
-
},
|
|
37
|
-
]"
|
|
38
|
-
/>
|
|
39
|
-
{{ hasAdapters }}
|
|
40
|
-
</div>
|
|
41
|
-
</foreignObject>
|
|
42
|
-
<text
|
|
43
|
-
data-title="adapter-main-text"
|
|
44
|
-
dy="14px"
|
|
45
|
-
font-size="14"
|
|
46
|
-
font-weight="500"
|
|
47
|
-
:x="positions.adapterTextX"
|
|
48
|
-
:y="props.adaptersWithPositions.titlePosition"
|
|
49
|
-
:class="['diagram__heading', { 'is-new': isNewView }]"
|
|
50
|
-
>
|
|
51
|
-
{{ headerText }}
|
|
52
|
-
</text>
|
|
53
|
-
|
|
54
|
-
<foreignObject
|
|
55
|
-
v-if="!isNewView && !hasAdapters"
|
|
56
|
-
data-title="no-adapter-text"
|
|
57
|
-
dy="11px"
|
|
58
|
-
height="20"
|
|
59
|
-
width="230"
|
|
60
|
-
x="462"
|
|
61
|
-
y="53"
|
|
62
|
-
>
|
|
63
|
-
<span
|
|
64
|
-
data-title="no-physical-adapters"
|
|
65
|
-
class="no-physical-adapters text-ellipsis"
|
|
66
|
-
>
|
|
67
|
-
{{ localization.common.noPhysicalNetworkAdapters }}
|
|
68
|
-
</span>
|
|
69
|
-
</foreignObject>
|
|
70
|
-
</g>
|
|
71
|
-
</template>
|
|
72
|
-
|
|
73
|
-
<script setup lang="ts">
|
|
74
|
-
import type { UI_I_AdaptersWithPositions } from '~/components/common/diagramMain/lib/models/interfaces'
|
|
75
|
-
import type {
|
|
76
|
-
UI_I_Localization,
|
|
77
|
-
UI_I_ArbitraryObject,
|
|
78
|
-
} from '~/lib/models/interfaces'
|
|
79
|
-
import { adapterContentPositionsFunc } from '~/components/common/diagramMain/lib/config'
|
|
80
|
-
|
|
81
|
-
const props = withDefaults(
|
|
82
|
-
defineProps<{
|
|
83
|
-
adaptersWithPositions: UI_I_AdaptersWithPositions
|
|
84
|
-
testId?: string
|
|
85
|
-
}>(),
|
|
86
|
-
{
|
|
87
|
-
testId: '',
|
|
88
|
-
}
|
|
89
|
-
)
|
|
90
|
-
const emits = defineEmits<{
|
|
91
|
-
(event: 'toggle-adapters', networkId: string, portId: string): void
|
|
92
|
-
}>()
|
|
93
|
-
|
|
94
|
-
const { $store }: any = useNuxtApp()
|
|
95
|
-
|
|
96
|
-
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
97
|
-
|
|
98
|
-
const positions = computed<UI_I_ArbitraryObject<number>>(() =>
|
|
99
|
-
adapterContentPositionsFunc(isNewView.value)
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
103
|
-
|
|
104
|
-
const hasAdapters = computed<boolean>(
|
|
105
|
-
() => props.adaptersWithPositions.adaptersCount > 0
|
|
106
|
-
)
|
|
107
|
-
|
|
108
|
-
const isShowArrow = computed<boolean>(() =>
|
|
109
|
-
isNewView.value ? true : hasAdapters.value
|
|
110
|
-
)
|
|
111
|
-
|
|
112
|
-
const headerText = computed<string>(() =>
|
|
113
|
-
isNewView.value
|
|
114
|
-
? `${localization.value.common.physicalAdapters} (${
|
|
115
|
-
props.adaptersWithPositions.adaptersCount || 0
|
|
116
|
-
})`
|
|
117
|
-
: localization.value.common.physicalAdapters
|
|
118
|
-
)
|
|
119
|
-
|
|
120
|
-
const arrawIconPosition = computed<number>(
|
|
121
|
-
() => props.adaptersWithPositions.titlePosition - 0.5
|
|
122
|
-
)
|
|
123
|
-
|
|
124
|
-
const onToggleAdapters = (networkId: string, portId: string): void => {
|
|
125
|
-
emits('toggle-adapters', networkId, portId)
|
|
126
|
-
}
|
|
127
|
-
</script>
|
|
128
|
-
|
|
129
|
-
<style scoped lang="scss">
|
|
130
|
-
@import '~/assets/scss/common/mixins.scss';
|
|
131
|
-
|
|
132
|
-
:root.dark-theme {
|
|
133
|
-
.diagram__heading {
|
|
134
|
-
fill: #c1cdd4;
|
|
135
|
-
&.is-new {
|
|
136
|
-
fill: var(--diagram-content-text);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
.no-physical-adapters {
|
|
140
|
-
fill: #c1cdd4;
|
|
141
|
-
}
|
|
142
|
-
.text-ellipsis {
|
|
143
|
-
color: #c1cdd4;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.text-ellipsis {
|
|
148
|
-
display: block;
|
|
149
|
-
max-width: 230px;
|
|
150
|
-
text-overflow: ellipsis;
|
|
151
|
-
overflow: hidden;
|
|
152
|
-
white-space: nowrap;
|
|
153
|
-
font-weight: 400;
|
|
154
|
-
font-size: 12px;
|
|
155
|
-
color: #565656;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.virtual-switch__arrow-icon {
|
|
159
|
-
width: 16px;
|
|
160
|
-
height: 16px;
|
|
161
|
-
margin-right: 4px;
|
|
162
|
-
transform: rotate(90deg);
|
|
163
|
-
align-self: center;
|
|
164
|
-
fill: var(--triger-icon-color);
|
|
165
|
-
|
|
166
|
-
&.is-new {
|
|
167
|
-
width: 20px;
|
|
168
|
-
height: 20px;
|
|
169
|
-
fill: none;
|
|
170
|
-
color: var(--diagram-content-second-text);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
&.open:not(.without-adapters) {
|
|
174
|
-
transform: rotate(180deg);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
&.without-adapters {
|
|
178
|
-
color: var(--diagram-content-second-disabled-text);
|
|
179
|
-
fill: none;
|
|
180
|
-
pointer-events: none;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
.diagram__heading {
|
|
184
|
-
@include text($fs: 14px, $fw: 500);
|
|
185
|
-
fill: #565656;
|
|
186
|
-
letter-spacing: normal;
|
|
187
|
-
line-height: 1.2rem;
|
|
188
|
-
|
|
189
|
-
&.is-new {
|
|
190
|
-
line-height: 16.94px;
|
|
191
|
-
fill: var(--diagram-content-text);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
.no-physical-adapters {
|
|
195
|
-
fill: #565656;
|
|
196
|
-
font-size: 13px;
|
|
197
|
-
font-weight: 400;
|
|
198
|
-
line-height: normal;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
:root.is-new-view {
|
|
202
|
-
.text-ellipsis {
|
|
203
|
-
color: var(--diagram-content-text);
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
:root.is-new-view.dark-theme {
|
|
208
|
-
.text-ellipsis {
|
|
209
|
-
color: var(--diagram-content-text);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<g data-title="adapter-block-contents">
|
|
3
|
+
<foreignObject
|
|
4
|
+
v-if="isShowArrow"
|
|
5
|
+
:data-id="`${props.testId}-adapters-toggle`"
|
|
6
|
+
data-title="adapter-toggle"
|
|
7
|
+
:width="positions.arrowIconSize"
|
|
8
|
+
:height="positions.arrowIconSize"
|
|
9
|
+
:x="positions.arrowIconX"
|
|
10
|
+
:y="arrawIconPosition"
|
|
11
|
+
:cursor="hasAdapters && 'pointer'"
|
|
12
|
+
@click="onToggleAdapters"
|
|
13
|
+
>
|
|
14
|
+
<div class="diagram-block__toggle">
|
|
15
|
+
<ui-icon
|
|
16
|
+
v-if="isNewView"
|
|
17
|
+
name="arrow"
|
|
18
|
+
width="20"
|
|
19
|
+
height="20"
|
|
20
|
+
:class="[
|
|
21
|
+
'virtual-switch__arrow-icon',
|
|
22
|
+
{
|
|
23
|
+
'is-new': isNewView,
|
|
24
|
+
open: hasAdapters ? props.adaptersWithPositions.toggle : false,
|
|
25
|
+
'without-adapters': !hasAdapters,
|
|
26
|
+
},
|
|
27
|
+
]"
|
|
28
|
+
/>
|
|
29
|
+
<atoms-the-icon
|
|
30
|
+
v-else
|
|
31
|
+
name="angle"
|
|
32
|
+
:class="[
|
|
33
|
+
'virtual-switch__arrow-icon',
|
|
34
|
+
{
|
|
35
|
+
open: props.adaptersWithPositions.toggle,
|
|
36
|
+
},
|
|
37
|
+
]"
|
|
38
|
+
/>
|
|
39
|
+
{{ hasAdapters }}
|
|
40
|
+
</div>
|
|
41
|
+
</foreignObject>
|
|
42
|
+
<text
|
|
43
|
+
data-title="adapter-main-text"
|
|
44
|
+
dy="14px"
|
|
45
|
+
font-size="14"
|
|
46
|
+
font-weight="500"
|
|
47
|
+
:x="positions.adapterTextX"
|
|
48
|
+
:y="props.adaptersWithPositions.titlePosition"
|
|
49
|
+
:class="['diagram__heading', { 'is-new': isNewView }]"
|
|
50
|
+
>
|
|
51
|
+
{{ headerText }}
|
|
52
|
+
</text>
|
|
53
|
+
|
|
54
|
+
<foreignObject
|
|
55
|
+
v-if="!isNewView && !hasAdapters"
|
|
56
|
+
data-title="no-adapter-text"
|
|
57
|
+
dy="11px"
|
|
58
|
+
height="20"
|
|
59
|
+
width="230"
|
|
60
|
+
x="462"
|
|
61
|
+
y="53"
|
|
62
|
+
>
|
|
63
|
+
<span
|
|
64
|
+
data-title="no-physical-adapters"
|
|
65
|
+
class="no-physical-adapters text-ellipsis"
|
|
66
|
+
>
|
|
67
|
+
{{ localization.common.noPhysicalNetworkAdapters }}
|
|
68
|
+
</span>
|
|
69
|
+
</foreignObject>
|
|
70
|
+
</g>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<script setup lang="ts">
|
|
74
|
+
import type { UI_I_AdaptersWithPositions } from '~/components/common/diagramMain/lib/models/interfaces'
|
|
75
|
+
import type {
|
|
76
|
+
UI_I_Localization,
|
|
77
|
+
UI_I_ArbitraryObject,
|
|
78
|
+
} from '~/lib/models/interfaces'
|
|
79
|
+
import { adapterContentPositionsFunc } from '~/components/common/diagramMain/lib/config'
|
|
80
|
+
|
|
81
|
+
const props = withDefaults(
|
|
82
|
+
defineProps<{
|
|
83
|
+
adaptersWithPositions: UI_I_AdaptersWithPositions
|
|
84
|
+
testId?: string
|
|
85
|
+
}>(),
|
|
86
|
+
{
|
|
87
|
+
testId: '',
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
const emits = defineEmits<{
|
|
91
|
+
(event: 'toggle-adapters', networkId: string, portId: string): void
|
|
92
|
+
}>()
|
|
93
|
+
|
|
94
|
+
const { $store }: any = useNuxtApp()
|
|
95
|
+
|
|
96
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
97
|
+
|
|
98
|
+
const positions = computed<UI_I_ArbitraryObject<number>>(() =>
|
|
99
|
+
adapterContentPositionsFunc(isNewView.value)
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
103
|
+
|
|
104
|
+
const hasAdapters = computed<boolean>(
|
|
105
|
+
() => props.adaptersWithPositions.adaptersCount > 0
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
const isShowArrow = computed<boolean>(() =>
|
|
109
|
+
isNewView.value ? true : hasAdapters.value
|
|
110
|
+
)
|
|
111
|
+
|
|
112
|
+
const headerText = computed<string>(() =>
|
|
113
|
+
isNewView.value
|
|
114
|
+
? `${localization.value.common.physicalAdapters} (${
|
|
115
|
+
props.adaptersWithPositions.adaptersCount || 0
|
|
116
|
+
})`
|
|
117
|
+
: localization.value.common.physicalAdapters
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
const arrawIconPosition = computed<number>(
|
|
121
|
+
() => props.adaptersWithPositions.titlePosition - 0.5
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
const onToggleAdapters = (networkId: string, portId: string): void => {
|
|
125
|
+
emits('toggle-adapters', networkId, portId)
|
|
126
|
+
}
|
|
127
|
+
</script>
|
|
128
|
+
|
|
129
|
+
<style scoped lang="scss">
|
|
130
|
+
@import '~/assets/scss/common/mixins.scss';
|
|
131
|
+
|
|
132
|
+
:root.dark-theme {
|
|
133
|
+
.diagram__heading {
|
|
134
|
+
fill: #c1cdd4;
|
|
135
|
+
&.is-new {
|
|
136
|
+
fill: var(--diagram-content-text);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
.no-physical-adapters {
|
|
140
|
+
fill: #c1cdd4;
|
|
141
|
+
}
|
|
142
|
+
.text-ellipsis {
|
|
143
|
+
color: #c1cdd4;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.text-ellipsis {
|
|
148
|
+
display: block;
|
|
149
|
+
max-width: 230px;
|
|
150
|
+
text-overflow: ellipsis;
|
|
151
|
+
overflow: hidden;
|
|
152
|
+
white-space: nowrap;
|
|
153
|
+
font-weight: 400;
|
|
154
|
+
font-size: 12px;
|
|
155
|
+
color: #565656;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.virtual-switch__arrow-icon {
|
|
159
|
+
width: 16px;
|
|
160
|
+
height: 16px;
|
|
161
|
+
margin-right: 4px;
|
|
162
|
+
transform: rotate(90deg);
|
|
163
|
+
align-self: center;
|
|
164
|
+
fill: var(--triger-icon-color);
|
|
165
|
+
|
|
166
|
+
&.is-new {
|
|
167
|
+
width: 20px;
|
|
168
|
+
height: 20px;
|
|
169
|
+
fill: none;
|
|
170
|
+
color: var(--diagram-content-second-text);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
&.open:not(.without-adapters) {
|
|
174
|
+
transform: rotate(180deg);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
&.without-adapters {
|
|
178
|
+
color: var(--diagram-content-second-disabled-text);
|
|
179
|
+
fill: none;
|
|
180
|
+
pointer-events: none;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
.diagram__heading {
|
|
184
|
+
@include text($fs: 14px, $fw: 500);
|
|
185
|
+
fill: #565656;
|
|
186
|
+
letter-spacing: normal;
|
|
187
|
+
line-height: 1.2rem;
|
|
188
|
+
|
|
189
|
+
&.is-new {
|
|
190
|
+
line-height: 16.94px;
|
|
191
|
+
fill: var(--diagram-content-text);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
.no-physical-adapters {
|
|
195
|
+
fill: #565656;
|
|
196
|
+
font-size: 13px;
|
|
197
|
+
font-weight: 400;
|
|
198
|
+
line-height: normal;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
:root.is-new-view {
|
|
202
|
+
.text-ellipsis {
|
|
203
|
+
color: var(--diagram-content-text);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
:root.is-new-view.dark-theme {
|
|
208
|
+
.text-ellipsis {
|
|
209
|
+
color: var(--diagram-content-text);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
</style>
|