bfg-common 1.4.154 → 1.4.155

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.
@@ -56,7 +56,7 @@ export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
56
56
  }
57
57
 
58
58
  export const bodyItems = (data: UI_I_ClusterTableItem[]): UI_I_BodyItem[][] => {
59
- const { $binary } = useNuxtApp()
59
+ const { $binary }: any = useNuxtApp()
60
60
 
61
61
  const bodyItems: UI_I_BodyItem[][] = []
62
62
  data.forEach((cluster, key) => {
@@ -73,7 +73,7 @@ export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
73
73
  }
74
74
 
75
75
  export const bodyItems = (data: any[]): UI_I_BodyItem[][] => {
76
- const { $binary } = useNuxtApp()
76
+ const { $binary }: any = useNuxtApp()
77
77
  const bodyItems: UI_I_BodyItem[][] = []
78
78
  data.forEach((vapp, key) => {
79
79
  bodyItems.push([
@@ -4,9 +4,7 @@ import type {
4
4
  UI_I_BodyItem,
5
5
  } from '~/components/atoms/table/dataGrid/lib/models/interfaces'
6
6
  import type { UI_I_Localization } from '~/lib/models/interfaces'
7
- import { E_StatusEnum } from '~/components/templates/inventory/treeView/lib/models/enums'
8
- import { columnKeys as getColumnKeys } from '~/components/templates/inventory/mainBlock/tablesView/lib/config/columnKeys'
9
- import { headItems as getHeadItems } from '~/components/templates/inventory/mainBlock/tablesView/lib/config/headItems'
7
+ import * as defaultSettings from '~/components/atoms/table/dataGrid/lib/config/settingsTable'
10
8
  import { vAppsTableItemKeys } from '~/components/common/wizards/vm/migrate/select/computeResource/tableView/lib/config/tableKeys'
11
9
 
12
10
  const getItems = (
@@ -17,7 +15,12 @@ const getItems = (
17
15
  [localization.common.cpuShares, true, '180px', vAppsTableItemKeys[1]],
18
16
  [localization.common.cpuSharesValue, true, '180px', vAppsTableItemKeys[2]],
19
17
  [localization.common.memoryShares, true, '180px', vAppsTableItemKeys[3]],
20
- [localization.common.memorySharesValue, true, '180px', vAppsTableItemKeys[4]],
18
+ [
19
+ localization.common.memorySharesValue,
20
+ true,
21
+ '180px',
22
+ vAppsTableItemKeys[4],
23
+ ],
21
24
  [localization.common.managedBy, true, '180px', vAppsTableItemKeys[5]],
22
25
  ]
23
26
  }
@@ -25,20 +28,23 @@ const getItems = (
25
28
  export const columnKeys = (
26
29
  localization: UI_I_Localization
27
30
  ): UI_I_ColumnKey[] => {
28
- return getColumnKeys(getItems(localization))
31
+ return defaultSettings.defaultColumnKeys(getItems(localization), {
32
+ icon: [0],
33
+ })
29
34
  }
30
35
 
31
36
  export const headItems = (localization: UI_I_Localization): UI_I_HeadItem[] => {
32
- return getHeadItems(getItems(localization))
37
+ return defaultSettings.defaultHeadItems(getItems(localization), {
38
+ icon: [0],
39
+ })
33
40
  }
34
41
 
35
42
  export const bodyItems = (data: any[]): UI_I_BodyItem[][] => {
36
43
  const bodyItems: UI_I_BodyItem[][] = []
37
44
  data.forEach((vapp, key) => {
38
- const nameData: any = {
39
- iconClassName: E_StatusEnum.vmtemplate_Normal,
45
+ const nameData = {
46
+ iconClassName: 'vsphere-icon-vm-template',
40
47
  name: vapp.name,
41
- // @ts-ignore TODO id надо для перехода, пока что так оставить чтобы нигде не ломалось потом поправить для всех
42
48
  id: vapp.id,
43
49
  nav: 'v',
44
50
  type: 'vmtemplate',
@@ -51,11 +57,11 @@ export const bodyItems = (data: any[]): UI_I_BodyItem[][] => {
51
57
  data: nameData,
52
58
  id: key,
53
59
  },
54
- { key: 'col2', text: vapp[vAppsTableItemKeys[1]], id: key },
55
- { key: 'col3', text: vapp[vAppsTableItemKeys[2]], id: key },
56
- { key: 'col4', text: vapp[vAppsTableItemKeys[3]], id: key },
57
- { key: 'col5', text: vapp[vAppsTableItemKeys[4]], id: key },
58
- { key: 'col6', text: vapp[vAppsTableItemKeys[5]], id: key },
60
+ { key: 'col1', text: vapp[vAppsTableItemKeys[1]], id: key },
61
+ { key: 'col2', text: vapp[vAppsTableItemKeys[2]], id: key },
62
+ { key: 'col3', text: vapp[vAppsTableItemKeys[3]], id: key },
63
+ { key: 'col4', text: vapp[vAppsTableItemKeys[4]], id: key },
64
+ { key: 'col5', text: vapp[vAppsTableItemKeys[5]], id: key },
59
65
  ])
60
66
  })
61
67
  return bodyItems
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.4.154",
4
+ "version": "1.4.155",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",