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
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="wizard-tab__container">
|
|
3
|
-
<div class="vertical-tabs__fixed-position">
|
|
4
|
-
<atoms-tabs-vertical-tabs
|
|
5
|
-
v-model="selectedTab"
|
|
6
|
-
:items="props.items"
|
|
7
|
-
:has-error-messages="props.hasErrorMessages"
|
|
8
|
-
@set-alert="emits('show-error-message-alert')"
|
|
9
|
-
/>
|
|
10
|
-
</div>
|
|
11
|
-
|
|
12
|
-
<template v-if="props.isNetwork || props.isSwitch">
|
|
13
|
-
<common-diagram-main-modals-edit-settings-tabs-network-properties
|
|
14
|
-
v-if="props.isNetwork"
|
|
15
|
-
v-show="selectedTab === '1'"
|
|
16
|
-
:is-show-error-message-alert="props.isShowErrorMessageAlert"
|
|
17
|
-
:error-messages="props.errorMessages"
|
|
18
|
-
:initial-data="props.initialData"
|
|
19
|
-
:has-error-messages="props.hasErrorMessages"
|
|
20
|
-
:network-already-exists="props.networkAlreadyExists"
|
|
21
|
-
@change-edit-properties-data="onChangeNetworkEditPropertiesData"
|
|
22
|
-
@change-error-messages="onChangeErrorMessages"
|
|
23
|
-
@hide-error-message-alert="emits('hide-error-message-alert')"
|
|
24
|
-
/>
|
|
25
|
-
<common-diagram-main-modals-edit-settings-tabs-switch-properties
|
|
26
|
-
v-if="props.isSwitch"
|
|
27
|
-
v-show="selectedTab === '1'"
|
|
28
|
-
:is-show-error-message-alert="props.isShowErrorMessageAlert"
|
|
29
|
-
:error-messages="props.errorMessages"
|
|
30
|
-
:initial-data="props.initialData"
|
|
31
|
-
:has-error-messages="props.hasErrorMessages"
|
|
32
|
-
@change-edit-properties-data="onChangeSwitchEditPropertiesData"
|
|
33
|
-
@change-error-messages="onChangeErrorMessages"
|
|
34
|
-
@hide-error-message-alert="emits('hide-error-message-alert')"
|
|
35
|
-
/>
|
|
36
|
-
<common-diagram-main-modals-edit-settings-tabs-security
|
|
37
|
-
v-show="selectedTab === '2'"
|
|
38
|
-
:is-switch="props.isSwitch"
|
|
39
|
-
:initial-data="props.initialData"
|
|
40
|
-
@change-edit-security-data="onChangeEditSecurityData"
|
|
41
|
-
/>
|
|
42
|
-
<common-diagram-main-modals-edit-settings-tabs-traffic-shaping
|
|
43
|
-
v-show="selectedTab === '3'"
|
|
44
|
-
:is-show-error-message-alert="props.isShowErrorMessageAlert"
|
|
45
|
-
:error-messages="props.errorMessages"
|
|
46
|
-
:initial-data="props.initialData"
|
|
47
|
-
:has-error-messages="props.hasErrorMessages"
|
|
48
|
-
:is-switch="props.isSwitch"
|
|
49
|
-
@change-edit-traffic-shaping-data="onChangeEditTrafficShapingData"
|
|
50
|
-
@change-error-messages="onChangeErrorMessages"
|
|
51
|
-
@hide-error-message-alert="emits('hide-error-message-alert')"
|
|
52
|
-
/>
|
|
53
|
-
<common-diagram-main-modals-edit-settings-tabs-teaming-failover
|
|
54
|
-
v-show="selectedTab === '4'"
|
|
55
|
-
:is-switch="props.isSwitch"
|
|
56
|
-
:adapters="props.adapters"
|
|
57
|
-
:initial-data="props.initialData"
|
|
58
|
-
:adapter-status="props.adapterStatus"
|
|
59
|
-
:is-dark-mode="props.isDarkMode"
|
|
60
|
-
@change-edit-teaming-failover-data="onChangeEditTeamingFailoverData"
|
|
61
|
-
@change-adapter-status="onChangeAdapterStatus"
|
|
62
|
-
/>
|
|
63
|
-
</template>
|
|
64
|
-
<template v-if="props.isPort">
|
|
65
|
-
<common-diagram-main-modals-edit-settings-tabs-port-port-properties
|
|
66
|
-
v-show="selectedTab === '1'"
|
|
67
|
-
:is-show-error-message-alert="props.isShowErrorMessageAlert"
|
|
68
|
-
:error-messages="props.errorMessages"
|
|
69
|
-
:initial-data="props.initialData"
|
|
70
|
-
:has-error-messages="props.hasErrorMessages"
|
|
71
|
-
@change-error-messages="onChangeErrorMessages"
|
|
72
|
-
@change-port-edit-properties-data="onChangePortEditPropertiesData"
|
|
73
|
-
@hide-error-message-alert="emits('hide-error-message-alert')"
|
|
74
|
-
/>
|
|
75
|
-
<common-diagram-main-modals-edit-settings-tabs-port-ipv-four-settings
|
|
76
|
-
v-show="selectedTab === '2'"
|
|
77
|
-
:is-show-error-message-alert="props.isShowErrorMessageAlert"
|
|
78
|
-
:error-messages="props.errorMessages"
|
|
79
|
-
:initial-data="props.initialData"
|
|
80
|
-
:has-error-messages="props.hasErrorMessages"
|
|
81
|
-
@change-error-messages="onChangeErrorMessages"
|
|
82
|
-
@change-port-ipv-four-data="onChangePortEditIpvFourData"
|
|
83
|
-
@hide-error-message-alert="emits('hide-error-message-alert')"
|
|
84
|
-
/>
|
|
85
|
-
</template>
|
|
86
|
-
<common-diagram-main-modals-edit-settings-confirm-teaming-settings-modal
|
|
87
|
-
:is-show="props.isShowWithoutActiveAdapterModal"
|
|
88
|
-
@hide="emits('hide-without-active-adapter-modal')"
|
|
89
|
-
@submit="emits('approve-without-active-adapter-modal')"
|
|
90
|
-
/>
|
|
91
|
-
</div>
|
|
92
|
-
</template>
|
|
93
|
-
|
|
94
|
-
<script setup lang="ts">
|
|
95
|
-
import type { UI_I_ItemsWithTotalCounts } from '~/lib/models/interfaces'
|
|
96
|
-
import type {
|
|
97
|
-
UI_I_AdapterStatus,
|
|
98
|
-
UI_I_ModalsInitialData,
|
|
99
|
-
UI_I_SwitchAdapterItem,
|
|
100
|
-
UI_I_SecurityFields,
|
|
101
|
-
UI_I_TrafficShapingFields,
|
|
102
|
-
UI_I_TeamingFailoverFields,
|
|
103
|
-
UI_I_PropertiesFields,
|
|
104
|
-
UI_I_EditSettingsErrorMessage,
|
|
105
|
-
UI_I_SwitchPropertiesFields,
|
|
106
|
-
UI_I_PortPropertiesFields,
|
|
107
|
-
UI_I_IpvFourSettingsFields,
|
|
108
|
-
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
109
|
-
|
|
110
|
-
const props = defineProps<{
|
|
111
|
-
items: {
|
|
112
|
-
value: string
|
|
113
|
-
text: string
|
|
114
|
-
}[]
|
|
115
|
-
adapters: UI_I_ItemsWithTotalCounts<UI_I_SwitchAdapterItem>
|
|
116
|
-
initialData: UI_I_ModalsInitialData
|
|
117
|
-
isDarkMode: boolean
|
|
118
|
-
isSwitch: boolean
|
|
119
|
-
isNetwork: boolean
|
|
120
|
-
isPort: boolean
|
|
121
|
-
hasErrorMessages: boolean
|
|
122
|
-
isShowErrorMessageAlert: boolean
|
|
123
|
-
networkAlreadyExists: boolean
|
|
124
|
-
isShowWithoutActiveAdapterModal: boolean
|
|
125
|
-
adapterStatus: UI_I_AdapterStatus
|
|
126
|
-
errorMessages: UI_I_EditSettingsErrorMessage
|
|
127
|
-
}>()
|
|
128
|
-
|
|
129
|
-
const emits = defineEmits<{
|
|
130
|
-
(event: 'show-error-message-alert', type: string): void
|
|
131
|
-
(event: 'hide-error-message-alert', type: string): void
|
|
132
|
-
(
|
|
133
|
-
event: 'change-error-messages',
|
|
134
|
-
newErrorMessage: string,
|
|
135
|
-
fieldName: keyof UI_I_EditSettingsErrorMessage
|
|
136
|
-
): void
|
|
137
|
-
(event: 'change-adapter-status', newAdapterStatus: UI_I_AdapterStatus): void
|
|
138
|
-
(
|
|
139
|
-
event: 'change-network-edit-properties-data',
|
|
140
|
-
newNetworkEditPropertiesData: UI_I_PropertiesFields
|
|
141
|
-
): void
|
|
142
|
-
(
|
|
143
|
-
event: 'change-switch-edit-properties-data',
|
|
144
|
-
newSwitchEditPropertiesData: UI_I_SwitchPropertiesFields
|
|
145
|
-
): void
|
|
146
|
-
(
|
|
147
|
-
event: 'change-port-edit-properties-data',
|
|
148
|
-
newSwitchEditPropertiesData: UI_I_SwitchPropertiesFields
|
|
149
|
-
): void
|
|
150
|
-
(
|
|
151
|
-
event: 'change-port-ipv-four-data',
|
|
152
|
-
newPortEditIpvFourData: UI_I_IpvFourSettingsFields
|
|
153
|
-
): void
|
|
154
|
-
(
|
|
155
|
-
event: 'change-edit-security-data',
|
|
156
|
-
newEditSecurityData: UI_I_SecurityFields
|
|
157
|
-
): void
|
|
158
|
-
(
|
|
159
|
-
event: 'change-edit-traffic-shaping-data',
|
|
160
|
-
newEditTrafficShapingData: UI_I_TrafficShapingFields
|
|
161
|
-
): void
|
|
162
|
-
(
|
|
163
|
-
event: 'change-edit-teaming-failover-data',
|
|
164
|
-
newEditTeamingFailoverData: UI_I_TeamingFailoverFields
|
|
165
|
-
): void
|
|
166
|
-
(event: 'hide-without-active-adapter-modal'): void
|
|
167
|
-
(event: 'approve-without-active-adapter-modal'): void
|
|
168
|
-
}>()
|
|
169
|
-
|
|
170
|
-
const selectedTab = defineModel<string>()
|
|
171
|
-
|
|
172
|
-
const onChangeErrorMessages = (
|
|
173
|
-
newErrorMessage: string,
|
|
174
|
-
fieldName: keyof UI_I_EditSettingsErrorMessage
|
|
175
|
-
): void => {
|
|
176
|
-
emits('change-error-messages', newErrorMessage, fieldName)
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
const onChangeAdapterStatus = (newAdapterStatus: UI_I_AdapterStatus) => {
|
|
180
|
-
emits('change-adapter-status', newAdapterStatus)
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
const onChangeNetworkEditPropertiesData = (
|
|
184
|
-
newNetworkEditPropertiesData: UI_I_PropertiesFields
|
|
185
|
-
) => {
|
|
186
|
-
emits('change-network-edit-properties-data', newNetworkEditPropertiesData)
|
|
187
|
-
}
|
|
188
|
-
const onChangeSwitchEditPropertiesData = (
|
|
189
|
-
newSwitchEditPropertiesData: UI_I_SwitchPropertiesFields
|
|
190
|
-
) => {
|
|
191
|
-
emits('change-switch-edit-properties-data', newSwitchEditPropertiesData)
|
|
192
|
-
}
|
|
193
|
-
const onChangePortEditPropertiesData = (
|
|
194
|
-
newPortEditPropertiesData: UI_I_PortPropertiesFields
|
|
195
|
-
) => {
|
|
196
|
-
emits('change-port-edit-properties-data', newPortEditPropertiesData)
|
|
197
|
-
}
|
|
198
|
-
const onChangePortEditIpvFourData = (
|
|
199
|
-
newPortEditIpvFourData: UI_I_IpvFourSettingsFields
|
|
200
|
-
) => {
|
|
201
|
-
emits('change-port-ipv-four-data', newPortEditIpvFourData)
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
const onChangeEditSecurityData = (newEditSecurityData: UI_I_SecurityFields) => {
|
|
205
|
-
emits('change-edit-security-data', newEditSecurityData)
|
|
206
|
-
}
|
|
207
|
-
const onChangeEditTrafficShapingData = (
|
|
208
|
-
newEditTrafficShapingData: UI_I_TrafficShapingFields
|
|
209
|
-
) => {
|
|
210
|
-
emits('change-edit-traffic-shaping-data', newEditTrafficShapingData)
|
|
211
|
-
}
|
|
212
|
-
const onChangeEditTeamingFailoverData = (
|
|
213
|
-
newEditTeamingFailoverData: UI_I_TeamingFailoverFields
|
|
214
|
-
) => {
|
|
215
|
-
emits('change-edit-teaming-failover-data', newEditTeamingFailoverData)
|
|
216
|
-
}
|
|
217
|
-
</script>
|
|
218
|
-
|
|
219
|
-
<style scoped lang="scss">
|
|
220
|
-
:deep(.alert-modal) {
|
|
221
|
-
.modal-dialog .modal-header {
|
|
222
|
-
padding-bottom: 24px;
|
|
223
|
-
border-bottom: none;
|
|
224
|
-
}
|
|
225
|
-
.warning-text {
|
|
226
|
-
color: #666666;
|
|
227
|
-
font-size: 14px;
|
|
228
|
-
margin-top: 24px;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
:deep(.wizard-content__container) {
|
|
232
|
-
margin-left: 220px;
|
|
233
|
-
}
|
|
234
|
-
.vertical-tabs__fixed-position {
|
|
235
|
-
position: absolute;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.loader {
|
|
239
|
-
position: absolute;
|
|
240
|
-
z-index: var(--z-fixed);
|
|
241
|
-
left: 0;
|
|
242
|
-
right: 0;
|
|
243
|
-
bottom: 0;
|
|
244
|
-
top: 0;
|
|
245
|
-
display: flex;
|
|
246
|
-
align-items: center;
|
|
247
|
-
justify-content: center;
|
|
248
|
-
background-color: rgba(0, 0, 0, 0.3);
|
|
249
|
-
|
|
250
|
-
.spinner {
|
|
251
|
-
left: unset;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
</style>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="confirm-teaming-settings">
|
|
3
|
-
<component
|
|
4
|
-
:is="currentComponent"
|
|
5
|
-
:is-show="props.isShow"
|
|
6
|
-
@hide="emits('hide')"
|
|
7
|
-
@submit="emits('submit')"
|
|
8
|
-
/>
|
|
9
|
-
</div>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script setup lang="ts">
|
|
13
|
-
const props = defineProps<{
|
|
14
|
-
isShow: boolean
|
|
15
|
-
}>()
|
|
16
|
-
|
|
17
|
-
const emits = defineEmits<{
|
|
18
|
-
(event: 'hide'): void
|
|
19
|
-
(event: 'submit'): void
|
|
20
|
-
}>()
|
|
21
|
-
|
|
22
|
-
const { $store }: any = useNuxtApp()
|
|
23
|
-
|
|
24
|
-
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
25
|
-
|
|
26
|
-
const currentComponent = computed(() =>
|
|
27
|
-
isNewView.value
|
|
28
|
-
? defineAsyncComponent(() => import('./ConfirmTeamingSettingsModalNew.vue'))
|
|
29
|
-
: defineAsyncComponent(() => import('./ConfirmTeamingSettingsModalOld.vue'))
|
|
30
|
-
)
|
|
31
|
-
</script>
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<ui-popup
|
|
3
|
-
v-if="props.isShow"
|
|
4
|
-
test-id="no-active-adapters"
|
|
5
|
-
icon-name="circle-warning"
|
|
6
|
-
:texts="texts"
|
|
7
|
-
:title="localization.common.noActiveAdaptersAssigned"
|
|
8
|
-
@hide="emits('hide')"
|
|
9
|
-
@submit="emits('submit')"
|
|
10
|
-
>
|
|
11
|
-
<template #content>
|
|
12
|
-
<div class="content">
|
|
13
|
-
<div class="title">
|
|
14
|
-
{{ localization.common.noActiveAdaptersAssigned }}
|
|
15
|
-
</div>
|
|
16
|
-
<div class="message">
|
|
17
|
-
<span>{{
|
|
18
|
-
localization.common.noActiveAdaptersAssignedMessage1
|
|
19
|
-
}}</span>
|
|
20
|
-
<span>{{
|
|
21
|
-
localization.common.noActiveAdaptersAssignedMessage2
|
|
22
|
-
}}</span>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
</ui-popup>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<script setup lang="ts">
|
|
30
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
31
|
-
|
|
32
|
-
const props = defineProps<{
|
|
33
|
-
isShow: boolean
|
|
34
|
-
}>()
|
|
35
|
-
|
|
36
|
-
const emits = defineEmits<{
|
|
37
|
-
(event: 'hide'): void
|
|
38
|
-
(event: 'submit'): void
|
|
39
|
-
}>()
|
|
40
|
-
|
|
41
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
42
|
-
|
|
43
|
-
const texts = computed(() => ({
|
|
44
|
-
button1: localization.value.common.cancel,
|
|
45
|
-
button2: localization.value.common.save,
|
|
46
|
-
}))
|
|
47
|
-
</script>
|
|
48
|
-
|
|
49
|
-
<style scoped lang="scss">
|
|
50
|
-
.content {
|
|
51
|
-
padding: 16px 32px;
|
|
52
|
-
|
|
53
|
-
.title {
|
|
54
|
-
text-align: center;
|
|
55
|
-
font-weight: 500;
|
|
56
|
-
font-size: 20px;
|
|
57
|
-
line-height: 24px;
|
|
58
|
-
letter-spacing: 0;
|
|
59
|
-
vertical-align: middle;
|
|
60
|
-
margin-bottom: 8px;
|
|
61
|
-
color: var(--modal-title);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.message {
|
|
65
|
-
display: flex;
|
|
66
|
-
row-gap: 12px;
|
|
67
|
-
flex-direction: column;
|
|
68
|
-
|
|
69
|
-
span {
|
|
70
|
-
display: block;
|
|
71
|
-
text-align: center;
|
|
72
|
-
font-weight: 400;
|
|
73
|
-
font-size: 14px;
|
|
74
|
-
line-height: 17px;
|
|
75
|
-
letter-spacing: 0;
|
|
76
|
-
text-align: center;
|
|
77
|
-
vertical-align: middle;
|
|
78
|
-
color: #9da6ad;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
</style>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
2
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
3
|
-
|
|
4
|
-
export const selectItemFunc = (
|
|
5
|
-
localization: UI_I_Localization
|
|
6
|
-
): UI_I_Dropdown[] | { text: string; value: number }[] => [
|
|
7
|
-
{
|
|
8
|
-
text: localization.common.reject,
|
|
9
|
-
value: 2,
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
text: localization.common.accept,
|
|
13
|
-
value: 1,
|
|
14
|
-
},
|
|
15
|
-
]
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
UI_I_EditFieldsData,
|
|
3
|
-
UI_I_PropertiesFields,
|
|
4
|
-
UI_I_PortPropertiesFields,
|
|
5
|
-
UI_I_SwitchPropertiesFields,
|
|
6
|
-
UI_I_IpvFourSettingsFields,
|
|
7
|
-
UI_I_SecurityFields,
|
|
8
|
-
UI_I_TrafficShapingFields,
|
|
9
|
-
UI_I_TeamingFailoverWithAdaptersFields,
|
|
10
|
-
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
11
|
-
import type { UI_I_ModalsInitialData } from '~/components/common/diagramMain/lib/models/interfaces'
|
|
12
|
-
|
|
13
|
-
export const compareDataFunc = (
|
|
14
|
-
viewName: 'port-edit' | 'switch-edit' | 'network-edit',
|
|
15
|
-
networkEditData: UI_I_EditFieldsData,
|
|
16
|
-
initialData: UI_I_ModalsInitialData
|
|
17
|
-
): boolean => {
|
|
18
|
-
if (viewName === 'port-edit') {
|
|
19
|
-
if (
|
|
20
|
-
(networkEditData.properties as UI_I_PortPropertiesFields).mtu ===
|
|
21
|
-
initialData.mtu &&
|
|
22
|
-
JSON.stringify(
|
|
23
|
-
(networkEditData.properties as UI_I_PortPropertiesFields).services
|
|
24
|
-
) === JSON.stringify(initialData.services) &&
|
|
25
|
-
(networkEditData.ipvFourSettings as UI_I_IpvFourSettingsFields)
|
|
26
|
-
.ipv4Settings ===
|
|
27
|
-
(
|
|
28
|
-
initialData.tcpConfig as
|
|
29
|
-
| UI_I_ModalsInitialData['tcpConfig']
|
|
30
|
-
| undefined
|
|
31
|
-
)?.ipv4Settings &&
|
|
32
|
-
(networkEditData.ipvFourSettings as UI_I_IpvFourSettingsFields)
|
|
33
|
-
.ipv4Address ===
|
|
34
|
-
(
|
|
35
|
-
initialData.tcpConfig as
|
|
36
|
-
| UI_I_ModalsInitialData['tcpConfig']
|
|
37
|
-
| undefined
|
|
38
|
-
)?.ipv4Address &&
|
|
39
|
-
(networkEditData.ipvFourSettings as UI_I_IpvFourSettingsFields)
|
|
40
|
-
.subnetMask ===
|
|
41
|
-
(
|
|
42
|
-
initialData.tcpConfig as
|
|
43
|
-
| UI_I_ModalsInitialData['tcpConfig']
|
|
44
|
-
| undefined
|
|
45
|
-
)?.subnetMask &&
|
|
46
|
-
!!(networkEditData.ipvFourSettings as UI_I_IpvFourSettingsFields)
|
|
47
|
-
.defaultGateway.checked ===
|
|
48
|
-
!!(
|
|
49
|
-
initialData.tcpConfig as
|
|
50
|
-
| UI_I_ModalsInitialData['tcpConfig']
|
|
51
|
-
| undefined
|
|
52
|
-
)?.defaultGateway?.checked &&
|
|
53
|
-
(networkEditData.ipvFourSettings as UI_I_IpvFourSettingsFields)
|
|
54
|
-
.defaultGateway.value ===
|
|
55
|
-
(
|
|
56
|
-
initialData.tcpConfig as
|
|
57
|
-
| UI_I_ModalsInitialData['tcpConfig']
|
|
58
|
-
| undefined
|
|
59
|
-
)?.defaultGateway?.value
|
|
60
|
-
) {
|
|
61
|
-
return true
|
|
62
|
-
} else {
|
|
63
|
-
return false
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
if (viewName === 'switch-edit' || viewName === 'network-edit') {
|
|
68
|
-
if (
|
|
69
|
-
viewName === 'switch-edit' &&
|
|
70
|
-
((networkEditData.properties as UI_I_SwitchPropertiesFields).mtu !==
|
|
71
|
-
initialData.mtu ||
|
|
72
|
-
(networkEditData.properties as UI_I_SwitchPropertiesFields)
|
|
73
|
-
.num_ports !== initialData.num_ports)
|
|
74
|
-
) {
|
|
75
|
-
return false
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
if (
|
|
79
|
-
viewName === 'network-edit' &&
|
|
80
|
-
(Number(
|
|
81
|
-
(
|
|
82
|
-
(networkEditData.properties as UI_I_PropertiesFields)
|
|
83
|
-
?.vlanId as string
|
|
84
|
-
)?.match?.(/([0-9]+)/)?.[0] ||
|
|
85
|
-
(networkEditData.properties as UI_I_PropertiesFields).vlanId
|
|
86
|
-
) !== initialData.vlanId ||
|
|
87
|
-
(networkEditData.properties as UI_I_PropertiesFields).networkLabel !==
|
|
88
|
-
initialData.networkLabel)
|
|
89
|
-
) {
|
|
90
|
-
return false
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
if (
|
|
94
|
-
(networkEditData.security as UI_I_SecurityFields).promiscuousMode
|
|
95
|
-
.selected === initialData.securityPolicy?.[0].initialValue.value &&
|
|
96
|
-
!!(networkEditData.security as UI_I_SecurityFields).promiscuousMode
|
|
97
|
-
.checked === !!initialData.securityPolicy?.[0].initialValue.override &&
|
|
98
|
-
(networkEditData.security as UI_I_SecurityFields).forgedTransmits
|
|
99
|
-
.selected === initialData.securityPolicy?.[1].initialValue.value &&
|
|
100
|
-
!!(networkEditData.security as UI_I_SecurityFields).forgedTransmits
|
|
101
|
-
.checked === !!initialData.securityPolicy?.[1].initialValue.override &&
|
|
102
|
-
(networkEditData.security as UI_I_SecurityFields).macAddressChanges
|
|
103
|
-
.selected === initialData.securityPolicy?.[2].initialValue.value &&
|
|
104
|
-
!!(networkEditData.security as UI_I_SecurityFields).macAddressChanges
|
|
105
|
-
.checked === !!initialData.securityPolicy?.[2].initialValue.override &&
|
|
106
|
-
!!(networkEditData.trafficShaping as UI_I_TrafficShapingFields).status
|
|
107
|
-
.checked === !!initialData.shapingPolicy?.[0].initialValue.override &&
|
|
108
|
-
(networkEditData.trafficShaping as UI_I_TrafficShapingFields).status
|
|
109
|
-
.selected === initialData.shapingPolicy?.[0].initialValue.value &&
|
|
110
|
-
(networkEditData.trafficShaping as UI_I_TrafficShapingFields).average ===
|
|
111
|
-
initialData.average_bw &&
|
|
112
|
-
(networkEditData.trafficShaping as UI_I_TrafficShapingFields)
|
|
113
|
-
.burstSize === initialData.burst_size &&
|
|
114
|
-
(networkEditData.trafficShaping as UI_I_TrafficShapingFields).peak ===
|
|
115
|
-
initialData.peak_bw &&
|
|
116
|
-
!!(
|
|
117
|
-
networkEditData.teamingFailover as UI_I_TeamingFailoverWithAdaptersFields
|
|
118
|
-
).notifySwitches.checked ===
|
|
119
|
-
!!initialData.nicTeamingPolicy?.[0].initialValue.override &&
|
|
120
|
-
(
|
|
121
|
-
networkEditData.teamingFailover as UI_I_TeamingFailoverWithAdaptersFields
|
|
122
|
-
).notifySwitches.selected ===
|
|
123
|
-
initialData.nicTeamingPolicy?.[0].initialValue.value &&
|
|
124
|
-
!!(
|
|
125
|
-
networkEditData.teamingFailover as UI_I_TeamingFailoverWithAdaptersFields
|
|
126
|
-
).loadBalancing.checked ===
|
|
127
|
-
!!initialData.nicTeamingPolicy?.[1].initialValue.override &&
|
|
128
|
-
(
|
|
129
|
-
networkEditData.teamingFailover as UI_I_TeamingFailoverWithAdaptersFields
|
|
130
|
-
).loadBalancing.selected ===
|
|
131
|
-
initialData.nicTeamingPolicy?.[1].initialValue.value &&
|
|
132
|
-
!!(
|
|
133
|
-
networkEditData.teamingFailover as UI_I_TeamingFailoverWithAdaptersFields
|
|
134
|
-
).networkFailureDetection.checked ===
|
|
135
|
-
!!initialData.nicTeamingPolicy?.[2].initialValue.override &&
|
|
136
|
-
(
|
|
137
|
-
networkEditData.teamingFailover as UI_I_TeamingFailoverWithAdaptersFields
|
|
138
|
-
).networkFailureDetection.selected ===
|
|
139
|
-
initialData.nicTeamingPolicy?.[2].initialValue.value &&
|
|
140
|
-
!!(
|
|
141
|
-
networkEditData.teamingFailover as UI_I_TeamingFailoverWithAdaptersFields
|
|
142
|
-
).failback.checked ===
|
|
143
|
-
!!initialData.nicTeamingPolicy?.[3].initialValue.override &&
|
|
144
|
-
(
|
|
145
|
-
networkEditData.teamingFailover as UI_I_TeamingFailoverWithAdaptersFields
|
|
146
|
-
).failback.selected ===
|
|
147
|
-
initialData.nicTeamingPolicy?.[3].initialValue.value &&
|
|
148
|
-
!!(
|
|
149
|
-
networkEditData.teamingFailover as UI_I_TeamingFailoverWithAdaptersFields
|
|
150
|
-
).failoverOrder.checked === !!initialData.nics_override &&
|
|
151
|
-
(
|
|
152
|
-
networkEditData.teamingFailover as UI_I_TeamingFailoverWithAdaptersFields
|
|
153
|
-
)?.adapters?.active
|
|
154
|
-
?.sort?.()
|
|
155
|
-
.toString() ===
|
|
156
|
-
(initialData?.activeAdapters as string[])?.sort?.().toString() &&
|
|
157
|
-
(
|
|
158
|
-
networkEditData.teamingFailover as UI_I_TeamingFailoverWithAdaptersFields
|
|
159
|
-
)?.adapters?.standby
|
|
160
|
-
?.sort?.()
|
|
161
|
-
.toString() ===
|
|
162
|
-
(initialData?.standbyAdapters as string[])?.sort?.().toString() &&
|
|
163
|
-
(
|
|
164
|
-
networkEditData.teamingFailover as UI_I_TeamingFailoverWithAdaptersFields
|
|
165
|
-
)?.adapters?.unused
|
|
166
|
-
?.sort?.()
|
|
167
|
-
.toString() ===
|
|
168
|
-
(initialData?.unusedAdapters as string[])?.sort?.().toString()
|
|
169
|
-
) {
|
|
170
|
-
return true
|
|
171
|
-
} else {
|
|
172
|
-
return false
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return true
|
|
177
|
-
}
|
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<component
|
|
4
|
-
:is="currentComponent"
|
|
5
|
-
v-model:network-edit-data="networkEditData"
|
|
6
|
-
:width="props.width"
|
|
7
|
-
:height="props.height"
|
|
8
|
-
:show="props.show"
|
|
9
|
-
:title="props.title"
|
|
10
|
-
:modal-title="title"
|
|
11
|
-
:modal-loading="props.isEditModalLoading"
|
|
12
|
-
:is-dark-mode="props.isDarkMode"
|
|
13
|
-
:items="props.items"
|
|
14
|
-
:view-name="props.viewName"
|
|
15
|
-
:initial-data="props.initialData"
|
|
16
|
-
:adapters="props.adapters"
|
|
17
|
-
:flag-send-data="flagSendData"
|
|
18
|
-
@change-flag-send-data="onSendDataRequest"
|
|
19
|
-
@send-edit-data="onSendData"
|
|
20
|
-
@change-edit-fields-data="onChangeEditFieldsData"
|
|
21
|
-
@check-network-label="onCheckNetworkLabel"
|
|
22
|
-
@hide="onHideEditSettingsModal('close')"
|
|
23
|
-
@submit="onSendDataRequest"
|
|
24
|
-
/>
|
|
25
|
-
<common-diagram-main-modals-unsaved-changes-modal
|
|
26
|
-
:is-show="isShowUnsavedChangesModal"
|
|
27
|
-
@hide="isShowUnsavedChangesModal = false"
|
|
28
|
-
@leave="emits('hide')"
|
|
29
|
-
/>
|
|
30
|
-
</div>
|
|
31
|
-
</template>
|
|
32
|
-
|
|
33
|
-
<script setup lang="ts">
|
|
34
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
35
|
-
import type { UI_I_EditFieldsData } from '~/components/common/diagramMain/lib/models/interfaces'
|
|
36
|
-
import type { UI_I_PortViewSettingsModalProps } from '~/components/common/diagramMain/modals/editSettings/lib/models/interfaces'
|
|
37
|
-
import { compareDataFunc } from '~/components/common/diagramMain/modals/editSettings/lib/utils/utils'
|
|
38
|
-
|
|
39
|
-
const props = withDefaults(defineProps<UI_I_PortViewSettingsModalProps>(), {
|
|
40
|
-
initialData: () => ({}),
|
|
41
|
-
title: 'Network',
|
|
42
|
-
adapters: () => ({
|
|
43
|
-
total_pages: 0,
|
|
44
|
-
total_items: 0,
|
|
45
|
-
items: [],
|
|
46
|
-
}),
|
|
47
|
-
isEditModalLoading: false,
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
const emits = defineEmits<{
|
|
51
|
-
(event: 'hide'): void
|
|
52
|
-
(event: 'change-edit-fields-data', editFieldsData: UI_I_EditFieldsData): void
|
|
53
|
-
(
|
|
54
|
-
event: 'send-edit-data',
|
|
55
|
-
type: string,
|
|
56
|
-
hideModal: () => void,
|
|
57
|
-
id?: string
|
|
58
|
-
): void
|
|
59
|
-
(
|
|
60
|
-
event: 'check-network-label',
|
|
61
|
-
label: string,
|
|
62
|
-
sendMessage: (message: string) => void
|
|
63
|
-
): void
|
|
64
|
-
}>()
|
|
65
|
-
|
|
66
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
67
|
-
|
|
68
|
-
const { $store }: any = useNuxtApp()
|
|
69
|
-
|
|
70
|
-
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
71
|
-
|
|
72
|
-
const currentComponent = computed(() =>
|
|
73
|
-
isNewView.value
|
|
74
|
-
? defineAsyncComponent(() => import('./EditSettingsModalNew.vue'))
|
|
75
|
-
: defineAsyncComponent(() => import('./EditSettingsModalOld.vue'))
|
|
76
|
-
)
|
|
77
|
-
|
|
78
|
-
const networkEditData = ref<UI_I_EditFieldsData>({})
|
|
79
|
-
|
|
80
|
-
const isShowUnsavedChangesModal = ref<boolean>(false)
|
|
81
|
-
|
|
82
|
-
// Title
|
|
83
|
-
const title = computed(
|
|
84
|
-
() => props.title + localization.value.common.networkEditSettings
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
const onCheckNetworkLabel = (
|
|
88
|
-
label: string,
|
|
89
|
-
sendMessage: (message: string) => void
|
|
90
|
-
) => {
|
|
91
|
-
emits('check-network-label', label, sendMessage)
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
const onHideEditSettingsModal = (type: 'send' | 'close'): void => {
|
|
95
|
-
if (!isNewView.value || type === 'send') {
|
|
96
|
-
emits('hide')
|
|
97
|
-
return
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
if (
|
|
101
|
-
compareDataFunc(props.viewName, networkEditData.value, props.initialData)
|
|
102
|
-
) {
|
|
103
|
-
emits('hide')
|
|
104
|
-
} else {
|
|
105
|
-
isShowUnsavedChangesModal.value = true
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
const onChangeEditFieldsData = (newEditFieldsData: UI_I_EditFieldsData) => {
|
|
110
|
-
emits('change-edit-fields-data', newEditFieldsData)
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
const flagSendData = ref(true)
|
|
114
|
-
|
|
115
|
-
const onSendDataRequest = () => {
|
|
116
|
-
flagSendData.value = !flagSendData.value
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
const isSphereProject = computed<boolean>(() => props.project === 'sphere')
|
|
120
|
-
|
|
121
|
-
const onSendData = (type: string) => {
|
|
122
|
-
const typeLocal = isSphereProject.value
|
|
123
|
-
? props.networkType
|
|
124
|
-
? `${type}${props.networkType}`
|
|
125
|
-
: type
|
|
126
|
-
: type
|
|
127
|
-
|
|
128
|
-
compareDataFunc(props.viewName, networkEditData.value, props.initialData)
|
|
129
|
-
? emits('hide')
|
|
130
|
-
: emits(
|
|
131
|
-
'send-edit-data',
|
|
132
|
-
typeLocal,
|
|
133
|
-
() => onHideEditSettingsModal('send'),
|
|
134
|
-
props.initialData.id || props.title
|
|
135
|
-
)
|
|
136
|
-
}
|
|
137
|
-
</script>
|