bfg-common 1.5.116 → 1.5.117

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.
@@ -34,7 +34,7 @@
34
34
  </span>
35
35
  <common-wizards-datastore-add-steps-common-tooltip-info
36
36
  id="device-select-host-tooltip"
37
- :description="'Select Host'"
37
+ :description="localization.common.selectHostToViewAccessible"
38
38
  />
39
39
  </div>
40
40
  <div class="row__content">
@@ -5,6 +5,27 @@ import type {
5
5
  } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
6
6
  import type { UI_I_Localization } from '~/lib/models/interfaces'
7
7
  import type { UI_I_CreateStorageLunDiskItem } from '~/components/common/wizards/datastore/add/steps/nameAndDevice/table/lib/models/interfaces'
8
+ import {
9
+ E_DeviceStatus,
10
+ E_DeviceStatusChipColor,
11
+ E_DeviceStatusIcon,
12
+ } from '~/components/common/wizards/datastore/add/steps/nameAndDevice/table/new/lib/models/enums'
13
+
14
+ // Маппинг для статусов
15
+ const STATUS_MAPPING = {
16
+ [E_DeviceStatus.Unknown]: {
17
+ icon: E_DeviceStatusIcon.HelpIcon,
18
+ chipColor: E_DeviceStatusChipColor.Primary,
19
+ },
20
+ [E_DeviceStatus.Supported]: {
21
+ icon: E_DeviceStatusIcon.StatusCheck,
22
+ chipColor: E_DeviceStatusChipColor.Green,
23
+ },
24
+ [E_DeviceStatus.Notupported]: {
25
+ icon: E_DeviceStatusIcon.Close,
26
+ chipColor: E_DeviceStatusChipColor.Red,
27
+ },
28
+ }
8
29
 
9
30
  export const getHeaderDataFunc = (
10
31
  localization: UI_I_Localization
@@ -106,6 +127,14 @@ export const getBodyDataFunc = (
106
127
  ): UI_I_DataTableBody[] => {
107
128
  const { $binary } = useNuxtApp() as any
108
129
  return bodyData.map((device, index: number) => {
130
+ const statusKey = device.hardware_acceleration
131
+ ? E_DeviceStatus.Unknown
132
+ : E_DeviceStatus.Supported
133
+ const hardwareAccelerationData = {
134
+ ...STATUS_MAPPING[statusKey],
135
+ testId: `${device.identifier}-${index}-status`,
136
+ }
137
+
109
138
  return {
110
139
  row: index,
111
140
  collapse: false,
@@ -131,6 +160,7 @@ export const getBodyDataFunc = (
131
160
  {
132
161
  col: 'col4',
133
162
  text: device.hardware_acceleration,
163
+ data: hardwareAccelerationData,
134
164
  },
135
165
  {
136
166
  col: 'col5',
@@ -0,0 +1,16 @@
1
+ export enum E_DeviceStatus {
2
+ Unknown = 'unknown',
3
+ Supported = 'supported',
4
+ NotSupported = 'not Supported',
5
+ }
6
+
7
+ export enum E_DeviceStatusChipColor {
8
+ Green = 'green',
9
+ Red = 'red',
10
+ Primary = 'primary',
11
+ }
12
+ export enum E_DeviceStatusIcon {
13
+ StatusCheck = 'status-check',
14
+ Close = 'close',
15
+ HelpIcon = 'help-icon',
16
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.116",
4
+ "version": "1.5.117",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",