bfg-common 1.6.86 → 1.6.87

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 (140) hide show
  1. package/assets/localization/local_be.json +158 -3
  2. package/assets/localization/local_en.json +158 -3
  3. package/assets/localization/local_hy.json +158 -3
  4. package/assets/localization/local_kk.json +158 -3
  5. package/assets/localization/local_ru.json +158 -3
  6. package/assets/localization/local_zh.json +158 -3
  7. package/components/common/adapterManager/AdapterManager.vue +473 -473
  8. package/components/common/adapterManager/AdapterManagerOld.vue +498 -498
  9. package/components/common/adapterManager/addAdapterModal/AddAdapterModal.vue +70 -70
  10. package/components/common/adapterManager/addAdapterModal/AddAdapterModalNew.vue +110 -110
  11. package/components/common/adapterManager/addAdapterModal/AddAdapterModalOld.vue +531 -531
  12. package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModal.vue +32 -32
  13. package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalNew.vue +37 -37
  14. package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalOld.vue +73 -73
  15. package/components/common/adapterManager/lib/config/index.ts +19 -19
  16. package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModal.vue +31 -31
  17. package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModalNew.vue +34 -34
  18. package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModalOld.vue +57 -57
  19. package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModal.vue +31 -31
  20. package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModalNew.vue +34 -34
  21. package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModalOld.vue +57 -57
  22. package/components/common/adapterManager/ui/actions/AddAdapterButton.vue +34 -34
  23. package/components/common/adapterManager/ui/actions/RemoveAdapterButton.vue +41 -41
  24. package/components/common/adapterManager/ui/actions/VerticalSeparator.vue +10 -10
  25. package/components/common/adapterManager/ui/actions/bar/BarOld.vue +95 -95
  26. package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButton.vue +28 -28
  27. package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButtonNew.vue +76 -76
  28. package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButtonOld.vue +33 -33
  29. package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButton.vue +28 -28
  30. package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButtonNew.vue +77 -77
  31. package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButtonOld.vue +33 -33
  32. package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapter.vue +24 -24
  33. package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapterNew.vue +18 -18
  34. package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapterOld.vue +38 -38
  35. package/components/common/adapterManager/ui/secondTitle/SecondTitle.vue +31 -31
  36. package/components/common/adapterManager/ui/secondTitle/SecondTitleNew.vue +51 -51
  37. package/components/common/adapterManager/ui/secondTitle/SecondTitleOld.vue +35 -35
  38. package/components/common/adapterManager/ui/table/Table.vue +88 -88
  39. package/components/common/adapterManager/ui/table/TableNew.vue +137 -137
  40. package/components/common/adapterManager/ui/table/TableOld.vue +141 -141
  41. package/components/common/adapterManager/ui/table/adapters/Adapters.vue +44 -44
  42. package/components/common/adapterManager/ui/table/adapters/AdaptersNew.vue +187 -187
  43. package/components/common/adapterManager/ui/table/adapters/AdaptersOld.vue +87 -87
  44. package/components/common/adapterManager/ui/table/header/Header.vue +57 -57
  45. package/components/common/adapterManager/ui/table/header/HeaderNew.vue +81 -81
  46. package/components/common/adapterManager/ui/table/header/HeaderOld.vue +79 -79
  47. package/components/common/adapterManager/ui/table/lib/models/types.ts +1 -1
  48. package/components/common/diagramMain/adapter/Adapter.vue +123 -123
  49. package/components/common/diagramMain/adapter/AdapterItem.vue +438 -438
  50. package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
  51. package/components/common/diagramMain/adapter/Contents.vue +212 -212
  52. package/components/common/diagramMain/adapter/Lines.vue +81 -81
  53. package/components/common/diagramMain/adapter/block/Block.vue +27 -27
  54. package/components/common/diagramMain/adapter/block/BlockNew.vue +58 -58
  55. package/components/common/diagramMain/adapter/block/BlockOld.vue +50 -50
  56. package/components/common/diagramMain/adapter/secondBlock/SecondBlock.vue +27 -27
  57. package/components/common/diagramMain/adapter/secondBlock/SecondBlockNew.vue +60 -60
  58. package/components/common/diagramMain/adapter/secondBlock/SecondBlockOld.vue +51 -51
  59. package/components/common/diagramMain/highlights/Highlights.vue +151 -151
  60. package/components/common/diagramMain/highlights/HighlightsNew.vue +124 -124
  61. package/components/common/diagramMain/highlights/HighlightsOld.vue +107 -107
  62. package/components/common/diagramMain/lib/config/index.ts +81 -81
  63. package/components/common/diagramMain/lib/config/initial.ts +50 -50
  64. package/components/common/diagramMain/lib/config/positions.ts +194 -194
  65. package/components/common/diagramMain/lib/models/enums.ts +44 -44
  66. package/components/common/diagramMain/lib/models/interfaces.ts +760 -760
  67. package/components/common/diagramMain/lib/models/types.ts +21 -21
  68. package/components/common/diagramMain/lib/utils/utils.ts +331 -331
  69. package/components/common/diagramMain/modals/editSettings/lib/models/interfaces.ts +30 -30
  70. package/components/common/diagramMain/modals/editSettings/modal/EditSettingsModal.vue +137 -137
  71. package/components/common/diagramMain/modals/editSettings/modal/EditSettingsModalNew.vue +1 -1
  72. package/components/common/diagramMain/modals/editSettings/tabs/port/portProperties/PortPropertiesOld.vue +1 -0
  73. package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
  74. package/components/common/diagramMain/modals/lib/config/switchModal.ts +245 -245
  75. package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
  76. package/components/common/diagramMain/modals/lib/mappers/mappers.ts +88 -88
  77. package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +541 -541
  78. package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
  79. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +170 -170
  80. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
  81. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/VmkernelAdapterReadyComplete.vue +49 -49
  82. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +19 -19
  83. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +137 -137
  84. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +52 -52
  85. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
  86. package/components/common/diagramMain/modals/remove/RemoveModal.vue +82 -82
  87. package/components/common/diagramMain/modals/remove/RemoveModalNew.vue +157 -157
  88. package/components/common/diagramMain/modals/remove/RemoveModalOld.vue +241 -241
  89. package/components/common/diagramMain/modals/viewSettings/info/Info.vue +57 -57
  90. package/components/common/diagramMain/modals/viewSettings/info/InfoNew.vue +174 -174
  91. package/components/common/diagramMain/modals/viewSettings/info/InfoOld.vue +141 -141
  92. package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettings.vue +45 -45
  93. package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsNew.vue +323 -323
  94. package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsOld.vue +203 -203
  95. package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModal.vue +60 -60
  96. package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModalOld.vue +70 -70
  97. package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/lib/models/interfaces.ts +48 -48
  98. package/components/common/diagramMain/network/Contents.vue +497 -497
  99. package/components/common/diagramMain/network/Lines.vue +107 -107
  100. package/components/common/diagramMain/network/Network.vue +141 -141
  101. package/components/common/diagramMain/network/block/Block.vue +37 -37
  102. package/components/common/diagramMain/network/block/BlockNew.vue +68 -68
  103. package/components/common/diagramMain/network/block/BlockOld.vue +64 -64
  104. package/components/common/diagramMain/network/noNetwork/NoNetwork.vue +12 -12
  105. package/components/common/diagramMain/network/noNetwork/NoNetworkNew.vue +89 -89
  106. package/components/common/diagramMain/network/noNetwork/NoNetworkOld.vue +61 -61
  107. package/components/common/diagramMain/network/secondBlock/SecondBlock.vue +41 -41
  108. package/components/common/diagramMain/network/secondBlock/SecondBlockNew.vue +64 -64
  109. package/components/common/diagramMain/network/secondBlock/SecondBlockOld.vue +60 -60
  110. package/components/common/diagramMain/port/Port.vue +580 -580
  111. package/components/common/diagramMain/port/Ports.vue +47 -47
  112. package/components/common/diagramMain/switch/Switch.vue +180 -180
  113. package/components/common/diagramMain/switch/SwitchSelected.vue +111 -111
  114. package/components/common/monitor/advanced/table/tableOld/TableOld.vue +93 -93
  115. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/lib/config/utils.ts +903 -164
  116. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +12 -12
  117. package/components/common/monitor/advanced/tools/chartOptionsModal/lib/config/index.ts +2 -0
  118. package/components/common/monitor/advanced/tools/chartOptionsModal/lib/utils/checkSubmit.ts +3 -2
  119. package/components/common/monitor/lib/utils/local_be.json +13 -1
  120. package/components/common/monitor/lib/utils/local_en.json +13 -1
  121. package/components/common/monitor/lib/utils/local_hy.json +13 -1
  122. package/components/common/monitor/lib/utils/local_kk.json +13 -1
  123. package/components/common/monitor/lib/utils/local_ru.json +13 -1
  124. package/components/common/monitor/lib/utils/local_zh.json +13 -1
  125. package/components/common/monitor/utilization/lib/models/enums.ts +4 -4
  126. package/components/common/pages/backups/lib/models/interfaces.ts +1 -0
  127. package/components/common/pages/backups/modals/Modals.vue +1 -0
  128. package/components/common/pages/backups/modals/lib/config/restore.ts +1 -0
  129. package/components/common/pages/backups/modals/lib/models/interfaces.ts +1 -0
  130. package/components/common/pages/backups/modals/restore/Restore.vue +4 -2
  131. package/components/common/wizards/network/add/Add.vue +0 -1
  132. package/package.json +1 -1
  133. package/components/common/configure/vmkernelAdapters/VmkernelAdapters.vue +0 -254
  134. package/components/common/configure/vmkernelAdapters/tableView/TableView.vue +0 -427
  135. package/components/common/configure/vmkernelAdapters/tableView/lib/config/settings.ts +0 -300
  136. package/components/common/configure/vmkernelAdapters/tableView/lib/config/tableKeys.ts +0 -12
  137. package/components/common/configure/vmkernelAdapters/tableView/lib/config/vmKernelAdaptersTableConfig.ts +0 -166
  138. package/components/common/configure/vmkernelAdapters/tableView/lib/models/interfaces.ts +0 -9
  139. package/components/common/configure/vmkernelAdapters/tableView/lib/models/types.ts +0 -9
  140. package/components/common/configure/vmkernelAdapters/tableView/mappers/mappers.ts +0 -27
@@ -1,47 +1,47 @@
1
- <template>
2
- <g>
3
- <template v-if="props.network.toggle">
4
- <template v-for="port in props.network.ports" :key="port.id">
5
- <common-diagram-main-port
6
- :network="props.network"
7
- :port="port"
8
- :is-dark-mode="props.isDarkMode"
9
- :selected-port="props.selectedPort"
10
- :selected-adapter="props.selectedAdapter"
11
- @select-port="onSelectPort"
12
- @show-modal="onShowModal"
13
- />
14
- </template>
15
- </template>
16
- </g>
17
- </template>
18
-
19
- <script setup lang="ts">
20
- import type {
21
- UI_I_ModalsInitialData,
22
- UI_I_NetworkFullWithPositions,
23
- UI_I_SelectedAdapter,
24
- UI_I_SelectedPort,
25
- } from '~/components/common/diagramMain/lib/models/interfaces'
26
-
27
- const props = defineProps<{
28
- network: UI_I_NetworkFullWithPositions
29
- selectedPort: UI_I_SelectedPort
30
- selectedAdapter: UI_I_SelectedAdapter
31
- isDarkMode: boolean
32
- }>()
33
-
34
- const emits = defineEmits<{
35
- (event: 'select-port', networkId: string, portId: string): void
36
- (
37
- event: 'show-modal',
38
- value: string,
39
- properties?: UI_I_ModalsInitialData
40
- ): void
41
- }>()
42
-
43
- const onSelectPort = (networkId: string, portId: string) =>
44
- emits('select-port', networkId, portId)
45
- const onShowModal = (value: string, properties?: UI_I_ModalsInitialData) =>
46
- emits('show-modal', value, properties)
47
- </script>
1
+ <template>
2
+ <g>
3
+ <template v-if="props.network.toggle">
4
+ <template v-for="port in props.network.ports" :key="port.id">
5
+ <common-diagram-main-port
6
+ :network="props.network"
7
+ :port="port"
8
+ :is-dark-mode="props.isDarkMode"
9
+ :selected-port="props.selectedPort"
10
+ :selected-adapter="props.selectedAdapter"
11
+ @select-port="onSelectPort"
12
+ @show-modal="onShowModal"
13
+ />
14
+ </template>
15
+ </template>
16
+ </g>
17
+ </template>
18
+
19
+ <script setup lang="ts">
20
+ import type {
21
+ UI_I_ModalsInitialData,
22
+ UI_I_NetworkFullWithPositions,
23
+ UI_I_SelectedAdapter,
24
+ UI_I_SelectedPort,
25
+ } from '~/components/common/diagramMain/lib/models/interfaces'
26
+
27
+ const props = defineProps<{
28
+ network: UI_I_NetworkFullWithPositions
29
+ selectedPort: UI_I_SelectedPort
30
+ selectedAdapter: UI_I_SelectedAdapter
31
+ isDarkMode: boolean
32
+ }>()
33
+
34
+ const emits = defineEmits<{
35
+ (event: 'select-port', networkId: string, portId: string): void
36
+ (
37
+ event: 'show-modal',
38
+ value: string,
39
+ properties?: UI_I_ModalsInitialData
40
+ ): void
41
+ }>()
42
+
43
+ const onSelectPort = (networkId: string, portId: string) =>
44
+ emits('select-port', networkId, portId)
45
+ const onShowModal = (value: string, properties?: UI_I_ModalsInitialData) =>
46
+ emits('show-modal', value, properties)
47
+ </script>
@@ -1,180 +1,180 @@
1
- <template>
2
- <g>
3
- <rect
4
- :width="positions.rw"
5
- :height="props.mainRectHeight"
6
- :x="positions.rx"
7
- :y="UI_E_PositionsY.DIAGRAM_TOP"
8
- :rx="positions.radius"
9
- :ry="positions.radius"
10
- shape-rendering="geometricprecision"
11
- class="central-panel"
12
- />
13
- <g
14
- v-if="props.isVisibleLine && !!props.networksCount"
15
- data-title="switch-main-lines"
16
- >
17
- <g v-if="isNewView">
18
- <path :d="d1" class="connection-line" />
19
- <path :d="d2" class="connection-line" />
20
- </g>
21
- <line
22
- v-else
23
- :x1="positions.lx"
24
- :y1="props.mainSwitchLine.y1"
25
- :x2="positions.lx"
26
- :y2="props.mainSwitchLine.y2"
27
- shape-rendering="geometricprecision"
28
- class="connection-line"
29
- />
30
- <common-diagram-main-highlights
31
- data-title="switch-selected-main-line"
32
- type="line-vertical-orange"
33
- :d1="d1"
34
- :d2="d2"
35
- :x="positions.lx"
36
- :y="props.mainSwitchLine.y1"
37
- :x2="positions.lx"
38
- :y2="props.mainSwitchLine.y2"
39
- :hide="!props.selectedMainLine"
40
- />
41
- <g v-if="isNewView">
42
- <path :d="d1" class="invisible-line main-line__handler" />
43
- <path :d="d2" class="invisible-line main-line__handler" />
44
- </g>
45
- <line
46
- v-else
47
- :x1="positions.lx"
48
- :y1="props.mainSwitchLine.y1"
49
- :x2="positions.lx"
50
- :y2="props.mainSwitchLine.y2"
51
- shape-rendering="geometricprecision"
52
- class="invisible-line main-line__handler"
53
- />
54
- </g>
55
- </g>
56
- </template>
57
-
58
- <script setup lang="ts">
59
- import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
60
- import type {
61
- UI_I_SwitchLine,
62
- UI_I_NetworksWithPositions,
63
- UI_I_FirstAndLastNetworkLinesY,
64
- } from '~/components/common/diagramMain/lib/models/interfaces'
65
- import { UI_E_PositionsY } from '~/components/common/diagramMain/lib/models/enums'
66
- import { switchPositionsFunc } from '~/components/common/diagramMain/lib/config'
67
-
68
- const props = defineProps<{
69
- mainRectHeight: number
70
- mainSwitchLine: UI_I_SwitchLine
71
- selectedMainLine: boolean
72
- isVisibleLine: boolean
73
- networksCount: number
74
- firstAndLastNetworkLinesY: UI_I_FirstAndLastNetworkLinesY
75
- adapterLineY: number
76
- networksWithPositions: UI_I_NetworksWithPositions[]
77
- }>()
78
-
79
- const { $store }: any = useNuxtApp()
80
-
81
- const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
82
-
83
- const positions = computed<UI_I_ArbitraryObject<number>>(() =>
84
- switchPositionsFunc(isNewView.value)
85
- )
86
-
87
- const height = computed<number>(() =>
88
- Math.abs(
89
- Math.abs(props.mainSwitchLine.y1) - Math.abs(props.mainSwitchLine.y2)
90
- )
91
- )
92
-
93
- const difference1 = computed<number>(() =>
94
- Math.abs(props.firstAndLastNetworkLinesY.lastNetworkY - props.adapterLineY)
95
- )
96
-
97
- const difference2 = computed<number>(() =>
98
- Math.abs(props.adapterLineY - props.firstAndLastNetworkLinesY.firstNetworkY)
99
- )
100
-
101
- const radius1 = computed<number>(() =>
102
- difference1.value < 4 ? difference1.value / 2 : 2
103
- )
104
- const radius2 = computed<number>(() =>
105
- difference2.value < 4 ? difference2.value / 2 : 2
106
- )
107
- const radius = computed<number>(() =>
108
- firstLineIsNetwork.value ? radius2.value : radius1.value
109
- )
110
-
111
- const firstLineIsNetwork = computed<boolean>(
112
- () => props.firstAndLastNetworkLinesY.firstNetworkY < props.adapterLineY
113
- )
114
-
115
- const isNetworkHigherThenAdapter = computed<boolean>(
116
- () =>
117
- props.firstAndLastNetworkLinesY.firstNetworkY ===
118
- props.firstAndLastNetworkLinesY.lastNetworkY && firstLineIsNetwork.value
119
- )
120
-
121
- const d1 = computed<string>(
122
- () =>
123
- `M ${positions.value.lx} ${props.mainSwitchLine.y2 - radius.value} l 0 -${
124
- height.value - 2 * radius.value
125
- } q 0,-${radius.value} ${firstLineIsNetwork.value ? '-2' : '2'},-${
126
- radius.value
127
- }`
128
- )
129
-
130
- const d2 = computed<string>(
131
- () =>
132
- `M ${positions.value.lx} ${props.mainSwitchLine.y1 + radius1.value} l 0 ${
133
- height.value - 2 * radius1.value
134
- } q 0,${radius1.value} ${isNetworkHigherThenAdapter.value ? '2' : '-2'},${
135
- radius1.value
136
- }`
137
- )
138
- </script>
139
-
140
- <style scoped lang="scss">
141
- :root.dark-theme {
142
- .central-panel {
143
- fill: #314351;
144
- stroke: #adbbc4;
145
- }
146
-
147
- .connection-line {
148
- stroke: #adbbc4;
149
- fill: none;
150
- }
151
- }
152
-
153
- :root.is-new-view {
154
- .connection-line {
155
- stroke: var(--diagram-connect-line);
156
- }
157
-
158
- .central-panel {
159
- fill: var(--diagram-central-panel-bg);
160
- stroke: var(--diagram-block-stroke);
161
- }
162
- }
163
-
164
- .central-panel {
165
- fill: #f2f2f2;
166
- stroke: #888;
167
- }
168
-
169
- .invisible-line {
170
- cursor: pointer;
171
- stroke: #000;
172
- stroke-opacity: 0;
173
- stroke-width: 10px;
174
- fill: none;
175
- }
176
- .connection-line {
177
- stroke: #888;
178
- fill: none;
179
- }
180
- </style>
1
+ <template>
2
+ <g>
3
+ <rect
4
+ :width="positions.rw"
5
+ :height="props.mainRectHeight"
6
+ :x="positions.rx"
7
+ :y="UI_E_PositionsY.DIAGRAM_TOP"
8
+ :rx="positions.radius"
9
+ :ry="positions.radius"
10
+ shape-rendering="geometricprecision"
11
+ class="central-panel"
12
+ />
13
+ <g
14
+ v-if="props.isVisibleLine && !!props.networksCount"
15
+ data-title="switch-main-lines"
16
+ >
17
+ <g v-if="isNewView">
18
+ <path :d="d1" class="connection-line" />
19
+ <path :d="d2" class="connection-line" />
20
+ </g>
21
+ <line
22
+ v-else
23
+ :x1="positions.lx"
24
+ :y1="props.mainSwitchLine.y1"
25
+ :x2="positions.lx"
26
+ :y2="props.mainSwitchLine.y2"
27
+ shape-rendering="geometricprecision"
28
+ class="connection-line"
29
+ />
30
+ <common-diagram-main-highlights
31
+ data-title="switch-selected-main-line"
32
+ type="line-vertical-orange"
33
+ :d1="d1"
34
+ :d2="d2"
35
+ :x="positions.lx"
36
+ :y="props.mainSwitchLine.y1"
37
+ :x2="positions.lx"
38
+ :y2="props.mainSwitchLine.y2"
39
+ :hide="!props.selectedMainLine"
40
+ />
41
+ <g v-if="isNewView">
42
+ <path :d="d1" class="invisible-line main-line__handler" />
43
+ <path :d="d2" class="invisible-line main-line__handler" />
44
+ </g>
45
+ <line
46
+ v-else
47
+ :x1="positions.lx"
48
+ :y1="props.mainSwitchLine.y1"
49
+ :x2="positions.lx"
50
+ :y2="props.mainSwitchLine.y2"
51
+ shape-rendering="geometricprecision"
52
+ class="invisible-line main-line__handler"
53
+ />
54
+ </g>
55
+ </g>
56
+ </template>
57
+
58
+ <script setup lang="ts">
59
+ import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
60
+ import type {
61
+ UI_I_SwitchLine,
62
+ UI_I_NetworksWithPositions,
63
+ UI_I_FirstAndLastNetworkLinesY,
64
+ } from '~/components/common/diagramMain/lib/models/interfaces'
65
+ import { UI_E_PositionsY } from '~/components/common/diagramMain/lib/models/enums'
66
+ import { switchPositionsFunc } from '~/components/common/diagramMain/lib/config'
67
+
68
+ const props = defineProps<{
69
+ mainRectHeight: number
70
+ mainSwitchLine: UI_I_SwitchLine
71
+ selectedMainLine: boolean
72
+ isVisibleLine: boolean
73
+ networksCount: number
74
+ firstAndLastNetworkLinesY: UI_I_FirstAndLastNetworkLinesY
75
+ adapterLineY: number
76
+ networksWithPositions: UI_I_NetworksWithPositions[]
77
+ }>()
78
+
79
+ const { $store }: any = useNuxtApp()
80
+
81
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
82
+
83
+ const positions = computed<UI_I_ArbitraryObject<number>>(() =>
84
+ switchPositionsFunc(isNewView.value)
85
+ )
86
+
87
+ const height = computed<number>(() =>
88
+ Math.abs(
89
+ Math.abs(props.mainSwitchLine.y1) - Math.abs(props.mainSwitchLine.y2)
90
+ )
91
+ )
92
+
93
+ const difference1 = computed<number>(() =>
94
+ Math.abs(props.firstAndLastNetworkLinesY.lastNetworkY - props.adapterLineY)
95
+ )
96
+
97
+ const difference2 = computed<number>(() =>
98
+ Math.abs(props.adapterLineY - props.firstAndLastNetworkLinesY.firstNetworkY)
99
+ )
100
+
101
+ const radius1 = computed<number>(() =>
102
+ difference1.value < 4 ? difference1.value / 2 : 2
103
+ )
104
+ const radius2 = computed<number>(() =>
105
+ difference2.value < 4 ? difference2.value / 2 : 2
106
+ )
107
+ const radius = computed<number>(() =>
108
+ firstLineIsNetwork.value ? radius2.value : radius1.value
109
+ )
110
+
111
+ const firstLineIsNetwork = computed<boolean>(
112
+ () => props.firstAndLastNetworkLinesY.firstNetworkY < props.adapterLineY
113
+ )
114
+
115
+ const isNetworkHigherThenAdapter = computed<boolean>(
116
+ () =>
117
+ props.firstAndLastNetworkLinesY.firstNetworkY ===
118
+ props.firstAndLastNetworkLinesY.lastNetworkY && firstLineIsNetwork.value
119
+ )
120
+
121
+ const d1 = computed<string>(
122
+ () =>
123
+ `M ${positions.value.lx} ${props.mainSwitchLine.y2 - radius.value} l 0 -${
124
+ height.value - 2 * radius.value
125
+ } q 0,-${radius.value} ${firstLineIsNetwork.value ? '-2' : '2'},-${
126
+ radius.value
127
+ }`
128
+ )
129
+
130
+ const d2 = computed<string>(
131
+ () =>
132
+ `M ${positions.value.lx} ${props.mainSwitchLine.y1 + radius1.value} l 0 ${
133
+ height.value - 2 * radius1.value
134
+ } q 0,${radius1.value} ${isNetworkHigherThenAdapter.value ? '2' : '-2'},${
135
+ radius1.value
136
+ }`
137
+ )
138
+ </script>
139
+
140
+ <style scoped lang="scss">
141
+ :root.dark-theme {
142
+ .central-panel {
143
+ fill: #314351;
144
+ stroke: #adbbc4;
145
+ }
146
+
147
+ .connection-line {
148
+ stroke: #adbbc4;
149
+ fill: none;
150
+ }
151
+ }
152
+
153
+ :root.is-new-view {
154
+ .connection-line {
155
+ stroke: var(--diagram-connect-line);
156
+ }
157
+
158
+ .central-panel {
159
+ fill: var(--diagram-central-panel-bg);
160
+ stroke: var(--diagram-block-stroke);
161
+ }
162
+ }
163
+
164
+ .central-panel {
165
+ fill: #f2f2f2;
166
+ stroke: #888;
167
+ }
168
+
169
+ .invisible-line {
170
+ cursor: pointer;
171
+ stroke: #000;
172
+ stroke-opacity: 0;
173
+ stroke-width: 10px;
174
+ fill: none;
175
+ }
176
+ .connection-line {
177
+ stroke: #888;
178
+ fill: none;
179
+ }
180
+ </style>
@@ -1,111 +1,111 @@
1
- <template>
2
- <g v-if="props.isVisibleLine">
3
- <g v-if="isNewView && inNetworkLinesY.length > 0">
4
- <path :d="d1" class="selection-line" />
5
- <path :d="d2" class="selection-line" />
6
- </g>
7
- <line
8
- v-if="!isNewView"
9
- x1="362.5"
10
- :y1="props.selectedSwitchLineY.y1"
11
- x2="362.5"
12
- :y2="props.selectedSwitchLineY.y2"
13
- shape-rendering="geometricprecision"
14
- stroke-width="2"
15
- class="selection-line"
16
- />
17
- </g>
18
- </template>
19
-
20
- <script setup lang="ts">
21
- import type { UI_I_SwitchLine } from '~/components/common/diagramMain/lib/models/interfaces'
22
-
23
- const props = defineProps<{
24
- selectedSwitchLineY: UI_I_SwitchLine
25
- isVisibleLine: boolean
26
- adaptersPositionsY: number[]
27
- adapterLineY: number
28
- isHighlightedAdapterLine: boolean
29
- inNetworkLinesY: number[]
30
- }>()
31
-
32
- const { $store }: any = useNuxtApp()
33
-
34
- const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
35
-
36
- const firstAdapterY = computed<number>(() =>
37
- props.isHighlightedAdapterLine
38
- ? props.adapterLineY
39
- : props.adaptersPositionsY[0] + 7.5
40
- )
41
- const lastAdapterY = computed<number>(() =>
42
- props.isHighlightedAdapterLine
43
- ? props.adapterLineY
44
- : props.adaptersPositionsY[props.adaptersPositionsY.length - 1] + 7.5
45
- )
46
-
47
- const height = computed<number>(() =>
48
- Math.abs(
49
- Math.abs(props.selectedSwitchLineY.y1) -
50
- Math.abs(props.selectedSwitchLineY.y2)
51
- )
52
- )
53
-
54
- const firstLineIsNetwork = computed<boolean>(
55
- () => props.selectedSwitchLineY.y1 < firstAdapterY.value
56
- )
57
-
58
- const isNetworkHigherThenAdapter = computed<boolean>(
59
- () =>
60
- props.inNetworkLinesY[props.inNetworkLinesY.length - 1] < lastAdapterY.value
61
- )
62
-
63
- const difference1 = computed<number>(() =>
64
- Math.abs(
65
- props.inNetworkLinesY[props.inNetworkLinesY.length - 1] -
66
- firstAdapterY.value
67
- )
68
- )
69
-
70
- const difference2 = computed<number>(() =>
71
- Math.abs(lastAdapterY.value - props.inNetworkLinesY[0])
72
- )
73
-
74
- const radius1 = computed<number>(() => (difference1.value < 4 ? difference1.value / 2 : 2))
75
- const radius2 = computed<number>(() => (difference2.value < 4 ? difference2.value / 2 : 2))
76
-
77
- const d1 = computed<string>(
78
- () =>
79
- `M 362.5 ${props.selectedSwitchLineY.y2 - radius1.value} l 0 -${
80
- height.value - 2 * radius1.value
81
- } q 0,-${radius1.value} ${firstLineIsNetwork.value ? '-2' : '2'},-${radius1.value}`
82
- )
83
-
84
- const d2 = computed<string>(
85
- () =>
86
- `M 362.5 ${props.selectedSwitchLineY.y1 + radius2.value} l 0 ${
87
- height.value - 2 * radius2.value
88
- } q 0,${radius2.value} ${isNetworkHigherThenAdapter.value ? '2' : '-2'},${
89
- radius2.value
90
- }`
91
- )
92
- </script>
93
-
94
- <style scoped lang="scss">
95
- :root.dark-theme {
96
- .selection-line {
97
- stroke: #fdd006;
98
- }
99
- }
100
- :root.is-new-view {
101
- .selection-line {
102
- stroke: var(--diagram-highlight-line);
103
- fill: none;
104
- stroke-width: 1.5px;
105
- }
106
- }
107
-
108
- .selection-line {
109
- stroke: #f3bb00;
110
- }
111
- </style>
1
+ <template>
2
+ <g v-if="props.isVisibleLine">
3
+ <g v-if="isNewView && inNetworkLinesY.length > 0">
4
+ <path :d="d1" class="selection-line" />
5
+ <path :d="d2" class="selection-line" />
6
+ </g>
7
+ <line
8
+ v-if="!isNewView"
9
+ x1="362.5"
10
+ :y1="props.selectedSwitchLineY.y1"
11
+ x2="362.5"
12
+ :y2="props.selectedSwitchLineY.y2"
13
+ shape-rendering="geometricprecision"
14
+ stroke-width="2"
15
+ class="selection-line"
16
+ />
17
+ </g>
18
+ </template>
19
+
20
+ <script setup lang="ts">
21
+ import type { UI_I_SwitchLine } from '~/components/common/diagramMain/lib/models/interfaces'
22
+
23
+ const props = defineProps<{
24
+ selectedSwitchLineY: UI_I_SwitchLine
25
+ isVisibleLine: boolean
26
+ adaptersPositionsY: number[]
27
+ adapterLineY: number
28
+ isHighlightedAdapterLine: boolean
29
+ inNetworkLinesY: number[]
30
+ }>()
31
+
32
+ const { $store }: any = useNuxtApp()
33
+
34
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
35
+
36
+ const firstAdapterY = computed<number>(() =>
37
+ props.isHighlightedAdapterLine
38
+ ? props.adapterLineY
39
+ : props.adaptersPositionsY[0] + 7.5
40
+ )
41
+ const lastAdapterY = computed<number>(() =>
42
+ props.isHighlightedAdapterLine
43
+ ? props.adapterLineY
44
+ : props.adaptersPositionsY[props.adaptersPositionsY.length - 1] + 7.5
45
+ )
46
+
47
+ const height = computed<number>(() =>
48
+ Math.abs(
49
+ Math.abs(props.selectedSwitchLineY.y1) -
50
+ Math.abs(props.selectedSwitchLineY.y2)
51
+ )
52
+ )
53
+
54
+ const firstLineIsNetwork = computed<boolean>(
55
+ () => props.selectedSwitchLineY.y1 < firstAdapterY.value
56
+ )
57
+
58
+ const isNetworkHigherThenAdapter = computed<boolean>(
59
+ () =>
60
+ props.inNetworkLinesY[props.inNetworkLinesY.length - 1] < lastAdapterY.value
61
+ )
62
+
63
+ const difference1 = computed<number>(() =>
64
+ Math.abs(
65
+ props.inNetworkLinesY[props.inNetworkLinesY.length - 1] -
66
+ firstAdapterY.value
67
+ )
68
+ )
69
+
70
+ const difference2 = computed<number>(() =>
71
+ Math.abs(lastAdapterY.value - props.inNetworkLinesY[0])
72
+ )
73
+
74
+ const radius1 = computed<number>(() => (difference1.value < 4 ? difference1.value / 2 : 2))
75
+ const radius2 = computed<number>(() => (difference2.value < 4 ? difference2.value / 2 : 2))
76
+
77
+ const d1 = computed<string>(
78
+ () =>
79
+ `M 362.5 ${props.selectedSwitchLineY.y2 - radius1.value} l 0 -${
80
+ height.value - 2 * radius1.value
81
+ } q 0,-${radius1.value} ${firstLineIsNetwork.value ? '-2' : '2'},-${radius1.value}`
82
+ )
83
+
84
+ const d2 = computed<string>(
85
+ () =>
86
+ `M 362.5 ${props.selectedSwitchLineY.y1 + radius2.value} l 0 ${
87
+ height.value - 2 * radius2.value
88
+ } q 0,${radius2.value} ${isNetworkHigherThenAdapter.value ? '2' : '-2'},${
89
+ radius2.value
90
+ }`
91
+ )
92
+ </script>
93
+
94
+ <style scoped lang="scss">
95
+ :root.dark-theme {
96
+ .selection-line {
97
+ stroke: #fdd006;
98
+ }
99
+ }
100
+ :root.is-new-view {
101
+ .selection-line {
102
+ stroke: var(--diagram-highlight-line);
103
+ fill: none;
104
+ stroke-width: 1.5px;
105
+ }
106
+ }
107
+
108
+ .selection-line {
109
+ stroke: #f3bb00;
110
+ }
111
+ </style>