bfg-common 1.4.530 → 1.4.532
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/img/icons/icons-sprite-dark-1.svg +407 -407
- package/assets/img/icons/icons-sprite-dark-2.svg +343 -343
- package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-4.svg +255 -255
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-dark-6.svg +94 -94
- package/assets/img/icons/icons-sprite-light-1.svg +407 -407
- package/assets/img/icons/icons-sprite-light-2.svg +343 -343
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-4.svg +255 -255
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-6.svg +94 -94
- package/assets/localization/local_be.json +11 -2
- package/assets/localization/local_en.json +11 -2
- package/assets/localization/local_hy.json +11 -2
- package/assets/localization/local_kk.json +11 -2
- package/assets/localization/local_ru.json +11 -2
- package/assets/localization/local_zh.json +11 -2
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/modal/bySteps/BySteps.vue +253 -253
- package/components/atoms/stack/StackBlock.vue +185 -185
- package/components/atoms/table/dataGrid/DataGrid.vue +1633 -1633
- package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +222 -222
- package/components/common/browse/blocks/lib/models/types.ts +1 -1
- package/components/common/browse/lib/models/interfaces.ts +5 -5
- package/components/common/context/lib/models/interfaces.ts +30 -30
- package/components/common/context/recursion/Recursion.vue +86 -86
- package/components/common/context/recursion/RecursionNew.vue +199 -199
- package/components/common/context/recursion/RecursionOld.vue +213 -213
- package/components/common/diagramMain/Header.vue +211 -211
- package/components/common/diagramMain/adapter/AdapterItems.vue +61 -61
- package/components/common/diagramMain/lib/config/initial.ts +50 -50
- package/components/common/diagramMain/lib/models/enums.ts +44 -44
- package/components/common/diagramMain/lib/models/types.ts +21 -21
- package/components/common/diagramMain/lib/utils/utils.ts +331 -331
- package/components/common/diagramMain/modals/ManagePhysicalAdaptersModal.vue +330 -330
- package/components/common/diagramMain/modals/editSettings/ConfirmTeamingSettingsModal.vue +40 -40
- package/components/common/diagramMain/modals/editSettings/EditSettings.vue +497 -497
- package/components/common/diagramMain/modals/editSettings/EditSettingsModal.vue +812 -812
- package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +214 -214
- package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +189 -189
- package/components/common/diagramMain/modals/editSettings/tabs/SwitchProperties.vue +163 -163
- package/components/common/diagramMain/modals/editSettings/tabs/TeamingFailover.vue +175 -175
- package/components/common/diagramMain/modals/editSettings/tabs/TrafficShaping.vue +398 -398
- package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +346 -346
- package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +205 -205
- package/components/common/diagramMain/modals/lib/config/diagramConfig.ts +23 -23
- package/components/common/diagramMain/modals/lib/config/initial.ts +180 -180
- package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +90 -90
- package/components/common/diagramMain/modals/lib/mappers/mappers.ts +87 -87
- package/components/common/diagramMain/modals/lib/utils/index.ts +24 -24
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +537 -537
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/lib/config/steps.ts +114 -114
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/ConnectionSettings.vue +169 -169
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/steps/SelectVmkernelAdapter.vue +159 -159
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +14 -14
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings.ts +137 -137
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter.ts +52 -52
- package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts +19 -19
- package/components/common/diagramMain/port/Ports.vue +47 -47
- package/components/common/layout/theHeader/feedback/Feedback.vue +1 -1
- package/components/common/layout/theHeader/feedback/lib/config/sendFeedback.ts +8 -0
- package/components/common/layout/theHeader/feedback/new/New.vue +141 -90
- package/components/common/layout/theHeader/feedback/new/additionalDetails/AdditionalDetails.vue +494 -12
- package/components/common/layout/theHeader/feedback/new/additionalDetails/Headline.vue +10 -7
- package/components/common/layout/theHeader/feedback/new/description/Description.vue +2 -2
- package/components/common/layout/theHeader/feedback/new/email/Email.vue +2 -2
- package/components/common/layout/theHeader/feedback/new/lib/models/interfaces.ts +4 -0
- package/components/common/layout/theHeader/feedback/new/subtitle/Subtitle.vue +6 -3
- package/components/common/layout/theHeader/feedback/new/tabs/Tabs.vue +24 -8
- package/components/common/layout/theHeader/feedback/new/tabs/lib/config/tabs.ts +2 -2
- package/components/common/layout/theHeader/feedback/new/tabs/lib/models/enums.ts +6 -0
- package/components/common/layout/theHeader/helpMenu/About.vue +85 -85
- package/components/common/layout/theHeader/helpMenu/aboutNew/AboutNew.vue +103 -103
- package/components/common/mainNavigationPanel/MainNavigationPanel.vue +152 -152
- package/components/common/modals/confirmation/Confirmation.vue +70 -70
- package/components/common/vm/actions/add/Add.vue +617 -617
- package/components/common/vm/actions/clone/lib/config/steps.ts +129 -129
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +267 -267
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +264 -264
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/BusNew.vue +118 -118
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDriveNew.vue +163 -163
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +25 -25
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/MediaNew.vue +55 -55
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +147 -147
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/sharing/SharingNew.vue +44 -44
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetworkNew.vue +124 -124
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/LocationOld.vue +134 -134
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/New.vue +63 -63
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/Table.vue +74 -74
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/lib/config/config.ts +95 -95
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddressNew.vue +69 -69
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddressOld.vue +83 -83
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceNew.vue +85 -85
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDeviceOld.vue +91 -91
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoNew.vue +35 -35
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIoNew.vue +48 -48
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/Note.vue +15 -15
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteNew.vue +42 -42
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteOld.vue +30 -30
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGridNew.vue +30 -30
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/typeSelection/TypeSelectionNew.vue +46 -46
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerNew.vue +56 -56
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/OtherNew.vue +27 -27
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/totalVideoMemory/TotalVideoMemoryNew.vue +54 -54
- package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +145 -145
- package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsNew.vue +102 -102
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsNew.vue +75 -75
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +26 -26
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +57 -57
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/FirmwareNew.vue +42 -42
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/menu/MenuNew.vue +25 -25
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +171 -171
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +50 -50
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsNew.vue +141 -141
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/New.vue +140 -140
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/copyPaste/CopyPasteNew.vue +30 -30
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/fileTransfer/FileTransferNew.vue +30 -30
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/folderSharing/FolderSharingNew.vue +30 -30
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +32 -32
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/KeymapNew.vue +39 -39
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/PasswordNew.vue +100 -100
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirectionNew.vue +38 -38
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirectionOld.vue +44 -44
- package/components/common/vm/actions/common/select/storage/Storage.vue +130 -130
- package/components/common/vm/actions/common/select/storage/StorageOld.vue +129 -129
- package/components/common/vm/actions/common/select/storage/new/New.vue +159 -159
- package/components/common/vm/actions/editSettings/EditSettings.vue +214 -214
- package/components/common/vm/actions/editSettings/EditSettingsOld.vue +182 -182
- package/components/common/wizards/network/add/lib/config/steps.ts +464 -464
- package/composables/productNameLocal.ts +30 -30
- package/package.json +2 -2
- package/plugins/date.ts +233 -233
- package/plugins/recursion.ts +311 -311
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/public/spice-console/network/spicechannel.js +383 -383
- package/store/main/mutations.ts +7 -7
- package/store/main/state.ts +7 -7
- package/components/common/layout/theHeader/feedback/new/tabs/lib/models/interfaces.ts +0 -17
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import type { UI_I_SelectVmkernelAdapter } from '~/components/common/wizards/network/add/lib/models/interfaces'
|
|
2
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
3
|
-
import type { UI_I_WizardStep, UI_I_ValidationReturn } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
4
|
-
import { UI_E_MigrationValidationFields } from '~/components/common/diagramMain/lib/models/enums'
|
|
5
|
-
import type Wizard from '~/components/atoms/wizard/lib/utils/utils'
|
|
6
|
-
|
|
7
|
-
export const validateSelectedVmLocal = (
|
|
8
|
-
localization: UI_I_Localization,
|
|
9
|
-
data: UI_I_SelectVmkernelAdapter,
|
|
10
|
-
wizard: Wizard
|
|
11
|
-
): void => {
|
|
12
|
-
wizard.validateFieldLocal(
|
|
13
|
-
0,
|
|
14
|
-
'vm',
|
|
15
|
-
data.vm === '',
|
|
16
|
-
'',
|
|
17
|
-
localization.common.noVmKernelNetworkAdapterSelectedForMigration
|
|
18
|
-
)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export const checkSelectedVmSync = (
|
|
22
|
-
localization: UI_I_Localization,
|
|
23
|
-
data: UI_I_SelectVmkernelAdapter,
|
|
24
|
-
wizard: Wizard,
|
|
25
|
-
value: UI_I_WizardStep[]
|
|
26
|
-
): UI_I_ValidationReturn => {
|
|
27
|
-
let stepHasError = false
|
|
28
|
-
|
|
29
|
-
if (data.vm === '') {
|
|
30
|
-
stepHasError = wizard.setValidation(
|
|
31
|
-
0,
|
|
32
|
-
UI_E_MigrationValidationFields.SELECT_ADAPTER_VM,
|
|
33
|
-
{
|
|
34
|
-
fieldMessage: '',
|
|
35
|
-
alertMessage: localization.common.noVmKernelNetworkAdapterSelectedForMigration,
|
|
36
|
-
}
|
|
37
|
-
)
|
|
38
|
-
} else if (
|
|
39
|
-
wizard.hasMessage(0, UI_E_MigrationValidationFields.SELECT_ADAPTER_VM)
|
|
40
|
-
) {
|
|
41
|
-
value = wizard.removeValidation(
|
|
42
|
-
0,
|
|
43
|
-
UI_E_MigrationValidationFields.SELECT_ADAPTER_VM,
|
|
44
|
-
value
|
|
45
|
-
)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
return {
|
|
49
|
-
newValue: value,
|
|
50
|
-
stepHasError,
|
|
51
|
-
}
|
|
52
|
-
}
|
|
1
|
+
import type { UI_I_SelectVmkernelAdapter } from '~/components/common/wizards/network/add/lib/models/interfaces'
|
|
2
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
3
|
+
import type { UI_I_WizardStep, UI_I_ValidationReturn } from '~/components/atoms/wizard/lib/models/interfaces'
|
|
4
|
+
import { UI_E_MigrationValidationFields } from '~/components/common/diagramMain/lib/models/enums'
|
|
5
|
+
import type Wizard from '~/components/atoms/wizard/lib/utils/utils'
|
|
6
|
+
|
|
7
|
+
export const validateSelectedVmLocal = (
|
|
8
|
+
localization: UI_I_Localization,
|
|
9
|
+
data: UI_I_SelectVmkernelAdapter,
|
|
10
|
+
wizard: Wizard
|
|
11
|
+
): void => {
|
|
12
|
+
wizard.validateFieldLocal(
|
|
13
|
+
0,
|
|
14
|
+
'vm',
|
|
15
|
+
data.vm === '',
|
|
16
|
+
'',
|
|
17
|
+
localization.common.noVmKernelNetworkAdapterSelectedForMigration
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const checkSelectedVmSync = (
|
|
22
|
+
localization: UI_I_Localization,
|
|
23
|
+
data: UI_I_SelectVmkernelAdapter,
|
|
24
|
+
wizard: Wizard,
|
|
25
|
+
value: UI_I_WizardStep[]
|
|
26
|
+
): UI_I_ValidationReturn => {
|
|
27
|
+
let stepHasError = false
|
|
28
|
+
|
|
29
|
+
if (data.vm === '') {
|
|
30
|
+
stepHasError = wizard.setValidation(
|
|
31
|
+
0,
|
|
32
|
+
UI_E_MigrationValidationFields.SELECT_ADAPTER_VM,
|
|
33
|
+
{
|
|
34
|
+
fieldMessage: '',
|
|
35
|
+
alertMessage: localization.common.noVmKernelNetworkAdapterSelectedForMigration,
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
} else if (
|
|
39
|
+
wizard.hasMessage(0, UI_E_MigrationValidationFields.SELECT_ADAPTER_VM)
|
|
40
|
+
) {
|
|
41
|
+
value = wizard.removeValidation(
|
|
42
|
+
0,
|
|
43
|
+
UI_E_MigrationValidationFields.SELECT_ADAPTER_VM,
|
|
44
|
+
value
|
|
45
|
+
)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
newValue: value,
|
|
50
|
+
stepHasError,
|
|
51
|
+
}
|
|
52
|
+
}
|
package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/validations.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
validateVlanIdConnectionSettingsLocal,
|
|
3
|
-
validateNetworkConnectionSettingsLocal,
|
|
4
|
-
checkConnectionSettingsSync,
|
|
5
|
-
checkNetworkAsync,
|
|
6
|
-
} from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings'
|
|
7
|
-
import {
|
|
8
|
-
checkSelectedVmSync,
|
|
9
|
-
validateSelectedVmLocal,
|
|
10
|
-
} from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter'
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
validateVlanIdConnectionSettingsLocal,
|
|
14
|
-
validateNetworkConnectionSettingsLocal,
|
|
15
|
-
checkConnectionSettingsSync,
|
|
16
|
-
checkNetworkAsync,
|
|
17
|
-
checkSelectedVmSync,
|
|
18
|
-
validateSelectedVmLocal,
|
|
19
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
validateVlanIdConnectionSettingsLocal,
|
|
3
|
+
validateNetworkConnectionSettingsLocal,
|
|
4
|
+
checkConnectionSettingsSync,
|
|
5
|
+
checkNetworkAsync,
|
|
6
|
+
} from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/connectionSettings'
|
|
7
|
+
import {
|
|
8
|
+
checkSelectedVmSync,
|
|
9
|
+
validateSelectedVmLocal,
|
|
10
|
+
} from '~/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/selectVmkernelAdapter'
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
validateVlanIdConnectionSettingsLocal,
|
|
14
|
+
validateNetworkConnectionSettingsLocal,
|
|
15
|
+
checkConnectionSettingsSync,
|
|
16
|
+
checkNetworkAsync,
|
|
17
|
+
checkSelectedVmSync,
|
|
18
|
+
validateSelectedVmLocal,
|
|
19
|
+
}
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<g>
|
|
3
|
-
<template v-if="props.network.toggle">
|
|
4
|
-
<template v-for="port in props.network.ports" :key="port.id">
|
|
5
|
-
<common-diagram-main-port
|
|
6
|
-
:network="props.network"
|
|
7
|
-
:port="port"
|
|
8
|
-
:is-dark-mode="props.isDarkMode"
|
|
9
|
-
:selected-port="props.selectedPort"
|
|
10
|
-
:selected-adapter="props.selectedAdapter"
|
|
11
|
-
@select-port="onSelectPort"
|
|
12
|
-
@show-modal="onShowModal"
|
|
13
|
-
/>
|
|
14
|
-
</template>
|
|
15
|
-
</template>
|
|
16
|
-
</g>
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<script setup lang="ts">
|
|
20
|
-
import type {
|
|
21
|
-
UI_I_ModalsInitialData,
|
|
22
|
-
UI_I_NetworkFullWithPositions,
|
|
23
|
-
UI_I_SelectedAdapter,
|
|
24
|
-
UI_I_SelectedPort,
|
|
25
|
-
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
26
|
-
|
|
27
|
-
const props = defineProps<{
|
|
28
|
-
network: UI_I_NetworkFullWithPositions
|
|
29
|
-
selectedPort: UI_I_SelectedPort
|
|
30
|
-
selectedAdapter: UI_I_SelectedAdapter
|
|
31
|
-
isDarkMode: boolean
|
|
32
|
-
}>()
|
|
33
|
-
|
|
34
|
-
const emits = defineEmits<{
|
|
35
|
-
(event: 'select-port', networkId: string, portId: string): void
|
|
36
|
-
(
|
|
37
|
-
event: 'show-modal',
|
|
38
|
-
value: string,
|
|
39
|
-
properties?: UI_I_ModalsInitialData
|
|
40
|
-
): void
|
|
41
|
-
}>()
|
|
42
|
-
|
|
43
|
-
const onSelectPort = (networkId: string, portId: string) =>
|
|
44
|
-
emits('select-port', networkId, portId)
|
|
45
|
-
const onShowModal = (value: string, properties?: UI_I_ModalsInitialData) =>
|
|
46
|
-
emits('show-modal', value, properties)
|
|
47
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<g>
|
|
3
|
+
<template v-if="props.network.toggle">
|
|
4
|
+
<template v-for="port in props.network.ports" :key="port.id">
|
|
5
|
+
<common-diagram-main-port
|
|
6
|
+
:network="props.network"
|
|
7
|
+
:port="port"
|
|
8
|
+
:is-dark-mode="props.isDarkMode"
|
|
9
|
+
:selected-port="props.selectedPort"
|
|
10
|
+
:selected-adapter="props.selectedAdapter"
|
|
11
|
+
@select-port="onSelectPort"
|
|
12
|
+
@show-modal="onShowModal"
|
|
13
|
+
/>
|
|
14
|
+
</template>
|
|
15
|
+
</template>
|
|
16
|
+
</g>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup lang="ts">
|
|
20
|
+
import type {
|
|
21
|
+
UI_I_ModalsInitialData,
|
|
22
|
+
UI_I_NetworkFullWithPositions,
|
|
23
|
+
UI_I_SelectedAdapter,
|
|
24
|
+
UI_I_SelectedPort,
|
|
25
|
+
} from '~/components/common/diagramMain/lib/models/interfaces'
|
|
26
|
+
|
|
27
|
+
const props = defineProps<{
|
|
28
|
+
network: UI_I_NetworkFullWithPositions
|
|
29
|
+
selectedPort: UI_I_SelectedPort
|
|
30
|
+
selectedAdapter: UI_I_SelectedAdapter
|
|
31
|
+
isDarkMode: boolean
|
|
32
|
+
}>()
|
|
33
|
+
|
|
34
|
+
const emits = defineEmits<{
|
|
35
|
+
(event: 'select-port', networkId: string, portId: string): void
|
|
36
|
+
(
|
|
37
|
+
event: 'show-modal',
|
|
38
|
+
value: string,
|
|
39
|
+
properties?: UI_I_ModalsInitialData
|
|
40
|
+
): void
|
|
41
|
+
}>()
|
|
42
|
+
|
|
43
|
+
const onSelectPort = (networkId: string, portId: string) =>
|
|
44
|
+
emits('select-port', networkId, portId)
|
|
45
|
+
const onShowModal = (value: string, properties?: UI_I_ModalsInitialData) =>
|
|
46
|
+
emits('show-modal', value, properties)
|
|
47
|
+
</script>
|
|
@@ -96,7 +96,7 @@ const onHide = (): void => {
|
|
|
96
96
|
const onSubmit = async (data: UI_I_FeedbackForm): Promise<void> => {
|
|
97
97
|
onHide()
|
|
98
98
|
|
|
99
|
-
const sendForm: UI_I_FeedbackForm = isNewView ? feedbackForm.value : data
|
|
99
|
+
const sendForm: UI_I_FeedbackForm = isNewView.value ? feedbackForm.value : data
|
|
100
100
|
const isValid = await handleRequest(sendForm)
|
|
101
101
|
|
|
102
102
|
if (isValid) showNotification(msgSuccess.value)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { UI_I_FeedbackForm } from '~/components/common/feedback/lib/models/interfaces'
|
|
2
|
+
// import type { UI_I_FeedbackCanvasOptions } from '~/components/common/layout/theHeader/feedback/new/lib/models/interfaces'
|
|
2
3
|
export const feedbackDefaultFormFunc = (): UI_I_FeedbackForm => {
|
|
3
4
|
return {
|
|
4
5
|
description: '',
|
|
@@ -7,3 +8,10 @@ export const feedbackDefaultFormFunc = (): UI_I_FeedbackForm => {
|
|
|
7
8
|
image: '', // base64
|
|
8
9
|
}
|
|
9
10
|
}
|
|
11
|
+
|
|
12
|
+
// export const feedbackCanvasDefaultOptions = (): UI_I_FeedbackCanvasOptions => {
|
|
13
|
+
// return {
|
|
14
|
+
// isAnnotateImage: false,
|
|
15
|
+
// hasTakeScreenshot: false,
|
|
16
|
+
// }
|
|
17
|
+
// }
|
|
@@ -1,78 +1,86 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Teleport to="body">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
3
|
+
<div id="feedback-dialog">
|
|
4
|
+
<ui-modal
|
|
5
|
+
show
|
|
6
|
+
:width="!options.isAnnotateImage ? '560px' : '880px'"
|
|
7
|
+
test-id="feedback-modal"
|
|
8
|
+
:title="title"
|
|
9
|
+
class="feedback"
|
|
10
|
+
@hide="onHideModal"
|
|
11
|
+
>
|
|
12
|
+
<template #content>
|
|
13
|
+
<ui-modal-block-standard>
|
|
14
|
+
<template v-if="!options.isAnnotateImage">
|
|
15
|
+
<common-layout-the-header-feedback-new-subtitle />
|
|
16
|
+
|
|
17
|
+
<common-layout-the-header-feedback-new-tabs
|
|
18
|
+
v-model="selectedTab"
|
|
19
|
+
class="metrics-tabs"
|
|
20
|
+
/>
|
|
21
|
+
|
|
22
|
+
<div
|
|
23
|
+
v-if="selectedTab === 'light-bulb'"
|
|
24
|
+
class="feedback__visit-portal"
|
|
25
|
+
>
|
|
26
|
+
{{ localization.common.useOurExternalIdeasPortal }}
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<template v-if="selectedTab !== 'light-bulb'">
|
|
31
|
+
<template v-if="!options.isAnnotateImage">
|
|
32
|
+
<common-layout-the-header-feedback-new-description
|
|
33
|
+
v-model="feedbackForm.description"
|
|
34
|
+
v-model:is-valid="isValidForm"
|
|
35
|
+
:selected-tab="selectedTab"
|
|
36
|
+
/>
|
|
37
|
+
|
|
38
|
+
<common-layout-the-header-feedback-new-email
|
|
39
|
+
v-model="feedbackForm.email"
|
|
40
|
+
/>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<common-layout-the-header-feedback-new-additional-details
|
|
44
|
+
v-model="options"
|
|
45
|
+
/>
|
|
46
|
+
</template>
|
|
47
|
+
</ui-modal-block-standard>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<template #footerLeftContent><span /></template>
|
|
51
|
+
|
|
52
|
+
<template #footerContent>
|
|
53
|
+
<div class="flex gap-4">
|
|
54
|
+
<ui-button
|
|
55
|
+
v-if="selectedTab !== 'light-bulb'"
|
|
56
|
+
test-id="feedback-modal-hide-btn"
|
|
57
|
+
size="md"
|
|
58
|
+
variant="outline"
|
|
59
|
+
min-width="96px"
|
|
60
|
+
@click="onHideModal"
|
|
61
|
+
>
|
|
62
|
+
{{ localization.common.cancel }}
|
|
63
|
+
</ui-button>
|
|
64
|
+
<ui-button
|
|
65
|
+
test-id="feedback-modal-submit-btn"
|
|
66
|
+
size="md"
|
|
67
|
+
:disabled="isDisabledButton"
|
|
68
|
+
min-width="96px"
|
|
69
|
+
@click="onSubmit"
|
|
70
|
+
>
|
|
71
|
+
<ui-icon
|
|
72
|
+
v-if="selectedTab === 'light-bulb'"
|
|
73
|
+
name="new-tab"
|
|
74
|
+
width="20"
|
|
75
|
+
height="20"
|
|
76
|
+
class="feedback__btn-icon"
|
|
77
|
+
/>
|
|
78
|
+
{{ modalFooterButtonNames }}
|
|
79
|
+
</ui-button>
|
|
25
80
|
</div>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
v-model="feedbackForm.description"
|
|
30
|
-
v-model:is-valid="isValidForm"
|
|
31
|
-
:selected-tab="selectedTab"
|
|
32
|
-
/>
|
|
33
|
-
|
|
34
|
-
<common-layout-the-header-feedback-new-email
|
|
35
|
-
v-model="feedbackForm.email"
|
|
36
|
-
/>
|
|
37
|
-
|
|
38
|
-
<common-layout-the-header-feedback-new-additional-details />
|
|
39
|
-
</template>
|
|
40
|
-
</ui-modal-block-standard>
|
|
41
|
-
</template>
|
|
42
|
-
|
|
43
|
-
<template #footerLeftContent><span /></template>
|
|
44
|
-
|
|
45
|
-
<template #footerContent>
|
|
46
|
-
<div class="flex gap-4">
|
|
47
|
-
<ui-button
|
|
48
|
-
v-if="selectedTab !== 'light-bulb'"
|
|
49
|
-
test-id="feedback-modal-hide-btn"
|
|
50
|
-
size="md"
|
|
51
|
-
variant="outline"
|
|
52
|
-
min-width="96px"
|
|
53
|
-
@click="onHideModal"
|
|
54
|
-
>
|
|
55
|
-
{{ localization.common.cancel }}
|
|
56
|
-
</ui-button>
|
|
57
|
-
<ui-button
|
|
58
|
-
test-id="feedback-modal-submit-btn"
|
|
59
|
-
size="md"
|
|
60
|
-
:disabled="!selectedTab"
|
|
61
|
-
min-width="96px"
|
|
62
|
-
@click="onSubmit"
|
|
63
|
-
>
|
|
64
|
-
<ui-icon
|
|
65
|
-
v-if="selectedTab === 'light-bulb'"
|
|
66
|
-
name="new-tab"
|
|
67
|
-
width="20"
|
|
68
|
-
height="20"
|
|
69
|
-
class="feedback__btn-icon"
|
|
70
|
-
/>
|
|
71
|
-
{{ modalFooterButtonNames }}
|
|
72
|
-
</ui-button>
|
|
73
|
-
</div>
|
|
74
|
-
</template>
|
|
75
|
-
</ui-modal>
|
|
81
|
+
</template>
|
|
82
|
+
</ui-modal>
|
|
83
|
+
</div>
|
|
76
84
|
</Teleport>
|
|
77
85
|
</template>
|
|
78
86
|
|
|
@@ -80,6 +88,8 @@
|
|
|
80
88
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
81
89
|
import type { UI_I_FeedbackForm } from '~/components/common/feedback/lib/models/interfaces'
|
|
82
90
|
import type { UI_T_FeedbackTab } from '~/components/common/layout/theHeader/feedback/new/tabs/lib/models/types'
|
|
91
|
+
import type { UI_I_FeedbackCanvasOptions } from '~/components/common/layout/theHeader/feedback/new/lib/models/interfaces'
|
|
92
|
+
import { UI_E_FeedbackType } from '~/components/common/layout/theHeader/feedback/new/tabs/lib/models/enums'
|
|
83
93
|
|
|
84
94
|
const feedbackForm = defineModel<UI_I_FeedbackForm>({ required: true })
|
|
85
95
|
const emits = defineEmits<{
|
|
@@ -89,19 +99,47 @@ const emits = defineEmits<{
|
|
|
89
99
|
|
|
90
100
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
91
101
|
|
|
92
|
-
const isValidForm = ref<boolean>(true)
|
|
93
102
|
const selectedTab = ref<UI_T_FeedbackTab>()
|
|
103
|
+
const isValidForm = ref<boolean>(true)
|
|
104
|
+
const options = ref<UI_I_FeedbackCanvasOptions>({
|
|
105
|
+
isAnnotateImage: false,
|
|
106
|
+
hasTakeScreenshot: false,
|
|
107
|
+
})
|
|
94
108
|
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
109
|
+
const title = computed<string>(() => {
|
|
110
|
+
const { common, feedback } = localization.value
|
|
111
|
+
|
|
112
|
+
return !options.value.isAnnotateImage
|
|
113
|
+
? common.sendFeedback
|
|
114
|
+
: options.value.hasTakeScreenshot
|
|
115
|
+
? feedback.annotateScreenshot
|
|
116
|
+
: feedback.annotateImage
|
|
117
|
+
})
|
|
118
|
+
const modalFooterButtonNames = computed<string>(() => {
|
|
119
|
+
const { visitIdeasPortal, send, save } = localization.value.common
|
|
120
|
+
|
|
121
|
+
return options.value.isAnnotateImage
|
|
122
|
+
? save
|
|
123
|
+
: selectedTab.value === 'light-bulb'
|
|
124
|
+
? visitIdeasPortal
|
|
125
|
+
: send
|
|
126
|
+
})
|
|
127
|
+
|
|
128
|
+
const isDisabledButton = computed<boolean>(() => {
|
|
129
|
+
return !options.value.isAnnotateImage && !selectedTab.value
|
|
99
130
|
})
|
|
100
131
|
|
|
101
132
|
const onHideModal = (): void => {
|
|
102
|
-
|
|
133
|
+
!options.value.isAnnotateImage
|
|
134
|
+
? emits('hide')
|
|
135
|
+
: (options.value.isAnnotateImage = false)
|
|
103
136
|
}
|
|
104
137
|
const onSubmit = (): void => {
|
|
138
|
+
if (options.value.isAnnotateImage) {
|
|
139
|
+
options.value.isAnnotateImage = false
|
|
140
|
+
return
|
|
141
|
+
}
|
|
142
|
+
|
|
105
143
|
if (selectedTab.value === 'light-bulb') {
|
|
106
144
|
const targetUrl = 'https://customer.aobfg.ru/' // Ваш URL
|
|
107
145
|
window.open(targetUrl, '_blank')
|
|
@@ -111,24 +149,25 @@ const onSubmit = (): void => {
|
|
|
111
149
|
isValidForm.value = !!feedbackForm.value.description
|
|
112
150
|
|
|
113
151
|
if (!isValidForm.value) return
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
152
|
+
const canvasData = (
|
|
153
|
+
document.getElementById('feedbackImg') as HTMLCanvasElement
|
|
154
|
+
).toDataURL()
|
|
155
|
+
const canvasBlankData = (
|
|
156
|
+
document.getElementById('feedbackImgBlank') as HTMLCanvasElement
|
|
157
|
+
).toDataURL()
|
|
117
158
|
|
|
118
|
-
|
|
119
|
-
:
|
|
120
|
-
|
|
121
|
-
--link-visited-color: #5659b8;
|
|
122
|
-
}
|
|
159
|
+
const image = canvasData.match(/base64,(.+)/)?.[1] || ''
|
|
160
|
+
feedbackForm.value.image = canvasData === canvasBlankData ? '' : image
|
|
161
|
+
feedbackForm.value.type = UI_E_FeedbackType[selectedTab.value]
|
|
123
162
|
|
|
124
|
-
|
|
125
|
-
--description-color: #adbbc4;
|
|
126
|
-
--link-visited-color: #49afd9;
|
|
163
|
+
emits('submit')
|
|
127
164
|
}
|
|
165
|
+
</script>
|
|
128
166
|
|
|
167
|
+
<style lang="scss" scoped>
|
|
129
168
|
.feedback {
|
|
130
169
|
&__visit-portal {
|
|
131
|
-
color:
|
|
170
|
+
color: var(--feedback-text-color);
|
|
132
171
|
font-size: 13px;
|
|
133
172
|
font-weight: 400;
|
|
134
173
|
line-height: 15.73px;
|
|
@@ -139,3 +178,15 @@ const onSubmit = (): void => {
|
|
|
139
178
|
}
|
|
140
179
|
}
|
|
141
180
|
</style>
|
|
181
|
+
<style lang="scss">
|
|
182
|
+
:root {
|
|
183
|
+
--feedback-text-color: #4d5d69;
|
|
184
|
+
--feedback-tooltip-close-color: #213444;
|
|
185
|
+
--feedback-tab-active-bg-color: #008fd60f;
|
|
186
|
+
}
|
|
187
|
+
:root.dark-theme {
|
|
188
|
+
--feedback-text-color: #e9eaec;
|
|
189
|
+
--feedback-tooltip-close-color: #e9eaec;
|
|
190
|
+
--feedback-tab-active-bg-color: #2ba2de14;
|
|
191
|
+
}
|
|
192
|
+
</style>
|