bfg-common 1.3.335 → 1.3.336

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,111 +1,126 @@
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-unmount', // 'datastore-disconnected',
67
- ]
68
-
69
- export const networkLocalizationByState = [
70
- 'unknown',
71
- 'connected',
72
- 'warning',
73
- 'error',
74
- ]
75
-
76
- export const networkIconByState = [
77
- 'network-error',
78
- 'network',
79
- 'network-warning',
80
- 'network-error',
81
- ]
82
-
83
- export const switchLocalizationByState = [
84
- 'unknown',
85
- 'connected',
86
- 'warning',
87
- 'error',
88
- ]
89
-
90
- export const switchIconByState = [
91
- 'switch-error',
92
- 'switch',
93
- 'switch-warning',
94
- 'switch-error',
95
- ]
96
-
97
- export const resourcePoolLocalizationByState = [
98
- 'unknown',
99
- 'normal',
100
- 'warning',
101
- 'error',
102
- 'alert',
103
- ]
104
-
105
- export const resourcePoolIconByState = [
106
- 'resourcePoolAlert',
107
- 'resource-pool',
108
- 'resourcePoolWarning',
109
- 'resourcePoolAlert',
110
- 'resourcePoolAlert',
111
- ]
1
+ export const clusterLocalizationByState = [
2
+ 'unknown',
3
+ 'connected',
4
+ 'warning',
5
+ 'error',
6
+ ]
7
+
8
+ export const clusterIconByState = [
9
+ 'cluster-error',
10
+ 'cluster',
11
+ 'cluster-warning',
12
+ 'cluster-error',
13
+ // TODO Добавил на скорую руку нужно дополнить, если есть что добавить
14
+ ]
15
+
16
+ export const hostLocalizationByState = [
17
+ 'unknown',
18
+ 'connected',
19
+ 'warning',
20
+ 'error',
21
+ 'maintenance',
22
+ 'notResponding',
23
+ 'disconnected',
24
+ ]
25
+
26
+ export const hostIconByState = [
27
+ 'host-error',
28
+ 'host',
29
+ 'host-warning',
30
+ 'host-error',
31
+ 'host-maintenance',
32
+ 'host-not-responding',
33
+ 'host-disconnected',
34
+ ]
35
+
36
+ export const vmLocalizationByState = [
37
+ 'unknown',
38
+ 'powerOff',
39
+ 'poweredOn',
40
+ 'suspended',
41
+ 'error',
42
+ 'warning',
43
+ 'pending',
44
+ 'paused',
45
+ 'blocked',
46
+ 'shuttingDown',
47
+ 'shuttingOff',
48
+ ]
49
+
50
+ export const vmIconByState = [
51
+ 'vm-error',
52
+ 'vm',
53
+ 'vm-on',
54
+ 'vm-suspended',
55
+ 'vm-error',
56
+ 'vm-warning',
57
+ 'vm-warning',
58
+ 'vm-suspended',
59
+ 'vm-warning',
60
+ 'vm-warning',
61
+ 'vm-warning',
62
+ ]
63
+
64
+ export const datastoreLocalizationByState = [
65
+ 'unknown',
66
+ 'connected',
67
+ 'warning',
68
+ 'error',
69
+ 'maintenance',
70
+ 'inaccessible',
71
+ 'disconnected',
72
+ ]
73
+
74
+ export const datastoreIconByState = [
75
+ 'datastore-error',
76
+ 'datastore',
77
+ 'datastore-warning',
78
+ 'datastore-error',
79
+ 'datastore-maintenance',
80
+ 'datastore-inaccessible',
81
+ 'datastore-unmount', // 'datastore-disconnected',
82
+ ]
83
+
84
+ export const networkLocalizationByState = [
85
+ 'unknown',
86
+ 'connected',
87
+ 'warning',
88
+ 'error',
89
+ ]
90
+
91
+ export const networkIconByState = [
92
+ 'network-error',
93
+ 'network',
94
+ 'network-warning',
95
+ 'network-error',
96
+ ]
97
+
98
+ export const switchLocalizationByState = [
99
+ 'unknown',
100
+ 'connected',
101
+ 'warning',
102
+ 'error',
103
+ ]
104
+
105
+ export const switchIconByState = [
106
+ 'switch-error',
107
+ 'switch',
108
+ 'switch-warning',
109
+ 'switch-error',
110
+ ]
111
+
112
+ export const resourcePoolLocalizationByState = [
113
+ 'unknown',
114
+ 'normal',
115
+ 'warning',
116
+ 'error',
117
+ 'alert',
118
+ ]
119
+
120
+ export const resourcePoolIconByState = [
121
+ 'resourcePoolAlert',
122
+ 'resource-pool',
123
+ 'resourcePoolWarning',
124
+ 'resourcePoolAlert',
125
+ 'resourcePoolAlert',
126
+ ]
@@ -54,7 +54,7 @@
54
54
  :datastore-type="datastoreType"
55
55
  :nfs-configuration-submit="nfsConfigurationSubmit"
56
56
  :host-accessibility-submit="hostAccessibilitySubmit"
57
- :datacenter-hosts="props.datacenterHosts"
57
+ :hosts="props.nfsHosts"
58
58
  @loading="(e) => (loading = e)"
59
59
  @change-nfs-version="updateNfsVersion"
60
60
  @submit="saveChangesAndNextNfs"
@@ -95,6 +95,7 @@ const props = defineProps<{
95
95
  version: UI_T_NfsType
96
96
  ) => Promise<void>
97
97
  datacenterHosts?: UI_I_SelectHostOptions[]
98
+ nfsHosts?: any[]
98
99
  isMainFilter?: boolean
99
100
  }>()
100
101
  const emits = defineEmits<{
@@ -24,7 +24,7 @@
24
24
  <common-wizards-datastore-add-nfs-accessibility
25
25
  v-if="showHostAccessibility"
26
26
  :host-accessibility-submit="props.hostAccessibilitySubmit"
27
- :datacenter-hosts="props.datacenterHosts"
27
+ :datacenter-hosts="props.hosts"
28
28
  @next="applyChangesAndNext"
29
29
  />
30
30
  <!-- TODO Он будет когда будем делать групповое -->
@@ -48,7 +48,7 @@ const props = defineProps<{
48
48
  datastoreType: UI_T_DatastoreType
49
49
  nfsConfigurationSubmit: number
50
50
  hostAccessibilitySubmit: number
51
- datacenterHosts?: UI_I_SelectHostOptions[]
51
+ hosts?: UI_I_SelectHostOptions[]
52
52
  }>()
53
53
  const emits = defineEmits<{
54
54
  (event: 'loading', value: boolean): void
@@ -43,7 +43,7 @@ import { hostAccessibilityTabsFunc } from '~/components/common/wizards/datastore
43
43
 
44
44
  const props = defineProps<{
45
45
  hostAccessibilitySubmit: number
46
- datacenterHosts?: UI_I_SelectHostOptions[]
46
+ hosts?: UI_I_SelectHostOptions[]
47
47
  }>()
48
48
  const localization = computed<UI_I_Localization>(() => useLocal())
49
49
  const emits = defineEmits<{
@@ -61,8 +61,8 @@ console.log(444444)
61
61
  // TODO refactoring
62
62
  const dataTable = computed<API_UI_I_DataTable<UI_I_SelectHostOptions[]>>(() => {
63
63
  return {
64
- items: props.datacenterHosts,
65
- total_items: props.datacenterHosts.length,
64
+ items: props.hosts,
65
+ total_items: props.hosts.length,
66
66
  total_pages: 1,
67
67
  }
68
68
  })
@@ -1,55 +1,62 @@
1
- import {
2
- UI_I_HeadItem,
3
- UI_I_BodyItem,
4
- } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
5
- import { UI_I_Localization } from '~/lib/models/interfaces'
6
- import { constructHeadItem } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
7
- import { I_CompatibleHostsTable } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces'
8
- import { E_NodeIconsByState } from '~/lib/models/enums'
9
- import { compatibleHostsTableKeys } from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/tableKeys'
10
-
11
- const getItems = (
12
- localization: UI_I_Localization
13
- ): [string, boolean, string, string][] => {
14
- return [
15
- [localization.host, true, '96px', compatibleHostsTableKeys[0]],
16
- [localization.cluster, true, '180px', compatibleHostsTableKeys[1]],
17
- ]
18
- }
19
-
20
- export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
21
- const result: UI_I_HeadItem[] = []
22
- getItems(localization).forEach((item) => {
23
- result.push(constructHeadItem('icon', item[0], item[3], false, item[2]))
24
- })
25
- return result
26
- }
27
-
28
- export const bodyItems = (data: I_CompatibleHostsTable[]): UI_I_BodyItem[][] => {
29
- console.log(data, 11111);
30
- const bodyItems: UI_I_BodyItem[][] = []
31
- data.forEach((item: I_CompatibleHostsTable, key) => {
32
- const hostData = {
33
- iconClassName: E_NodeIconsByState.host_Normal,
34
- }
35
- const clusterData = {
36
- iconClassName: E_NodeIconsByState.host_Normal,
37
- }
38
-
39
- bodyItems.push([
40
- {
41
- key: 'icon',
42
- text: item[compatibleHostsTableKeys[0]],
43
- data: hostData,
44
- id: key,
45
- },
46
- {
47
- key: 'icon',
48
- text: item[compatibleHostsTableKeys[1]],
49
- data: clusterData,
50
- id: key,
51
- },
52
- ])
53
- })
54
- return bodyItems
55
- }
1
+ import {
2
+ UI_I_HeadItem,
3
+ UI_I_BodyItem,
4
+ } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
5
+ import { UI_I_Localization } from '~/lib/models/interfaces'
6
+ import { constructHeadItem } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
7
+ import { I_CompatibleHostsTable } from '~/components/common/wizards/datastore/add/nfs/accessibility/lib/models/interfaces'
8
+ import { compatibleHostsTableKeys } from '~/components/common/wizards/datastore/add/nfs/accessibility/tablesView/lib/config/tableKeys'
9
+ import {
10
+ hostIconByState,
11
+ clusterIconByState,
12
+ } from '~/components/common/lib/config/states'
13
+
14
+ const getItems = (
15
+ localization: UI_I_Localization
16
+ ): [string, boolean, string, string][] => {
17
+ return [
18
+ [localization.host, true, '96px', compatibleHostsTableKeys[0]],
19
+ [localization.cluster, true, '180px', compatibleHostsTableKeys[1]],
20
+ ]
21
+ }
22
+
23
+ export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
24
+ const result: UI_I_HeadItem[] = []
25
+ getItems(localization).forEach((item) => {
26
+ result.push(constructHeadItem('icon', item[0], item[3], false, item[2]))
27
+ })
28
+ return result
29
+ }
30
+
31
+ export const bodyItems = (
32
+ data: I_CompatibleHostsTable[]
33
+ ): UI_I_BodyItem[][] => {
34
+ console.log(data, 11111)
35
+ const bodyItems: UI_I_BodyItem[][] = []
36
+ data.forEach((item: I_CompatibleHostsTable, key) => {
37
+ const hostData = {
38
+ iconClassName: `vsphere-icon-${hostIconByState[1]}`,
39
+ }
40
+ const clusterData = {
41
+ iconClassName: `vsphere-icon-${clusterIconByState[1]}`,
42
+ }
43
+
44
+ bodyItems.push([
45
+ {
46
+ key: 'icon',
47
+ text: item[compatibleHostsTableKeys[0]],
48
+ data: hostData,
49
+ id: item.id,
50
+ testId: `host-table-item-${item.host}`,
51
+ },
52
+ {
53
+ key: 'icon',
54
+ text: item[compatibleHostsTableKeys[1]],
55
+ data: clusterData,
56
+ id: item.id,
57
+ testId: `host-table-item-${item.host}`,
58
+ },
59
+ ])
60
+ })
61
+ return bodyItems
62
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.3.335",
4
+ "version": "1.3.336",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",