bfg-common 1.3.295 → 1.3.296

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.
@@ -1,17 +1,17 @@
1
1
  import type { UI_I_Localization } from '~/lib/models/interfaces'
2
2
  import type { UI_I_VerticalStepItem } from '~/components/atoms/lib/models/interfaces'
3
3
  import type { UI_T_Project } from '~/lib/models/types'
4
- import { UI_E_Fields } from '~/components/common/vm/actions/common/lib/models/enums'
4
+ import { UI_E_FieldsSphere, UI_E_FieldsProcurator } from '~/components/common/vm/actions/common/lib/models/enums'
5
5
  import { checkAllField } from '~/components/common/vm/actions/lib/utils'
6
6
 
7
- export const getStepPositionByField = (field: string): number => {
7
+ export const getStepPositionByField = (field: string, project: UI_T_Project): number => {
8
8
  // TODO refactoring for procurator
9
9
  if (checkAllField(field)) {
10
- return UI_E_Fields[field]
10
+ return project === 'sphere' ? UI_E_FieldsSphere[field] : UI_E_FieldsProcurator[field]
11
11
  } else if (field.includes('disk_devices')) {
12
- return UI_E_Fields.disk_devices
12
+ return project === 'sphere' ? UI_E_FieldsSphere.disk_devices : UI_E_FieldsProcurator.disk_devices
13
13
  } else if (field.includes('network_devices')) {
14
- return UI_E_Fields.network_devices
14
+ return project === 'sphere' ? UI_E_FieldsSphere.network_devices : UI_E_FieldsProcurator.network_devices
15
15
  }
16
16
  return 5
17
17
  }
@@ -1,5 +1,34 @@
1
- export enum UI_E_Fields {
1
+ export enum UI_E_FieldsSphere {
2
2
  'compute_resource' = 3,
3
+ 'storage.id' = 4,
4
+ 'storage.name' = 4,
5
+ 'storage.type' = 4,
6
+ 'storage.pool' = 4,
7
+ 'compatibility' = 5,
8
+ 'guest_os_family' = 7,
9
+ 'guest_os_version' = 7,
10
+ 'machine_type' = 7,
11
+ 'cpu.vcpus' = 8,
12
+ 'cpu.max_vcpus' = 8,
13
+ 'cpu.shares' = 8,
14
+ 'cpu.core_per_socket' = 8,
15
+ 'cpu.model' = 8,
16
+ 'memory.size_mb' = 8,
17
+ 'memory.limit_mb' = 8,
18
+ 'memory.reservation_mb' = 8,
19
+ 'video_card.adapter' = 8,
20
+ 'video_card.displays' = 8,
21
+ 'video_card.memory_mb' = 8,
22
+ 'options.remote_console.type' = 8,
23
+ 'options.remote_console.spice.img_compression' = 8,
24
+ 'options.remote_console.spice.jpeg_compression' = 8,
25
+ 'options.remote_console.spice.zlib_glz_compression' = 8,
26
+ 'options.remote_console.spice.streaming_mode' = 8,
27
+ 'options.boot_options.firmware' = 8,
28
+ 'disk_devices' = 8,
29
+ 'network_devices' = 8,
30
+ }
31
+ export enum UI_E_FieldsProcurator {
3
32
  'storage.id' = 4,
4
33
  'storage.name' = 4,
5
34
  'storage.type' = 4,
@@ -8,25 +37,25 @@ export enum UI_E_Fields {
8
37
  'guest_os_family' = 6,
9
38
  'guest_os_version' = 6,
10
39
  'machine_type' = 6,
11
- 'cpu.vcpus' = 7,
12
- 'cpu.max_vcpus' = 7,
13
- 'cpu.shares' = 7,
14
- 'cpu.core_per_socket' = 7,
15
- 'cpu.model' = 7,
16
- 'memory.size_mb' = 7,
17
- 'memory.limit_mb' = 7,
18
- 'memory.reservation_mb' = 7,
19
- 'video_card.adapter' = 7,
20
- 'video_card.displays' = 7,
21
- 'video_card.memory_mb' = 7,
22
- 'options.remote_console.type' = 7,
23
- 'options.remote_console.spice.img_compression' = 7,
24
- 'options.remote_console.spice.jpeg_compression' = 7,
25
- 'options.remote_console.spice.zlib_glz_compression' = 7,
26
- 'options.remote_console.spice.streaming_mode' = 7,
27
- 'options.boot_options.firmware' = 7,
28
- 'disk_devices' = 7,
29
- 'network_devices' = 7,
40
+ 'cpu.vcpus' = 8,
41
+ 'cpu.max_vcpus' = 8,
42
+ 'cpu.shares' = 8,
43
+ 'cpu.core_per_socket' = 8,
44
+ 'cpu.model' = 8,
45
+ 'memory.size_mb' = 8,
46
+ 'memory.limit_mb' = 8,
47
+ 'memory.reservation_mb' = 8,
48
+ 'video_card.adapter' = 8,
49
+ 'video_card.displays' = 8,
50
+ 'video_card.memory_mb' = 8,
51
+ 'options.remote_console.type' = 8,
52
+ 'options.remote_console.spice.img_compression' = 8,
53
+ 'options.remote_console.spice.jpeg_compression' = 8,
54
+ 'options.remote_console.spice.zlib_glz_compression' = 8,
55
+ 'options.remote_console.spice.streaming_mode' = 8,
56
+ 'options.boot_options.firmware' = 8,
57
+ 'disk_devices' = 8,
58
+ 'network_devices' = 8,
30
59
  }
31
60
 
32
61
  // TODO remove because not used
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.3.295",
4
+ "version": "1.3.296",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",