bfg-common 1.4.669 → 1.4.670

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
- import type { UI_I_Localization } from '~/node_modules/bfg-common/lib/models/interfaces'
2
1
  import type {
3
2
  UI_I_DataTableBody,
4
3
  UI_I_DataTableOptions,
5
4
  UI_I_DataTableHeader,
6
5
  } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
7
- import type { UI_I_RecentTaskItem } from '~/node_modules/bfg-common/lib/models/store/tasks/interfaces'
8
- import { UI_E_RecentTaskStatus } from '~/node_modules/bfg-common/lib/models/store/tasks/enums'
6
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
7
+ import type { UI_I_RecentTaskItem } from '~/lib/models/store/tasks/interfaces'
8
+ import { UI_E_RecentTaskStatus } from '~/lib/models/store/tasks/enums'
9
9
  import { E_NodeIconsByState } from '~/lib/models/enums'
10
- import { E_TabsByType } from '~/components/templates/inventory/lib/models/enums'
10
+ import { UI_E_TabsByType } from '~/components/common/pages/tasks/table/lib/models/enums'
11
11
  import {
12
- E_RTaskChipColor,
13
- E_RTaskStatusIcon,
14
- } from '~/components/layout/bottomPanel/new/table/lib/models/enums'
12
+ UI_E_RTaskChipColor,
13
+ UI_E_RTaskStatusIcon,
14
+ } from '~/components/common/pages/tasks/table/lib/models/enums'
15
15
  import type { T_TypeNodes } from '~/lib/models/types'
16
16
 
17
17
  export const getHeaderDataFunc = (
@@ -152,14 +152,14 @@ export const options: UI_I_DataTableOptions = {
152
152
  showSearch: false,
153
153
  showColumnManager: true,
154
154
  withActions: true,
155
- inBlockOnlyLightMode: true
155
+ inBlockOnlyLightMode: true,
156
156
  }
157
157
 
158
158
  export const getBodyDataFunc = (
159
159
  bodyData: UI_I_RecentTaskItem<T_TypeNodes>[],
160
160
  localization: UI_I_Localization
161
161
  ): UI_I_DataTableBody[] => {
162
- const { $formattedDatetime } = useNuxtApp()
162
+ const { $formattedDatetime } = useNuxtApp() as any
163
163
 
164
164
  return bodyData.map((task, index: number) => {
165
165
  const iconClassName = E_NodeIconsByState[`${task.targetType}_Normal`]
@@ -167,15 +167,15 @@ export const getBodyDataFunc = (
167
167
  const targetData = {
168
168
  id,
169
169
  icon: iconClassName,
170
- nav: E_TabsByType[task.targetType],
170
+ nav: UI_E_TabsByType[task.targetType],
171
171
  type: task.targetType,
172
172
  isLink: true,
173
173
  testId: `${task.targetType}-item`,
174
174
  }
175
175
 
176
176
  const statusData = {
177
- icon: E_RTaskStatusIcon[task.status],
178
- chipColor: E_RTaskChipColor[task.status],
177
+ icon: UI_E_RTaskStatusIcon[task.status],
178
+ chipColor: UI_E_RTaskChipColor[task.status],
179
179
  error: task.error,
180
180
  testId: `${task.taskName}-progress`,
181
181
  }
@@ -1,13 +1,23 @@
1
- export enum E_RTaskChipColor {
1
+ export enum UI_E_RTaskChipColor {
2
2
  'default',
3
3
  'primary',
4
4
  'green',
5
5
  'red',
6
6
  }
7
7
 
8
- export enum E_RTaskStatusIcon {
8
+ export enum UI_E_RTaskStatusIcon {
9
9
  'help-icon',
10
10
  'running-icon',
11
11
  'status-check',
12
12
  'error-outline',
13
13
  }
14
+
15
+ export enum UI_E_TabsByType { // TODO временно так надо такой enum сделать глобально для (Sphere, Procurator)
16
+ 'host' = 'v',
17
+ 'vm' = 'v',
18
+ 'datastore' = 's',
19
+ 'network' = 'n',
20
+ 'backup' = 'b',
21
+ 'folder' = 'v',
22
+ 'file' = 'v',
23
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.669",
4
+ "version": "1.4.670",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",