bfg-common 1.4.493 → 1.4.495

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.
@@ -2805,7 +2805,11 @@
2805
2805
  "coreMhzCount": "Ядро МГц ({0})",
2806
2806
  "memoryMetrics": "Метрыкі памяці",
2807
2807
  "networkMetrics": "Сеткавыя паказчыкі",
2808
- "diskMetrics": "Паказчыкі дыска"
2808
+ "diskMetrics": "Паказчыкі дыска",
2809
+ "vmCpuMetrics": "Метрыкі працэсара віртуальнай машыны",
2810
+ "vmMemoryMetrics": "Метрыкі памяці віртуальнай машыны",
2811
+ "vmNetworkMetrics": "Метрыкі сеткі віртуальнай машыны",
2812
+ "vmDiskMetrics": "Метрыкі дыска віртуальнай машыны"
2809
2813
  },
2810
2814
  "remoteConsole": {
2811
2815
  "remoteConsoleSessions": "Аддаленыя сеансы кансолі",
@@ -2809,7 +2809,11 @@
2809
2809
  "coreMhzCount": "Core MHz ({0})",
2810
2810
  "memoryMetrics": "Memory Metrics",
2811
2811
  "networkMetrics": "Network Metrics",
2812
- "diskMetrics": "Disk Metrics"
2812
+ "diskMetrics": "Disk Metrics",
2813
+ "vmCpuMetrics": "VM CPU Metrics",
2814
+ "vmMemoryMetrics": "VM Memory Metrics",
2815
+ "vmNetworkMetrics": "VM Network Metrics",
2816
+ "vmDiskMetrics": "VM Disk Metrics"
2813
2817
  },
2814
2818
  "remoteConsole": {
2815
2819
  "remoteConsoleSessions": "Remote Console Sessions",
@@ -2809,7 +2809,11 @@
2809
2809
  "coreMhzCount": "Core MHz ({0})",
2810
2810
  "memoryMetrics": "Հիշողության չափումներ",
2811
2811
  "networkMetrics": "Ցանցի չափումներ",
2812
- "diskMetrics": "Սկավառակի չափումներ"
2812
+ "diskMetrics": "Սկավառակի չափումներ",
2813
+ "vmCpuMetrics": "VM CPU չափումներ",
2814
+ "vmMemoryMetrics": "VM հիշողության չափումներ",
2815
+ "vmNetworkMetrics": "VM ցանցի չափումներ",
2816
+ "vmDiskMetrics": "VM սկավառակի չափումներ"
2813
2817
  },
2814
2818
  "remoteConsole": {
2815
2819
  "remoteConsoleSessions": "Վահանակի հեռավոր նստաշրջաններ",
@@ -2808,7 +2808,11 @@
2808
2808
  "coreMhzCount": "Негізгі МГц ({0})",
2809
2809
  "memoryMetrics": "Жад көрсеткіштері",
2810
2810
  "networkMetrics": "Желілік көрсеткіштер",
2811
- "diskMetrics": "Диск Өлшемдері"
2811
+ "diskMetrics": "Диск Өлшемдері",
2812
+ "vmCpuMetrics": "VM CPU көрсеткіштері",
2813
+ "vmMemoryMetrics": "VM жад көрсеткіштері",
2814
+ "vmNetworkMetrics": "VM желілік көрсеткіштері",
2815
+ "vmDiskMetrics": "VM дискінің көрсеткіштері"
2812
2816
  },
2813
2817
  "remoteConsole": {
2814
2818
  "remoteConsoleSessions": "Қашықтағы консоль сеанстары",
@@ -2809,8 +2809,12 @@
2809
2809
  "coreCount": "Ядро ({0})",
2810
2810
  "coreMhzCount": "Ядро МГц ({0})",
2811
2811
  "memoryMetrics": "Показатели памяти",
2812
- "networkMetrics": "Сетевые показатели",
2813
- "diskMetrics": "Показатели диска"
2812
+ "networkMetrics": "Показатели сети",
2813
+ "diskMetrics": "Показатели диска",
2814
+ "vmCpuMetrics": "Показатели ЦП виртуальной машины",
2815
+ "vmMemoryMetrics": "Показатели памяти виртуальной машины",
2816
+ "vmNetworkMetrics": "Показатели сети виртуальной машины",
2817
+ "vmDiskMetrics": "Метрики диска виртуальной машины"
2814
2818
  },
2815
2819
  "remoteConsole": {
2816
2820
  "remoteConsoleSessions": "Сеансы удаленной консоли",
@@ -2807,7 +2807,11 @@
2807
2807
  "coreMhzCount": "核心 MHz ({0})",
2808
2808
  "memoryMetrics": "内存指标",
2809
2809
  "networkMetrics": "网络指标",
2810
- "diskMetrics": "磁盘指标"
2810
+ "diskMetrics": "磁盘指标",
2811
+ "vmCpuMetrics": "虚拟机 CPU 指标",
2812
+ "vmMemoryMetrics": "虚拟机内存指标",
2813
+ "vmNetworkMetrics": "虚拟机网络指标",
2814
+ "vmDiskMetrics": "虚拟机磁盘指标"
2811
2815
  },
2812
2816
  "remoteConsole": {
2813
2817
  "remoteConsoleSessions": "远程控制台会话",
@@ -1,23 +1,10 @@
1
- import type { UI_T_NodeType } from '~/components/common/home/lib/models/types'
1
+ import type { UI_T_NodeType } from '~/components/common/pages/home/lib/models/types'
2
+ import type { UI_I_Resources } from '~/components/common/resource/lib/models/interfaces'
2
3
 
3
4
  export interface UI_I_ZoneList {
4
5
  name: string
5
6
  id: number
6
7
  }
7
-
8
- export interface UI_I_ResourceMeter<T = UI_I_MeterBlockItem> {
9
- // TODO такой интерфасе есть (UI_I_Resources)
10
- type: string
11
- capacity?: T
12
- free?: T
13
- used?: T
14
- }
15
-
16
- export interface UI_I_MeterBlockItem {
17
- value: number
18
- text: string
19
- }
20
-
21
8
  export interface UI_I_Hosts {
22
9
  connected: number
23
10
  disconnected: number
@@ -47,7 +34,7 @@ export interface UI_I_Service {
47
34
  }
48
35
 
49
36
  export interface UI_I_HomeInfo {
50
- resource_meter: UI_I_ResourceMeter<UI_I_MeterBlockItem>[]
37
+ resource_meter: UI_I_Resources[]
51
38
  hosts: UI_I_Hosts
52
39
  vms: UI_I_Vms
53
40
  alerts: UI_I_Alert[]
@@ -1,9 +1,5 @@
1
- import type {
2
- UI_I_MeterBlockItem,
3
- UI_I_ResourceMeter,
4
- } from '~/components/common/home/lib/models/interfaces'
5
-
6
- export const optionsDefault: UI_I_ResourceMeter<UI_I_MeterBlockItem>[] = [
1
+ import type { UI_I_Resources } from '~/components/common/resource/lib/models/interfaces'
2
+ export const optionsDefault: UI_I_Resources[] = [
7
3
  {
8
4
  type: 'cpu',
9
5
  free: { text: '0', value: 0 },
@@ -1,3 +1,5 @@
1
+ // TODO наверно надо сделать глобално
2
+
1
3
  export type UI_T_NodeType =
2
4
  | 'zone'
3
5
  | 'folder'
@@ -8,11 +10,3 @@ export type UI_T_NodeType =
8
10
  | 'vm'
9
11
  | 'datastore'
10
12
  | 'network'
11
-
12
- export type UI_T_AlertColumnKeys = 'item' | 'alerts' | 'warnings'
13
-
14
- export type UI_T_ServiceColumnKeys =
15
- | 'item'
16
- | 'statusText'
17
- | 'statusIcon'
18
- | 'version'
@@ -27,8 +27,8 @@ export const getHeaderDataFunc = (
27
27
  },
28
28
  {
29
29
  col: 1,
30
- colName: 'alerts',
31
- text: localization.common.alerts,
30
+ colName: 'status',
31
+ text: localization.common.status,
32
32
  isSortable: true,
33
33
  sort: 'asc',
34
34
  width: '33.3%',
@@ -37,8 +37,8 @@ export const getHeaderDataFunc = (
37
37
  },
38
38
  {
39
39
  col: 2,
40
- colName: 'warnings',
41
- text: localization.common.warnings,
40
+ colName: 'version',
41
+ text: localization.common.version,
42
42
  isSortable: true,
43
43
  sort: 'asc',
44
44
  width: '33.3%',
@@ -4,10 +4,10 @@ import type {
4
4
  } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
5
5
  import type { UI_I_Localization } from '~/lib/models/interfaces'
6
6
  import { constructHeadItem } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
7
- import type { UI_T_ServiceColumnKeys } from '~/components/common/home/lib/models/types'
7
+ import type { UI_T_ServiceTableKeysTuple } from '~/components/common/pages/home/widgets/services/table/lib/models/types'
8
8
  import type { UI_I_Service } from '~/components/common/home/lib/models/interfaces'
9
9
 
10
- export const servicesTableKeys: UI_T_ServiceColumnKeys[] = [
10
+ export const servicesTableKeys: UI_T_ServiceTableKeysTuple = [
11
11
  'item',
12
12
  'statusText',
13
13
  'statusIcon',
@@ -0,0 +1,6 @@
1
+ export type UI_T_ServiceTableKeysTuple = [
2
+ 'item',
3
+ 'statusText',
4
+ 'statusIcon',
5
+ 'version'
6
+ ]
@@ -71,7 +71,7 @@ watch(
71
71
  (newValue: UI_I_Alert[]) => {
72
72
  if (!newValue?.length) return
73
73
 
74
- resentTaskBodyItems.value = getBodyDataFunc(newValue, localization.value)
74
+ resentTaskBodyItems.value = getBodyDataFunc(newValue)
75
75
  },
76
76
  { deep: true, immediate: true }
77
77
  )
@@ -4,13 +4,9 @@ import type {
4
4
  UI_I_DataTableOptions,
5
5
  UI_I_DataTableHeader,
6
6
  } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
7
- import { UI_E_RecentTaskStatus } from '~/lib/models/store/tasks/enums'
7
+ import type { UI_I_Alert } from '~/components/common/home/lib/models/interfaces'
8
+ import { UI_E_TabsByTypeEnum } from '~/components/common/pages/home/widgets/warnings/table/lib/models/enums'
8
9
  import { E_NodeIconsByState } from '~/lib/models/enums'
9
- // import { E_TabsByType } from '~/components/templates/inventory/lib/models/enums'
10
- import {
11
- E_RTaskChipColor,
12
- E_RTaskStatusIcon,
13
- } from '~/components/common/pages/home/widgets/services/lib/models/enums'
14
10
 
15
11
  export const getHeaderDataFunc = (
16
12
  localization: UI_I_Localization
@@ -28,8 +24,9 @@ export const getHeaderDataFunc = (
28
24
  },
29
25
  {
30
26
  col: 1,
31
- colName: 'status',
32
- text: localization.common.status,
27
+ colName: 'alerts',
28
+ text: localization.common.alerts,
29
+
33
30
  isSortable: true,
34
31
  sort: 'asc',
35
32
  width: '33.3%',
@@ -38,8 +35,8 @@ export const getHeaderDataFunc = (
38
35
  },
39
36
  {
40
37
  col: 2,
41
- colName: 'version',
42
- text: localization.common.version,
38
+ colName: 'warnings',
39
+ text: localization.common.warnings,
43
40
  isSortable: true,
44
41
  sort: 'asc',
45
42
  width: '33.3%',
@@ -62,26 +59,17 @@ export const options: UI_I_DataTableOptions = {
62
59
  }
63
60
 
64
61
  export const getBodyDataFunc = (
65
- bodyData: any,
66
- localization: UI_I_Localization
62
+ bodyData: UI_I_Alert[]
67
63
  ): UI_I_DataTableBody[] => {
68
- return bodyData.map((task, index: number) => {
69
- const iconClassName = E_NodeIconsByState[`${task.targetType}_Normal`]
70
- const id = task.extra?.created_id || task.target
64
+ return bodyData.map((alert, index: number) => {
65
+ const iconClassName = E_NodeIconsByState[`${alert.type}_Normal`]
71
66
  const targetData = {
72
- id,
67
+ id: alert.id,
73
68
  icon: iconClassName,
74
- // nav: E_TabsByType[task.targetType],
75
- type: task.targetType,
69
+ nav: UI_E_TabsByTypeEnum[alert.type],
70
+ type: alert.type,
76
71
  isLink: true,
77
- testId: `${task.targetType}-item`,
78
- }
79
-
80
- const statusData = {
81
- icon: E_RTaskStatusIcon[task.status],
82
- chipColor: E_RTaskChipColor[task.status],
83
- error: task.error,
84
- testId: `${task.taskName}-progress`,
72
+ testId: `${alert.type}-item`,
85
73
  }
86
74
 
87
75
  return {
@@ -90,18 +78,14 @@ export const getBodyDataFunc = (
90
78
  isHiddenCollapse: false,
91
79
  collapseToggle: false,
92
80
  data: [
93
- { col: 0, text: task.taskName },
81
+ { key: 'icon', col: 0, text: alert.item, data: targetData },
94
82
  {
95
- key: 'icon',
96
83
  col: 1,
97
- text: task.target,
98
- data: targetData,
84
+ text: alert.alerts + '',
99
85
  },
100
86
  {
101
- key: 'status',
102
87
  col: 2,
103
- text: localization.common[UI_E_RecentTaskStatus[task.status]],
104
- data: statusData,
88
+ text: alert.warnings + '',
105
89
  },
106
90
  ],
107
91
  }
@@ -3,13 +3,13 @@ import type {
3
3
  UI_I_BodyItem,
4
4
  } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
5
5
  import type { UI_I_Localization } from '~/lib/models/interfaces'
6
- import type { UI_T_AlertColumnKeys } from '~/components/common/home/lib/models/types'
7
6
  import type { UI_I_Alert } from '~/components/common/home/lib/models/interfaces'
7
+ import { UI_T_WarningsTableKeysTuple } from '~/components/common/pages/home/widgets/warnings/table/lib/models/types'
8
8
  import type { UI_I_AlertData } from '~/components/common/pages/home/widgets/warnings/table/lib/models/interfaces'
9
9
  import { UI_E_TabsByTypeEnum } from '~/components/common/pages/home/widgets/warnings/table/lib/models/enums'
10
10
  import { constructHeadItem } from '~/components/atoms/table/dataGrid/lib/utils/constructDataTable'
11
11
 
12
- export const alertsTableKeys: UI_T_AlertColumnKeys[] = [
12
+ export const alertsTableKeys: UI_T_WarningsTableKeysTuple = [
13
13
  'item',
14
14
  'alerts',
15
15
  'warnings',
@@ -11,3 +11,5 @@ export type UI_T_InventoryAllTreeName =
11
11
  | UI_T_InventoryTreeName
12
12
  | 'folderTree'
13
13
  | 'computeResourceTree'
14
+
15
+ export type UI_T_WarningsTableKeysTuple = ['item', 'alerts', 'warnings']
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.493",
4
+ "version": "1.4.495",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",