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
@@ -1,106 +1,157 @@
1
- <template>
2
- <ui-popup
3
- :v-if="props.show"
4
- :title="title"
5
- :message="text"
6
- :texts="buttons"
7
- icon-name="info-status"
8
- size="sm"
9
- @hide="onHideModal"
10
- @submit="onRemove"
11
- />
12
- </template>
13
-
14
- <script setup lang="ts">
15
- import type { UI_T_Project } from '~/lib/models/types'
16
- import type { UI_I_ModalTexts } from '~/node_modules/bfg-uikit/components/ui/modal/models/interfaces'
17
- import type { UI_I_Localization } from '~/lib/models/interfaces'
18
-
19
- // Props from up
20
- const props = withDefaults(
21
- defineProps<{
22
- show: boolean
23
- modalName: string
24
- viewName: string
25
- title: string
26
- type: string
27
- id?: string
28
- isShowLoader?: boolean
29
- label?: string
30
- switchName?: string
31
- hostName?: string
32
- networkType: string
33
- project: UI_T_Project
34
- }>(),
35
- {
36
- id: '',
37
- isShowLoader: false,
38
- label: '',
39
- switchName: '',
40
- hostName: '',
41
- }
42
- )
43
-
44
- // Modal hiding
45
- const emits = defineEmits<{
46
- (event: 'hide'): void
47
- (event: 'remove', id: string, type: string): void
48
- }>()
49
-
50
- // UI_I_Localization
51
- const localization = computed<UI_I_Localization>(() => useLocal())
52
-
53
- const title = computed<string>(() => {
54
- switch (props.type) {
55
- case 'network':
56
- return localization.value.common.confirmNetworkRemoval
57
- case 'port':
58
- return localization.value.common.confirmPortRemoval
59
- case 'switch':
60
- return localization.value.common.confirmSwitchRemoval
61
- default:
62
- return ''
63
- }
64
- })
65
-
66
- const text = computed<string>(() => {
67
- switch (props.type) {
68
- case 'network':
69
- return localization.value.common.confirmNetworkRemovalMessage
70
- .replace('{networkName}', props.label)
71
- .replace('{switchName}', props.switchName)
72
- case 'port':
73
- return localization.value.common.confirmPortRemovalMessage
74
- .replace('{portName}', props.id)
75
- .replace('{switchName}', props.switchName)
76
- case 'switch':
77
- return localization.value.common.confirmSwitchRemovalMessage
78
- .replace('{switchName}', props.switchName)
79
- .replace('{hostName}', props.hostName)
80
- default:
81
- return ''
82
- }
83
- })
84
-
85
- const buttons = computed<UI_I_ModalTexts>(() => ({
86
- button1: localization.value.common.cancel,
87
- button2: localization.value.common.confirm,
88
- }))
89
-
90
- const isSphereProject = computed<boolean>(() => props.project === 'sphere')
91
-
92
- const onRemove = (): void => {
93
- const type = isSphereProject.value
94
- ? props.networkType
95
- ? `${props.type}${props.networkType}`
96
- : props.type
97
- : props.type
98
-
99
- emits('remove', props.id, type)
100
- }
101
- const onHideModal = (): void => {
102
- emits('hide')
103
- }
104
- </script>
105
-
106
- <style scoped lang="scss"></style>
1
+ <template>
2
+ <div>
3
+ <ui-popup
4
+ :v-if="props.show"
5
+ :title="title"
6
+ :message="text"
7
+ :texts="buttons"
8
+ icon-name="circle-warning"
9
+ size="sm"
10
+ @hide="onHideModal"
11
+ @submit="onRemove"
12
+ >
13
+ <template #content>
14
+ <div v-if="props.type === 'port'" class="message">
15
+ <span class="message-title">{{ title }}</span>
16
+ <span class="message-item">{{ text[0] }}</span>
17
+ <span class="message-item">{{ text[1] }}</span>
18
+ </div>
19
+ </template>
20
+ </ui-popup>
21
+ </div>
22
+ </template>
23
+
24
+ <script setup lang="ts">
25
+ import type { UI_T_Project } from '~/lib/models/types'
26
+ import type { UI_I_ModalTexts } from '~/node_modules/bfg-uikit/components/ui/modal/models/interfaces'
27
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
28
+
29
+ // Props from up
30
+ const props = withDefaults(
31
+ defineProps<{
32
+ show: boolean
33
+ modalName: string
34
+ viewName: string
35
+ title: string
36
+ type: string
37
+ id?: string
38
+ isShowLoader?: boolean
39
+ label?: string
40
+ switchName?: string
41
+ hostName?: string
42
+ networkType: string
43
+ project: UI_T_Project
44
+ }>(),
45
+ {
46
+ id: '',
47
+ isShowLoader: false,
48
+ label: '',
49
+ switchName: '',
50
+ hostName: '',
51
+ }
52
+ )
53
+
54
+ // Modal hiding
55
+ const emits = defineEmits<{
56
+ (event: 'hide'): void
57
+ (event: 'remove', id: string, type: string): void
58
+ }>()
59
+
60
+ // UI_I_Localization
61
+ const localization = computed<UI_I_Localization>(() => useLocal())
62
+
63
+ const title = computed<string>(() => {
64
+ switch (props.type) {
65
+ case 'network':
66
+ return localization.value.common.confirmNetworkRemoval
67
+ case 'port':
68
+ return localization.value.common.confirmPortRemoval
69
+ case 'switch':
70
+ return localization.value.common.confirmSwitchRemoval
71
+ default:
72
+ return ''
73
+ }
74
+ })
75
+
76
+ const text = computed<string | string[]>(() => {
77
+ switch (props.type) {
78
+ case 'network':
79
+ return localization.value.common.confirmNetworkRemovalMessage
80
+ .replace('{networkName}', props.label)
81
+ .replace('{switchName}', props.switchName)
82
+ case 'port':
83
+ return [
84
+ localization.value.common.confirmPortRemovalMessage1,
85
+ localization.value.common.confirmPortRemovalMessage2
86
+ .replace('{portName}', props.id)
87
+ .replace('{switchName}', props.switchName),
88
+ ]
89
+ case 'switch':
90
+ return localization.value.common.confirmSwitchRemovalMessage
91
+ .replace('{switchName}', props.switchName)
92
+ .replace('{hostName}', props.hostName)
93
+ default:
94
+ return ''
95
+ }
96
+ })
97
+
98
+ const buttons = computed<UI_I_ModalTexts>(() => ({
99
+ button1: localization.value.common.cancel,
100
+ button2: localization.value.common.remove,
101
+ }))
102
+
103
+ const isSphereProject = computed<boolean>(() => props.project === 'sphere')
104
+
105
+ const onRemove = (): void => {
106
+ const type = isSphereProject.value
107
+ ? props.networkType
108
+ ? `${props.type}${props.networkType}`
109
+ : props.type
110
+ : props.type
111
+
112
+ emits('remove', props.id, type)
113
+ }
114
+ const onHideModal = (): void => {
115
+ emits('hide')
116
+ }
117
+ </script>
118
+
119
+ <style scoped lang="scss">
120
+ :deep(svg) {
121
+ path {
122
+ fill: #ea3223;
123
+ }
124
+ }
125
+
126
+ .message {
127
+ padding: 16px 32px;
128
+
129
+ &-title {
130
+ display: block;
131
+ font-weight: 500;
132
+ font-size: 20px;
133
+ line-height: 24px;
134
+ letter-spacing: 0;
135
+ text-align: center;
136
+ vertical-align: middle;
137
+ margin-bottom: 8px;
138
+ color: var(--title-form-first-color);
139
+ }
140
+
141
+ &-item {
142
+ display: block;
143
+ font-weight: 400;
144
+ font-size: 14px;
145
+ line-height: 18px;
146
+ letter-spacing: 0;
147
+ text-align: center;
148
+ vertical-align: middle;
149
+ color: #9da6ad;
150
+ margin-bottom: 12px;
151
+ }
152
+
153
+ span:last-of-type {
154
+ margin-bottom: 0;
155
+ }
156
+ }
157
+ </style>
@@ -1,50 +1,58 @@
1
- <template>
2
- <div class="view-settings-modal__container">
3
- <ui-modal
4
- v-if="props.show"
5
- :width="props.width"
6
- :title="props.title"
7
- :subtitle="props.secondTitle"
8
- @hide="emits('hide')"
9
- >
10
- <template #content>
11
- <common-diagram-main-modals-view-settings-info
12
- :show="true"
13
- :height="props.infoHeight"
14
- :view-name="props.viewName"
15
- :modal-tabs="props.modalTabs"
16
- :full-mode="false"
17
- :view-settings-fields="props.viewSettingsFields"
18
- />
19
- </template>
20
- <template #footer>
21
- <div style="height: 32px"></div>
22
- </template>
23
- </ui-modal>
24
- </div>
25
- </template>
26
-
27
- <script setup lang="ts">
28
- import type { UI_I_PortViewSettingsNewModalProps } from '~/components/common/diagramMain/modals/viewSettings/viewSettingsModal/lib/models/interfaces'
29
-
30
- const props = withDefaults(defineProps<UI_I_PortViewSettingsNewModalProps>(), {
31
- initialData: () => ({}),
32
- title: '',
33
- width: '560px',
34
- height: '553px',
35
- modalTabs: () => [],
36
- infoHeight: '390px',
37
- secondTitle: '',
38
- })
39
-
40
- const emits = defineEmits<{
41
- (event: 'hide'): void
42
- }>()
43
- </script>
44
-
45
- <style scoped lang="scss">
46
- :deep(.modal-body) {
47
- max-height: unset;
48
- overflow-y: unset;
49
- }
50
- </style>
1
+ <template>
2
+ <div class="view-settings-modal__container">
3
+ <ui-modal
4
+ v-if="props.show"
5
+ :width="props.width"
6
+ :title="props.title"
7
+ :subtitle="props.secondTitle"
8
+ @hide="emits('hide')"
9
+ >
10
+ <template #content>
11
+ <common-diagram-main-modals-view-settings-info
12
+ :show="true"
13
+ :height="props.infoHeight"
14
+ :view-name="props.viewName"
15
+ :modal-tabs="props.modalTabs"
16
+ :full-mode="false"
17
+ :view-settings-fields="props.viewSettingsFields"
18
+ />
19
+ </template>
20
+ <template #footer>
21
+ <div style="height: 32px"></div>
22
+ </template>
23
+ </ui-modal>
24
+ </div>
25
+ </template>
26
+
27
+ <script setup lang="ts">
28
+ import type { UI_I_PortViewSettingsNewModalProps } from '~/components/common/diagramMain/modals/viewSettings/viewSettingsModal/lib/models/interfaces'
29
+
30
+ const props = withDefaults(defineProps<UI_I_PortViewSettingsNewModalProps>(), {
31
+ initialData: () => ({}),
32
+ title: '',
33
+ width: '560px',
34
+ height: '553px',
35
+ modalTabs: () => [],
36
+ infoHeight: '390px',
37
+ secondTitle: '',
38
+ })
39
+
40
+ const emits = defineEmits<{
41
+ (event: 'hide'): void
42
+ }>()
43
+ </script>
44
+
45
+ <style scoped lang="scss">
46
+ :deep(.modal-body) {
47
+ max-height: unset;
48
+ overflow-y: unset;
49
+
50
+ .info-container {
51
+ padding-top: 0;
52
+ }
53
+ .table-fixed-height {
54
+ scrollbar-gutter: stable;
55
+ padding-right: 18px;
56
+ }
57
+ }
58
+ </style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.6.78",
4
+ "version": "1.6.80",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
@@ -18,7 +18,7 @@
18
18
  "@vueuse/core": "10.1.2",
19
19
  "@vueuse/nuxt": "10.1.2",
20
20
  "bfg-nuxt-3-graph": "1.0.28",
21
- "bfg-uikit": "1.1.32",
21
+ "bfg-uikit": "1.1.33",
22
22
  "eslint-config-prettier": "^8.5.0",
23
23
  "eslint-plugin-myrules": "file:./eslint",
24
24
  "nuxt": "3.11.2",
@@ -1,22 +0,0 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
- import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
3
-
4
- export const certificateTabsFunc = (
5
- localization: UI_I_Localization
6
- ): UI_I_CollapseNavItem[] => {
7
- return [
8
- {
9
- text: localization.common.renew,
10
- value: 'renew',
11
- disabled: false,
12
- testId: 'certificate-renew',
13
- },
14
- {
15
- text: localization.common.certificateRefreshTitle,
16
- value: 'refreshCaCertificates',
17
- disabled: true,
18
- testId: 'certificate-refresh',
19
- development: true,
20
- },
21
- ]
22
- }