bfg-common 1.5.330 → 1.5.332

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.
Files changed (156) hide show
  1. package/CODE_STYLE.md +109 -109
  2. package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
  3. package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
  4. package/assets/img/icons/icons-sprite-light-3.svg +227 -227
  5. package/assets/img/icons/icons-sprite-light-5.svg +488 -488
  6. package/assets/localization/local_be.json +6 -4
  7. package/assets/localization/local_en.json +3266 -3264
  8. package/assets/localization/local_hy.json +6 -4
  9. package/assets/localization/local_kk.json +6 -4
  10. package/assets/localization/local_ru.json +6 -4
  11. package/assets/localization/local_zh.json +3263 -3261
  12. package/components/atoms/TheIcon3.vue +50 -50
  13. package/components/atoms/collapse/CollapseNav.vue +170 -170
  14. package/components/atoms/collapse/CollapseNavItem.vue +226 -226
  15. package/components/atoms/nav/NavBar.vue +147 -147
  16. package/components/atoms/perPage/PerPage.vue +58 -58
  17. package/components/atoms/table/dataGrid/DataGrid.vue +1717 -1717
  18. package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
  19. package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
  20. package/components/atoms/tabs/VerticalTabs.vue +105 -105
  21. package/components/common/backup/storage/actions/add/lib/config/steps.ts +168 -168
  22. package/components/common/backup/storage/actions/add/steps/hostAccessibility/HostAccessibility.vue +52 -52
  23. package/components/common/backup/storage/actions/add/steps/readyComplete/ReadyComplete.vue +45 -45
  24. package/components/common/backup/storage/actions/delete/Delete.vue +65 -65
  25. package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
  26. package/components/common/context/lib/models/interfaces.ts +33 -33
  27. package/components/common/diagramMain/DiagramMain.vue +897 -897
  28. package/components/common/diagramMain/modals/lib/config/networkModal.ts +398 -398
  29. package/components/common/diagramMain/network/Network.vue +141 -141
  30. package/components/common/layout/theHeader/helpMenu/About.vue +82 -82
  31. package/components/common/layout/theHeader/userMenu/modals/preferences/view/ViewOld.vue +112 -112
  32. package/components/common/monitor/overview/OverviewOld.vue +139 -139
  33. package/components/common/pages/home/headline/Headline.vue +45 -45
  34. package/components/common/pages/home/headline/HeadlineOld.vue +42 -42
  35. package/components/common/pages/home/lib/models/interfaces.ts +48 -48
  36. package/components/common/pages/home/widgets/Widgets.vue +49 -49
  37. package/components/common/pages/home/widgets/WidgetsNew.vue +86 -88
  38. package/components/common/pages/home/widgets/WidgetsOld.vue +34 -36
  39. package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
  40. package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
  41. package/components/common/pages/home/widgets/vms/Vms.vue +26 -26
  42. package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
  43. package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
  44. package/components/common/pages/packages/Packages.vue +208 -208
  45. package/components/common/pages/shortcuts/block/BlockOld.vue +68 -68
  46. package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
  47. package/components/common/recursionTree/RecursionTree.vue +223 -223
  48. package/components/common/select/button/ButtonDropdown.vue +112 -112
  49. package/components/common/select/radio/RadioGroup.vue +128 -135
  50. package/components/common/select/radio/lib/models/interfaces.ts +0 -1
  51. package/components/common/spiceConsole/Drawer.vue +377 -377
  52. package/components/common/spiceConsole/SpiceConsole.vue +127 -127
  53. package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
  54. package/components/common/tools/Actions.vue +207 -207
  55. package/components/common/vm/actions/add/New.vue +642 -647
  56. package/components/common/vm/actions/add/Old.vue +385 -388
  57. package/components/common/vm/actions/add/folderTreeView/FolderTreeView.vue +72 -72
  58. package/components/common/vm/actions/add/folderTreeView/New.vue +40 -40
  59. package/components/common/vm/actions/add/folderTreeView/Old.vue +50 -50
  60. package/components/common/vm/actions/add/lib/config/steps.ts +10 -22
  61. package/components/common/vm/actions/clone/Clone.vue +823 -823
  62. package/components/common/vm/actions/clone/lib/config/steps.ts +291 -291
  63. package/components/common/vm/actions/clone/toTemplate/lib/config/steps.ts +116 -116
  64. package/components/common/vm/actions/common/customizeHardware/CustomizeHardware.vue +0 -3
  65. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +0 -2
  66. package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareOld.vue +0 -2
  67. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardwareOld.vue +321 -321
  68. package/components/common/vm/actions/common/customizeHardware/virtualHardware/browseView/BrowseView.vue +227 -227
  69. package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/Bus.vue +100 -100
  70. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +232 -232
  71. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDriveOld.vue +168 -168
  72. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/Media.vue +25 -25
  73. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/MediaNew.vue +78 -78
  74. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/MediaOld.vue +50 -50
  75. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/Shares.vue +140 -140
  76. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
  77. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/tooltip/TooltipNew.vue +154 -154
  78. package/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/config/dropdownItems.ts +153 -155
  79. package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/Limit.vue +220 -220
  80. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +307 -307
  81. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +385 -385
  82. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/Location.vue +154 -154
  83. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/location/LocationOld.vue +85 -85
  84. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +288 -288
  85. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/location/new/table/lib/config/config.ts +94 -94
  86. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddress.vue +119 -119
  87. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/NewPciDevice.vue +205 -205
  88. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoNew.vue +66 -66
  89. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/directPathIo/DirectPathIoOld.vue +62 -62
  90. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIo.vue +31 -31
  91. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/dynamicDirectPathIo/DynamicDirectPathIoOld.vue +76 -76
  92. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/Note.vue +15 -15
  93. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteNew.vue +42 -42
  94. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/note/NoteOld.vue +30 -30
  95. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newPciDevice/nvidiaGrid/NvidiaGridOld.vue +84 -84
  96. package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/Other.vue +16 -16
  97. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +154 -154
  98. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/numberDisplays/NumberDisplays.vue +53 -53
  99. package/components/common/vm/actions/common/customizeHardware/vmoptions/Vmoptions.vue +152 -155
  100. package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsNew.vue +128 -132
  101. package/components/common/vm/actions/common/customizeHardware/vmoptions/VmoptionsOld.vue +111 -115
  102. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/delay/Delay.vue +32 -32
  103. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/firmware/Firmware.vue +60 -60
  104. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +174 -174
  105. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +83 -95
  106. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsNew.vue +1 -2
  107. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptionsOld.vue +154 -155
  108. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/New.vue +6 -8
  109. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/Old.vue +6 -8
  110. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +32 -32
  111. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/KeymapOld.vue +44 -44
  112. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/Password.vue +103 -103
  113. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirection.vue +28 -28
  114. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/usbRedirection/UsbRedirectionOld.vue +44 -44
  115. package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/ToolsNew.vue +0 -1
  116. package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/ToolsOld.vue +1 -1
  117. package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
  118. package/components/common/vm/actions/common/select/computeResource/treeView/TreeView.vue +118 -118
  119. package/components/common/vm/actions/common/select/createType/CreateType.vue +38 -38
  120. package/components/common/vm/actions/common/select/createType/lib/config/items.ts +48 -48
  121. package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
  122. package/components/common/vm/actions/common/select/name/Name.vue +174 -174
  123. package/components/common/vm/actions/common/select/options/Options.vue +1 -6
  124. package/components/common/vm/actions/common/select/os/Old.vue +152 -152
  125. package/components/common/vm/actions/common/select/os/Os.vue +139 -139
  126. package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
  127. package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
  128. package/components/common/vm/actions/editSettings/EditSettings.vue +239 -242
  129. package/components/common/vm/actions/editSettings/EditSettingsOld.vue +0 -2
  130. package/components/common/vm/actions/editSettings/new/New.vue +0 -2
  131. package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
  132. package/components/common/vmt/actions/add/Add.vue +280 -379
  133. package/components/common/vmt/actions/add/New.vue +346 -0
  134. package/components/common/vmt/actions/add/Old.vue +301 -0
  135. package/components/common/vmt/actions/add/lib/config/steps.ts +8 -8
  136. package/components/common/vmt/actions/add/lib/models/interfaces.ts +23 -23
  137. package/components/common/wizards/network/add/steps/SelectConnectionType.vue +104 -104
  138. package/components/common/wizards/network/add/steps/SelectedTargetDevice.vue +467 -467
  139. package/components/common/wizards/vm/migrate/Migrate.vue +349 -349
  140. package/components/common/wizards/vm/migrate/lib/config/constructDataReady.ts +220 -220
  141. package/components/common/wizards/vm/migrate/lib/config/steps.ts +157 -157
  142. package/components/common/wizards/vm/migrate/lib/validations.ts +68 -68
  143. package/components/common/wizards/vm/migrate/select/network/Network.vue +103 -103
  144. package/components/common/wizards/vm/migrate/select/network/table/network/lib/config/advancedTable.ts +91 -91
  145. package/components/common/wizards/vm/migrate/select/type/lib/config/typeOptions.ts +43 -45
  146. package/composables/productNameLocal.ts +30 -30
  147. package/composables/useAppVersion.ts +21 -21
  148. package/package.json +1 -1
  149. package/plugins/date.ts +233 -233
  150. package/plugins/panelStates.ts +70 -70
  151. package/plugins/text.ts +59 -59
  152. package/public/spice-console/lib/images/bitmap.js +203 -203
  153. package/public/spice-console/network/spicechannel.js +387 -387
  154. package/store/main/mutations.ts +7 -7
  155. package/store/main/state.ts +7 -7
  156. package/store/tasks/mappers/recentTasks.ts +64 -64
@@ -1,116 +1,117 @@
1
1
  <template>
2
- <div class="add-template">
3
- <atoms-wizard
4
- show
5
- :wizard="wizard"
6
- :selected-scheme="selectedScheme"
7
- :title="title"
8
- :localization="localization"
9
- @change-steps="onChangeSteps"
10
- @hide="onHideModal"
11
- @submit="onFinish"
12
- >
13
- <template #modalBody="{ selectedStep }">
14
- <atoms-loader
15
- v-show="isLoading"
16
- id="loader"
17
- test-id="add-template-loader"
18
- />
19
- <div class="vmt-context">
20
- <common-pages-scheduled-tasks-modals-common-new-task-form
21
- v-show="selectedStep.id === dynamicSteps.scheduledTasks"
22
- v-model="newTaskForm"
23
- target="0"
24
- class="new-task-form"
25
- />
26
- <common-vm-actions-common-select-name
27
- v-show="selectedStep.id === dynamicSteps.selectName"
28
- :show="selectedStep.id === dynamicSteps.selectName"
29
- :name-form-submit="nameFormSubmit"
30
- :project="props.project"
31
- @submit="onChangeName(...$event)"
32
- @check-name="emits('check-name', $event)"
33
- />
34
- <common-vm-actions-common-select-storage
35
- v-show="selectedStep.id === dynamicSteps.selectStorage"
36
- :storage-submit="storageSubmit"
37
- :datastore="props.datastore"
38
- :is-datastore-loading="props.isDatastoreLoading"
39
- :get-datastore-table-func="props.getDatastoreTableFunc"
40
- @submit="onChangeStorage"
41
- />
42
- <common-vm-actions-common-select-os
43
- v-show="selectedStep.id === dynamicSteps.selectGuestOSMachineType"
44
- v-model:machine-type="vmtForm.guestMachineType"
45
- v-model:guest-os-family="vmtForm.guestOsFamily"
46
- v-model:guest-os-version="vmtForm.guestOsVersion"
47
- :families-options="guestOsFamilies"
48
- :versions-options="guestOsVersions"
49
- :machine-types-options="machineTypes"
50
- :error-validation-fields="props.errorValidationFields"
51
- @remove-error-by-title="emits('remove-error-by-title', $event)"
52
- />
53
- <common-vm-actions-common-customize-hardware
54
- v-show="selectedStep.id === dynamicSteps.customizeHardware"
55
- v-model:vm-name="vmtForm.name"
56
- v-model:guest-machine-type="vmtForm.guestMachineType"
57
- v-model:guest-os-family="vmtForm.guestOsFamily"
58
- v-model:guest-os-version="vmtForm.guestOsVersion"
59
- :storage="vmtForm.storage"
60
- :hard-disks-for-boot-options="virtualHardwareHardDisksLocal"
61
- :cd-dvd-drives-for-boot-options="virtualHardwareCdDvdDrivesLocal"
62
- :networks-for-boot-options="virtualHardwareNetworksLocal"
63
- :customize-hardware-submit="customizeHardwareSubmit"
64
- :max-cpus="maxCpus"
65
- :max-memory="maxMemory"
66
- :cpu-models="cpuModels"
67
- :selected-nav-item="selectedNavItem"
68
- :nodes="props.nodes"
69
- :files="props.files"
70
- :networks-table="props.networksTable"
71
- :error-validation-fields="props.errorValidationFields"
72
- :get-datastore-table-func="props.getDatastoreTableFunc"
73
- :datastore="props.datastore"
74
- :is-datastore-loading="props.isDatastoreLoading"
75
- :vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
76
- :passthrough-devices="props.passthroughDevices"
77
- :mediated-devices="props.mediatedDevices"
78
- :compute-resource="vmtForm.computeResource"
79
- :project="props.project"
80
- @change-boot-order="onChangeBootOrder"
81
- @send-data="onChangeCustomizeHardware"
82
- @get-storage="emits('get-storage', $event)"
83
- @get-folders-or-files="emits('get-folders-or-files', $event)"
84
- @get-active-device-child="emits('get-active-device-child', $event)"
85
- @show-datastore-child="emits('show-datastore-child', $event)"
86
- @get-networks-table="emits('get-networks-table', $event)"
87
- @get-pci-devices="emits('get-pci-devices')"
88
- />
89
- <common-ready-to-complete
90
- v-show="selectedStep.id === dynamicSteps.readyComplete"
91
- :data="props.readyCompleteTableInfo"
92
- />
93
- </div>
94
- </template>
95
- </atoms-wizard>
96
- </div>
2
+ <common-vmt-actions-add-new
3
+ v-if="isNewView"
4
+ v-model:vmt-form="vmtForm"
5
+ :title="title"
6
+ :alert-messages="alertMessages"
7
+ :wizard="wizard"
8
+ :dynamic-steps="dynamicSteps"
9
+ :new-task-form="newTaskForm"
10
+ :selected-scheme="selectedScheme"
11
+ :name-form-submit="nameFormSubmit"
12
+ :storage-submit="storageSubmit"
13
+ :customize-hardware-submit="customizeHardwareSubmit"
14
+ :is-loading="isLoading"
15
+ :selected-nav-item="selectedNavItem"
16
+ :machine-types="machineTypes"
17
+ :cpu-models="cpuModels"
18
+ :max-memory="maxMemory"
19
+ :max-cpus="maxCpus"
20
+ :guest-os-versions="guestOsVersions"
21
+ :virtual-hardware-cd-dvd-drives-local="virtualHardwareCdDvdDrivesLocal"
22
+ :virtual-hardware-networks-local="virtualHardwareNetworksLocal"
23
+ :virtual-hardware-hard-disks-local="virtualHardwareHardDisksLocal"
24
+ :guest-os-families="guestOsFamilies"
25
+ :project="props.project"
26
+ :nodes="props.nodes"
27
+ :files="props.files"
28
+ :networks-table="props.networksTable"
29
+ :datastore="props.datastore"
30
+ :is-datastore-loading="props.isDatastoreLoading"
31
+ :error-validation-fields="props.errorValidationFields"
32
+ :vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
33
+ :get-datastore-table-func="props.getDatastoreTableFunc"
34
+ :passthrough-devices="props.passthroughDevices"
35
+ :mediated-devices="props.mediatedDevices"
36
+ :ready-complete-table-info="props.readyCompleteTableInfo"
37
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
38
+ @get-storage="emits('get-storage', $event)"
39
+ @change-steps="onChangeSteps"
40
+ @check-name="emits('check-name', $event)"
41
+ @get-pci-devices="emits('get-pci-devices')"
42
+ @change-storage="onChangeStorage"
43
+ @change-boot-order="onChangeBootOrder"
44
+ @change-customize-hardware="onChangeCustomizeHardware"
45
+ @get-folders-or-files="emits('get-folders-or-files', $event)"
46
+ @get-active-device-child="emits('get-active-device-child', $event)"
47
+ @show-datastore-child="emits('show-datastore-child', $event)"
48
+ @get-networks-table="emits('get-networks-table', $event)"
49
+ @change-name="onChangeName"
50
+ @hide="emits('hide')"
51
+ @finish="onFinish"
52
+ />
53
+ <common-vmt-actions-add-old
54
+ v-else
55
+ v-model:vmt-form="vmtForm"
56
+ :title="title"
57
+ :wizard="wizard"
58
+ :dynamic-steps="dynamicSteps"
59
+ :new-task-form="newTaskForm"
60
+ :selected-scheme="selectedScheme"
61
+ :name-form-submit="nameFormSubmit"
62
+ :storage-submit="storageSubmit"
63
+ :customize-hardware-submit="customizeHardwareSubmit"
64
+ :is-loading="isLoading"
65
+ :selected-nav-item="selectedNavItem"
66
+ :virtual-hardware-cd-dvd-drives-local="virtualHardwareCdDvdDrivesLocal"
67
+ :virtual-hardware-networks-local="virtualHardwareNetworksLocal"
68
+ :virtual-hardware-hard-disks-local="virtualHardwareHardDisksLocal"
69
+ :max-memory="maxMemory"
70
+ :max-cpus="maxCpus"
71
+ :machine-types="machineTypes"
72
+ :cpu-models="cpuModels"
73
+ :guest-os-versions="guestOsVersions"
74
+ :guest-os-families="guestOsFamilies"
75
+ :project="props.project"
76
+ :nodes="props.nodes"
77
+ :files="props.files"
78
+ :networks-table="props.networksTable"
79
+ :datastore="props.datastore"
80
+ :is-datastore-loading="props.isDatastoreLoading"
81
+ :error-validation-fields="props.errorValidationFields"
82
+ :ready-complete-table-info="props.readyCompleteTableInfo"
83
+ :vm-cpu-help-text-second="props.vmCpuHelpTextSecond"
84
+ :get-datastore-table-func="props.getDatastoreTableFunc"
85
+ :passthrough-devices="props.passthroughDevices"
86
+ :mediated-devices="props.mediatedDevices"
87
+ @change-steps="onChangeSteps"
88
+ @check-name="emits('check-name', $event)"
89
+ @get-storage="emits('get-storage', $event)"
90
+ @get-folders-or-files="emits('get-folders-or-files', $event)"
91
+ @get-active-device-child="emits('get-active-device-child', $event)"
92
+ @show-datastore-child="emits('show-datastore-child', $event)"
93
+ @remove-error-by-title="emits('remove-error-by-title', $event)"
94
+ @get-networks-table="emits('get-networks-table', $event)"
95
+ @change-boot-order="onChangeBootOrder"
96
+ @change-customize-hardware="onChangeCustomizeHardware"
97
+ @get-pci-devices="emits('get-pci-devices')"
98
+ @change-storage="onChangeStorage"
99
+ @change-name="onChangeName"
100
+ @hide="emits('hide')"
101
+ @finish="onFinish"
102
+ />
97
103
  </template>
98
104
 
99
105
  <script setup lang="ts">
100
- import type {
101
- UI_I_DatastoreTableItem,
102
- UI_I_FolderOrFileTreePayload,
103
- } from '~/lib/models/store/storage/interfaces'
104
- import type { UI_I_NetworkTableItem } from '~/lib/models/store/network/interfaces'
105
- import type { API_UI_I_Error } from '~/lib/models/store/interfaces'
106
- import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
107
- import type { UI_I_FileTreeNode } from '~/components/lib/models/interfaces'
108
106
  import type {
109
107
  UI_I_ArbitraryObject,
110
108
  UI_I_Localization,
111
109
  } from '~/lib/models/interfaces'
112
- import type { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
113
- import type { UI_I_ErrorValidationField } from '~/lib/models/store/interfaces'
110
+ import type {
111
+ UI_I_ValidationReturn,
112
+ UI_I_WizardStep,
113
+ } from '~/components/atoms/wizard/lib/models/interfaces'
114
+ import type { UI_I_VmtForm } from '~/components/common/vmt/actions/add/lib/models/interfaces'
114
115
  import type {
115
116
  UI_I_SendDataCpu,
116
117
  UI_I_SendDataMemory,
@@ -118,33 +119,36 @@ import type {
118
119
  UI_I_SendDataNewHardDisk,
119
120
  UI_I_SendDataNewNetwork,
120
121
  } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/lib/models/interfaces'
122
+ import type {
123
+ API_UI_I_Error,
124
+ UI_I_ErrorValidationField,
125
+ } from '~/lib/models/store/interfaces'
126
+ import type { UI_I_SendDataCustomizeHardware } from '~/components/common/vm/actions/common/customizeHardware/lib/models/interfaces'
127
+ import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
121
128
  import type { UI_T_SelectedNavItem } from '~/components/common/vm/actions/common/lib/models/types'
122
- import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
123
129
  import type { UI_T_ChangeBootOrder } from '~/components/common/vm/actions/lib/models/types'
130
+ import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
124
131
  import type { UI_T_Project } from '~/lib/models/types'
132
+ import type { UI_I_FileTreeNode } from '~/components/lib/models/interfaces'
133
+ import type { UI_I_NetworkTableItem } from '~/lib/models/store/network/interfaces'
134
+ import type {
135
+ UI_I_DatastoreTableItem,
136
+ UI_I_FolderOrFileTreePayload,
137
+ } from '~/lib/models/store/storage/interfaces'
138
+ import type { UI_I_TableInfoItem } from '~/components/atoms/table/info/lib/models/interfaces'
139
+ import type { UI_I_TablePayload } from '~/lib/models/table/interfaces'
125
140
  import type {
126
141
  UI_I_MediatedDevice,
127
142
  UI_I_PciDevice,
128
143
  } from '~/lib/models/store/vm/interfaces'
129
- // import type {
130
- // I_DynamicSteps,
131
- // // UI_I_VmForm,
132
- // } from '~/components/common/vmt/actions/add/lib/models/interfaces'
133
- import type {
134
- UI_I_ValidationReturn,
135
- UI_I_WizardStep,
136
- } from '~/components/atoms/wizard/lib/models/interfaces'
137
144
  import type { UI_I_Capabilities } from '~/components/common/vm/actions/common/lib/models/interfaces'
138
- import type { UI_I_ScheduleNewTasksForm } from '~/components/common/pages/scheduledTasks/modals/lib/models/interfaces'
139
- import type { UI_I_OptionItem } from '~/components/atoms/lib/models/interfaces'
140
- import type { UI_I_VmtForm } from '~/components/common/vmt/actions/add/lib/models/interfaces'
145
+ import Wizard from '~/components/atoms/wizard/lib/utils/utils'
146
+ import { mapCapabilities } from '~/components/common/vm/actions/common/lib/utils/capabilities'
141
147
  import {
142
148
  dynamicSteps,
143
149
  stepsSchemeInitial,
144
150
  stepsFunc,
145
151
  } from '~/components/common/vmt/actions/add/lib/config/steps'
146
- import Wizard from '~/components/atoms/wizard/lib/utils/utils'
147
- import { mapCapabilities } from '~/components/common/vm/actions/common/lib/utils/capabilities'
148
152
  import { scheduledTaskDefaultFormFunc } from '~/components/common/pages/scheduledTasks/modals/lib/config/createScheduledTask'
149
153
  import { capabilities } from '~/components/common/vm/actions/common/lib/config/capabilities'
150
154
 
@@ -180,137 +184,29 @@ const emits = defineEmits<{
180
184
  (event: 'hide'): void
181
185
  }>()
182
186
 
187
+ const { $store }: any = useNuxtApp()
188
+
189
+ const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
190
+
183
191
  const localization = computed<UI_I_Localization>(() => useLocal())
184
192
 
185
193
  const isScheduledTasks = computed<boolean>(
186
194
  () => props.schedulerTask?.isSchedulerTask
187
195
  )
188
196
 
189
- const title = computed<string>(() => {
190
- const { scheduleNewTasks, scheduleTaskEdit } = localization.value.common
191
-
192
- let result = localization.value.vmt.newTemplate
193
- if (isScheduledTasks.value) {
194
- const schedulerMode = props.schedulerTask.editTask
195
- ? scheduleTaskEdit
196
- : scheduleNewTasks
197
-
198
- result = `${schedulerMode} (${localization.value.vmt.newTemplate})`
199
- }
200
-
201
- return result
202
- })
203
-
204
- // const dynamicSteps = ref<I_DynamicSteps>(
205
- // getDynamicSteps(isScheduledTasks.value)
206
- // )
207
-
208
- watch(
209
- () => props.capabilities,
210
- () => {
211
- if (props.capabilities) mapCapabilities(props.capabilities)
212
- },
213
- { deep: true, immediate: true }
214
- )
215
-
216
- const guestOsFamilies = ref<UI_I_OptionItem[]>(
217
- capabilities.value.guestOsFamilies
218
- )
219
- const guestOsVersions = ref<UI_I_ArbitraryObject<UI_I_OptionItem[]>>(
220
- capabilities.value.guestOsVersions
221
- )
222
- const machineTypes = ref<UI_I_OptionItem[]>(capabilities.value.machineTypes)
223
- const cpuModels = ref<UI_I_OptionItem[]>(capabilities.value.cpuModels)
224
- const maxCpus = ref<number>(capabilities.value.maxCpus)
225
- const maxMemory = ref<number>(capabilities.value.maxMemory)
226
-
227
197
  const wizard: Wizard = new Wizard(
228
198
  stepsFunc(localization.value, isScheduledTasks.value),
229
199
  stepsSchemeInitial
230
200
  )
231
- // TODO move to common
232
- const newTaskForm = ref<UI_I_ScheduleNewTasksForm>(
233
- useDeepCopy(scheduledTaskDefaultFormFunc())
234
- )
235
- watch(
236
- newTaskForm,
237
- (newValue: UI_I_ScheduleNewTasksForm) => {
238
- if (isScheduledTasks.value) wizard.setDisabledNextButton(newValue.isValid)
239
- },
240
- { immediate: true, deep: true }
241
- )
242
201
 
243
202
  const selectedScheme = computed<number[]>(() => wizard.selectedScheme.value)
203
+ const alertMessages = computed<string[][]>(() => wizard.alertMessages.value)
244
204
 
245
- const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> => {
246
- wizard.changeSteps(value, validationFunc, validateSendData)
247
- }
248
-
249
- const validationFunc = async (
250
- value: UI_I_WizardStep[],
251
- currentStep: UI_I_WizardStep,
252
- nextStep: UI_I_WizardStep
253
- ): Promise<UI_I_ValidationReturn> => {
254
- let stepHasError = false
255
- let stepShouldStop = {
256
- ifOnCurrentStep: false,
257
- ifFromAnyStep: false,
258
- stoppageStepId: -1,
259
- }
260
-
261
- wizard.setLoader(true)
262
- if (
263
- wizard.isValidateForStep(
264
- dynamicSteps.selectName,
265
- currentStep.id,
266
- nextStep.id
267
- )
268
- ) {
269
- const nameValidation = await checkName(value)
270
-
271
- value = nameValidation.newValue
272
- stepHasError = stepHasError || nameValidation.stepHasError
273
- } else if (
274
- wizard.isValidateForStep(
275
- dynamicSteps.selectStorage,
276
- currentStep.id,
277
- nextStep.id
278
- )
279
- ) {
280
- const storageValidation = await checkStorage(value)
281
-
282
- value = storageValidation.newValue
283
-
284
- stepHasError = stepHasError || storageValidation.stepHasError
285
- } else if (
286
- wizard.isValidateForStep(
287
- dynamicSteps.selectOptions,
288
- currentStep.id,
289
- nextStep.id
290
- )
291
- ) {
292
- selectOptionsSubmit.value++
293
- } else if (
294
- wizard.isValidateForStep(
295
- dynamicSteps.customizeHardware,
296
- currentStep.id,
297
- nextStep.id
298
- )
299
- ) {
300
- const customizeHardwareValidation = await checkCustomizeHardware(value)
301
-
302
- value = customizeHardwareValidation.newValue
303
-
304
- stepHasError = stepHasError || customizeHardwareValidation.stepHasError
305
- }
306
- wizard.setLoader(false)
205
+ const nameFormSubmit = ref<Function | null>(null)
206
+ const storageSubmit = ref<Function | null>(null)
207
+ const selectOptionsSubmit = ref<number>(0)
208
+ const customizeHardwareSubmit = ref<Function | null>(null)
307
209
 
308
- return {
309
- newValue: value,
310
- stepHasError,
311
- stepShouldStop,
312
- }
313
- }
314
210
  const checkName = async (
315
211
  value: UI_I_WizardStep[]
316
212
  ): Promise<UI_I_ValidationReturn> => {
@@ -401,6 +297,71 @@ const checkCustomizeHardware = async (
401
297
  }
402
298
  })
403
299
  }
300
+ const validationFunc = async (
301
+ value: UI_I_WizardStep[],
302
+ currentStep: UI_I_WizardStep,
303
+ nextStep: UI_I_WizardStep
304
+ ): Promise<UI_I_ValidationReturn> => {
305
+ let stepHasError = false
306
+ let stepShouldStop = {
307
+ ifOnCurrentStep: false,
308
+ ifFromAnyStep: false,
309
+ stoppageStepId: -1,
310
+ }
311
+
312
+ wizard.setLoader(true)
313
+ if (
314
+ wizard.isValidateForStep(
315
+ dynamicSteps.selectName,
316
+ currentStep.id,
317
+ nextStep.id
318
+ )
319
+ ) {
320
+ const nameValidation = await checkName(value)
321
+
322
+ value = nameValidation.newValue
323
+ stepHasError = stepHasError || nameValidation.stepHasError
324
+ } else if (
325
+ wizard.isValidateForStep(
326
+ dynamicSteps.selectStorage,
327
+ currentStep.id,
328
+ nextStep.id
329
+ )
330
+ ) {
331
+ const storageValidation = await checkStorage(value)
332
+
333
+ value = storageValidation.newValue
334
+
335
+ stepHasError = stepHasError || storageValidation.stepHasError
336
+ } else if (
337
+ wizard.isValidateForStep(
338
+ dynamicSteps.selectOptions,
339
+ currentStep.id,
340
+ nextStep.id
341
+ )
342
+ ) {
343
+ selectOptionsSubmit.value++
344
+ } else if (
345
+ wizard.isValidateForStep(
346
+ dynamicSteps.customizeHardware,
347
+ currentStep.id,
348
+ nextStep.id
349
+ )
350
+ ) {
351
+ const customizeHardwareValidation = await checkCustomizeHardware(value)
352
+
353
+ value = customizeHardwareValidation.newValue
354
+
355
+ stepHasError = stepHasError || customizeHardwareValidation.stepHasError
356
+ }
357
+ wizard.setLoader(false)
358
+
359
+ return {
360
+ newValue: value,
361
+ stepHasError,
362
+ stepShouldStop,
363
+ }
364
+ }
404
365
 
405
366
  const vmtForm = ref<UI_I_VmtForm>({
406
367
  name: '',
@@ -413,58 +374,20 @@ const vmtForm = ref<UI_I_VmtForm>({
413
374
  locationPath: '',
414
375
  // dataCenter: null,
415
376
  })
416
- const storageIdCash = ref<string | null>(null)
417
- const onChangeName = (name: string): void => {
418
- vmtForm.value.name = name
419
- }
420
- const onChangeStorage = (storage: UI_I_DatastoreTableItem | null): void => {
421
- if (!storage) return
422
-
423
- vmtForm.value.storage = storage
424
- storageIdCash.value = storage.id
425
- }
426
377
  const customizeHardware = ref<UI_I_SendDataCustomizeHardware | null>(null)
427
- const onChangeCustomizeHardware = (
428
- data: UI_I_SendDataCustomizeHardware
429
- ): void => {
430
- customizeHardware.value = data
431
- }
432
-
433
- const virtualHardwareHardDisksLocal = computed<
434
- UI_I_SendDataNewHardDisk[] | null
435
- >(() => customizeHardware.value?.virtualHardware?.hardDisks || null)
436
- const virtualHardwareNetworksLocal = computed<UI_I_SendDataNewNetwork[] | null>(
437
- () => customizeHardware.value?.virtualHardware?.networks || null
438
- )
439
- const virtualHardwareCdDvdDrivesLocal = computed<
440
- UI_I_SendDataNewCdDvdDrive[] | null
441
- >(() => customizeHardware.value?.virtualHardware?.cdDvdDrives || null)
442
-
443
378
  const virtualHardwareCpu = computed<UI_I_SendDataCpu | null>(
444
379
  () => customizeHardware.value?.virtualHardware?.cpu || null
445
380
  )
446
381
  const virtualHardwareMemory = computed<UI_I_SendDataMemory | null>(
447
382
  () => customizeHardware.value?.virtualHardware?.memory || null
448
383
  )
384
+ const virtualHardwareNetworks = ref<UI_I_SendDataNewNetwork[] | null>(null)
449
385
  const virtualHardwareHardDisks = ref<UI_I_SendDataNewHardDisk[] | null>(null)
450
386
  const virtualHardwareCdDvdDrives = ref<UI_I_SendDataNewCdDvdDrive[] | null>(
451
387
  null
452
388
  )
453
- const virtualHardwareNetworks = ref<UI_I_SendDataNewNetwork[] | null>(null)
454
- const onChangeBootOrder = (data: UI_T_ChangeBootOrder): void => {
455
- virtualHardwareHardDisks.value = data[0]
456
- virtualHardwareCdDvdDrives.value = data[1]
457
- virtualHardwareNetworks.value = data[2]
458
- }
459
-
460
389
  const isPowerOnByDefault = ref<boolean>(true)
461
-
462
- watch(
463
- () => props.vmtNameInWizard,
464
- (newValue) => {
465
- vmtForm.value.name = newValue
466
- }
467
- )
390
+ const selectedNavItem = ref<UI_T_SelectedNavItem>(0)
468
391
 
469
392
  const validateSendData = async (
470
393
  value: UI_I_WizardStep[]
@@ -496,6 +419,37 @@ const validateSendData = async (
496
419
  }
497
420
  }
498
421
 
422
+ const onChangeSteps = async (value: UI_I_WizardStep[]): Promise<void> => {
423
+ wizard.changeSteps(value, validationFunc, validateSendData)
424
+ }
425
+
426
+ const title = computed<string>(() => {
427
+ const { scheduleNewTasks, scheduleTaskEdit } = localization.value.common
428
+
429
+ let result = localization.value.vmt.newTemplate
430
+ if (isScheduledTasks.value) {
431
+ const schedulerMode = props.schedulerTask.editTask
432
+ ? scheduleTaskEdit
433
+ : scheduleNewTasks
434
+
435
+ result = `${schedulerMode} (${localization.value.vmt.newTemplate})`
436
+ }
437
+
438
+ return result
439
+ })
440
+
441
+ // TODO move to common
442
+ const newTaskForm = ref<UI_I_ScheduleNewTasksForm>(
443
+ useDeepCopy(scheduledTaskDefaultFormFunc())
444
+ )
445
+ watch(
446
+ newTaskForm,
447
+ (newValue: UI_I_ScheduleNewTasksForm) => {
448
+ if (isScheduledTasks.value) wizard.setDisabledNextButton(newValue.isValid)
449
+ },
450
+ { immediate: true, deep: true }
451
+ )
452
+
499
453
  const isLoading = ref<boolean>(false)
500
454
  const onFinish = (): void => {
501
455
  isLoading.value = true
@@ -517,125 +471,72 @@ const onFinish = (): void => {
517
471
  )
518
472
  .then(() => {
519
473
  isLoading.value = false
520
- onHideModal()
474
+ emits('hide')
521
475
  wizard.setLoader(false)
522
476
  })
523
477
  }
524
478
 
525
- const selectedNavItem = ref<UI_T_SelectedNavItem>(0)
479
+ const virtualHardwareCdDvdDrivesLocal = computed<
480
+ UI_I_SendDataNewCdDvdDrive[] | null
481
+ >(() => customizeHardware.value?.virtualHardware?.cdDvdDrives || null)
482
+ const virtualHardwareNetworksLocal = computed<UI_I_SendDataNewNetwork[] | null>(
483
+ () => customizeHardware.value?.virtualHardware?.networks || null
484
+ )
485
+ const virtualHardwareHardDisksLocal = computed<
486
+ UI_I_SendDataNewHardDisk[] | null
487
+ >(() => customizeHardware.value?.virtualHardware?.hardDisks || null)
526
488
 
527
- const nameFormSubmit = ref<null | Function>(null)
528
- const storageSubmit = ref<null | Function>(null)
529
- const selectOptionsSubmit = ref<number>(0)
530
- const customizeHardwareSubmit = ref<null | Function>(null)
489
+ const maxCpus = ref<number>(capabilities.value.maxCpus)
490
+ const maxMemory = ref<number>(capabilities.value.maxMemory)
491
+ const cpuModels = ref<UI_I_OptionItem[]>(capabilities.value.cpuModels)
492
+ const machineTypes = ref<UI_I_OptionItem[]>(capabilities.value.machineTypes)
531
493
 
532
- const onHideModal = (): void => {
533
- emits('hide')
534
- }
535
- </script>
494
+ const guestOsVersions = ref<UI_I_ArbitraryObject<UI_I_OptionItem[]>>(
495
+ capabilities.value.guestOsVersions
496
+ )
536
497
 
537
- <style>
538
- :root {
539
- --vmt-context-title: #333;
540
- --vmt-context-sub-title: #000;
541
- }
542
- :root.dark-theme {
543
- --vmt-context-title: #adbbc4;
544
- --vmt-context-sub-title: #adbbc4;
545
- }
546
- </style>
547
- <style scoped lang="scss">
548
- :deep(.has-solid.close-icon.clr-icon) {
549
- width: 20px;
550
- top: 0;
551
- }
552
- .vmt-context {
553
- padding: 16px 15px 10px 10px;
554
- height: 100%;
555
- display: flex;
556
- flex-direction: column;
557
-
558
- .context-title-wrap {
559
- padding-bottom: 3px;
560
- border-bottom: 1px solid #a6a6a6;
561
-
562
- h4 {
563
- font-weight: 700;
564
- font-size: 13px;
565
- color: var(--vmt-context-title);
566
- }
567
- p {
568
- font-weight: 400;
569
- font-size: 13px;
570
- color: var(--vmt-context-sub-title);
571
- }
572
- }
498
+ const guestOsFamilies = ref<UI_I_OptionItem[]>(
499
+ capabilities.value.guestOsFamilies
500
+ )
573
501
 
574
- .finish-block {
575
- padding: 18px 24px 24px 24px;
502
+ watch(
503
+ () => props.capabilities,
504
+ () => {
505
+ if (props.capabilities) mapCapabilities(props.capabilities)
506
+ },
507
+ { deep: true, immediate: true }
508
+ )
576
509
 
577
- .add-hosts-ready-to-complete-mt-12 {
578
- margin-top: 12px;
510
+ const onChangeCustomizeHardware = (
511
+ data: UI_I_SendDataCustomizeHardware
512
+ ): void => {
513
+ customizeHardware.value = data
514
+ }
579
515
 
580
- .add-hosts-ready-to-complete-bold {
581
- line-height: 18px;
582
- font-weight: 700;
583
- }
584
- }
585
- }
516
+ const storageIdCash = ref<string | null>(null)
517
+ const onChangeStorage = (storage: UI_I_DatastoreTableItem | null): void => {
518
+ if (!storage) return
586
519
 
587
- .vm-hardware-version {
588
- align-self: flex-end;
589
- margin-top: auto;
590
- }
520
+ vmtForm.value.storage = storage
521
+ storageIdCash.value = storage.id
591
522
  }
592
523
 
593
- :deep(.modal .modal-dialog .modal-content .modal-footer) {
594
- flex: unset;
595
- height: unset;
596
- min-height: unset;
597
- }
598
- :deep(.wizard-modal-titlebar h3) {
599
- color: #000;
600
- font-size: 24px;
601
- font-weight: 200;
602
- line-height: 27px;
603
- margin: 0;
604
- padding: 0;
605
- }
606
- :deep(.clr-wizard-stepnav-item) {
607
- padding-left: 0;
608
- }
609
- :deep(.clr-wizard-stepnav
610
- .clr-wizard-stepnav-item
611
- button
612
- .clr-wizard-stepnav-link-title) {
613
- width: 189px;
614
- font-weight: 700;
615
- font-size: 13px;
524
+ const onChangeName = (name: string): void => {
525
+ vmtForm.value.name = name
616
526
  }
617
527
 
618
- #vm-wizard-notification {
619
- h3 {
620
- color: var(--global-font-color7);
621
- margin-top: 6px;
622
- }
623
- p {
624
- color: var(--global-font-color6);
625
- line-height: 16px;
626
- }
528
+ const onChangeBootOrder = (data: UI_T_ChangeBootOrder): void => {
529
+ virtualHardwareHardDisks.value = data[0]
530
+ virtualHardwareCdDvdDrives.value = data[1]
531
+ virtualHardwareNetworks.value = data[2]
627
532
  }
628
533
 
629
- .power-on-by-default-wrap {
630
- display: flex;
631
- align-items: center;
632
-
633
- input {
634
- margin-right: 6px;
534
+ watch(
535
+ () => props.vmtNameInWizard,
536
+ (newValue) => {
537
+ vmtForm.value.name = newValue
635
538
  }
636
- }
539
+ )
540
+ </script>
637
541
 
638
- .new-task-form {
639
- padding: 0 25px 0 5px;
640
- }
641
- </style>
542
+ <style scoped lang="scss"></style>