bfg-common 1.5.573 → 1.5.575
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/localization/local_be.json +29 -6
- package/assets/localization/local_en.json +29 -6
- package/assets/localization/local_hy.json +29 -6
- package/assets/localization/local_kk.json +29 -6
- package/assets/localization/local_ru.json +29 -6
- package/assets/localization/local_zh.json +30 -7
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/collapse/CollapseNav.vue +170 -170
- package/components/atoms/perPage/PerPage.vue +58 -58
- package/components/atoms/table/dataGrid/DataGrid.vue +1718 -1718
- package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
- package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
- package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
- package/components/common/backup/storage/actions/add/Add.vue +3 -2
- package/components/common/backup/storage/actions/add/New.vue +3 -2
- package/components/common/backup/storage/actions/add/Old.vue +5 -4
- package/components/common/backup/storage/actions/add/lib/utils.ts +51 -51
- 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 +7 -7
- package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
- package/components/common/diagramMain/DiagramMain.vue +1 -1
- package/components/common/diagramMain/modals/lib/config/portModal.ts +251 -251
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/layout/theHeader/helpMenu/About.vue +79 -79
- package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +79 -79
- package/components/common/modals/confirmByInput/ConfirmByInput.vue +9 -1
- package/components/common/modals/confirmByInput/ConfirmByInputNew.vue +7 -2
- package/components/common/monitor/overview/filters/lib/config/filterOptions.ts +1 -0
- package/components/common/pages/backups/DetailView.vue +52 -52
- package/components/common/pages/backups/lib/models/interfaces.ts +36 -36
- package/components/common/pages/backups/modals/Modals.vue +243 -243
- package/components/common/pages/backups/modals/createBackup/CreateBackup.vue +1 -1
- package/components/common/pages/backups/modals/createBackup/New.vue +8 -2
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
- package/components/common/pages/backups/modals/createBackup/lib/config/readyToCompleteOptions.ts +69 -69
- package/components/common/pages/backups/modals/createBackup/lib/config/steps.ts +2 -1
- package/components/common/pages/backups/modals/lib/config/restore.ts +115 -115
- package/components/common/pages/backups/modals/lib/models/interfaces.ts +186 -186
- package/components/common/pages/backups/modals/restore/Restore.vue +9 -5
- package/components/common/pages/backups/modals/restore/RestoreNew.vue +13 -3
- package/components/common/pages/backups/modals/restore/RestoreOld.vue +6 -18
- package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
- package/components/common/pages/home/lib/models/interfaces.ts +48 -48
- 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/VmsOld.vue +35 -35
- package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
- package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
- package/components/common/pages/scheduledTasks/table/Table.vue +1 -1
- package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
- package/components/common/select/radio/RadioGroup.vue +137 -137
- package/components/common/spiceConsole/Drawer.vue +420 -420
- package/components/common/spiceConsole/SpiceConsole.vue +184 -184
- package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
- package/components/common/tools/Actions.vue +207 -207
- package/components/common/treeView/TreeView.vue +52 -52
- package/components/common/vm/actions/add/Add.vue +127 -52
- package/components/common/vm/actions/add/New.vue +54 -16
- package/components/common/vm/actions/add/Old.vue +55 -16
- package/components/common/vm/actions/add/lib/config/steps.ts +347 -347
- package/components/common/vm/actions/clone/Clone.vue +121 -48
- package/components/common/vm/actions/clone/new/New.vue +50 -14
- package/components/common/vm/actions/clone/old/Old.vue +52 -16
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +81 -14
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +56 -7
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +56 -8
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +206 -208
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareNew.vue +120 -223
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +118 -218
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +53 -66
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/lib/config/options.ts +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +159 -139
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuNew.vue +15 -8
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CpuOld.vue +13 -8
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +140 -140
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +75 -62
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/MemoryNew.vue +158 -158
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/MemoryOld.vue +155 -155
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +149 -241
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskNew.vue +4 -3
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskOld.vue +3 -2
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/Location.vue +154 -154
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +96 -58
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +31 -31
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +17 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerNew.vue +3 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbControllerOld.vue +3 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +39 -17
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardNew.vue +5 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCardOld.vue +5 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/lib/config/options.ts +4 -4
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +53 -53
- package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +93 -6
- package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsNew.vue +62 -8
- package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsOld.vue +60 -8
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptions.vue +69 -5
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsNew.vue +32 -12
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/BootOptionsOld.vue +33 -12
- 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 +132 -114
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +6 -41
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderOld.vue +6 -44
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +23 -8
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsNew.vue +31 -21
- package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsOld.vue +34 -26
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/New.vue +34 -28
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/Old.vue +30 -24
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +112 -8
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +3 -3
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{New.vue → KeymapNew.vue} +6 -6
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/{Old.vue → KeymapOld.vue} +5 -5
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +7 -6
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +28 -28
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/Tools.vue +38 -4
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/ToolsNew.vue +26 -7
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/ToolsOld.vue +50 -24
- package/components/common/vm/actions/common/lib/models/interfaces.ts +25 -57
- package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
- 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/os/New.vue +19 -0
- package/components/common/vm/actions/common/select/os/Old.vue +34 -0
- package/components/common/vm/actions/common/select/os/Os.vue +25 -0
- package/components/common/vm/actions/common/select/storage/Old.vue +125 -125
- package/components/common/vm/actions/common/select/storage/Storage.vue +178 -178
- package/components/common/vm/actions/common/select/storage/new/New.vue +311 -311
- 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/common/select/template/old/Old.vue +50 -50
- package/components/common/vm/actions/editSettings/EditSettings.vue +90 -32
- package/components/common/vm/actions/editSettings/EditSettingsOld.vue +41 -14
- package/components/common/vm/actions/editSettings/new/New.vue +41 -14
- package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
- package/components/common/vm/actions/lib/models/interfaces.ts +29 -4
- package/components/common/vm/actions/lib/utils.ts +36 -64
- package/components/common/vm/actions/register/Register.vue +352 -352
- package/components/common/vm/actions/register/lib/config/steps.ts +86 -86
- package/components/common/wizards/common/compatibility/Compatibility.vue +35 -35
- package/components/common/wizards/common/compatibility/New.vue +99 -99
- package/components/common/wizards/common/compatibility/Old.vue +53 -53
- package/components/common/wizards/common/steps/computeResource/ComputeResource.vue +86 -86
- package/components/common/wizards/common/steps/computeResource/New.vue +93 -93
- package/components/common/wizards/common/steps/computeResource/Old.vue +103 -103
- package/components/common/wizards/common/steps/name/Name.vue +178 -178
- package/components/common/wizards/common/steps/name/New.vue +221 -221
- package/components/common/wizards/common/steps/name/Old.vue +121 -121
- package/components/common/wizards/common/steps/name/lib/models/interfaces.ts +4 -4
- package/components/common/wizards/common/steps/name/location/Location.vue +85 -85
- package/components/common/wizards/common/steps/name/location/New.vue +40 -40
- package/components/common/wizards/datastore/add/Add.vue +228 -228
- package/components/common/wizards/datastore/add/lib/utils.ts +85 -85
- package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
- package/components/common/wizards/vm/migrate/select/computeResource/ComputeResource.vue +205 -205
- package/components/common/wizards/vm/migrate/select/network/Network.vue +103 -103
- package/composables/useAppVersion.ts +21 -21
- package/composables/useLocal.ts +6 -6
- package/composables/useLocalCommon.ts +39 -39
- package/package.json +3 -1
- package/plugins/console.ts +21 -21
- package/plugins/date.ts +233 -233
- package/plugins/mouse.ts +21 -21
- package/plugins/panelStates.ts +70 -70
- package/plugins/text.ts +59 -59
- package/public/spice-console/application/clientgui.js +854 -854
- package/public/spice-console/application/packetfactory.js +211 -211
- package/public/spice-console/application/virtualmouse.js +147 -147
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/public/spice-console/network/spicechannel.js +440 -440
- package/public/spice-console/process/cursorprocess.js +121 -121
- package/public/spice-console/process/inputprocess.js +227 -227
- package/public/spice-console/process/mainprocess.js +210 -210
- package/public/spice-console/run.js +210 -210
- package/store/main/mutations.ts +7 -7
- package/store/main/state.ts +7 -7
- package/store/tasks/mappers/recentTasks.ts +4 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/{New.vue → PasswordNew.vue} +0 -0
- /package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/{Old.vue → PasswordOld.vue} +0 -0
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-new
|
|
3
3
|
v-if="isNewView"
|
|
4
4
|
v-model:delete-files-from-datastore="deleteFilesFromDatastore"
|
|
5
|
-
v-model:size="
|
|
5
|
+
v-model:size="size"
|
|
6
6
|
v-model:hard-disk-type="hardDiskType"
|
|
7
|
-
v-model:disk-provisioning="
|
|
8
|
-
v-model:sharing="
|
|
7
|
+
v-model:disk-provisioning="diskProvisioning"
|
|
8
|
+
v-model:sharing="sharing"
|
|
9
9
|
v-model:limit-iops="limitIops"
|
|
10
10
|
v-model:limit-iops-type="limitIopsType"
|
|
11
11
|
v-model:limit-iops-invalid="limitIopsInvalid"
|
|
12
12
|
v-model:disk-mode="diskMode"
|
|
13
13
|
v-model:cache="cache"
|
|
14
14
|
v-model:bus="bus"
|
|
15
|
-
v-model:source="source"
|
|
16
15
|
:is-removable="isRemovable"
|
|
17
16
|
:label="label"
|
|
18
17
|
:hard-disk-invalid="hardDiskInvalid"
|
|
@@ -37,6 +36,7 @@
|
|
|
37
36
|
:error-validation-fields="props.errorValidationFields"
|
|
38
37
|
:index="props.index"
|
|
39
38
|
:type="props.type"
|
|
39
|
+
:hard-disk="props.hardDisk"
|
|
40
40
|
:guest-machine-type="props.guestMachineType"
|
|
41
41
|
:compute-resource="props.computeResource"
|
|
42
42
|
@remove="emits('remove')"
|
|
@@ -48,17 +48,16 @@
|
|
|
48
48
|
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-old
|
|
49
49
|
v-else
|
|
50
50
|
v-model:delete-files-from-datastore="deleteFilesFromDatastore"
|
|
51
|
-
v-model:size="
|
|
51
|
+
v-model:size="size"
|
|
52
52
|
v-model:hard-disk-type="hardDiskType"
|
|
53
|
-
v-model:disk-provisioning="
|
|
54
|
-
v-model:sharing="
|
|
53
|
+
v-model:disk-provisioning="diskProvisioning"
|
|
54
|
+
v-model:sharing="sharing"
|
|
55
55
|
v-model:limit-iops="limitIops"
|
|
56
56
|
v-model:limit-iops-type="limitIopsType"
|
|
57
57
|
v-model:limit-iops-invalid="limitIopsInvalid"
|
|
58
58
|
v-model:disk-mode="diskMode"
|
|
59
59
|
v-model:cache="cache"
|
|
60
60
|
v-model:bus="bus"
|
|
61
|
-
v-model:source="source"
|
|
62
61
|
:is-removable="isRemovable"
|
|
63
62
|
:label="label"
|
|
64
63
|
:hard-disk-invalid="hardDiskInvalid"
|
|
@@ -83,6 +82,7 @@
|
|
|
83
82
|
:error-validation-fields="props.errorValidationFields"
|
|
84
83
|
:index="props.index"
|
|
85
84
|
:type="props.type"
|
|
85
|
+
:hard-disk="props.hardDisk"
|
|
86
86
|
:guest-machine-type="props.guestMachineType"
|
|
87
87
|
:compute-resource="props.computeResource"
|
|
88
88
|
:disabled="false"
|
|
@@ -96,10 +96,10 @@
|
|
|
96
96
|
|
|
97
97
|
<script setup lang="ts">
|
|
98
98
|
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
import type {
|
|
100
|
+
UI_I_SendDataNewHardDisk,
|
|
101
|
+
UI_I_SendDataNewHardDiskStorage,
|
|
102
|
+
} from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
103
103
|
import type { UI_T_HardDiskType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
|
|
104
104
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
105
105
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
@@ -108,61 +108,10 @@ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
|
|
|
108
108
|
import type { UI_I_TreeNode } from '~/components/common/recursionTree/lib/models/interfaces'
|
|
109
109
|
import { binaryOptionsFunc } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/binaryOptions'
|
|
110
110
|
|
|
111
|
-
const size = defineModel<number>('size', { required: true })
|
|
112
|
-
const initialSize = size.value
|
|
113
|
-
// const provisionType = ref<string>('thick')
|
|
114
|
-
const provisionType = defineModel<string>('provisionType', { required: true })
|
|
115
|
-
// const sharing = ref<string>('')
|
|
116
|
-
const sharing = defineModel<boolean>('sharing', { required: true })
|
|
117
|
-
// const sharingLocal = ref<string>(sharing.value ? 'yes' : '')
|
|
118
|
-
const sharingLocal = computed<string>({
|
|
119
|
-
set(newValue) {
|
|
120
|
-
sharing.value = newValue === 'yes'
|
|
121
|
-
},
|
|
122
|
-
get() {
|
|
123
|
-
return sharing.value ? 'yes' : ''
|
|
124
|
-
}
|
|
125
|
-
})
|
|
126
|
-
// const shares = ref<number>(0)
|
|
127
|
-
const shares = defineModel<number>('shares', { required: true })
|
|
128
|
-
|
|
129
|
-
// const limitIops = ref<number>(16)
|
|
130
|
-
const limitIops = defineModel<number>('limitIops', { required: true })
|
|
131
|
-
const limitIopsType = ref<string>('unlimited') // ??
|
|
132
|
-
const limitIopsInvalid = ref<boolean>(false) // ??
|
|
133
|
-
|
|
134
|
-
// const diskMode = ref<string>('dependent')
|
|
135
|
-
const diskMode = defineModel<string>('diskMode', { required: true })
|
|
136
|
-
|
|
137
|
-
// const cache = ref<string>('none')
|
|
138
|
-
const cache = defineModel<string>('cache', { required: true })
|
|
139
|
-
|
|
140
|
-
// const bus = ref<string>('ide')
|
|
141
|
-
const bus = defineModel<string>('bus', { required: true })
|
|
142
|
-
|
|
143
|
-
// const readOnly = ref<boolean>(false)
|
|
144
|
-
const readOnly = defineModel<boolean>('readOnly', { required: true })
|
|
145
|
-
|
|
146
|
-
// const discard = ref<string>('')
|
|
147
|
-
const discard = defineModel<string>('discard', { required: true })
|
|
148
|
-
|
|
149
|
-
// const io = ref<string>('')
|
|
150
|
-
const io = defineModel<string>('io', { required: true })
|
|
151
|
-
|
|
152
|
-
// const target = ref<string>('')
|
|
153
|
-
const target = defineModel<string>('target', { required: true })
|
|
154
|
-
|
|
155
|
-
const source = defineModel<string>('source', { required: true })
|
|
156
|
-
|
|
157
|
-
const storage = defineModel<any>('storage', { required: true })
|
|
158
|
-
|
|
159
|
-
const remove = defineModel<boolean>('remove', { required: true })
|
|
160
|
-
const detach = defineModel<boolean>('detach', { required: true })
|
|
161
|
-
|
|
162
111
|
const props = withDefaults(
|
|
163
112
|
defineProps<{
|
|
164
|
-
|
|
165
|
-
|
|
113
|
+
storage: UI_I_DatastoreTableItem | null
|
|
114
|
+
hardDisk: UI_I_SendDataNewHardDisk
|
|
166
115
|
type: UI_T_HardDiskType
|
|
167
116
|
index: number
|
|
168
117
|
errorValidationFields: UI_I_ErrorValidationField[]
|
|
@@ -181,18 +130,13 @@ const props = withDefaults(
|
|
|
181
130
|
}
|
|
182
131
|
)
|
|
183
132
|
const emits = defineEmits<{
|
|
184
|
-
|
|
133
|
+
(event: 'send-data', value: UI_I_SendDataNewHardDisk): void
|
|
185
134
|
(event: 'invalid', value: boolean): void
|
|
186
135
|
(event: 'remove'): void
|
|
187
136
|
(event: 'roll-back'): void
|
|
188
137
|
(event: 'remove-error-by-title', value: string): void
|
|
189
138
|
}>()
|
|
190
139
|
|
|
191
|
-
watch(() => props.type, (newValue) => {
|
|
192
|
-
detach.value = newValue === 'removed'
|
|
193
|
-
})
|
|
194
|
-
|
|
195
|
-
|
|
196
140
|
const { $store, $binary }: any = useNuxtApp()
|
|
197
141
|
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
198
142
|
|
|
@@ -236,24 +180,23 @@ const label = computed<string>(() => {
|
|
|
236
180
|
})
|
|
237
181
|
|
|
238
182
|
const maxHardDisk = computed<number>(() => {
|
|
239
|
-
|
|
183
|
+
const hardDiskSizeMb = $binary.gbToMb(props.hardDisk.size)
|
|
240
184
|
|
|
241
|
-
if (props.type === 'exist') return
|
|
185
|
+
if (props.type === 'exist') return hardDiskSizeMb
|
|
242
186
|
|
|
243
|
-
if (!
|
|
244
|
-
const free =
|
|
245
|
-
storageLocal.value.capacity) as number // TODO fix
|
|
187
|
+
if (!storage.value) return 0
|
|
188
|
+
const free = storage.value.capacity.free_mb || storage.value.capacity // TODO fix
|
|
246
189
|
|
|
247
|
-
if (props.isEdit) return free +
|
|
190
|
+
if (props.isEdit) return free + hardDiskSizeMb
|
|
248
191
|
|
|
249
192
|
return free
|
|
250
193
|
})
|
|
251
194
|
const hardDiskTypeErrorLocalText = computed<string>(() => {
|
|
252
|
-
if (
|
|
195
|
+
if (+sizeInMb.value > maxHardDisk.value) {
|
|
253
196
|
return localization.value.common.diskCapacitySpecifiedGreater
|
|
254
197
|
}
|
|
255
198
|
|
|
256
|
-
if (
|
|
199
|
+
if (+sizeInMb.value <= 0) {
|
|
257
200
|
return localization.value.common.diskCapacityCannotZero
|
|
258
201
|
}
|
|
259
202
|
|
|
@@ -274,38 +217,25 @@ const hardDiskLocalAndApiErrorsTexts = computed<string>(() => {
|
|
|
274
217
|
})
|
|
275
218
|
|
|
276
219
|
const deleteFilesFromDatastore = ref<boolean>(false)
|
|
277
|
-
watch(deleteFilesFromDatastore, (newValue) => {
|
|
278
|
-
remove.value = props.type === 'removed' && newValue
|
|
279
|
-
})
|
|
280
220
|
|
|
281
|
-
const hardDiskType = ref<string>(
|
|
282
|
-
watch(hardDiskType, (newValue) => {
|
|
283
|
-
size.value = $binary.universalFromTo(sizeLocal.value, newValue, 'mb')
|
|
284
|
-
})
|
|
221
|
+
const hardDiskType = ref<string>('gb')
|
|
285
222
|
const hardDiskTypeOptions = ref<UI_I_OptionItem[]>(
|
|
286
223
|
binaryOptionsFunc(localization.value)
|
|
287
224
|
)
|
|
288
225
|
|
|
289
|
-
const
|
|
290
|
-
|
|
226
|
+
const size = ref<number>(props.hardDisk.size) // Изначально всегда приходит в gb
|
|
227
|
+
const sizeInMb = computed<number>(() => {
|
|
291
228
|
if (hardDiskType.value === 'mb') {
|
|
292
|
-
size.value
|
|
229
|
+
return size.value
|
|
293
230
|
}
|
|
294
231
|
|
|
295
|
-
|
|
232
|
+
return $binary.universalFromTo(size.value, hardDiskType.value, 'mb')
|
|
296
233
|
})
|
|
297
|
-
// const sizeInMb = computed<number>(() => {
|
|
298
|
-
// if (hardDiskType.value === 'mb') {
|
|
299
|
-
// return size.value
|
|
300
|
-
// }
|
|
301
|
-
//
|
|
302
|
-
// return $binary.universalFromTo(size.value, hardDiskType.value, 'mb')
|
|
303
|
-
// })
|
|
304
234
|
const onValidateSize = (): void => {
|
|
305
235
|
if (props.type !== 'edit') return
|
|
306
|
-
if (
|
|
307
|
-
|
|
308
|
-
|
|
236
|
+
if (sizeInMb.value < props.hardDisk.size) {
|
|
237
|
+
size.value = $binary.universalFromTo(
|
|
238
|
+
props.hardDisk.size,
|
|
309
239
|
'mb',
|
|
310
240
|
hardDiskType.value
|
|
311
241
|
)
|
|
@@ -317,7 +247,7 @@ const isDisabledSize = computed<boolean>(() => {
|
|
|
317
247
|
return (
|
|
318
248
|
props.type === 'exist' ||
|
|
319
249
|
(props.type === 'edit' && readOnly.value) ||
|
|
320
|
-
(isRunning.value &&
|
|
250
|
+
(isRunning.value && diskProvisioning.value === 'thick')
|
|
321
251
|
)
|
|
322
252
|
})
|
|
323
253
|
const isDisabledProvisioning = computed<boolean>(() => {
|
|
@@ -341,25 +271,13 @@ const isDisabledBus = computed<boolean>(() => {
|
|
|
341
271
|
return !isNewHardDisk.value && isRunning.value
|
|
342
272
|
})
|
|
343
273
|
|
|
344
|
-
const location = ref<UI_I_DatastoreTableItem | null>(props.
|
|
345
|
-
const
|
|
274
|
+
const location = ref<UI_I_DatastoreTableItem | null>(props.storage || null)
|
|
275
|
+
const storage = ref<UI_I_DatastoreTableItem | null>(props.storage)
|
|
346
276
|
watch(
|
|
347
|
-
() => props.
|
|
277
|
+
() => props.storage,
|
|
348
278
|
(newValue) => {
|
|
349
279
|
location.value = newValue
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
storage.value = {
|
|
353
|
-
id: newValue?.id || '',
|
|
354
|
-
name: newValue?.name || '',
|
|
355
|
-
type: newValue?.type_text || '',
|
|
356
|
-
pool: newValue?.pool_name || '',
|
|
357
|
-
user: '',
|
|
358
|
-
endpoint: '',
|
|
359
|
-
password: '',
|
|
360
|
-
protocol: '',
|
|
361
|
-
options: '',
|
|
362
|
-
}
|
|
280
|
+
storage.value = newValue
|
|
363
281
|
},
|
|
364
282
|
{
|
|
365
283
|
immediate: true,
|
|
@@ -367,135 +285,125 @@ watch(
|
|
|
367
285
|
}
|
|
368
286
|
)
|
|
369
287
|
const onChangeStorage = (item: UI_I_DatastoreTableItem): void => {
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
storage.value = {
|
|
373
|
-
id: item?.id || '',
|
|
374
|
-
name: item?.name || '',
|
|
375
|
-
type: item?.type_text || '',
|
|
376
|
-
pool: item?.pool_name || '',
|
|
377
|
-
user: '',
|
|
378
|
-
endpoint: '',
|
|
379
|
-
password: '',
|
|
380
|
-
protocol: '',
|
|
381
|
-
options: '',
|
|
382
|
-
}
|
|
288
|
+
storage.value = item
|
|
383
289
|
}
|
|
384
290
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
291
|
+
const diskProvisioning = ref<string>('thick')
|
|
292
|
+
const sharing = ref<string>('')
|
|
293
|
+
const shares = ref<number>(0)
|
|
294
|
+
|
|
295
|
+
const limitIops = ref<number>(16)
|
|
296
|
+
const limitIopsType = ref<string>('unlimited')
|
|
297
|
+
const limitIopsInvalid = ref<boolean>(false)
|
|
298
|
+
|
|
299
|
+
const diskMode = ref<string>('dependent')
|
|
300
|
+
|
|
301
|
+
const cache = ref<string>('none')
|
|
302
|
+
|
|
397
303
|
// const bus = ref<string>('ide')
|
|
398
|
-
//
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
//
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
304
|
+
const bus = ref<string>('virtio') // Семён попросил
|
|
305
|
+
|
|
306
|
+
const readOnly = ref<boolean>(false)
|
|
307
|
+
|
|
308
|
+
const discard = ref<string>('')
|
|
309
|
+
|
|
310
|
+
const io = ref<string>('')
|
|
311
|
+
|
|
312
|
+
const target = ref<string>('')
|
|
313
|
+
|
|
314
|
+
watch(
|
|
315
|
+
[
|
|
316
|
+
sizeInMb,
|
|
317
|
+
storage,
|
|
318
|
+
diskProvisioning,
|
|
319
|
+
sharing,
|
|
320
|
+
limitIops,
|
|
321
|
+
limitIopsType,
|
|
322
|
+
diskMode,
|
|
323
|
+
cache,
|
|
324
|
+
bus,
|
|
325
|
+
deleteFilesFromDatastore,
|
|
326
|
+
(): void => props.type,
|
|
327
|
+
],
|
|
328
|
+
() => {
|
|
329
|
+
const limitIopsLocal =
|
|
330
|
+
limitIopsType.value === 'unlimited' ? 0 : limitIops.value
|
|
331
|
+
const storageLocal: UI_I_SendDataNewHardDiskStorage = {
|
|
332
|
+
id: storage.value?.id || '',
|
|
333
|
+
name: storage.value?.name || '',
|
|
334
|
+
type: storage.value?.type_text || '',
|
|
335
|
+
pool: storage.value?.pool_name || '',
|
|
336
|
+
user: '',
|
|
337
|
+
endpoint: '',
|
|
338
|
+
password: '',
|
|
339
|
+
protocol: '',
|
|
340
|
+
options: '',
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
emits('send-data', {
|
|
344
|
+
create: props.hardDisk.create,
|
|
345
|
+
attach: props.hardDisk.attach,
|
|
346
|
+
source: props.hardDisk.source,
|
|
347
|
+
size: Math.ceil(sizeInMb.value),
|
|
348
|
+
bus: bus.value,
|
|
349
|
+
target: target.value,
|
|
350
|
+
storage: storageLocal,
|
|
351
|
+
device_type: 'disk',
|
|
352
|
+
provision_type: diskProvisioning.value,
|
|
353
|
+
disk_mode: diskMode.value,
|
|
354
|
+
sharing: sharing.value === 'yes',
|
|
355
|
+
read_only: readOnly.value,
|
|
356
|
+
shares: shares.value,
|
|
357
|
+
cache: cache.value,
|
|
358
|
+
io: io.value,
|
|
359
|
+
limit_iops: limitIopsLocal,
|
|
360
|
+
discard: discard.value,
|
|
361
|
+
capacity: Math.ceil(sizeInMb.value),
|
|
362
|
+
boot_order: props.hardDisk.boot_order,
|
|
363
|
+
detach: props.type === 'removed',
|
|
364
|
+
remove: props.type === 'removed' && deleteFilesFromDatastore.value, // Проверяем если удалили диск и указали Delete files from datastore
|
|
365
|
+
})
|
|
366
|
+
},
|
|
367
|
+
{ immediate: true }
|
|
368
|
+
)
|
|
462
369
|
|
|
463
370
|
// Добавляем данные для редактирования
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
//
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
//
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
//
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
//
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
371
|
+
watch(
|
|
372
|
+
() => props.hardDisk,
|
|
373
|
+
(newValue) => {
|
|
374
|
+
// TODO refactoring
|
|
375
|
+
if (props.type === 'exist') {
|
|
376
|
+
diskProvisioning.value = newValue.provision_type || 'thick'
|
|
377
|
+
return
|
|
378
|
+
}
|
|
379
|
+
// if (props.type !== 'edit') return
|
|
380
|
+
if (props.type !== 'edit' && props.type !== 'clone') return
|
|
381
|
+
|
|
382
|
+
const sizeInGb = $binary.mbToGb(newValue.size)
|
|
383
|
+
if (sizeInGb < 1) {
|
|
384
|
+
size.value = newValue.size
|
|
385
|
+
hardDiskType.value = 'mb'
|
|
386
|
+
} else {
|
|
387
|
+
size.value = sizeInGb
|
|
388
|
+
hardDiskType.value = 'gb'
|
|
389
|
+
}
|
|
390
|
+
diskProvisioning.value = newValue.provision_type || 'thick'
|
|
391
|
+
sharing.value = newValue.sharing ? 'yes' : ''
|
|
392
|
+
shares.value = newValue.shares || 0
|
|
393
|
+
// limitIopsType.value = newValue.io === 'native' ? 'unlimited' : 'custom'
|
|
394
|
+
limitIopsType.value = newValue.limit_iops === 0 ? 'unlimited' : 'custom'
|
|
395
|
+
limitIops.value = newValue.limit_iops || 16
|
|
396
|
+
diskMode.value = newValue.disk_mode || 'dependent'
|
|
397
|
+
cache.value = newValue.cache || 'none'
|
|
398
|
+
// bus.value = newValue.bus || 'ide'
|
|
399
|
+
bus.value = newValue.bus || 'virtio' // Семён попросил
|
|
400
|
+
readOnly.value = newValue.read_only || false
|
|
401
|
+
discard.value = newValue.discard || ''
|
|
402
|
+
io.value = newValue.io || ''
|
|
403
|
+
target.value = newValue.target || ''
|
|
404
|
+
},
|
|
405
|
+
{ immediate: true }
|
|
406
|
+
)
|
|
499
407
|
watch(
|
|
500
408
|
isRunning,
|
|
501
409
|
(newValue) => {
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
/>
|
|
108
108
|
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-file
|
|
109
109
|
v-else
|
|
110
|
-
:path="source"
|
|
110
|
+
:path="props.hardDisk?.source"
|
|
111
111
|
:index="props.index"
|
|
112
112
|
/>
|
|
113
113
|
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-provisioning
|
|
@@ -165,6 +165,7 @@
|
|
|
165
165
|
|
|
166
166
|
<script setup lang="ts">
|
|
167
167
|
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
168
|
+
import type { UI_I_SendDataNewHardDisk } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
168
169
|
import type { UI_T_HardDiskType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
|
|
169
170
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
170
171
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
@@ -190,7 +191,6 @@ const limitIopsInvalid = defineModel<boolean>('limitIopsInvalid', {
|
|
|
190
191
|
const diskMode = defineModel<string>('diskMode', { required: true })
|
|
191
192
|
const cache = defineModel<string>('cache', { required: true })
|
|
192
193
|
const bus = defineModel<string>('bus', { required: true })
|
|
193
|
-
const source = defineModel<string>('source', { required: true })
|
|
194
194
|
|
|
195
195
|
const props = withDefaults(
|
|
196
196
|
defineProps<{
|
|
@@ -216,9 +216,10 @@ const props = withDefaults(
|
|
|
216
216
|
datastore: UI_I_DatastoreTableItem[]
|
|
217
217
|
isDatastoreLoading: boolean
|
|
218
218
|
getDatastoreTableFunc: (payload: UI_I_TablePayload) => Promise<void>
|
|
219
|
-
errorValidationFields: UI_I_ErrorValidationField[]
|
|
219
|
+
errorValidationFields: UI_I_ErrorValidationField<string>[]
|
|
220
220
|
index: number
|
|
221
221
|
type: UI_T_HardDiskType
|
|
222
|
+
hardDisk: UI_I_SendDataNewHardDisk
|
|
222
223
|
guestMachineType?: UI_I_OptionItem | null
|
|
223
224
|
computeResource?: UI_I_TreeNode | null
|
|
224
225
|
}>(),
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
/>
|
|
122
122
|
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-file
|
|
123
123
|
v-else
|
|
124
|
-
:path="source"
|
|
124
|
+
:path="props.hardDisk?.source"
|
|
125
125
|
:index="props.index"
|
|
126
126
|
/>
|
|
127
127
|
<common-vm-actions-common-customize-hardware-virtual-hardware-new-hard-disk-provisioning
|
|
@@ -180,6 +180,7 @@
|
|
|
180
180
|
|
|
181
181
|
<script setup lang="ts">
|
|
182
182
|
import type { UI_I_DatastoreTableItem } from '~/lib/models/store/storage/interfaces'
|
|
183
|
+
import type { UI_I_SendDataNewHardDisk } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
|
|
183
184
|
import type { UI_T_HardDiskType } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/types'
|
|
184
185
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
185
186
|
import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
|
|
@@ -205,7 +206,6 @@ const limitIopsInvalid = defineModel<boolean>('limitIopsInvalid', {
|
|
|
205
206
|
const diskMode = defineModel<string>('diskMode', { required: true })
|
|
206
207
|
const cache = defineModel<string>('cache', { required: true })
|
|
207
208
|
const bus = defineModel<string>('bus', { required: true })
|
|
208
|
-
const source = defineModel<string>('source', { required: true })
|
|
209
209
|
|
|
210
210
|
const props = withDefaults(
|
|
211
211
|
defineProps<{
|
|
@@ -234,6 +234,7 @@ const props = withDefaults(
|
|
|
234
234
|
errorValidationFields: UI_I_ErrorValidationField<string>[]
|
|
235
235
|
index: number
|
|
236
236
|
type: UI_T_HardDiskType
|
|
237
|
+
hardDisk: UI_I_SendDataNewHardDisk
|
|
237
238
|
guestMachineType?: UI_I_OptionItem | null
|
|
238
239
|
computeResource?: UI_I_TreeNode | null
|
|
239
240
|
}>(),
|