bfg-common 1.1.14 → 1.1.16

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.
@@ -0,0 +1,67 @@
1
+ export const hostLocalizationByState = [
2
+ 'unknown',
3
+ 'connected',
4
+ 'warning',
5
+ 'error',
6
+ 'maintenance',
7
+ 'notResponding',
8
+ 'disconnected',
9
+ ]
10
+
11
+ export const hostIconByState = [
12
+ 'host-error',
13
+ 'host',
14
+ 'host-warning',
15
+ 'host-error',
16
+ 'host-maintenance',
17
+ 'host-not-responding',
18
+ 'host-disconnected',
19
+ ]
20
+
21
+ export const vmLocalizationByState = [
22
+ 'unknown',
23
+ 'powerOff',
24
+ 'poweredOn',
25
+ 'suspended',
26
+ 'error',
27
+ 'warning',
28
+ 'pending',
29
+ 'paused',
30
+ 'blocked',
31
+ 'shuttingDown',
32
+ 'shuttingOff',
33
+ ]
34
+
35
+ export const vmIconByState = [
36
+ 'vm-error',
37
+ 'vm',
38
+ 'vm-on',
39
+ 'vm-suspended',
40
+ 'vm-error',
41
+ 'vm-warning',
42
+ 'vm-warning',
43
+ 'vm-suspended',
44
+ 'vm-warning',
45
+ 'vm-warning',
46
+ 'vm-warning',
47
+ ]
48
+
49
+ export const datastoreLocalizationByState = [
50
+ 'unknown',
51
+ 'connected',
52
+ 'warning',
53
+ 'error',
54
+ 'maintenance',
55
+ 'inaccessible',
56
+ 'disconnected',
57
+ ]
58
+
59
+ export const datastoreIconByState = [
60
+ 'datastore-error',
61
+ 'datastore',
62
+ 'datastore-warning',
63
+ 'datastore-error',
64
+ 'datastore-maintenance',
65
+ 'datastore-inaccessible',
66
+ 'datastore-disconnected',
67
+ ]
@@ -5,7 +5,7 @@ export interface UI_I_TreeNodeShort<T = string> {
5
5
  type: T
6
6
  }
7
7
  export interface UI_I_TreeNode<N = UI_I_TreeNodeDuplicate, T = string> extends UI_I_TreeNodeShort<T> {
8
- state: string
8
+ state: string | number // TODO только number
9
9
  name: string
10
10
  iconClassName: string
11
11
  isActive: boolean
@@ -1,6 +1,5 @@
1
1
  import type { UI_I_Pagination } from '~/models/interfaces'
2
2
  import type { UI_T_Schema } from '~/models/types'
3
- import type { UI_T_VmState } from '~/models/store/types'
4
3
 
5
4
  export interface UI_I_ErrorValidationField<T = string> {
6
5
  error_message: string
@@ -18,7 +17,7 @@ export interface API_UI_I_Error {
18
17
  export interface API_UI_I_Node {
19
18
  id: string
20
19
  name: string
21
- state: UI_T_VmState
20
+ state: number
22
21
  net_bridge?: string
23
22
  console_type?: string
24
23
  }
@@ -1,4 +1,14 @@
1
- export type UI_T_VmState =
1
+ export type API_UI_I_HostState =
2
+ | 0 // ICON: host-error TEXT: Unknown
3
+ | 1 // ICON: host TEXT: Connected
4
+ | 2 // ICON: host-warning TEXT: Warning
5
+ | 3 // ICON: host-error TEXT: Error
6
+ | 4 // ICON: host-maintenance TEXT: Maintenance
7
+ | 5 // ICON: host-not-responding TEXT: Not Responding
8
+ | 6 // ICON: host-disconnected TEXT: Disconnected
9
+ export type UI_I_HostState = API_UI_I_HostState
10
+
11
+ export type API_UI_T_VmState =
2
12
  | 0 // ICON: vm-error TEXT: Unknown
3
13
  | 1 // ICON: vm TEXT: Power Off
4
14
  | 2 // ICON: vm-on TEXT: Powered On
@@ -10,3 +20,13 @@ export type UI_T_VmState =
10
20
  | 8 // ICON: vm-warning TEXT: Blocked
11
21
  | 9 // ICON: vm-warning TEXT: Shutting Down
12
22
  | 10 // ICON: vm-warning TEXT: Shutting Off
23
+
24
+
25
+ export type API_UI_T_DatastoreState =
26
+ | 0 // ICON: datastore-error TEXT: Unknown
27
+ | 1 // ICON: datastore TEXT: Connected
28
+ | 2 // ICON: datastore-warning TEXT: Warning
29
+ | 3 // ICON: datastore-error TEXT: Error
30
+ | 4 // ICON: datastore-maintenance TEXT: Maintenance
31
+ | 5 // ICON: datastore-inaccessible TEXT: Inaccessible
32
+ | 6 // ICON: datastore-disconnected TEXT: Disconnected
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.1.14",
4
+ "version": "1.1.16",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
@@ -1,27 +0,0 @@
1
- export const vmLocalizationByState = [
2
- 'unknown',
3
- 'powerOff',
4
- 'poweredOn',
5
- 'suspended',
6
- 'error',
7
- 'warning',
8
- 'pending',
9
- 'paused',
10
- 'blocked',
11
- 'shuttingDown',
12
- 'shuttingOff',
13
- ]
14
-
15
- export const vmIconByState = [
16
- 'vm-error',
17
- 'vm',
18
- 'vm-on',
19
- 'vm-suspended',
20
- 'vm-error',
21
- 'vm-warning',
22
- 'vm-warning',
23
- 'vm-suspended',
24
- 'vm-warning',
25
- 'vm-warning',
26
- 'vm-warning',
27
- ]