bfg-common 1.6.76 → 1.6.77
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 +4213 -4474
- package/assets/localization/local_en.json +4217 -4479
- package/assets/localization/local_hy.json +4217 -4478
- package/assets/localization/local_kk.json +4216 -4477
- package/assets/localization/local_ru.json +4216 -4477
- package/assets/localization/local_zh.json +4214 -4475
- package/assets/scss/common/global.scss +0 -11
- package/assets/scss/common/normalize.scss +0 -3
- package/assets/scss/common/theme.scss +2 -2
- package/components/atoms/dropdown/dropdown/Dropdown.vue +170 -170
- package/components/atoms/dropdown/dropdown/lib/models/interfaces.ts +10 -10
- package/components/atoms/stack/StackBlock.vue +1 -1
- package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +2 -2
- package/components/atoms/tooltip/TooltipError.vue +0 -3
- package/components/common/adapterManager/AdapterManagerNew.vue +0 -86
- package/components/common/adapterManager/addAdapterModal/AddAdapterModalNew.vue +1 -1
- package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalNew.vue +1 -0
- package/components/common/adapterManager/ui/actions/bar/Bar.vue +0 -2
- package/components/common/adapterManager/ui/actions/bar/BarNew.vue +2 -3
- package/components/common/adapterManager/ui/table/adapters/AdaptersNew.vue +0 -1
- package/components/common/configure/physicalAdapters/PhysicalAdapters.vue +0 -6
- package/components/common/configure/physicalAdapters/PhysicalAdaptersNew.vue +192 -219
- package/components/common/configure/physicalAdapters/PhysicalAdaptersOld.vue +4 -6
- package/components/common/configure/physicalAdapters/buttons/Buttons.vue +0 -1
- package/components/common/configure/physicalAdapters/modals/edit/Edit.vue +1 -26
- package/components/common/configure/physicalAdapters/modals/edit/EditNew.vue +1 -30
- package/components/common/configure/physicalAdapters/modals/edit/lib/models/interfaces.ts +0 -5
- package/components/common/configure/physicalAdapters/tableView/TableViewNew.vue +1 -12
- package/components/common/configure/physicalAdapters/tableView/lib/config/physicalAdaptersTableConfigNew.ts +21 -21
- package/components/common/configure/physicalAdapters/tableView/lib/config/settings.ts +5 -12
- package/components/common/configure/physicalAdapters/tableView/lib/models/interfaces.ts +1 -4
- package/components/common/diagramMain/Diagram.vue +85 -169
- package/components/common/diagramMain/DiagramMain.vue +10 -40
- package/components/common/diagramMain/{header/HeaderOld.vue → Header.vue} +67 -78
- package/components/common/diagramMain/modals/Modals.vue +0 -4
- package/components/common/diagramMain/modals/editSettings/{confirmTeamingSettingsModal/ConfirmTeamingSettingsModalOld.vue → ConfirmTeamingSettingsModal.vue} +5 -2
- package/components/common/diagramMain/modals/editSettings/EditSettings.vue +102 -104
- package/components/common/diagramMain/modals/editSettings/{modal/EditSettingsModalOld.vue → EditSettingsModal.vue} +51 -12
- package/components/common/diagramMain/modals/editSettings/lib/models/interfaces.ts +0 -6
- package/components/common/diagramMain/modals/editSettings/tabs/{networkProperties/NetworkPropertiesOld.vue → NetworkProperties.vue} +113 -12
- package/components/common/diagramMain/modals/editSettings/tabs/{security/SecurityOld.vue → Security.vue} +48 -25
- package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +164 -0
- package/components/common/diagramMain/modals/editSettings/tabs/{teamingFailover/TeamingFailoverOld.vue → TeamingFailover.vue} +48 -11
- package/components/common/diagramMain/modals/editSettings/tabs/{trafficShaping/TrafficShapingOld.vue → TrafficShaping.vue} +134 -12
- package/components/common/diagramMain/modals/editSettings/tabs/port/{ipvFourSettings/IpvFourSettingsOld.vue → IpvFourSettings.vue} +152 -11
- package/components/common/diagramMain/modals/editSettings/tabs/port/{portProperties/PortPropertiesOld.vue → PortProperties.vue} +103 -12
- package/components/common/diagramMain/modals/lib/config/diagramConfig.ts +2 -43
- package/components/common/diagramMain/modals/lib/config/index.ts +1 -2
- package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +1 -1
- package/components/common/diagramMain/modals/lib/utils/index.ts +4 -34
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +2 -2
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +1 -1
- package/components/common/layout/theHeader/ThemeSwitch.vue +1 -1
- package/components/common/layout/theHeader/modals/reconnect/New.vue +30 -38
- package/components/common/layout/theHeader/userMenu/modals/changePassword/New.vue +9 -8
- package/components/common/layout/theHeader/userMenu/modals/preferences/New.vue +0 -4
- package/components/common/layout/theHeader/userMenu/modals/preferences/Old.vue +2 -9
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +7 -11
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsole.vue +1 -7
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/config/consoleOptions.ts +5 -8
- package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/TimeFormat.vue +5 -9
- package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/config/formatOptions.ts +1 -1
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/Old.vue +9 -5
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/View.vue +6 -9
- package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +1 -3
- package/components/common/modals/Rename.vue +1 -3
- package/components/common/noDataProvided/NoDataProvidedNew.vue +1 -1
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/new/lib/config/table.ts +4 -4
- package/components/common/pages/backups/modals/createBackup/datastores/tableView/old/lib/config/table.ts +4 -4
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModal.vue +253 -184
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/actions/ActionsNew.vue +1 -1
- package/components/common/pages/scheduledTasks/table/lib/models/enums.ts +0 -9
- package/components/common/pages/scheduledTasks/table/new/New.vue +10 -12
- package/components/common/pages/tasks/Tasks.vue +1 -4
- package/components/common/pages/tasks/table/Table.vue +23 -25
- package/components/common/readyToComplete/New.vue +0 -1
- package/components/common/split/vertical/New.vue +8 -42
- package/components/common/split/vertical/Old.vue +2 -31
- package/components/common/split/vertical/Vertical.vue +0 -4
- package/components/common/tools/Actions.vue +3 -7
- package/components/common/tools/lib/models/interfaces.ts +0 -1
- package/components/common/vm/actions/add/New.vue +6 -21
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +1 -14
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/New.vue +0 -5
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Old.vue +0 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/New.vue +0 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/New.vue +0 -2
- package/components/common/vm/actions/common/select/options/New.vue +12 -14
- package/components/common/vm/actions/common/select/options/Old.vue +15 -16
- package/components/common/vm/actions/common/select/storage/new/lib/config/table.ts +15 -13
- package/components/common/vm/actions/confirm/Confirm.vue +0 -3
- package/components/common/vm/actions/rename/Old.vue +0 -1
- package/components/common/vm/snapshots/DetailView.vue +6 -6
- package/components/common/wizards/datastore/add/New.vue +0 -6
- package/components/common/wizards/datastore/add/lib/config/steps.ts +1 -1
- package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceNew.vue +1 -1
- package/components/common/wizards/datastore/add/steps/nameAndDevice/advancedOptions/New.vue +1 -1
- package/components/common/wizards/network/add/Add.vue +2 -13
- package/components/common/wizards/network/add/AddNew.vue +26 -22
- package/components/common/wizards/network/add/lib/config/initialData.ts +4 -6
- package/components/common/wizards/network/add/lib/config/steps.ts +1 -1
- package/components/common/wizards/network/add/lib/models/interfaces.ts +0 -1
- package/components/common/wizards/network/add/lib/utils/utils.ts +1 -1
- package/components/common/wizards/network/add/steps/connectionSettings/ConnectionSettingsOld.vue +1 -5
- package/components/common/wizards/network/add/steps/ipFourSettings/IpFourSettingsNew.vue +8 -2
- package/components/common/wizards/network/add/steps/ipFourSettings/IpFourSettingsOld.vue +0 -3
- package/components/common/wizards/network/add/steps/portProperties/PortPropertiesNew.vue +8 -2
- package/components/common/wizards/network/add/steps/portProperties/PortPropertiesOld.vue +2 -6
- package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue +3 -10
- package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceOld.vue +0 -4
- package/components/common/wizards/network/add/steps/selectTargetDevice/modals/new/SelectNetwork.vue +1 -5
- package/components/common/wizards/network/add/validations/common.ts +1 -1
- package/components/common/wizards/vm/migrate/New.vue +3 -13
- package/components/common/wizards/vm/migrate/lib/config/constructDataReady.ts +0 -5
- package/components/common/wizards/vm/migrate/lib/config/steps.ts +2 -3
- package/components/common/wizards/vm/migrate/steps/computeResource/New.vue +1 -2
- package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/New.vue +21 -40
- package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/hostTable.ts +14 -44
- package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/models/enums.ts +0 -4
- package/components/common/wizards/vm/migrate/steps/priority/New.vue +2 -7
- package/components/common/wizards/vm/migrate/steps/selectStorage/New.vue +7 -22
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/batch/New.vue +0 -6
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/batch/table/new/New.vue +1 -4
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/batch/table/new/lib/config/datastoreTable.ts +16 -12
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/new/New.vue +5 -10
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/new/lib/config/diskTable.ts +11 -16
- package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/old/lib/config/diskTable.ts +1 -7
- package/components/common/wizards/vm/migrate/steps/selectStorage/selectedPerDisk/New.vue +10 -17
- package/components/common/wizards/vm/migrate/steps/type/TypeNew.vue +0 -1
- package/components/common/wizards/vm/migrate/vmOrigin/New.vue +15 -35
- package/lib/models/store/tasks/enums.ts +0 -3
- package/lib/models/store/tasks/types.ts +6 -7
- package/package.json +1 -1
- package/plugins/directives.ts +5 -3
- package/public/spice-console/application/agent.js +17 -18
- package/store/tasks/actions.ts +8 -26
- package/store/tasks/mappers/recentTasks.ts +0 -1
- package/components/common/configure/physicalAdapters/modals/edit/lib/validations/validations.ts +0 -19
- package/components/common/diagramMain/header/Header.vue +0 -49
- package/components/common/diagramMain/header/HeaderNew.vue +0 -155
- package/components/common/diagramMain/modals/UnsavedChangesModal.vue +0 -32
- package/components/common/diagramMain/modals/editSettings/EditSettingsNew.vue +0 -285
- package/components/common/diagramMain/modals/editSettings/EditSettingsOld.vue +0 -254
- package/components/common/diagramMain/modals/editSettings/confirmTeamingSettingsModal/ConfirmTeamingSettingsModal.vue +0 -31
- package/components/common/diagramMain/modals/editSettings/confirmTeamingSettingsModal/ConfirmTeamingSettingsModalNew.vue +0 -82
- package/components/common/diagramMain/modals/editSettings/lib/config/config.ts +0 -15
- package/components/common/diagramMain/modals/editSettings/lib/utils/utils.ts +0 -177
- package/components/common/diagramMain/modals/editSettings/modal/EditSettingsModal.vue +0 -137
- package/components/common/diagramMain/modals/editSettings/modal/EditSettingsModalNew.vue +0 -91
- package/components/common/diagramMain/modals/editSettings/tabs/networkProperties/NetworkProperties.vue +0 -158
- package/components/common/diagramMain/modals/editSettings/tabs/networkProperties/NetworkPropertiesNew.vue +0 -262
- package/components/common/diagramMain/modals/editSettings/tabs/port/ipvFourSettings/IpvFourSettings.vue +0 -192
- package/components/common/diagramMain/modals/editSettings/tabs/port/ipvFourSettings/IpvFourSettingsNew.vue +0 -388
- package/components/common/diagramMain/modals/editSettings/tabs/port/portProperties/PortProperties.vue +0 -139
- package/components/common/diagramMain/modals/editSettings/tabs/port/portProperties/PortPropertiesNew.vue +0 -286
- package/components/common/diagramMain/modals/editSettings/tabs/security/Security.vue +0 -209
- package/components/common/diagramMain/modals/editSettings/tabs/security/SecurityNew.vue +0 -233
- package/components/common/diagramMain/modals/editSettings/tabs/switchProperties/SwitchProperties.vue +0 -128
- package/components/common/diagramMain/modals/editSettings/tabs/switchProperties/SwitchPropertiesNew.vue +0 -235
- package/components/common/diagramMain/modals/editSettings/tabs/switchProperties/SwitchPropertiesOld.vue +0 -87
- package/components/common/diagramMain/modals/editSettings/tabs/teamingFailover/TeamingFailover.vue +0 -99
- package/components/common/diagramMain/modals/editSettings/tabs/teamingFailover/TeamingFailoverNew.vue +0 -319
- package/components/common/diagramMain/modals/editSettings/tabs/trafficShaping/TrafficShaping.vue +0 -173
- package/components/common/diagramMain/modals/editSettings/tabs/trafficShaping/TrafficShapingNew.vue +0 -348
- package/components/common/diagramMain/skeleton/Header.vue +0 -31
- package/components/common/diagramMain/skeleton/Switch.vue +0 -75
- package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/clusterTable.ts +0 -340
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
:width="props.width"
|
|
5
5
|
:height="props.height"
|
|
6
6
|
:show="props.show"
|
|
7
|
-
:title="
|
|
7
|
+
:title="title"
|
|
8
8
|
:modal-loading="props.isEditModalLoading"
|
|
9
9
|
:class="[
|
|
10
10
|
'diagram-action__edit',
|
|
@@ -13,16 +13,15 @@
|
|
|
13
13
|
},
|
|
14
14
|
]"
|
|
15
15
|
@hide="onHideEditSettingsModal"
|
|
16
|
-
@submit="
|
|
16
|
+
@submit="onSendDataRequest"
|
|
17
17
|
>
|
|
18
18
|
<template #modalBody>
|
|
19
19
|
<common-diagram-main-modals-edit-settings
|
|
20
|
-
v-model:network-edit-data="networkEditData"
|
|
21
20
|
:items="props.items"
|
|
22
21
|
:view-name="props.viewName"
|
|
23
22
|
:initial-data="props.initialData"
|
|
24
23
|
:adapters="props.adapters"
|
|
25
|
-
:flag-send-data="
|
|
24
|
+
:flag-send-data="flagSendData"
|
|
26
25
|
:is-dark-mode="props.isDarkMode"
|
|
27
26
|
@send-edit-data="onSendData"
|
|
28
27
|
@change-edit-fields-data="onChangeEditFieldsData"
|
|
@@ -34,24 +33,45 @@
|
|
|
34
33
|
</template>
|
|
35
34
|
|
|
36
35
|
<script setup lang="ts">
|
|
36
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
37
37
|
import type { UI_I_EditFieldsData } from '~/components/common/diagramMain/lib/models/interfaces'
|
|
38
|
-
import type {
|
|
39
|
-
|
|
40
|
-
const props = defineProps<
|
|
41
|
-
|
|
38
|
+
import type { UI_I_PortViewSettingsModalProps } from '~/components/common/diagramMain/modals/editSettings/lib/models/interfaces'
|
|
39
|
+
|
|
40
|
+
const props = withDefaults(defineProps<UI_I_PortViewSettingsModalProps>(), {
|
|
41
|
+
initialData: () => ({}),
|
|
42
|
+
title: 'Network',
|
|
43
|
+
adapters: () => ({
|
|
44
|
+
total_pages: 0,
|
|
45
|
+
total_items: 0,
|
|
46
|
+
items: [],
|
|
47
|
+
}),
|
|
48
|
+
isEditModalLoading: false,
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
// Modal hiding
|
|
42
52
|
const emits = defineEmits<{
|
|
43
53
|
(event: 'hide'): void
|
|
44
54
|
(event: 'change-edit-fields-data', editFieldsData: UI_I_EditFieldsData): void
|
|
45
|
-
(
|
|
55
|
+
(
|
|
56
|
+
event: 'send-edit-data',
|
|
57
|
+
type: string,
|
|
58
|
+
hideModal: () => void,
|
|
59
|
+
id?: string
|
|
60
|
+
): void
|
|
46
61
|
(
|
|
47
62
|
event: 'check-network-label',
|
|
48
63
|
label: string,
|
|
49
64
|
sendMessage: (message: string) => void
|
|
50
65
|
): void
|
|
51
|
-
(event: 'change-flag-send-data'): void
|
|
52
66
|
}>()
|
|
53
67
|
|
|
54
|
-
|
|
68
|
+
// UI_I_Localization
|
|
69
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
70
|
+
|
|
71
|
+
// Title
|
|
72
|
+
const title = computed(
|
|
73
|
+
() => props.title + localization.value.common.networkEditSettings
|
|
74
|
+
)
|
|
55
75
|
|
|
56
76
|
const onCheckNetworkLabel = (
|
|
57
77
|
label: string,
|
|
@@ -68,8 +88,27 @@ const onChangeEditFieldsData = (newEditFieldsData: UI_I_EditFieldsData) => {
|
|
|
68
88
|
emits('change-edit-fields-data', newEditFieldsData)
|
|
69
89
|
}
|
|
70
90
|
|
|
91
|
+
const flagSendData = ref(true)
|
|
92
|
+
|
|
93
|
+
const onSendDataRequest = () => {
|
|
94
|
+
flagSendData.value = !flagSendData.value
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
const isSphereProject = computed<boolean>(() => props.project === 'sphere')
|
|
98
|
+
|
|
71
99
|
const onSendData = (type: string) => {
|
|
72
|
-
|
|
100
|
+
const typeLocal = isSphereProject.value
|
|
101
|
+
? props.networkType
|
|
102
|
+
? `${type}${props.networkType}`
|
|
103
|
+
: type
|
|
104
|
+
: type
|
|
105
|
+
|
|
106
|
+
emits(
|
|
107
|
+
'send-edit-data',
|
|
108
|
+
typeLocal,
|
|
109
|
+
onHideEditSettingsModal,
|
|
110
|
+
props.initialData.id || props.title
|
|
111
|
+
)
|
|
73
112
|
}
|
|
74
113
|
</script>
|
|
75
114
|
|
|
@@ -22,9 +22,3 @@ export interface UI_I_PortViewSettingsModalProps {
|
|
|
22
22
|
networkType: string
|
|
23
23
|
project: UI_T_Project
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
export interface UI_I_PortViewSettingsModalExtendedProps
|
|
27
|
-
extends UI_I_PortViewSettingsModalProps {
|
|
28
|
-
modalTitle?: string
|
|
29
|
-
flagSendData: boolean
|
|
30
|
-
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
<div class="wizard-content__container">
|
|
3
3
|
<div class="wizard-content">
|
|
4
4
|
<atoms-alert
|
|
5
|
-
v-if="
|
|
5
|
+
v-if="isShowErrorMessage"
|
|
6
6
|
:items="validationMessagesArray"
|
|
7
7
|
status="alert-danger"
|
|
8
8
|
test-id="network-properties-alert"
|
|
9
|
-
@remove="
|
|
9
|
+
@remove="onHideErrorMessageAlert"
|
|
10
10
|
/>
|
|
11
11
|
<form id="network-properties-form">
|
|
12
12
|
<div class="horizontal-flex-container">
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
<div class="flex-align-center">
|
|
54
54
|
<atoms-combobox
|
|
55
55
|
v-model="fieldsValues.vlanId"
|
|
56
|
-
:items="
|
|
56
|
+
:items="vlanIdSelectDataLocal"
|
|
57
57
|
test-id="vlan-id-select-combobox"
|
|
58
58
|
@click.stop
|
|
59
59
|
@select="selectVlanId"
|
|
@@ -87,31 +87,132 @@
|
|
|
87
87
|
<script setup lang="ts">
|
|
88
88
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
89
89
|
import type {
|
|
90
|
+
UI_I_ModalsInitialData,
|
|
90
91
|
UI_I_EditSettingsErrorMessage,
|
|
91
92
|
UI_I_PropertiesFields,
|
|
92
93
|
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
93
|
-
import type {
|
|
94
|
+
import type { UI_T_PropertiesFieldName } from '~/components/common/diagramMain/lib/models/types'
|
|
94
95
|
import { validationMessagesArrayFunc } from '~/components/common/diagramMain/modals/lib/utils'
|
|
96
|
+
import { vlanIdSelectDataFunc } from '~/components/common/wizards/network/add/lib/config/config'
|
|
95
97
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
// Props from up
|
|
99
|
+
const props = withDefaults(
|
|
100
|
+
defineProps<{
|
|
101
|
+
isShowErrorMessageAlert: boolean
|
|
102
|
+
errorMessages: UI_I_EditSettingsErrorMessage
|
|
103
|
+
networkAlreadyExists: boolean
|
|
104
|
+
initialData?: UI_I_ModalsInitialData
|
|
105
|
+
hasErrorMessages?: boolean
|
|
106
|
+
}>(),
|
|
107
|
+
{
|
|
108
|
+
initialData: () => ({}),
|
|
109
|
+
hasErrorMessages: undefined,
|
|
110
|
+
}
|
|
111
|
+
)
|
|
101
112
|
|
|
113
|
+
// Validation
|
|
102
114
|
const emits = defineEmits<{
|
|
115
|
+
(
|
|
116
|
+
event: 'change-error-messages',
|
|
117
|
+
errorMessage: string,
|
|
118
|
+
fieldName: keyof UI_I_EditSettingsErrorMessage
|
|
119
|
+
): void
|
|
103
120
|
(event: 'hide-error-message-alert'): void
|
|
121
|
+
(
|
|
122
|
+
event: 'change-edit-properties-data',
|
|
123
|
+
propertiesData: UI_I_PropertiesFields
|
|
124
|
+
): void
|
|
104
125
|
}>()
|
|
105
126
|
|
|
127
|
+
const validationMessagesArray = computed(() =>
|
|
128
|
+
validationMessagesArrayFunc(['networkLabel', 'vlanId'], props.errorMessages)
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
// UI_I_Localization
|
|
106
132
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
133
|
+
const vlanIdSelectDataLocal = computed<UI_I_Localization>(() =>
|
|
134
|
+
vlanIdSelectDataFunc(localization.value)
|
|
135
|
+
)
|
|
107
136
|
|
|
108
|
-
|
|
137
|
+
// For showing component validation errors on the top of modal
|
|
138
|
+
const isShowErrorMessage = computed<boolean>(
|
|
139
|
+
() => props.isShowErrorMessageAlert && props.hasErrorMessages
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
const fieldsValues = ref<UI_I_PropertiesFields>(
|
|
143
|
+
useDeepCopy({
|
|
144
|
+
vlanId: props.initialData.vlanId || `${localization.value.common.none} (0)`,
|
|
145
|
+
networkLabel: props.initialData.networkLabel || 'Network',
|
|
146
|
+
})
|
|
147
|
+
)
|
|
109
148
|
|
|
110
149
|
const selectVlanId = (id: string): void => {
|
|
111
150
|
fieldsValues.value.vlanId = id
|
|
112
151
|
}
|
|
113
152
|
|
|
114
|
-
const
|
|
115
|
-
|
|
153
|
+
const onHideErrorMessageAlert = () => emits('hide-error-message-alert')
|
|
154
|
+
|
|
155
|
+
const onChangeData = (data: UI_I_PropertiesFields) =>
|
|
156
|
+
emits('change-edit-properties-data', data)
|
|
157
|
+
|
|
158
|
+
const changeErrorMessage = (
|
|
159
|
+
errorMessage: string,
|
|
160
|
+
fieldName: keyof UI_I_EditSettingsErrorMessage
|
|
161
|
+
) => emits('change-error-messages', errorMessage, fieldName)
|
|
162
|
+
|
|
163
|
+
const messageTexts = (local: UI_I_Localization) => ({
|
|
164
|
+
vlanId: local.common.vlanIdInvalidMessage,
|
|
165
|
+
networkLabel: local.common.networkLabelInvalidMessage,
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
const isNumberInRange = (value: number | string, down: number, up: number) =>
|
|
169
|
+
isNaN(Number(value)) || Number(value) < down || Number(value) > up
|
|
170
|
+
|
|
171
|
+
const setMessageOnChangedField = (
|
|
172
|
+
values: string | number,
|
|
173
|
+
name: UI_T_PropertiesFieldName,
|
|
174
|
+
text: string
|
|
175
|
+
) => {
|
|
176
|
+
if (name === 'networkLabel' && !values) {
|
|
177
|
+
changeErrorMessage(text, name)
|
|
178
|
+
return
|
|
179
|
+
} else if (name === 'networkLabel' && props.networkAlreadyExists) return
|
|
180
|
+
|
|
181
|
+
if (
|
|
182
|
+
name === 'vlanId' &&
|
|
183
|
+
values !== `${localization.value.common.none} (0)` &&
|
|
184
|
+
values !== `${localization.value.common.all} (4095)` &&
|
|
185
|
+
(isNumberInRange(values, 0, 4095) || values === '')
|
|
186
|
+
) {
|
|
187
|
+
changeErrorMessage(text, name)
|
|
188
|
+
return
|
|
189
|
+
}
|
|
190
|
+
changeErrorMessage('', name)
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
watch(
|
|
194
|
+
fieldsValues,
|
|
195
|
+
(newValues: UI_I_PropertiesFields) => {
|
|
196
|
+
setMessageOnChangedField(
|
|
197
|
+
newValues.vlanId,
|
|
198
|
+
'vlanId',
|
|
199
|
+
messageTexts(localization.value).vlanId
|
|
200
|
+
)
|
|
201
|
+
setMessageOnChangedField(
|
|
202
|
+
newValues.networkLabel,
|
|
203
|
+
'networkLabel',
|
|
204
|
+
messageTexts(localization.value).networkLabel
|
|
205
|
+
)
|
|
206
|
+
onChangeData(newValues)
|
|
207
|
+
!props.hasErrorMessages && onHideErrorMessageAlert()
|
|
208
|
+
},
|
|
209
|
+
{ deep: true }
|
|
116
210
|
)
|
|
211
|
+
|
|
212
|
+
onMounted(() => {
|
|
213
|
+
onChangeData(fieldsValues.value)
|
|
214
|
+
})
|
|
215
|
+
onUnmounted(() => {
|
|
216
|
+
onHideErrorMessageAlert()
|
|
217
|
+
})
|
|
117
218
|
</script>
|
|
@@ -34,12 +34,11 @@
|
|
|
34
34
|
data-id="promiscuous-mode-select"
|
|
35
35
|
name="selectName"
|
|
36
36
|
>
|
|
37
|
-
<option
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
{{ item.text }}
|
|
37
|
+
<option :value="2" :label="localization.common.reject">
|
|
38
|
+
{{ localization.common.reject }}
|
|
39
|
+
</option>
|
|
40
|
+
<option :value="1" :label="localization.common.accept">
|
|
41
|
+
{{ localization.common.accept }}
|
|
43
42
|
</option>
|
|
44
43
|
</select>
|
|
45
44
|
</div>
|
|
@@ -81,12 +80,11 @@
|
|
|
81
80
|
data-id="mac-address-select"
|
|
82
81
|
name="selectName"
|
|
83
82
|
>
|
|
84
|
-
<option
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
{{ item.text }}
|
|
83
|
+
<option :value="2" :label="localization.common.reject">
|
|
84
|
+
{{ localization.common.reject }}
|
|
85
|
+
</option>
|
|
86
|
+
<option :value="1" :label="localization.common.accept">
|
|
87
|
+
{{ localization.common.accept }}
|
|
90
88
|
</option>
|
|
91
89
|
</select>
|
|
92
90
|
</div>
|
|
@@ -128,12 +126,11 @@
|
|
|
128
126
|
data-id="forged-transmits-select"
|
|
129
127
|
name="selectName"
|
|
130
128
|
>
|
|
131
|
-
<option
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
{{ item.text }}
|
|
129
|
+
<option :value="2" :label="localization.common.reject">
|
|
130
|
+
{{ localization.common.reject }}
|
|
131
|
+
</option>
|
|
132
|
+
<option :value="1" :label="localization.common.accept">
|
|
133
|
+
{{ localization.common.accept }}
|
|
137
134
|
</option>
|
|
138
135
|
</select>
|
|
139
136
|
</div>
|
|
@@ -150,18 +147,44 @@
|
|
|
150
147
|
|
|
151
148
|
<script setup lang="ts">
|
|
152
149
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
153
|
-
import type {
|
|
154
|
-
|
|
150
|
+
import type {
|
|
151
|
+
UI_I_ModalsInitialData,
|
|
152
|
+
UI_I_SecurityFields,
|
|
153
|
+
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
154
|
+
import { securityFieldsInitialFunc } from '~/components/common/diagramMain/modals/lib/config'
|
|
155
155
|
|
|
156
|
-
|
|
157
|
-
|
|
156
|
+
// Props from up
|
|
157
|
+
const props = withDefaults(
|
|
158
|
+
defineProps<{
|
|
159
|
+
isSwitch: boolean
|
|
160
|
+
initialData?: UI_I_ModalsInitialData
|
|
161
|
+
}>(),
|
|
162
|
+
{
|
|
163
|
+
isSwitch: false,
|
|
164
|
+
initialData: undefined,
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
const emits = defineEmits<{
|
|
169
|
+
(event: 'change-edit-security-data', securityData: UI_I_SecurityFields): void
|
|
158
170
|
}>()
|
|
159
171
|
|
|
172
|
+
// UI_I_Localization
|
|
160
173
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
161
174
|
|
|
162
|
-
const fieldsValues =
|
|
175
|
+
const fieldsValues = ref<UI_I_SecurityFields>(
|
|
176
|
+
securityFieldsInitialFunc(props.isSwitch, props.initialData)
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
onMounted(() => {
|
|
180
|
+
emits('change-edit-security-data', fieldsValues.value)
|
|
181
|
+
})
|
|
163
182
|
|
|
164
|
-
|
|
165
|
-
|
|
183
|
+
watch(
|
|
184
|
+
fieldsValues,
|
|
185
|
+
(newFieldsValues: UI_I_SecurityFields) => {
|
|
186
|
+
emits('change-edit-security-data', newFieldsValues)
|
|
187
|
+
},
|
|
188
|
+
{ deep: true }
|
|
166
189
|
)
|
|
167
190
|
</script>
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="wizard-content__container">
|
|
3
|
+
<div class="wizard-content">
|
|
4
|
+
<atoms-alert
|
|
5
|
+
v-if="isShowErrorMessage"
|
|
6
|
+
:items="validationMessagesArray"
|
|
7
|
+
status="alert-danger"
|
|
8
|
+
test-id="switch-properties-alert"
|
|
9
|
+
@remove="onHideErrorMessageAlert"
|
|
10
|
+
/>
|
|
11
|
+
<form id="switch-properties-form">
|
|
12
|
+
<div class="horizontal-flex-container">
|
|
13
|
+
<label class="property-label-group" for="network-label">
|
|
14
|
+
{{ localization.common.numberOfPorts }}
|
|
15
|
+
</label>
|
|
16
|
+
<div class="margin-left-property-value-group">
|
|
17
|
+
<div class="property-value-group">
|
|
18
|
+
<fieldset>
|
|
19
|
+
{{ props.initialData.num_ports }}
|
|
20
|
+
</fieldset>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="horizontal-flex-container">
|
|
25
|
+
<label class="property-label-group">
|
|
26
|
+
{{ localization.common.mtuBytes }}
|
|
27
|
+
</label>
|
|
28
|
+
<div class="margin-left-property-value-group">
|
|
29
|
+
<div class="property-value-group tooltip-field-container">
|
|
30
|
+
<fieldset>
|
|
31
|
+
<atoms-tooltip-error :has-error="!!props.errorMessages.mtu">
|
|
32
|
+
<template #elem>
|
|
33
|
+
<input
|
|
34
|
+
id="mtu"
|
|
35
|
+
v-model="fieldsValues.mtu"
|
|
36
|
+
:class="[
|
|
37
|
+
'tooltip-field',
|
|
38
|
+
{
|
|
39
|
+
'danger-not-valid': props.errorMessages.mtu,
|
|
40
|
+
},
|
|
41
|
+
]"
|
|
42
|
+
data-id="mtu-input"
|
|
43
|
+
type="number"
|
|
44
|
+
name="mtu"
|
|
45
|
+
@click.stop
|
|
46
|
+
/>
|
|
47
|
+
</template>
|
|
48
|
+
<template #content>
|
|
49
|
+
{{ props.errorMessages.mtu }}
|
|
50
|
+
</template>
|
|
51
|
+
</atoms-tooltip-error>
|
|
52
|
+
</fieldset>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</form>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
|
|
61
|
+
<script setup lang="ts">
|
|
62
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
63
|
+
import type {
|
|
64
|
+
UI_I_SwitchPropertiesFields,
|
|
65
|
+
UI_I_EditSettingsErrorMessage,
|
|
66
|
+
UI_I_ModalsInitialData,
|
|
67
|
+
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
68
|
+
import type { UI_T_PortPropertiesFieldName } from '~/components/common/diagramMain/lib/models/types'
|
|
69
|
+
import { validationMessagesArrayFunc } from '~/components/common/diagramMain/modals/lib/utils'
|
|
70
|
+
|
|
71
|
+
// Props from up
|
|
72
|
+
const props = withDefaults(
|
|
73
|
+
defineProps<{
|
|
74
|
+
isShowErrorMessageAlert: boolean
|
|
75
|
+
errorMessages: UI_I_EditSettingsErrorMessage
|
|
76
|
+
initialData?: UI_I_ModalsInitialData
|
|
77
|
+
hasErrorMessages?: boolean
|
|
78
|
+
}>(),
|
|
79
|
+
{
|
|
80
|
+
initialData: () => ({}),
|
|
81
|
+
hasErrorMessages: undefined,
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
// Validation
|
|
86
|
+
const emits = defineEmits<{
|
|
87
|
+
(
|
|
88
|
+
event: 'change-error-messages',
|
|
89
|
+
errorMessage: string,
|
|
90
|
+
fieldName: keyof UI_I_EditSettingsErrorMessage
|
|
91
|
+
): void
|
|
92
|
+
(event: 'hide-error-message-alert'): void
|
|
93
|
+
(
|
|
94
|
+
event: 'change-edit-properties-data',
|
|
95
|
+
switchPropertiesData: UI_I_SwitchPropertiesFields
|
|
96
|
+
): void
|
|
97
|
+
}>()
|
|
98
|
+
|
|
99
|
+
const validationMessagesArray = computed(() =>
|
|
100
|
+
validationMessagesArrayFunc(['mtu'], props.errorMessages)
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
// UI_I_Localization
|
|
104
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
105
|
+
|
|
106
|
+
// For showing component validation errors on the top of modal
|
|
107
|
+
const isShowErrorMessage = computed<boolean>(
|
|
108
|
+
() => props.isShowErrorMessageAlert && props.hasErrorMessages
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
const fieldsValues = ref<UI_I_SwitchPropertiesFields>({
|
|
112
|
+
mtu: props.initialData.mtu || 0,
|
|
113
|
+
num_ports: props.initialData.num_ports || '',
|
|
114
|
+
})
|
|
115
|
+
|
|
116
|
+
const onHideErrorMessageAlert = () => emits('hide-error-message-alert')
|
|
117
|
+
const onChangeData = (data: UI_I_SwitchPropertiesFields) =>
|
|
118
|
+
emits('change-edit-properties-data', data)
|
|
119
|
+
|
|
120
|
+
const changeErrorMessage = (
|
|
121
|
+
errorMessage: string,
|
|
122
|
+
fieldName: keyof UI_I_EditSettingsErrorMessage
|
|
123
|
+
) => emits('change-error-messages', errorMessage, fieldName)
|
|
124
|
+
|
|
125
|
+
const messageTexts = (local: UI_I_Localization) => ({
|
|
126
|
+
mtu: local.common.mtuInvalidMessage,
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
const setMessageOnChangedField = (
|
|
130
|
+
values: number,
|
|
131
|
+
name: UI_T_PortPropertiesFieldName,
|
|
132
|
+
text: string
|
|
133
|
+
) => {
|
|
134
|
+
if (values < 1280 || values > 65535) {
|
|
135
|
+
changeErrorMessage(text, name)
|
|
136
|
+
return
|
|
137
|
+
}
|
|
138
|
+
changeErrorMessage('', name)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
watch(
|
|
142
|
+
fieldsValues,
|
|
143
|
+
(newValues: UI_I_SwitchPropertiesFields) => {
|
|
144
|
+
setMessageOnChangedField(
|
|
145
|
+
newValues.mtu,
|
|
146
|
+
'mtu',
|
|
147
|
+
messageTexts(localization.value).mtu
|
|
148
|
+
)
|
|
149
|
+
onChangeData(newValues)
|
|
150
|
+
!props.hasErrorMessages && onHideErrorMessageAlert()
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
deep: true,
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
onMounted(() => {
|
|
158
|
+
onChangeData(fieldsValues.value)
|
|
159
|
+
})
|
|
160
|
+
|
|
161
|
+
onUnmounted(() => {
|
|
162
|
+
onHideErrorMessageAlert()
|
|
163
|
+
})
|
|
164
|
+
</script>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<form id="teaming-failover">
|
|
5
5
|
<section class="form-block">
|
|
6
6
|
<template
|
|
7
|
-
v-for="(item, key) in
|
|
7
|
+
v-for="(item, key) in teamingAndFailoverTemplate"
|
|
8
8
|
:key="item.key"
|
|
9
9
|
>
|
|
10
10
|
<div class="horizontal-flex-container">
|
|
@@ -107,28 +107,65 @@ import type {
|
|
|
107
107
|
UI_I_TeamingAndFailoverTemplate,
|
|
108
108
|
UI_I_AdapterStatus,
|
|
109
109
|
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
110
|
+
import {
|
|
111
|
+
teamingFailoverFieldsInitialFunc,
|
|
112
|
+
teamingAndFailoverTemplateMakerFunc,
|
|
113
|
+
} from '~/components/common/diagramMain/modals/lib/config'
|
|
110
114
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
// Props from up
|
|
116
|
+
const props = withDefaults(
|
|
117
|
+
defineProps<{
|
|
118
|
+
adapters: UI_I_ItemsWithTotalCounts<UI_I_SwitchAdapterItem>
|
|
119
|
+
adapterStatus: UI_I_AdapterStatus
|
|
120
|
+
isSwitch: boolean
|
|
121
|
+
initialData?: UI_I_ModalsInitialData
|
|
122
|
+
isDarkMode?: boolean
|
|
123
|
+
}>(),
|
|
124
|
+
{
|
|
125
|
+
initialData: () => ({}),
|
|
126
|
+
isSwitch: false,
|
|
127
|
+
isDarkMode: false,
|
|
128
|
+
}
|
|
129
|
+
)
|
|
119
130
|
|
|
120
131
|
const emits = defineEmits<{
|
|
132
|
+
(
|
|
133
|
+
event: 'change-edit-teaming-failover-data',
|
|
134
|
+
teamingFailoverData: UI_I_TeamingFailoverFields
|
|
135
|
+
): void
|
|
121
136
|
(event: 'change-adapter-status', adapterStatus: UI_I_AdapterStatus): void
|
|
122
137
|
}>()
|
|
123
138
|
|
|
139
|
+
// UI_I_Localization
|
|
124
140
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
125
141
|
|
|
126
|
-
|
|
142
|
+
// Making fields template
|
|
143
|
+
const teamingAndFailoverTemplate = computed<UI_I_TeamingAndFailoverTemplate[]>(
|
|
144
|
+
() => teamingAndFailoverTemplateMakerFunc(localization.value)
|
|
145
|
+
)
|
|
146
|
+
// Temporary data for this component
|
|
147
|
+
const fieldsValues = ref<UI_I_TeamingFailoverFields>(
|
|
148
|
+
teamingFailoverFieldsInitialFunc(props.isSwitch, props.initialData)
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
const onChangeData = (data: UI_I_TeamingFailoverFields) =>
|
|
152
|
+
emits('change-edit-teaming-failover-data', data)
|
|
127
153
|
|
|
128
154
|
const onChangeAdapterStatus = (adapterStatus: UI_I_AdapterStatus) =>
|
|
129
155
|
emits('change-adapter-status', adapterStatus)
|
|
130
|
-
</script>
|
|
131
156
|
|
|
157
|
+
watch(
|
|
158
|
+
fieldsValues,
|
|
159
|
+
(newFieldsValues: UI_I_TeamingFailoverFields) => {
|
|
160
|
+
onChangeData(newFieldsValues)
|
|
161
|
+
},
|
|
162
|
+
{ deep: true, immediate: true }
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
onMounted(() => {
|
|
166
|
+
onChangeData(fieldsValues.value)
|
|
167
|
+
})
|
|
168
|
+
</script>
|
|
132
169
|
<style lang="scss" scoped>
|
|
133
170
|
:deep(.diagram-action__edit) {
|
|
134
171
|
.table-fixed-height {
|