bfg-common 1.5.244 → 1.5.245
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/CODE_STYLE.md +109 -109
- package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/assets/scss/common/icons/icons-1.scss +2 -2
- package/assets/scss/common/icons/icons-5.scss +5 -5
- package/assets/scss/common/icons/icons-6.scss +1 -1
- package/assets/scss/common/theme.scss +6 -0
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/perPage/PerPage.vue +58 -58
- package/components/atoms/table/dataGrid/DataGrid.vue +1717 -1717
- package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
- package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
- package/components/atoms/tabs/VerticalTabs.vue +105 -105
- package/components/common/backup/actions/deleteBackup/DeleteBackup.vue +38 -0
- package/components/common/backup/storage/actions/add/Add.vue +250 -247
- package/components/common/backup/storage/actions/add/New.vue +283 -286
- package/components/common/backup/storage/actions/add/Old.vue +116 -114
- package/components/common/backup/storage/actions/add/lib/config/steps.ts +168 -168
- package/components/common/backup/storage/actions/add/steps/common/tooltipInfo/TooltipInfo.vue +94 -0
- package/components/common/backup/storage/actions/add/steps/nameAndConfigure/NameAndConfigure.vue +41 -41
- package/components/common/backup/storage/actions/add/steps/nameAndConfigure/NameAndConfigureNew.vue +294 -304
- package/components/common/backup/storage/actions/add/steps/readyComplete/ReadyComplete.vue +45 -45
- package/components/common/backup/storage/actions/add/steps/readyComplete/lib/config/propertiesDetails.ts +242 -242
- package/components/common/backup/storage/actions/add/steps/typeMode/TypeModeNew.vue +3 -12
- package/components/common/backup/storage/actions/delete/Delete.vue +65 -65
- package/components/common/browse/BrowseNew.vue +8 -2
- package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
- package/components/common/context/lib/models/interfaces.ts +31 -31
- package/components/common/diagramMain/DiagramMain.vue +897 -897
- package/components/common/diagramMain/Header.vue +214 -214
- package/components/common/layout/theHeader/feedback/new/additionalDetails/Headline.vue +67 -8
- package/components/common/layout/theHeader/feedback/new/subtitle/Subtitle.vue +72 -8
- package/components/common/layout/theHeader/helpMenu/About.vue +82 -82
- package/components/common/layout/theHeader/userMenu/modals/preferences/view/ViewOld.vue +112 -112
- package/components/common/monitor/overview/OverviewOld.vue +139 -139
- package/components/common/pages/home/headline/Headline.vue +45 -45
- package/components/common/pages/home/headline/HeadlineOld.vue +42 -42
- package/components/common/pages/home/lib/models/interfaces.ts +48 -48
- package/components/common/pages/home/widgets/Widgets.vue +49 -49
- package/components/common/pages/home/widgets/WidgetsNew.vue +86 -86
- package/components/common/pages/home/widgets/WidgetsOld.vue +34 -34
- package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
- package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
- package/components/common/pages/home/widgets/vms/Vms.vue +26 -26
- package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
- package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
- package/components/common/pages/packages/Packages.vue +208 -208
- package/components/common/pages/shortcuts/block/BlockOld.vue +68 -68
- package/components/common/pages/tasks/table/Table.vue +7 -15
- package/components/common/pages/tasks/table/errorInfo/ErrorInfo.vue +128 -0
- package/components/common/pages/tasks/table/expandDetails/ExpandDetails.vue +9 -15
- package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
- package/components/common/recursionTree/RecursionTree.vue +223 -223
- package/components/common/select/button/ButtonDropdown.vue +108 -108
- package/components/common/spiceConsole/Drawer.vue +377 -377
- package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/add/Add.vue +3 -0
- package/components/common/vm/actions/add/New.vue +4 -0
- package/components/common/vm/actions/add/Old.vue +4 -0
- package/components/common/vm/actions/add/folderTreeView/FolderTreeView.vue +72 -72
- package/components/common/vm/actions/add/folderTreeView/New.vue +40 -40
- package/components/common/vm/actions/add/folderTreeView/Old.vue +50 -50
- package/components/common/vm/actions/clone/Clone.vue +3 -0
- package/components/common/vm/actions/clone/lib/config/steps.ts +291 -291
- package/components/common/vm/actions/clone/toTemplate/ToTemplate.vue +3 -0
- package/components/common/vm/actions/clone/toTemplate/lib/config/steps.ts +116 -116
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +3 -0
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +7 -2
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +2 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +3 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +9 -7
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +321 -319
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/browseView/BrowseView.vue +219 -219
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/Bus.vue +100 -100
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/BusNew.vue +99 -8
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +232 -232
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDriveNew.vue +4 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDriveOld.vue +168 -168
- 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 +78 -78
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/MediaOld.vue +50 -50
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuNew.vue +8 -53
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/model/ModelNew.vue +162 -34
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +140 -140
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/SharesNew.vue +6 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/tooltip/TooltipNew.vue +154 -154
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/Limit.vue +220 -220
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +307 -307
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/MemoryNew.vue +5 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/hotPlug/HotPlugNew.vue +8 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +385 -382
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskNew.vue +6 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskOld.vue +2 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/file/FileNew.vue +8 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/Location.vue +154 -151
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/LocationNew.vue +75 -73
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/LocationOld.vue +85 -83
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/StorageModal.vue +3 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/StorageModalNew.vue +2 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/StorageModalOld.vue +2 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/maximumSize/MaximumSizeNew.vue +8 -4
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/provisioning/ProvisioningNew.vue +6 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/sharing/SharingNew.vue +6 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +288 -288
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetworkNew.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/New.vue +4 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/Table.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/lib/config/config.ts +94 -94
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +205 -205
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoNew.vue +66 -66
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoOld.vue +62 -62
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +31 -31
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIoOld.vue +76 -76
- 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/NvidiaGridOld.vue +84 -84
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerNew.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/OtherNew.vue +8 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/inputDevices/InputDevicesNew.vue +40 -40
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/ReservationNew.vue +5 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardNew.vue +5 -2
- package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +145 -145
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsNew.vue +5 -1
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +32 -32
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +60 -60
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +174 -174
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +4 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsNew.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/New.vue +8 -2
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/copyPaste/CopyPasteNew.vue +31 -31
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/fileTransfer/FileTransferNew.vue +31 -31
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +32 -32
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +103 -103
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/PasswordNew.vue +128 -128
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +28 -28
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirectionNew.vue +39 -39
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirectionOld.vue +44 -44
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/ToolsNew.vue +5 -1
- package/components/common/vm/actions/common/lib/utils/capabilities.ts +52 -52
- package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
- package/components/common/vm/actions/common/select/computeResource/treeView/New.vue +44 -44
- package/components/common/vm/actions/common/select/computeResource/treeView/TreeView.vue +118 -118
- package/components/common/vm/actions/common/select/createType/CreateType.vue +38 -38
- package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/name/New.vue +70 -10
- package/components/common/vm/actions/common/select/os/Old.vue +152 -152
- package/components/common/vm/actions/common/select/os/Os.vue +139 -139
- package/components/common/vm/actions/common/select/storage/Old.vue +2 -0
- package/components/common/vm/actions/common/select/storage/Storage.vue +3 -0
- package/components/common/vm/actions/common/select/storage/new/New.vue +10 -5
- package/components/common/vm/actions/common/select/storage/new/lib/config/table.ts +2 -1
- package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
- package/components/common/vm/actions/editSettings/EditSettings.vue +3 -0
- package/components/common/vm/actions/editSettings/EditSettingsOld.vue +2 -0
- package/components/common/vm/actions/editSettings/new/New.vue +2 -0
- package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
- package/components/common/wizards/datastore/add/New.vue +3 -8
- package/components/common/wizards/datastore/add/steps/common/tooltipInfo/TooltipInfo.vue +93 -0
- package/components/common/wizards/datastore/add/steps/nameAndConfigure/NameAndConfigureNew.vue +6 -17
- package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceNew.vue +3 -9
- package/components/common/wizards/datastore/add/steps/typeMode/TypeModeNew.vue +3 -8
- package/components/common/wizards/vm/migrate/lib/config/constructDataReady.ts +220 -220
- package/components/common/wizards/vm/migrate/lib/config/steps.ts +157 -157
- package/components/common/wizards/vm/migrate/lib/validations.ts +68 -68
- package/components/common/wizards/vm/migrate/select/computeResource/tableView/TableView.vue +135 -137
- package/components/common/wizards/vm/migrate/select/network/Network.vue +103 -103
- package/components/common/wizards/vm/migrate/select/network/table/network/lib/config/advancedTable.ts +91 -91
- package/composables/productNameLocal.ts +30 -30
- package/composables/useAppVersion.ts +21 -21
- package/lib/utils/utils.ts +14 -2
- package/package.json +2 -2
- package/plugins/cron.ts +75 -0
- package/plugins/date.ts +233 -233
- package/plugins/helpers.ts +18 -0
- package/plugins/number.ts +18 -0
- package/plugins/panelStates.ts +70 -0
- package/plugins/text.ts +59 -48
- package/plugins/time.ts +17 -0
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/public/spice-console/network/spicechannel.js +387 -387
- package/store/main/mutations.ts +7 -7
- package/store/main/state.ts +7 -7
- package/store/tasks/mappers/recentTasks.ts +64 -64
- package/components/common/tooltip/Help.vue +0 -132
- package/components/common/tooltip/lib/models/types.ts +0 -1
- /package/{components/common/split/horizontal/lib/models → lib/models/plugins/panelStates}/interfaces.ts +0 -0
|
@@ -1,103 +1,103 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-password-new
|
|
3
|
-
v-if="isNewView"
|
|
4
|
-
v-model:is-enabled-password="isEnabledPassword"
|
|
5
|
-
v-model:form="form"
|
|
6
|
-
:disabled="props.disabled"
|
|
7
|
-
:error-text="passwordErrorText"
|
|
8
|
-
@set-password-disable="setPasswordDisable"
|
|
9
|
-
@change-password="changePassword"
|
|
10
|
-
@generate-password="onGeneratePassword"
|
|
11
|
-
/>
|
|
12
|
-
<common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-password-old
|
|
13
|
-
v-else
|
|
14
|
-
v-model:is-enabled-password="isEnabledPassword"
|
|
15
|
-
v-model:form="form"
|
|
16
|
-
:disabled="props.disabled"
|
|
17
|
-
:error-text="passwordErrorText"
|
|
18
|
-
@set-password-disable="setPasswordDisable"
|
|
19
|
-
@change-password="changePassword"
|
|
20
|
-
@generate-password="onGeneratePassword"
|
|
21
|
-
/>
|
|
22
|
-
</template>
|
|
23
|
-
|
|
24
|
-
<script setup lang="ts">
|
|
25
|
-
import type { UI_I_DefaultForm } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/lib/models/interfaces'
|
|
26
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
27
|
-
import { generatePassword } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/lib/utils'
|
|
28
|
-
|
|
29
|
-
const password = defineModel<string>('password', { required: true })
|
|
30
|
-
|
|
31
|
-
const props = defineProps<{
|
|
32
|
-
disabled: boolean
|
|
33
|
-
}>()
|
|
34
|
-
const emits = defineEmits<{
|
|
35
|
-
(event: 'valid', value: boolean): void
|
|
36
|
-
}>()
|
|
37
|
-
|
|
38
|
-
const { $store, $validation }: any = useNuxtApp()
|
|
39
|
-
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
40
|
-
|
|
41
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
42
|
-
|
|
43
|
-
const validation = $validation.call({})
|
|
44
|
-
const defaultForm: UI_I_DefaultForm = {
|
|
45
|
-
password: {
|
|
46
|
-
value: password.value,
|
|
47
|
-
validations: [
|
|
48
|
-
{
|
|
49
|
-
value: 'password',
|
|
50
|
-
errorText: localization.value.common.
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
},
|
|
54
|
-
}
|
|
55
|
-
const form = ref<UI_I_DefaultForm>(useDeepCopy(defaultForm))
|
|
56
|
-
const setForm = (): void => {
|
|
57
|
-
form.value = useDeepCopy(defaultForm)
|
|
58
|
-
validation.setForm(form)
|
|
59
|
-
}
|
|
60
|
-
setForm()
|
|
61
|
-
|
|
62
|
-
const showValidationErrors = (): void => {
|
|
63
|
-
const valid = validation.touch()
|
|
64
|
-
console.log(valid, 111)
|
|
65
|
-
passwordErrorText.value = !valid.isValid ? valid.errors.password[0] : ''
|
|
66
|
-
emits('valid', valid.isValid)
|
|
67
|
-
}
|
|
68
|
-
const removeValidationErrors = (): void => {
|
|
69
|
-
passwordErrorText.value = ''
|
|
70
|
-
emits('valid', true)
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const setPasswordDisable = (): void => {
|
|
74
|
-
if (isEnabledPassword.value) {
|
|
75
|
-
return
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
removeValidationErrors()
|
|
79
|
-
setForm()
|
|
80
|
-
password.value = ''
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
const passwordErrorText = ref<string>('')
|
|
84
|
-
|
|
85
|
-
const changePassword = (value: string): void => {
|
|
86
|
-
password.value = value
|
|
87
|
-
|
|
88
|
-
showValidationErrors()
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
const isEnabledPassword = ref<boolean>(!!password.value)
|
|
92
|
-
|
|
93
|
-
const onGeneratePassword = (): void => {
|
|
94
|
-
const generatedPassword = generatePassword()
|
|
95
|
-
|
|
96
|
-
form.value.password.value = generatedPassword
|
|
97
|
-
password.value = generatedPassword
|
|
98
|
-
|
|
99
|
-
showValidationErrors()
|
|
100
|
-
}
|
|
101
|
-
</script>
|
|
102
|
-
|
|
103
|
-
<style scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-password-new
|
|
3
|
+
v-if="isNewView"
|
|
4
|
+
v-model:is-enabled-password="isEnabledPassword"
|
|
5
|
+
v-model:form="form"
|
|
6
|
+
:disabled="props.disabled"
|
|
7
|
+
:error-text="passwordErrorText"
|
|
8
|
+
@set-password-disable="setPasswordDisable"
|
|
9
|
+
@change-password="changePassword"
|
|
10
|
+
@generate-password="onGeneratePassword"
|
|
11
|
+
/>
|
|
12
|
+
<common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-password-old
|
|
13
|
+
v-else
|
|
14
|
+
v-model:is-enabled-password="isEnabledPassword"
|
|
15
|
+
v-model:form="form"
|
|
16
|
+
:disabled="props.disabled"
|
|
17
|
+
:error-text="passwordErrorText"
|
|
18
|
+
@set-password-disable="setPasswordDisable"
|
|
19
|
+
@change-password="changePassword"
|
|
20
|
+
@generate-password="onGeneratePassword"
|
|
21
|
+
/>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
import type { UI_I_DefaultForm } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/lib/models/interfaces'
|
|
26
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
27
|
+
import { generatePassword } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/lib/utils'
|
|
28
|
+
|
|
29
|
+
const password = defineModel<string>('password', { required: true })
|
|
30
|
+
|
|
31
|
+
const props = defineProps<{
|
|
32
|
+
disabled: boolean
|
|
33
|
+
}>()
|
|
34
|
+
const emits = defineEmits<{
|
|
35
|
+
(event: 'valid', value: boolean): void
|
|
36
|
+
}>()
|
|
37
|
+
|
|
38
|
+
const { $store, $validation }: any = useNuxtApp()
|
|
39
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
40
|
+
|
|
41
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
42
|
+
|
|
43
|
+
const validation = $validation.call({})
|
|
44
|
+
const defaultForm: UI_I_DefaultForm = {
|
|
45
|
+
password: {
|
|
46
|
+
value: password.value,
|
|
47
|
+
validations: [
|
|
48
|
+
{
|
|
49
|
+
value: 'password',
|
|
50
|
+
errorText: localization.value.common.passwordsMustLeast8CharactersLongContainUpperAndLowerCaseLetterNumberAndSpecialCharacter,
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
}
|
|
55
|
+
const form = ref<UI_I_DefaultForm>(useDeepCopy(defaultForm))
|
|
56
|
+
const setForm = (): void => {
|
|
57
|
+
form.value = useDeepCopy(defaultForm)
|
|
58
|
+
validation.setForm(form)
|
|
59
|
+
}
|
|
60
|
+
setForm()
|
|
61
|
+
|
|
62
|
+
const showValidationErrors = (): void => {
|
|
63
|
+
const valid = validation.touch()
|
|
64
|
+
console.log(valid, 111)
|
|
65
|
+
passwordErrorText.value = !valid.isValid ? valid.errors.password[0] : ''
|
|
66
|
+
emits('valid', valid.isValid)
|
|
67
|
+
}
|
|
68
|
+
const removeValidationErrors = (): void => {
|
|
69
|
+
passwordErrorText.value = ''
|
|
70
|
+
emits('valid', true)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const setPasswordDisable = (): void => {
|
|
74
|
+
if (isEnabledPassword.value) {
|
|
75
|
+
return
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
removeValidationErrors()
|
|
79
|
+
setForm()
|
|
80
|
+
password.value = ''
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const passwordErrorText = ref<string>('')
|
|
84
|
+
|
|
85
|
+
const changePassword = (value: string): void => {
|
|
86
|
+
password.value = value
|
|
87
|
+
|
|
88
|
+
showValidationErrors()
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const isEnabledPassword = ref<boolean>(!!password.value)
|
|
92
|
+
|
|
93
|
+
const onGeneratePassword = (): void => {
|
|
94
|
+
const generatedPassword = generatePassword()
|
|
95
|
+
|
|
96
|
+
form.value.password.value = generatedPassword
|
|
97
|
+
password.value = generatedPassword
|
|
98
|
+
|
|
99
|
+
showValidationErrors()
|
|
100
|
+
}
|
|
101
|
+
</script>
|
|
102
|
+
|
|
103
|
+
<style scoped></style>
|
|
@@ -1,128 +1,128 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<ui-stack-block :has-children="false">
|
|
3
|
-
<template #stackBlockKey>
|
|
4
|
-
{{ localization.auth.password }}
|
|
5
|
-
</template>
|
|
6
|
-
<template #stackBlockContent>
|
|
7
|
-
<div class="password-content">
|
|
8
|
-
<ui-checkbox
|
|
9
|
-
id="enable-password"
|
|
10
|
-
v-model="isEnabledPassword"
|
|
11
|
-
:disabled="props.disabled"
|
|
12
|
-
:label-text="localization.common.enable"
|
|
13
|
-
test-id="enable-password-input"
|
|
14
|
-
size="md"
|
|
15
|
-
class="mr-2"
|
|
16
|
-
@change="emits('set-password-disable')"
|
|
17
|
-
/>
|
|
18
|
-
|
|
19
|
-
<ui-input-with-tooltip
|
|
20
|
-
id="password-input"
|
|
21
|
-
v-model="form.password.value"
|
|
22
|
-
:class="[{ 'has-error': !!props.errorText }]"
|
|
23
|
-
:disabled="!isEnabledPassword || props.disabled"
|
|
24
|
-
:error-text="props.errorText"
|
|
25
|
-
test-id="password-input"
|
|
26
|
-
type="text"
|
|
27
|
-
size="sm"
|
|
28
|
-
@change="onChangePassword"
|
|
29
|
-
>
|
|
30
|
-
<template #icon>
|
|
31
|
-
<div
|
|
32
|
-
:class="[
|
|
33
|
-
'copy-icon pointer',
|
|
34
|
-
{ disabled: !isEnabledPassword || props.disabled },
|
|
35
|
-
]"
|
|
36
|
-
@click="onCopyToClipboard"
|
|
37
|
-
>
|
|
38
|
-
<ui-icon
|
|
39
|
-
name="copy-to-clipboard"
|
|
40
|
-
type="input"
|
|
41
|
-
width="16"
|
|
42
|
-
height="16"
|
|
43
|
-
/>
|
|
44
|
-
</div>
|
|
45
|
-
</template>
|
|
46
|
-
</ui-input-with-tooltip>
|
|
47
|
-
|
|
48
|
-
<ui-button
|
|
49
|
-
id="generate-password-button"
|
|
50
|
-
:disabled="!isEnabledPassword || props.disabled"
|
|
51
|
-
:title="localization.common.generatePassword"
|
|
52
|
-
test-id="generate-password-button"
|
|
53
|
-
class="generate-password-button"
|
|
54
|
-
@click="emits('generate-password')"
|
|
55
|
-
>
|
|
56
|
-
<ui-icon
|
|
57
|
-
name="key"
|
|
58
|
-
width="16"
|
|
59
|
-
height="16"
|
|
60
|
-
class="generate-password-icon"
|
|
61
|
-
/>
|
|
62
|
-
</ui-button>
|
|
63
|
-
</div>
|
|
64
|
-
</template>
|
|
65
|
-
</ui-stack-block>
|
|
66
|
-
</template>
|
|
67
|
-
|
|
68
|
-
<script setup lang="ts">
|
|
69
|
-
import type { UI_I_DefaultForm } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/lib/models/interfaces'
|
|
70
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
71
|
-
|
|
72
|
-
const isEnabledPassword = defineModel<boolean>('isEnabledPassword', {
|
|
73
|
-
required: true,
|
|
74
|
-
})
|
|
75
|
-
const form = defineModel<UI_I_DefaultForm>('form', { required: true })
|
|
76
|
-
|
|
77
|
-
const props = defineProps<{
|
|
78
|
-
disabled: boolean
|
|
79
|
-
errorText: string
|
|
80
|
-
}>()
|
|
81
|
-
const emits = defineEmits<{
|
|
82
|
-
(event: 'set-password-disable'): void
|
|
83
|
-
(event: 'change-password', value: string): void
|
|
84
|
-
(event: 'generate-password'): void
|
|
85
|
-
}>()
|
|
86
|
-
|
|
87
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
88
|
-
|
|
89
|
-
const onChangePassword = (): void => {
|
|
90
|
-
emits('change-password', form.value.password.value)
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
const onCopyToClipboard = (): void => {
|
|
94
|
-
navigator.clipboard.writeText(form.value.password.value)
|
|
95
|
-
}
|
|
96
|
-
</script>
|
|
97
|
-
|
|
98
|
-
<style scoped>
|
|
99
|
-
.password-content {
|
|
100
|
-
display: grid;
|
|
101
|
-
grid-template-columns: max-content 144px max-content;
|
|
102
|
-
grid-gap: 8px;
|
|
103
|
-
|
|
104
|
-
.copy-icon {
|
|
105
|
-
color: #9da6ad;
|
|
106
|
-
|
|
107
|
-
&.disabled {
|
|
108
|
-
color: #bdc3c770;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
.generate-password-button {
|
|
112
|
-
padding: 8px;
|
|
113
|
-
|
|
114
|
-
&:disabled {
|
|
115
|
-
.generate-password-icon {
|
|
116
|
-
color: #e9eaec;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
:deep(.ui-main.ui-main-sm .ui-main-input) {
|
|
123
|
-
height: 32px;
|
|
124
|
-
}
|
|
125
|
-
:deep(.ui-main.ui-main-sm .ui-slot-icon-content) {
|
|
126
|
-
pointer-events: unset;
|
|
127
|
-
}
|
|
128
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<ui-stack-block :has-children="false">
|
|
3
|
+
<template #stackBlockKey>
|
|
4
|
+
{{ localization.auth.password }}
|
|
5
|
+
</template>
|
|
6
|
+
<template #stackBlockContent>
|
|
7
|
+
<div class="password-content">
|
|
8
|
+
<ui-checkbox
|
|
9
|
+
id="enable-password"
|
|
10
|
+
v-model="isEnabledPassword"
|
|
11
|
+
:disabled="props.disabled"
|
|
12
|
+
:label-text="localization.common.enable"
|
|
13
|
+
test-id="enable-password-input"
|
|
14
|
+
size="md"
|
|
15
|
+
class="mr-2"
|
|
16
|
+
@change="emits('set-password-disable')"
|
|
17
|
+
/>
|
|
18
|
+
|
|
19
|
+
<ui-input-with-tooltip
|
|
20
|
+
id="password-input"
|
|
21
|
+
v-model="form.password.value"
|
|
22
|
+
:class="[{ 'has-error': !!props.errorText }]"
|
|
23
|
+
:disabled="!isEnabledPassword || props.disabled"
|
|
24
|
+
:error-text="props.errorText"
|
|
25
|
+
test-id="password-input"
|
|
26
|
+
type="text"
|
|
27
|
+
size="sm"
|
|
28
|
+
@change="onChangePassword"
|
|
29
|
+
>
|
|
30
|
+
<template #icon>
|
|
31
|
+
<div
|
|
32
|
+
:class="[
|
|
33
|
+
'copy-icon pointer',
|
|
34
|
+
{ disabled: !isEnabledPassword || props.disabled },
|
|
35
|
+
]"
|
|
36
|
+
@click="onCopyToClipboard"
|
|
37
|
+
>
|
|
38
|
+
<ui-icon
|
|
39
|
+
name="copy-to-clipboard"
|
|
40
|
+
type="input"
|
|
41
|
+
width="16"
|
|
42
|
+
height="16"
|
|
43
|
+
/>
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
46
|
+
</ui-input-with-tooltip>
|
|
47
|
+
|
|
48
|
+
<ui-button
|
|
49
|
+
id="generate-password-button"
|
|
50
|
+
:disabled="!isEnabledPassword || props.disabled"
|
|
51
|
+
:title="localization.common.generatePassword"
|
|
52
|
+
test-id="generate-password-button"
|
|
53
|
+
class="generate-password-button"
|
|
54
|
+
@click="emits('generate-password')"
|
|
55
|
+
>
|
|
56
|
+
<ui-icon
|
|
57
|
+
name="key"
|
|
58
|
+
width="16"
|
|
59
|
+
height="16"
|
|
60
|
+
class="generate-password-icon"
|
|
61
|
+
/>
|
|
62
|
+
</ui-button>
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|
|
65
|
+
</ui-stack-block>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<script setup lang="ts">
|
|
69
|
+
import type { UI_I_DefaultForm } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/lib/models/interfaces'
|
|
70
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
71
|
+
|
|
72
|
+
const isEnabledPassword = defineModel<boolean>('isEnabledPassword', {
|
|
73
|
+
required: true,
|
|
74
|
+
})
|
|
75
|
+
const form = defineModel<UI_I_DefaultForm>('form', { required: true })
|
|
76
|
+
|
|
77
|
+
const props = defineProps<{
|
|
78
|
+
disabled: boolean
|
|
79
|
+
errorText: string
|
|
80
|
+
}>()
|
|
81
|
+
const emits = defineEmits<{
|
|
82
|
+
(event: 'set-password-disable'): void
|
|
83
|
+
(event: 'change-password', value: string): void
|
|
84
|
+
(event: 'generate-password'): void
|
|
85
|
+
}>()
|
|
86
|
+
|
|
87
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
88
|
+
|
|
89
|
+
const onChangePassword = (): void => {
|
|
90
|
+
emits('change-password', form.value.password.value)
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const onCopyToClipboard = (): void => {
|
|
94
|
+
navigator.clipboard.writeText(form.value.password.value)
|
|
95
|
+
}
|
|
96
|
+
</script>
|
|
97
|
+
|
|
98
|
+
<style scoped>
|
|
99
|
+
.password-content {
|
|
100
|
+
display: grid;
|
|
101
|
+
grid-template-columns: max-content 144px max-content;
|
|
102
|
+
grid-gap: 8px;
|
|
103
|
+
|
|
104
|
+
.copy-icon {
|
|
105
|
+
color: #9da6ad;
|
|
106
|
+
|
|
107
|
+
&.disabled {
|
|
108
|
+
color: #bdc3c770;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
.generate-password-button {
|
|
112
|
+
padding: 8px;
|
|
113
|
+
|
|
114
|
+
&:disabled {
|
|
115
|
+
.generate-password-icon {
|
|
116
|
+
color: #e9eaec;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
:deep(.ui-main.ui-main-sm .ui-main-input) {
|
|
123
|
+
height: 32px;
|
|
124
|
+
}
|
|
125
|
+
:deep(.ui-main.ui-main-sm .ui-slot-icon-content) {
|
|
126
|
+
pointer-events: unset;
|
|
127
|
+
}
|
|
128
|
+
</style>
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-usb-redirection-new
|
|
3
|
-
v-if="isNewView"
|
|
4
|
-
v-model:usb-redirection="usbRedirection"
|
|
5
|
-
:usb-redirection-options="usbRedirectionOptions"
|
|
6
|
-
/>
|
|
7
|
-
<common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-usb-redirection-old
|
|
8
|
-
v-else
|
|
9
|
-
v-model:usb-redirection="usbRedirection"
|
|
10
|
-
:usb-redirection-options="usbRedirectionOptions"
|
|
11
|
-
/>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
<script setup lang="ts">
|
|
15
|
-
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
16
|
-
import { usbRedirectionOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/lib/config/config'
|
|
17
|
-
|
|
18
|
-
const usbRedirection = defineModel<number>('usbRedirection', { required: true })
|
|
19
|
-
|
|
20
|
-
const { $store }: any = useNuxtApp()
|
|
21
|
-
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
22
|
-
|
|
23
|
-
const usbRedirectionOptions = ref<UI_I_OptionItem[]>(
|
|
24
|
-
usbRedirectionOptionsConfig
|
|
25
|
-
)
|
|
26
|
-
</script>
|
|
27
|
-
|
|
28
|
-
<style scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-usb-redirection-new
|
|
3
|
+
v-if="isNewView"
|
|
4
|
+
v-model:usb-redirection="usbRedirection"
|
|
5
|
+
:usb-redirection-options="usbRedirectionOptions"
|
|
6
|
+
/>
|
|
7
|
+
<common-vm-actions-common-customize-hardware-vmoptions-remote-console-options-usb-redirection-old
|
|
8
|
+
v-else
|
|
9
|
+
v-model:usb-redirection="usbRedirection"
|
|
10
|
+
:usb-redirection-options="usbRedirectionOptions"
|
|
11
|
+
/>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
16
|
+
import { usbRedirectionOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/lib/config/config'
|
|
17
|
+
|
|
18
|
+
const usbRedirection = defineModel<number>('usbRedirection', { required: true })
|
|
19
|
+
|
|
20
|
+
const { $store }: any = useNuxtApp()
|
|
21
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
22
|
+
|
|
23
|
+
const usbRedirectionOptions = ref<UI_I_OptionItem[]>(
|
|
24
|
+
usbRedirectionOptionsConfig
|
|
25
|
+
)
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<style scoped></style>
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<ui-stack-block :has-children="false">
|
|
3
|
-
<template #stackBlockKey>
|
|
4
|
-
{{ localization.common.usbRedirection }}
|
|
5
|
-
</template>
|
|
6
|
-
<template #stackBlockContent>
|
|
7
|
-
<ui-select
|
|
8
|
-
id="usb-redirection-select"
|
|
9
|
-
v-model="usbRedirection"
|
|
10
|
-
:items="props.usbRedirectionOptions"
|
|
11
|
-
test-id="usb-redirection-select"
|
|
12
|
-
class="usb-redirection-select"
|
|
13
|
-
disabled
|
|
14
|
-
size="sm"
|
|
15
|
-
/>
|
|
16
|
-
</template>
|
|
17
|
-
</ui-stack-block>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script setup lang="ts">
|
|
21
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
22
|
-
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
23
|
-
|
|
24
|
-
const usbRedirection = defineModel<number>('usbRedirection', {
|
|
25
|
-
required: true,
|
|
26
|
-
})
|
|
27
|
-
|
|
28
|
-
const props = defineProps<{
|
|
29
|
-
usbRedirectionOptions: UI_I_OptionItem[]
|
|
30
|
-
}>()
|
|
31
|
-
|
|
32
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
33
|
-
</script>
|
|
34
|
-
|
|
35
|
-
<style scoped>
|
|
36
|
-
:deep(.usb-redirection-select .ui-main-select-toggle) {
|
|
37
|
-
width: 108px;
|
|
38
|
-
}
|
|
39
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<ui-stack-block :has-children="false">
|
|
3
|
+
<template #stackBlockKey>
|
|
4
|
+
{{ localization.common.usbRedirection }}
|
|
5
|
+
</template>
|
|
6
|
+
<template #stackBlockContent>
|
|
7
|
+
<ui-select
|
|
8
|
+
id="usb-redirection-select"
|
|
9
|
+
v-model="usbRedirection"
|
|
10
|
+
:items="props.usbRedirectionOptions"
|
|
11
|
+
test-id="usb-redirection-select"
|
|
12
|
+
class="usb-redirection-select"
|
|
13
|
+
disabled
|
|
14
|
+
size="sm"
|
|
15
|
+
/>
|
|
16
|
+
</template>
|
|
17
|
+
</ui-stack-block>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script setup lang="ts">
|
|
21
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
22
|
+
import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
23
|
+
|
|
24
|
+
const usbRedirection = defineModel<number>('usbRedirection', {
|
|
25
|
+
required: true,
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
const props = defineProps<{
|
|
29
|
+
usbRedirectionOptions: UI_I_OptionItem[]
|
|
30
|
+
}>()
|
|
31
|
+
|
|
32
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<style scoped>
|
|
36
|
+
:deep(.usb-redirection-select .ui-main-select-toggle) {
|
|
37
|
+
width: 108px;
|
|
38
|
+
}
|
|
39
|
+
</style>
|