bfg-common 1.4.87 → 1.4.88

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.
@@ -106,12 +106,8 @@ watch(
106
106
  () => {
107
107
  if (props.guestMachineType) {
108
108
  busOptions.value = capabilities.bus[props.guestMachineType.value]
109
- // TODO временно так
110
109
  if (props.shortOptions) {
111
- busOptions.value = [
112
- { text: localization.value.common.ide, value: 'ide' },
113
- { text: localization.value.common.sata, value: 'sata' },
114
- ]
110
+ busOptions.value = capabilities.cdromBus[props.guestMachineType.value]
115
111
  }
116
112
 
117
113
  const hasSelected = busOptions.value.some(
@@ -339,6 +339,7 @@ export const capabilities: UI_I_Compatibility = {
339
339
  ],
340
340
  },
341
341
  bus: {},
342
+ cdromBus: {},
342
343
  maxCpus: 140,
343
344
  maxMemory: 262144, // 256 GB
344
345
  }
@@ -11,6 +11,7 @@ import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
11
11
 
12
12
  export interface UI_I_Capabilities {
13
13
  bus_types: UI_I_ArbitraryObject<UI_I_ArbitraryObject<string>>
14
+ cdrom_bus_type: UI_I_ArbitraryObject<UI_I_ArbitraryObject<string>>
14
15
  cpu_models: UI_I_ArbitraryObject<string>
15
16
  machine_types: UI_I_ArbitraryObject<string>
16
17
  max_mem_kib: number
@@ -35,6 +35,16 @@ export const mapCapabilities = (
35
35
  }
36
36
  )
37
37
  })
38
+ Object.keys(capabilitiesFromApi.cdrom_bus_type).forEach(key => {
39
+ capabilities.cdromBus[key] = Object.keys(capabilitiesFromApi.cdrom_bus_type[key]).map(
40
+ (key2) => {
41
+ return {
42
+ text: capabilitiesFromApi.cdrom_bus_type[key][key2],
43
+ value: key2,
44
+ }
45
+ }
46
+ )
47
+ })
38
48
 
39
49
  capabilities.maxCpus = capabilitiesFromApi.max_vcpus
40
50
  capabilities.maxMemory = $binary.kbToMb(capabilitiesFromApi.max_mem_kib)
@@ -28,6 +28,7 @@ export interface UI_I_Compatibility {
28
28
  machineTypes: UI_I_OptionItem[]
29
29
  cpuModels: UI_I_OptionItem[]
30
30
  bus: UI_I_ArbitraryObject<UI_I_OptionItem[]>
31
+ cdromBus: UI_I_ArbitraryObject<UI_I_OptionItem[]>
31
32
  maxCpus: number
32
33
  maxMemory: number
33
34
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.87",
4
+ "version": "1.4.88",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",