bfg-common 1.6.78 → 1.6.80

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 (34) hide show
  1. package/assets/localization/local_be.json +21 -7
  2. package/assets/localization/local_en.json +21 -7
  3. package/assets/localization/local_hy.json +21 -7
  4. package/assets/localization/local_kk.json +21 -7
  5. package/assets/localization/local_ru.json +21 -7
  6. package/assets/localization/local_zh.json +21 -7
  7. package/components/common/adapterManager/AdapterManagerNew.vue +1 -0
  8. package/components/common/certificate/Certificate.vue +16 -6
  9. package/components/common/certificate/Info/Info.vue +61 -0
  10. package/components/common/certificate/{CertificateInfo.vue → Info/Old.vue} +6 -34
  11. package/components/common/certificate/Info/new/New.vue +285 -0
  12. package/components/common/certificate/Info/new/lib/config/index.ts +59 -0
  13. package/components/common/certificate/Info/new/lib/models/interfaces.ts +3 -0
  14. package/components/common/certificate/Info/new/lib/utils/index.ts +10 -0
  15. package/components/common/certificate/Old.vue +27 -0
  16. package/components/common/certificate/new/New.vue +30 -0
  17. package/components/common/certificate/new/Skeleton.vue +155 -0
  18. package/components/common/certificate/tools/New.vue +48 -0
  19. package/components/common/certificate/tools/Old.vue +39 -0
  20. package/components/common/certificate/{Tools.vue → tools/Tools.vue} +18 -23
  21. package/components/common/certificate/tools/lib/config/tabsPannel.ts +20 -0
  22. package/components/common/configure/physicalAdapters/tableView/lib/config/settings.ts +29 -29
  23. package/components/common/diagramMain/modals/Modals.vue +479 -483
  24. package/components/common/diagramMain/modals/lib/config/adapterModal.ts +147 -147
  25. package/components/common/diagramMain/modals/lib/config/networkModal.ts +405 -405
  26. package/components/common/diagramMain/modals/lib/config/portModal.ts +253 -253
  27. package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
  28. package/components/common/diagramMain/modals/managePhysicalAdapters/ManagePhysicalAdapters.vue +164 -0
  29. package/components/common/diagramMain/modals/managePhysicalAdapters/ManagePhysicalAdaptersNew.vue +306 -0
  30. package/components/common/diagramMain/modals/{ManagePhysicalAdaptersModal.vue → managePhysicalAdapters/ManagePhysicalAdaptersOld.vue} +245 -331
  31. package/components/common/diagramMain/modals/remove/RemoveModalNew.vue +157 -106
  32. package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModalNew.vue +58 -50
  33. package/package.json +2 -2
  34. package/components/common/certificate/lib/config/tabsPannel.ts +0 -22
@@ -0,0 +1,164 @@
1
+ <template>
2
+ <div>
3
+ <component
4
+ :is="currentComponent"
5
+ :switch-name="props.switchName"
6
+ :is-dark-mode="props.isDarkMode"
7
+ :adapters="props.adapters"
8
+ :free-adapters="props.freeAdapters"
9
+ :added-adapters="addedAdapters"
10
+ :adapter-status="props.adapterStatus"
11
+ :is-show-no-connected-active-adapters-modal="
12
+ isShowNoConnectedActiveAdaptersModal
13
+ "
14
+ :is-show-no-active-adapters-modal="isShowNoActiveAdaptersModal"
15
+ :is-manage-adapters-modal-loading="props.isManageAdaptersModalLoading"
16
+ @get-free-adapters="onGetFreeAdapters"
17
+ @change-added-adapters="onChangeAddedAdapters"
18
+ @change-adapter-status="onChangeAdapterStatus"
19
+ @hide-no-connected-active-adapters-modal="
20
+ onHideNoConnectedActiveAdaptersModal
21
+ "
22
+ @hide-no-active-adapters-modal="onHideNoActiveAdaptersModal"
23
+ @confirm-no-active-adapters-modal="onConfirmNoActiveAdaptersModal"
24
+ @send-manage-adapter="onSendManageAdapter"
25
+ @hide="onHideManagePhysicalAdaptersModal"
26
+ />
27
+ </div>
28
+ </template>
29
+
30
+ <script setup lang="ts">
31
+ import type { UI_I_ItemsWithTotalCounts } from '~/lib/models/interfaces'
32
+ import type {
33
+ UI_I_Adapter,
34
+ UI_I_AdapterStatus,
35
+ UI_I_SwitchAdapterItem,
36
+ } from '~/components/common/diagramMain/lib/models/interfaces'
37
+
38
+ const props = withDefaults(
39
+ defineProps<{
40
+ switchName?: string
41
+ freeAdapters: UI_I_Adapter[]
42
+ adapterStatus?: UI_I_AdapterStatus
43
+ adapters: UI_I_ItemsWithTotalCounts<UI_I_SwitchAdapterItem>
44
+ initialAdapterStatus: UI_I_AdapterStatus
45
+ isDarkMode?: boolean
46
+ isManageAdaptersModalLoading?: boolean
47
+ }>(),
48
+ {
49
+ switchName: '',
50
+ adapterStatus: () => ({
51
+ active: [],
52
+ standby: [],
53
+ unused: [],
54
+ }),
55
+ isDarkMode: false,
56
+ isManageAdaptersModalLoading: false,
57
+ }
58
+ )
59
+
60
+ const emits = defineEmits<{
61
+ (event: 'hide'): void
62
+ (event: 'get-free-adapters', showModal: () => void): void
63
+ (event: 'change-adapter-status', adapterStatus: UI_I_AdapterStatus): void
64
+ (
65
+ event: 'send-manage-physical-adapters-data',
66
+ adapterStatus: UI_I_AdapterStatus,
67
+ switchName: string,
68
+ hideModal: () => void
69
+ ): void
70
+ }>()
71
+
72
+ const { $store }: any = useNuxtApp()
73
+
74
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
75
+
76
+ const currentComponent = computed(() =>
77
+ isNewView.value
78
+ ? defineAsyncComponent(() => import('./ManagePhysicalAdaptersNew.vue'))
79
+ : defineAsyncComponent(() => import('./ManagePhysicalAdaptersOld.vue'))
80
+ )
81
+
82
+ const addedAdapters = ref<string[]>([])
83
+
84
+ const onChangeAddedAdapters = (addedAdaptersNew: string[]) => {
85
+ addedAdapters.value = addedAdaptersNew
86
+ }
87
+
88
+ const onChangeAdapterStatus = (adapterStatusNew: UI_I_AdapterStatus) => {
89
+ emits('change-adapter-status', adapterStatusNew)
90
+ }
91
+
92
+ const isShowNoConnectedActiveAdaptersModal = ref(false)
93
+ const isShowNoActiveAdaptersModal = ref(false)
94
+
95
+ const showNoConnectedActiveAdaptersModal = () => {
96
+ isShowNoConnectedActiveAdaptersModal.value = true
97
+ }
98
+ const onHideNoConnectedActiveAdaptersModal = () => {
99
+ isShowNoConnectedActiveAdaptersModal.value = false
100
+ }
101
+ const showNoActiveAdaptersModal = () => {
102
+ isShowNoActiveAdaptersModal.value = true
103
+ }
104
+ const onHideNoActiveAdaptersModal = () => {
105
+ isShowNoActiveAdaptersModal.value = false
106
+ }
107
+
108
+ const onSendManagePhysicalAdaptersData = (
109
+ adapterStatus: UI_I_AdapterStatus,
110
+ switchName: string,
111
+ hideModal: () => void
112
+ ) => {
113
+ emits(
114
+ 'send-manage-physical-adapters-data',
115
+ adapterStatus,
116
+ switchName,
117
+ hideModal
118
+ )
119
+ }
120
+
121
+ const onConfirmNoActiveAdaptersModal = () => {
122
+ onSendManagePhysicalAdaptersData(
123
+ props.adapterStatus,
124
+ props.switchName,
125
+ onHideManagePhysicalAdaptersModal
126
+ )
127
+ onHideNoConnectedActiveAdaptersModal()
128
+ onHideNoActiveAdaptersModal()
129
+ }
130
+
131
+ const onSendManageAdapter = () => {
132
+ if (props.adapterStatus.active.length === 0) {
133
+ showNoActiveAdaptersModal()
134
+ return
135
+ }
136
+
137
+ const activeAndConnectedAdapters = props.adapterStatus.active.filter(
138
+ (adapterName: string) =>
139
+ props.adapters.items.find(
140
+ (ad: UI_I_SwitchAdapterItem) => ad.name === adapterName
141
+ )?.carrier
142
+ )
143
+ if (activeAndConnectedAdapters.length === 0) {
144
+ showNoConnectedActiveAdaptersModal()
145
+ return
146
+ }
147
+
148
+ onSendManagePhysicalAdaptersData(
149
+ props.adapterStatus,
150
+ props.switchName,
151
+ onHideManagePhysicalAdaptersModal
152
+ )
153
+ }
154
+
155
+ const onGetFreeAdapters = (showModal: () => void) => {
156
+ emits('get-free-adapters', showModal)
157
+ }
158
+
159
+ const onHideManagePhysicalAdaptersModal = (): void => {
160
+ addedAdapters.value = []
161
+ emits('change-adapter-status', props.initialAdapterStatus)
162
+ emits('hide')
163
+ }
164
+ </script>
@@ -0,0 +1,306 @@
1
+ <template>
2
+ <div class="manage-physical-adapters">
3
+ <ui-modal
4
+ :texts="modalTextsLocal"
5
+ :title="localization.common.managePhysicalNetworkAdapters"
6
+ :subtitle="props.switchName"
7
+ test-id="manage-physical-adapters-modal"
8
+ width="880px"
9
+ size="md"
10
+ :is-loading="props.isManageAdaptersModalLoading"
11
+ @hide="emits('hide')"
12
+ @submit="emits('send-manage-adapter')"
13
+ >
14
+ <template #content>
15
+ <div class="modal-content">
16
+ <common-adapter-manager
17
+ :adapters="props.adapters"
18
+ :free-adapters="props.freeAdapters"
19
+ :added-adapters="props.addedAdapters"
20
+ :adapter-status="props.adapterStatus"
21
+ :is-dark-mode="props.isDarkMode"
22
+ test-id="manage-physical-adapter"
23
+ :is-active="true"
24
+ :full-mode="true"
25
+ :is-show-no-connected-active-adapters-modal="
26
+ props.isShowNoConnectedActiveAdaptersModal
27
+ "
28
+ :is-show-no-active-adapters-modal="
29
+ props.isShowNoActiveAdaptersModal
30
+ "
31
+ @hide-no-connected-active-adapters-modal="
32
+ emits('hide-no-connected-active-adapters-modal')
33
+ "
34
+ @hide-no-active-adapters-modal="
35
+ emits('hide-no-active-adapters-modal')
36
+ "
37
+ @submit-from-modal="emits('confirm-no-active-adapters-modal')"
38
+ @change-added-adapters="onChangeAddedAdapters"
39
+ @change-adapter-status="onChangeAdapterStatus"
40
+ @get-free-adapters="onGetFreeAdapters"
41
+ />
42
+ </div>
43
+ </template>
44
+ <template #footerLeftContent><span></span></template>
45
+ </ui-modal>
46
+ </div>
47
+ </template>
48
+
49
+ <script setup lang="ts">
50
+ import type { UI_I_ModalTexts } from '~/node_modules/bfg-uikit/components/ui/modal/models/interfaces'
51
+ import type {
52
+ UI_I_Localization,
53
+ UI_I_ItemsWithTotalCounts,
54
+ } from '~/lib/models/interfaces'
55
+ import type {
56
+ UI_I_Adapter,
57
+ UI_I_AdapterStatus,
58
+ UI_I_SwitchAdapterItem,
59
+ } from '~/components/common/diagramMain/lib/models/interfaces'
60
+
61
+ const props = defineProps<{
62
+ switchName: string
63
+ freeAdapters: UI_I_Adapter[]
64
+ adapterStatus: UI_I_AdapterStatus
65
+ adapters: UI_I_ItemsWithTotalCounts<UI_I_SwitchAdapterItem>
66
+ addedAdapters: string[]
67
+ isDarkMode: boolean
68
+ isManageAdaptersModalLoading: boolean
69
+ isShowNoConnectedActiveAdaptersModal: boolean
70
+ isShowNoActiveAdaptersModal: boolean
71
+ }>()
72
+
73
+ const emits = defineEmits<{
74
+ (event: 'get-free-adapters', showModal: () => void): void
75
+ (event: 'change-added-adapters', addedAdapters: string[]): void
76
+ (event: 'change-adapter-status', adapterStatus: UI_I_AdapterStatus): void
77
+ (event: 'hide-no-connected-active-adapters-modal'): void
78
+ (event: 'hide-no-active-adapters-modal'): void
79
+ (event: 'confirm-no-active-adapters-modal'): void
80
+ (event: 'send-manage-adapter'): void
81
+ (event: 'hide'): void
82
+ }>()
83
+
84
+ const localization = computed<UI_I_Localization>(() => useLocal())
85
+
86
+ const modalTextsLocal = computed<UI_I_ModalTexts>(() => ({
87
+ button1: localization.value.common.cancel,
88
+ button2: localization.value.common.save,
89
+ }))
90
+
91
+ const onChangeAddedAdapters = (addedAdaptersNew: string[]) => {
92
+ emits('change-added-adapters', addedAdaptersNew)
93
+ }
94
+
95
+ const onChangeAdapterStatus = (adapterStatusNew: UI_I_AdapterStatus) => {
96
+ emits('change-adapter-status', adapterStatusNew)
97
+ }
98
+
99
+ const onGetFreeAdapters = (showModal: () => void) => {
100
+ emits('get-free-adapters', showModal)
101
+ }
102
+ </script>
103
+
104
+ <style scoped lang="scss">
105
+ .modal-content {
106
+ padding: 8px 0 8px 32px;
107
+
108
+ :deep(.manager) {
109
+ height: calc(100vh - 316px - 36px);
110
+ max-height: 331px;
111
+ min-height: unset;
112
+ width: 240px !important;
113
+ }
114
+
115
+ :deep(.info-container) {
116
+ .table-fixed-height {
117
+ height: calc(100vh - 316px - 36px);
118
+ max-height: 331px;
119
+ min-height: unset;
120
+ }
121
+ }
122
+ }
123
+
124
+ :deep(.modal-body) {
125
+ overflow: hidden;
126
+ height: 100%;
127
+
128
+ .modal-content {
129
+ max-height: calc(100vh - 300px);
130
+
131
+ .edit-pg-failover-order-with-details.full-height {
132
+ max-height: calc(100vh - 316px);
133
+
134
+ .failover-order-with-details {
135
+ max-height: calc(100vh - 316px);
136
+
137
+ .flex-container.flex-row.fill-parent {
138
+ max-height: calc(100vh - 316px);
139
+
140
+ .failover-order-master.relative-container {
141
+ max-height: calc(100vh - 316px);
142
+
143
+ .manager-wrapper {
144
+ max-height: calc(100vh - 316px);
145
+ }
146
+ }
147
+ }
148
+ }
149
+ }
150
+ }
151
+
152
+ .ui-main-no-items-found {
153
+ padding-top: 8px;
154
+ padding-bottom: 8px;
155
+ }
156
+
157
+ .full-width-adapter-info.no-selected-adapter {
158
+ overflow: hidden;
159
+ }
160
+ }
161
+
162
+ :deep(.modal-footer-transparent-block) {
163
+ display: block !important;
164
+ width: calc(100% - 224px - 32px - 16px - 24px);
165
+ right: 16px;
166
+ top: -22px;
167
+ }
168
+
169
+ @media (max-width: 1084px) {
170
+ :deep(.edit-pg-failover-order-with-details:not(.add-adapter-view)) {
171
+ .failover-order-details {
172
+ width: 100%;
173
+ }
174
+ .tabs-container {
175
+ padding-right: 32px !important;
176
+ }
177
+ .manager {
178
+ height: calc(100vh - 316px - 36px) !important;
179
+ max-height: 331px !important;
180
+ min-height: unset !important;
181
+ width: 240px !important;
182
+ }
183
+
184
+ .info-container {
185
+ .table-fixed-height {
186
+ height: calc(100vh - 316px - 36px) !important;
187
+ max-height: 331px !important;
188
+ min-height: unset !important;
189
+ }
190
+ }
191
+
192
+ .table-fixed-height {
193
+ min-height: unset !important;
194
+ max-height: unset !important;
195
+
196
+ .info-block-container {
197
+ padding-right: 19px !important;
198
+ }
199
+ }
200
+ .flex-container {
201
+ flex-direction: row !important;
202
+ row-gap: 16px;
203
+
204
+ .manager-wrapper {
205
+ width: 100%;
206
+ padding-right: 0;
207
+ }
208
+ }
209
+ .no-selected-adapter {
210
+ padding-bottom: unset;
211
+ }
212
+ }
213
+ }
214
+
215
+ @media (max-width: 650px) {
216
+ :deep(.modal-body) {
217
+ overflow-y: auto !important;
218
+ scrollbar-gutter: stable;
219
+ height: 383px !important;
220
+
221
+ .modal-content {
222
+ max-height: 100% !important;
223
+ height: 100% !important;
224
+
225
+ .edit-pg-failover-order-with-details.full-height {
226
+ max-height: 100% !important;
227
+ height: 100% !important;
228
+ .failover-order-with-details {
229
+ max-height: 100% !important;
230
+ height: 100% !important;
231
+ .flex-container.flex-row.fill-parent {
232
+ max-height: 100% !important;
233
+ height: 100% !important;
234
+ .manager-wrapper {
235
+ max-height: 100% !important;
236
+ height: 100% !important;
237
+ }
238
+ .failover-order-details.relative-container {
239
+ max-height: 100% !important;
240
+ height: 100% !important;
241
+ }
242
+ }
243
+ }
244
+ }
245
+ }
246
+ }
247
+ .modal-content {
248
+ padding: 8px 0 8px 32px;
249
+ height: 100%;
250
+
251
+ :deep(.manager) {
252
+ width: 100% !important;
253
+ }
254
+ :deep(.info-container) {
255
+ .table-fixed-height {
256
+ height: unset;
257
+ }
258
+ }
259
+ }
260
+
261
+ :deep(.modal-footer-transparent-block) {
262
+ display: block !important;
263
+ width: calc(100% - 14px) !important;
264
+ right: 14px !important;
265
+ top: -16px !important;
266
+ }
267
+
268
+ :deep(.edit-pg-failover-order-with-details:not(.add-adapter-view)) {
269
+ .manager {
270
+ height: unset !important;
271
+ max-height: unset !important;
272
+ min-height: unset !important;
273
+ width: 100% !important;
274
+ }
275
+
276
+ .info-container {
277
+ .table-fixed-height {
278
+ height: unset !important;
279
+ max-height: unset !important;
280
+ min-height: unset !important;
281
+ }
282
+ }
283
+
284
+ :deep(.table-fixed-height) {
285
+ min-height: unset !important;
286
+ max-height: unset !important;
287
+
288
+ .info-block-container {
289
+ padding-right: 19px !important;
290
+ }
291
+ }
292
+ .flex-container {
293
+ flex-direction: column !important;
294
+ column-gap: 16px;
295
+
296
+ .manager-wrapper {
297
+ width: 100%;
298
+ padding-right: 18px;
299
+ }
300
+ }
301
+ .no-selected-adapter {
302
+ padding-bottom: 16px;
303
+ }
304
+ }
305
+ }
306
+ </style>