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.
Files changed (138) hide show
  1. package/assets/localization/local_be.json +1 -14
  2. package/assets/localization/local_en.json +1 -14
  3. package/assets/localization/local_hy.json +1 -14
  4. package/assets/localization/local_kk.json +1 -14
  5. package/assets/localization/local_ru.json +1 -14
  6. package/assets/localization/local_zh.json +1 -14
  7. package/components/atoms/dropdown/dropdown/Dropdown.vue +170 -170
  8. package/components/atoms/dropdown/dropdown/lib/models/interfaces.ts +10 -10
  9. package/components/common/adapterManager/AdapterManager.vue +473 -473
  10. package/components/common/adapterManager/AdapterManagerOld.vue +498 -498
  11. package/components/common/adapterManager/addAdapterModal/AddAdapterModal.vue +70 -70
  12. package/components/common/adapterManager/addAdapterModal/AddAdapterModalNew.vue +110 -110
  13. package/components/common/adapterManager/addAdapterModal/AddAdapterModalOld.vue +531 -531
  14. package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModal.vue +32 -32
  15. package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalNew.vue +37 -37
  16. package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalOld.vue +73 -73
  17. package/components/common/adapterManager/lib/config/index.ts +19 -19
  18. package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModal.vue +31 -31
  19. package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModalNew.vue +34 -34
  20. package/components/common/adapterManager/noActiveAdaptersModal/NoActiveAdaptersModalOld.vue +57 -57
  21. package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModal.vue +31 -31
  22. package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModalNew.vue +34 -34
  23. package/components/common/adapterManager/noConnectedActiveAdaptersModal/NoConnectedActiveAdaptersModalOld.vue +57 -57
  24. package/components/common/adapterManager/ui/actions/AddAdapterButton.vue +34 -34
  25. package/components/common/adapterManager/ui/actions/RemoveAdapterButton.vue +41 -41
  26. package/components/common/adapterManager/ui/actions/VerticalSeparator.vue +10 -10
  27. package/components/common/adapterManager/ui/actions/bar/BarOld.vue +95 -95
  28. package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButton.vue +28 -28
  29. package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButtonNew.vue +76 -76
  30. package/components/common/adapterManager/ui/actions/moveDownAdapterButton/MoveDownAdapterButtonOld.vue +33 -33
  31. package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButton.vue +28 -28
  32. package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButtonNew.vue +77 -77
  33. package/components/common/adapterManager/ui/actions/moveUpAdapterButton/MoveUpAdapterButtonOld.vue +33 -33
  34. package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapter.vue +24 -24
  35. package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapterNew.vue +18 -18
  36. package/components/common/adapterManager/ui/noSelectedAdapter/NoSelectedAdapterOld.vue +38 -38
  37. package/components/common/adapterManager/ui/secondTitle/SecondTitle.vue +31 -31
  38. package/components/common/adapterManager/ui/secondTitle/SecondTitleNew.vue +51 -51
  39. package/components/common/adapterManager/ui/secondTitle/SecondTitleOld.vue +35 -35
  40. package/components/common/adapterManager/ui/table/Table.vue +88 -88
  41. package/components/common/adapterManager/ui/table/TableNew.vue +137 -137
  42. package/components/common/adapterManager/ui/table/TableOld.vue +141 -141
  43. package/components/common/adapterManager/ui/table/adapters/Adapters.vue +44 -44
  44. package/components/common/adapterManager/ui/table/adapters/AdaptersNew.vue +187 -187
  45. package/components/common/adapterManager/ui/table/adapters/AdaptersOld.vue +87 -87
  46. package/components/common/adapterManager/ui/table/header/Header.vue +57 -57
  47. package/components/common/adapterManager/ui/table/header/HeaderNew.vue +81 -81
  48. package/components/common/adapterManager/ui/table/header/HeaderOld.vue +79 -79
  49. package/components/common/adapterManager/ui/table/lib/models/types.ts +1 -1
  50. package/components/common/certificate/Certificate.vue +6 -16
  51. package/components/common/certificate/{Info/Old.vue → CertificateInfo.vue} +34 -6
  52. package/components/common/certificate/{tools/Tools.vue → Tools.vue} +23 -18
  53. package/components/common/certificate/lib/config/tabsPannel.ts +22 -0
  54. package/components/common/diagramMain/adapter/Adapter.vue +123 -123
  55. package/components/common/diagramMain/adapter/AdapterItem.vue +438 -438
  56. package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
  57. package/components/common/diagramMain/adapter/Contents.vue +212 -212
  58. package/components/common/diagramMain/adapter/Lines.vue +81 -81
  59. package/components/common/diagramMain/adapter/block/Block.vue +27 -27
  60. package/components/common/diagramMain/adapter/block/BlockNew.vue +58 -58
  61. package/components/common/diagramMain/adapter/block/BlockOld.vue +50 -50
  62. package/components/common/diagramMain/adapter/secondBlock/SecondBlock.vue +27 -27
  63. package/components/common/diagramMain/adapter/secondBlock/SecondBlockNew.vue +60 -60
  64. package/components/common/diagramMain/adapter/secondBlock/SecondBlockOld.vue +51 -51
  65. package/components/common/diagramMain/highlights/Highlights.vue +151 -151
  66. package/components/common/diagramMain/highlights/HighlightsNew.vue +124 -124
  67. package/components/common/diagramMain/highlights/HighlightsOld.vue +107 -107
  68. package/components/common/diagramMain/lib/config/index.ts +81 -81
  69. package/components/common/diagramMain/lib/config/initial.ts +50 -50
  70. package/components/common/diagramMain/lib/config/positions.ts +194 -194
  71. package/components/common/diagramMain/lib/models/enums.ts +44 -44
  72. package/components/common/diagramMain/lib/models/interfaces.ts +760 -760
  73. package/components/common/diagramMain/lib/models/types.ts +21 -21
  74. package/components/common/diagramMain/lib/utils/utils.ts +331 -331
  75. package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +331 -331
  76. package/components/common/diagramMain/modals/Modals.vue +483 -483
  77. package/components/common/diagramMain/modals/lib/config/adapterModal.ts +147 -147
  78. package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
  79. package/components/common/diagramMain/modals/lib/config/networkModal.ts +405 -405
  80. package/components/common/diagramMain/modals/lib/config/portModal.ts +253 -253
  81. package/components/common/diagramMain/modals/lib/config/switchModal.ts +245 -245
  82. package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
  83. package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
  84. package/components/common/diagramMain/modals/lib/mappers/mappers.ts +88 -88
  85. package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +541 -541
  86. package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
  87. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +170 -170
  88. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
  89. package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/VmkernelAdapterReadyComplete.vue +49 -49
  90. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +19 -19
  91. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +137 -137
  92. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +52 -52
  93. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
  94. package/components/common/diagramMain/modals/remove/RemoveModal.vue +82 -82
  95. package/components/common/diagramMain/modals/remove/RemoveModalNew.vue +106 -106
  96. package/components/common/diagramMain/modals/remove/RemoveModalOld.vue +241 -241
  97. package/components/common/diagramMain/modals/viewSettings/info/Info.vue +57 -57
  98. package/components/common/diagramMain/modals/viewSettings/info/InfoNew.vue +174 -174
  99. package/components/common/diagramMain/modals/viewSettings/info/InfoOld.vue +141 -141
  100. package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettings.vue +45 -45
  101. package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsNew.vue +323 -323
  102. package/components/common/diagramMain/modals/viewSettings/viewSettings/ViewSettingsOld.vue +203 -203
  103. package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModal.vue +60 -60
  104. package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModalNew.vue +50 -50
  105. package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/ViewSettingsModalOld.vue +70 -70
  106. package/components/common/diagramMain/modals/viewSettings/viewSettingsModal/lib/models/interfaces.ts +48 -48
  107. package/components/common/diagramMain/network/Contents.vue +497 -497
  108. package/components/common/diagramMain/network/Lines.vue +107 -107
  109. package/components/common/diagramMain/network/Network.vue +141 -141
  110. package/components/common/diagramMain/network/block/Block.vue +37 -37
  111. package/components/common/diagramMain/network/block/BlockNew.vue +68 -68
  112. package/components/common/diagramMain/network/block/BlockOld.vue +64 -64
  113. package/components/common/diagramMain/network/noNetwork/NoNetwork.vue +12 -12
  114. package/components/common/diagramMain/network/noNetwork/NoNetworkNew.vue +89 -89
  115. package/components/common/diagramMain/network/noNetwork/NoNetworkOld.vue +61 -61
  116. package/components/common/diagramMain/network/secondBlock/SecondBlock.vue +41 -41
  117. package/components/common/diagramMain/network/secondBlock/SecondBlockNew.vue +64 -64
  118. package/components/common/diagramMain/network/secondBlock/SecondBlockOld.vue +60 -60
  119. package/components/common/diagramMain/port/Port.vue +580 -580
  120. package/components/common/diagramMain/port/Ports.vue +47 -47
  121. package/components/common/diagramMain/switch/Switch.vue +180 -180
  122. package/components/common/diagramMain/switch/SwitchSelected.vue +111 -111
  123. package/components/common/monitor/advanced/table/tableOld/TableOld.vue +93 -93
  124. package/components/common/monitor/utilization/lib/models/enums.ts +4 -4
  125. package/components/common/split/horizontal/New.vue +1 -1
  126. package/components/common/split/horizontal/Old.vue +1 -1
  127. package/package.json +2 -2
  128. package/components/common/certificate/Info/Info.vue +0 -61
  129. package/components/common/certificate/Info/new/New.vue +0 -285
  130. package/components/common/certificate/Info/new/lib/config/index.ts +0 -59
  131. package/components/common/certificate/Info/new/lib/models/interfaces.ts +0 -3
  132. package/components/common/certificate/Info/new/lib/utils/index.ts +0 -10
  133. package/components/common/certificate/Old.vue +0 -27
  134. package/components/common/certificate/new/New.vue +0 -30
  135. package/components/common/certificate/new/Skeleton.vue +0 -155
  136. package/components/common/certificate/tools/New.vue +0 -48
  137. package/components/common/certificate/tools/Old.vue +0 -39
  138. package/components/common/certificate/tools/lib/config/tabsPannel.ts +0 -20
@@ -1,114 +1,114 @@
1
- import type { UI_I_WizardStep } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
2
- import { UI_E_WIZARD_STATUS } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/enums'
3
- import type { UI_I_MigrationVmkernelAdapterReadyComplete } from '~/components/common/diagramMain/lib/models/interfaces'
4
- import type { UI_I_Localization } from '~/lib/models/interfaces'
5
- import { UI_E_MigrationValidationFields } from '~/components/common/diagramMain/lib/models/enums'
6
-
7
- export const stepsFunc = (
8
- localization: UI_I_Localization
9
- ): UI_I_WizardStep[] => [
10
- {
11
- id: 0,
12
- title: localization.common.selectVmKernelAdapter,
13
- subTitle: localization.common.migrateVmKernelNetworkAdapter1Placeholder,
14
- status: UI_E_WIZARD_STATUS.SELECTED,
15
- fields: {
16
- [UI_E_MigrationValidationFields.SELECT_ADAPTER_VM]: {
17
- field: '',
18
- alert: '',
19
- },
20
- },
21
- isValid: true,
22
- },
23
- {
24
- id: 1,
25
- title: localization.common.configureSettings,
26
- subTitle: localization.common.migrateVmKernelNetworkAdapter2Placeholder,
27
- status: UI_E_WIZARD_STATUS.INACTIVE,
28
- fields: {
29
- [UI_E_MigrationValidationFields.CONNECTION_SETTINGS_NETWORK]: {
30
- field: '',
31
- alert: '',
32
- },
33
- [UI_E_MigrationValidationFields.CONNECTION_SETTINGS_VLAN]: {
34
- field: '',
35
- alert: '',
36
- },
37
- },
38
- isValid: true,
39
- },
40
- {
41
- id: 2,
42
- title: localization.common.readyComplete,
43
- subTitle: localization.common.migrateVmKernelNetworkAdapter3Placeholder,
44
- status: UI_E_WIZARD_STATUS.INACTIVE,
45
- fields: {},
46
- isValid: true,
47
- },
48
- ]
49
-
50
- export const stepsSchemeInitial: number[][] = [[0, 1, 2]]
51
-
52
- export const createMigrateVmkernelAdapterSchemeReadyCompleteFunc = (
53
- localization: UI_I_Localization,
54
- data: UI_I_MigrationVmkernelAdapterReadyComplete
55
- ) => [
56
- {
57
- id: 0,
58
- type: 0,
59
- rows: [
60
- {
61
- name: localization.common.vmAdapter,
62
- value: data.vm,
63
- },
64
- ],
65
- },
66
- {
67
- title: localization.common.currentSettings,
68
- id: 1,
69
- type: 0,
70
- rows: [
71
- {
72
- name: localization.common.migrateFromSwitch,
73
- value: data.currentSettings.switch,
74
- },
75
- {
76
- name: localization.common.networkLabel,
77
- value: data.currentSettings.network,
78
- },
79
- ],
80
- },
81
- {
82
- title: localization.common.newSettings,
83
- id: 2,
84
- type: 0,
85
- rows: [
86
- {
87
- name: localization.common.migrateToSwitch,
88
- value: data.newSettings.switch,
89
- },
90
- {
91
- name: localization.common.networkLabel,
92
- value: data.newSettings.network,
93
- },
94
- {
95
- name: localization.common.vlanId,
96
- value: data.vlanId,
97
- },
98
- ],
99
- },
100
- ]
101
-
102
- export const readyCompleteInitial: UI_I_MigrationVmkernelAdapterReadyComplete =
103
- {
104
- vm: '-',
105
- currentSettings: {
106
- switch: '-',
107
- network: '-',
108
- },
109
- newSettings: {
110
- switch: '-',
111
- network: '-',
112
- },
113
- vlanId: '-',
114
- }
1
+ import type { UI_I_WizardStep } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
2
+ import { UI_E_WIZARD_STATUS } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/enums'
3
+ import type { UI_I_MigrationVmkernelAdapterReadyComplete } from '~/components/common/diagramMain/lib/models/interfaces'
4
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
5
+ import { UI_E_MigrationValidationFields } from '~/components/common/diagramMain/lib/models/enums'
6
+
7
+ export const stepsFunc = (
8
+ localization: UI_I_Localization
9
+ ): UI_I_WizardStep[] => [
10
+ {
11
+ id: 0,
12
+ title: localization.common.selectVmKernelAdapter,
13
+ subTitle: localization.common.migrateVmKernelNetworkAdapter1Placeholder,
14
+ status: UI_E_WIZARD_STATUS.SELECTED,
15
+ fields: {
16
+ [UI_E_MigrationValidationFields.SELECT_ADAPTER_VM]: {
17
+ field: '',
18
+ alert: '',
19
+ },
20
+ },
21
+ isValid: true,
22
+ },
23
+ {
24
+ id: 1,
25
+ title: localization.common.configureSettings,
26
+ subTitle: localization.common.migrateVmKernelNetworkAdapter2Placeholder,
27
+ status: UI_E_WIZARD_STATUS.INACTIVE,
28
+ fields: {
29
+ [UI_E_MigrationValidationFields.CONNECTION_SETTINGS_NETWORK]: {
30
+ field: '',
31
+ alert: '',
32
+ },
33
+ [UI_E_MigrationValidationFields.CONNECTION_SETTINGS_VLAN]: {
34
+ field: '',
35
+ alert: '',
36
+ },
37
+ },
38
+ isValid: true,
39
+ },
40
+ {
41
+ id: 2,
42
+ title: localization.common.readyComplete,
43
+ subTitle: localization.common.migrateVmKernelNetworkAdapter3Placeholder,
44
+ status: UI_E_WIZARD_STATUS.INACTIVE,
45
+ fields: {},
46
+ isValid: true,
47
+ },
48
+ ]
49
+
50
+ export const stepsSchemeInitial: number[][] = [[0, 1, 2]]
51
+
52
+ export const createMigrateVmkernelAdapterSchemeReadyCompleteFunc = (
53
+ localization: UI_I_Localization,
54
+ data: UI_I_MigrationVmkernelAdapterReadyComplete
55
+ ) => [
56
+ {
57
+ id: 0,
58
+ type: 0,
59
+ rows: [
60
+ {
61
+ name: localization.common.vmAdapter,
62
+ value: data.vm,
63
+ },
64
+ ],
65
+ },
66
+ {
67
+ title: localization.common.currentSettings,
68
+ id: 1,
69
+ type: 0,
70
+ rows: [
71
+ {
72
+ name: localization.common.migrateFromSwitch,
73
+ value: data.currentSettings.switch,
74
+ },
75
+ {
76
+ name: localization.common.networkLabel,
77
+ value: data.currentSettings.network,
78
+ },
79
+ ],
80
+ },
81
+ {
82
+ title: localization.common.newSettings,
83
+ id: 2,
84
+ type: 0,
85
+ rows: [
86
+ {
87
+ name: localization.common.migrateToSwitch,
88
+ value: data.newSettings.switch,
89
+ },
90
+ {
91
+ name: localization.common.networkLabel,
92
+ value: data.newSettings.network,
93
+ },
94
+ {
95
+ name: localization.common.vlanId,
96
+ value: data.vlanId,
97
+ },
98
+ ],
99
+ },
100
+ ]
101
+
102
+ export const readyCompleteInitial: UI_I_MigrationVmkernelAdapterReadyComplete =
103
+ {
104
+ vm: '-',
105
+ currentSettings: {
106
+ switch: '-',
107
+ network: '-',
108
+ },
109
+ newSettings: {
110
+ switch: '-',
111
+ network: '-',
112
+ },
113
+ vlanId: '-',
114
+ }
@@ -1,170 +1,170 @@
1
- <template>
2
- <div class="wizard-content-container add-networking-step">
3
- <div class="wizard-content wizard-content-port">
4
- <atoms-alert
5
- v-if="props.alertMessages.length"
6
- :items="props.alertMessages"
7
- status="alert-danger"
8
- test-id="connection-settings-alert"
9
- @remove="onHideAlert"
10
- />
11
- <form>
12
- <div class="horizontal-flex-container">
13
- <label class="property-label-group" for="network-label">
14
- {{ localization.common.networkLabel }}
15
- </label>
16
- <div class="margin-left-property-value-group">
17
- <div class="property-value-group">
18
- <fieldset>
19
- <atoms-tooltip-error
20
- :has-error="!!props.messagesFields.name.field"
21
- >
22
- <template #elem>
23
- <input
24
- id="network-label"
25
- v-model="fields.networkLabel"
26
- :class="[
27
- 'tooltip-field port-properties-network-label',
28
- {
29
- 'danger-not-valid': props.messagesFields.name.field,
30
- },
31
- ]"
32
- name="network-label"
33
- data-id="network-label-input"
34
- type="text"
35
- @click.stop
36
- />
37
- </template>
38
- <template #content>
39
- {{ props.messagesFields.name.field }}
40
- </template>
41
- </atoms-tooltip-error>
42
- </fieldset>
43
- </div>
44
- </div>
45
- </div>
46
-
47
- <div class="horizontal-flex-container port-properties-padding">
48
- <label class="property-label-group">
49
- {{ localization.common.vlanId }}
50
- </label>
51
- <div class="margin-left-property-value-group">
52
- <div class="property-value-group">
53
- <fieldset>
54
- <div class="flex-align-center">
55
- <atoms-combobox
56
- v-model.trim="fields.vlanId"
57
- :items="vlanIdSelectDataLocal"
58
- :class="{
59
- 'danger-not-valid': props.messagesFields.vlan.field,
60
- }"
61
- test-id="vlan-combobox"
62
- @click.stop
63
- />
64
- <div
65
- v-show="props.messagesFields.vlan.field"
66
- class="flex-align-center"
67
- >
68
- <div class="tooltip">
69
- <atoms-the-icon
70
- width="24px"
71
- height="24px"
72
- class="is-error tooltip-trigger"
73
- name="info"
74
- />
75
- <div class="tooltip-top-left tooltip-content error">
76
- {{ props.messagesFields.vlan.field }}
77
- </div>
78
- </div>
79
- </div>
80
- </div>
81
- </fieldset>
82
- </div>
83
- </div>
84
- </div>
85
- </form>
86
- </div>
87
- </div>
88
- </template>
89
-
90
- <script setup lang="ts">
91
- import type { UI_I_ErrorFields } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
92
- import type Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
93
- import type {
94
- UI_I_ArbitraryObject,
95
- UI_I_Localization,
96
- } from '~/lib/models/interfaces'
97
- import type { UI_I_ConnectionSettings } from '~/components/common/wizards/network/add/lib/models/interfaces'
98
- import { vlanIdSelectDataFunc } from '~/components/common/wizards/network/add/lib/config/config'
99
- import {
100
- validateNetworkConnectionSettingsLocal,
101
- validateVlanIdConnectionSettingsLocal,
102
- } from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations'
103
-
104
- const props = defineProps<{
105
- connectionSettings: UI_I_ConnectionSettings
106
- alertMessages: string[]
107
- messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
108
- wizard: Wizard
109
- }>()
110
-
111
- const localization = computed<UI_I_Localization>(() => useLocal())
112
- const vlanIdSelectDataLocal = computed<UI_I_Localization>(() => vlanIdSelectDataFunc(localization.value))
113
-
114
- const emits = defineEmits<{
115
- (
116
- event: 'change-connection-settings',
117
- connectionSettings: UI_I_ConnectionSettings
118
- ): void
119
- (event: 'hide-alert', stepId: 1): void
120
- }>()
121
-
122
- const fields = ref<UI_I_ConnectionSettings>(
123
- useDeepCopy(props.connectionSettings)
124
- )
125
-
126
- let oldFields = useDeepCopy(fields.value)
127
-
128
- watch(
129
- fields,
130
- (newFields: UI_I_ConnectionSettings) => {
131
- oldFields.vlanId !== newFields.vlanId &&
132
- validateVlanIdConnectionSettingsLocal(
133
- localization.value,
134
- newFields,
135
- props.wizard
136
- )
137
-
138
- oldFields.networkLabel !== newFields.networkLabel &&
139
- validateNetworkConnectionSettingsLocal(
140
- localization.value,
141
- newFields,
142
- props.wizard
143
- )
144
-
145
- oldFields = useDeepCopy(fields.value)
146
-
147
- emits('change-connection-settings', newFields)
148
- },
149
- { deep: true, immediate: true }
150
- )
151
-
152
- const onHideAlert = (): void => {
153
- emits('hide-alert', 1)
154
- }
155
- </script>
156
-
157
- <style scoped lang="scss">
158
- .wizard-content-container {
159
- display: flex;
160
- flex-direction: column;
161
- align-items: stretch;
162
- flex: 1 1 100%;
163
- box-sizing: border-box;
164
- padding: 16px 15px 10px 10px;
165
- overflow-y: auto;
166
- color: #333;
167
- order: 2;
168
- width: 100%;
169
- }
170
- </style>
1
+ <template>
2
+ <div class="wizard-content-container add-networking-step">
3
+ <div class="wizard-content wizard-content-port">
4
+ <atoms-alert
5
+ v-if="props.alertMessages.length"
6
+ :items="props.alertMessages"
7
+ status="alert-danger"
8
+ test-id="connection-settings-alert"
9
+ @remove="onHideAlert"
10
+ />
11
+ <form>
12
+ <div class="horizontal-flex-container">
13
+ <label class="property-label-group" for="network-label">
14
+ {{ localization.common.networkLabel }}
15
+ </label>
16
+ <div class="margin-left-property-value-group">
17
+ <div class="property-value-group">
18
+ <fieldset>
19
+ <atoms-tooltip-error
20
+ :has-error="!!props.messagesFields.name.field"
21
+ >
22
+ <template #elem>
23
+ <input
24
+ id="network-label"
25
+ v-model="fields.networkLabel"
26
+ :class="[
27
+ 'tooltip-field port-properties-network-label',
28
+ {
29
+ 'danger-not-valid': props.messagesFields.name.field,
30
+ },
31
+ ]"
32
+ name="network-label"
33
+ data-id="network-label-input"
34
+ type="text"
35
+ @click.stop
36
+ />
37
+ </template>
38
+ <template #content>
39
+ {{ props.messagesFields.name.field }}
40
+ </template>
41
+ </atoms-tooltip-error>
42
+ </fieldset>
43
+ </div>
44
+ </div>
45
+ </div>
46
+
47
+ <div class="horizontal-flex-container port-properties-padding">
48
+ <label class="property-label-group">
49
+ {{ localization.common.vlanId }}
50
+ </label>
51
+ <div class="margin-left-property-value-group">
52
+ <div class="property-value-group">
53
+ <fieldset>
54
+ <div class="flex-align-center">
55
+ <atoms-combobox
56
+ v-model.trim="fields.vlanId"
57
+ :items="vlanIdSelectDataLocal"
58
+ :class="{
59
+ 'danger-not-valid': props.messagesFields.vlan.field,
60
+ }"
61
+ test-id="vlan-combobox"
62
+ @click.stop
63
+ />
64
+ <div
65
+ v-show="props.messagesFields.vlan.field"
66
+ class="flex-align-center"
67
+ >
68
+ <div class="tooltip">
69
+ <atoms-the-icon
70
+ width="24px"
71
+ height="24px"
72
+ class="is-error tooltip-trigger"
73
+ name="info"
74
+ />
75
+ <div class="tooltip-top-left tooltip-content error">
76
+ {{ props.messagesFields.vlan.field }}
77
+ </div>
78
+ </div>
79
+ </div>
80
+ </div>
81
+ </fieldset>
82
+ </div>
83
+ </div>
84
+ </div>
85
+ </form>
86
+ </div>
87
+ </div>
88
+ </template>
89
+
90
+ <script setup lang="ts">
91
+ import type { UI_I_ErrorFields } from '~/node_modules/bfg-uikit/components/ui/wizard/lib/models/interfaces'
92
+ import type Wizard from '~/node_modules/bfg-uikit/components/ui/wizard/lib/utils/utils'
93
+ import type {
94
+ UI_I_ArbitraryObject,
95
+ UI_I_Localization,
96
+ } from '~/lib/models/interfaces'
97
+ import type { UI_I_ConnectionSettings } from '~/components/common/wizards/network/add/lib/models/interfaces'
98
+ import { vlanIdSelectDataFunc } from '~/components/common/wizards/network/add/lib/config/config'
99
+ import {
100
+ validateNetworkConnectionSettingsLocal,
101
+ validateVlanIdConnectionSettingsLocal,
102
+ } from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations'
103
+
104
+ const props = defineProps<{
105
+ connectionSettings: UI_I_ConnectionSettings
106
+ alertMessages: string[]
107
+ messagesFields: UI_I_ArbitraryObject<UI_I_ErrorFields>
108
+ wizard: Wizard
109
+ }>()
110
+
111
+ const localization = computed<UI_I_Localization>(() => useLocal())
112
+ const vlanIdSelectDataLocal = computed<UI_I_Localization>(() => vlanIdSelectDataFunc(localization.value))
113
+
114
+ const emits = defineEmits<{
115
+ (
116
+ event: 'change-connection-settings',
117
+ connectionSettings: UI_I_ConnectionSettings
118
+ ): void
119
+ (event: 'hide-alert', stepId: 1): void
120
+ }>()
121
+
122
+ const fields = ref<UI_I_ConnectionSettings>(
123
+ useDeepCopy(props.connectionSettings)
124
+ )
125
+
126
+ let oldFields = useDeepCopy(fields.value)
127
+
128
+ watch(
129
+ fields,
130
+ (newFields: UI_I_ConnectionSettings) => {
131
+ oldFields.vlanId !== newFields.vlanId &&
132
+ validateVlanIdConnectionSettingsLocal(
133
+ localization.value,
134
+ newFields,
135
+ props.wizard
136
+ )
137
+
138
+ oldFields.networkLabel !== newFields.networkLabel &&
139
+ validateNetworkConnectionSettingsLocal(
140
+ localization.value,
141
+ newFields,
142
+ props.wizard
143
+ )
144
+
145
+ oldFields = useDeepCopy(fields.value)
146
+
147
+ emits('change-connection-settings', newFields)
148
+ },
149
+ { deep: true, immediate: true }
150
+ )
151
+
152
+ const onHideAlert = (): void => {
153
+ emits('hide-alert', 1)
154
+ }
155
+ </script>
156
+
157
+ <style scoped lang="scss">
158
+ .wizard-content-container {
159
+ display: flex;
160
+ flex-direction: column;
161
+ align-items: stretch;
162
+ flex: 1 1 100%;
163
+ box-sizing: border-box;
164
+ padding: 16px 15px 10px 10px;
165
+ overflow-y: auto;
166
+ color: #333;
167
+ order: 2;
168
+ width: 100%;
169
+ }
170
+ </style>