bfg-common 1.6.30 → 1.6.31

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.
Files changed (99) hide show
  1. package/assets/localization/local_be.json +66 -5
  2. package/assets/localization/local_en.json +73 -12
  3. package/assets/localization/local_hy.json +67 -6
  4. package/assets/localization/local_kk.json +66 -5
  5. package/assets/localization/local_ru.json +73 -12
  6. package/assets/localization/local_zh.json +66 -5
  7. package/assets/scss/common/theme.scss +2 -2
  8. package/components/atoms/stack/StackBlock.vue +1 -1
  9. package/components/common/adapterManager/addAdapterModal/AddAdapterModalNew.vue +1 -1
  10. package/components/common/adapterManager/addAdapterWarningModal/AddAdapterWarningModalNew.vue +0 -1
  11. package/components/common/adapterManager/ui/table/adapters/AdaptersNew.vue +1 -0
  12. package/components/common/configure/physicalAdapters/PhysicalAdapters.vue +6 -0
  13. package/components/common/configure/physicalAdapters/PhysicalAdaptersNew.vue +219 -192
  14. package/components/common/configure/physicalAdapters/PhysicalAdaptersOld.vue +6 -4
  15. package/components/common/configure/physicalAdapters/buttons/Buttons.vue +1 -0
  16. package/components/common/configure/physicalAdapters/modals/edit/Edit.vue +26 -1
  17. package/components/common/configure/physicalAdapters/modals/edit/EditNew.vue +30 -1
  18. package/components/common/configure/physicalAdapters/modals/edit/lib/models/interfaces.ts +5 -0
  19. package/components/common/configure/physicalAdapters/modals/edit/lib/validations/validations.ts +19 -0
  20. package/components/common/configure/physicalAdapters/tableView/TableViewNew.vue +12 -1
  21. package/components/common/configure/physicalAdapters/tableView/lib/config/physicalAdaptersTableConfigNew.ts +21 -21
  22. package/components/common/configure/physicalAdapters/tableView/lib/config/settings.ts +12 -5
  23. package/components/common/configure/physicalAdapters/tableView/lib/models/interfaces.ts +4 -1
  24. package/components/common/diagramMain/DiagramMain.vue +6 -0
  25. package/components/common/diagramMain/modals/Modals.vue +4 -0
  26. package/components/common/diagramMain/modals/editSettings/tabs/NetworkProperties.vue +2 -2
  27. package/components/common/diagramMain/modals/lib/config/vmKernelAdapter.ts +1 -1
  28. package/components/common/diagramMain/modals/migrateVmkernelAdapter/MigrateVmkernelAdapter.vue +2 -2
  29. package/components/common/diagramMain/modals/migrateVmkernelAdapter/validations/common.ts +1 -1
  30. package/components/common/layout/theHeader/ThemeSwitch.vue +1 -1
  31. package/components/common/layout/theHeader/userMenu/modals/changePassword/New.vue +8 -9
  32. package/components/common/layout/theHeader/userMenu/modals/preferences/New.vue +4 -0
  33. package/components/common/layout/theHeader/userMenu/modals/preferences/Old.vue +9 -2
  34. package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +11 -7
  35. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsole.vue +7 -1
  36. package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/lib/config/consoleOptions.ts +8 -5
  37. package/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/TimeFormat.vue +9 -5
  38. package/components/common/layout/theHeader/userMenu/modals/preferences/view/Old.vue +5 -9
  39. package/components/common/layout/theHeader/userMenu/modals/preferences/view/View.vue +9 -6
  40. package/components/common/mainNavigationPanel/MainNavigationPanelNew.vue +3 -1
  41. package/components/common/monitor/advanced/table/lib/models/interfaces.ts +13 -13
  42. package/components/common/monitor/advanced/table/lib/models/types.ts +7 -7
  43. package/components/common/monitor/advanced/table/tableNew/TableNew.vue +93 -93
  44. package/components/common/monitor/advanced/table/tableNew/lib/config/options.ts +109 -109
  45. package/components/common/monitor/advanced/table/tableNew/lib/utils/constructBody.ts +25 -25
  46. package/components/common/monitor/advanced/table/tableOld/lib/config/performanceDatatable.ts +125 -125
  47. package/components/common/monitor/lib/utils/local_be.json +702 -702
  48. package/components/common/monitor/lib/utils/local_en.json +702 -702
  49. package/components/common/monitor/lib/utils/local_hy.json +702 -702
  50. package/components/common/monitor/lib/utils/local_kk.json +702 -702
  51. package/components/common/monitor/lib/utils/local_ru.json +702 -702
  52. package/components/common/monitor/lib/utils/local_zh.json +702 -702
  53. package/components/common/monitor/utilization/lib/utils/index.ts +33 -33
  54. package/components/common/noDataProvided/NoDataProvidedNew.vue +1 -1
  55. package/components/common/pages/backups/modals/createBackup/datastores/tableView/new/lib/config/table.ts +4 -4
  56. package/components/common/pages/backups/modals/createBackup/datastores/tableView/old/lib/config/table.ts +4 -4
  57. package/components/common/pages/hardwareHealth/HardwareHealthNew.vue +1 -1
  58. package/components/common/pages/hardwareHealth/historyTestimony/GraphNew.vue +1 -1
  59. package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/actions/ActionsNew.vue +1 -1
  60. package/components/common/pages/scheduledTasks/table/lib/models/enums.ts +9 -0
  61. package/components/common/pages/scheduledTasks/table/new/New.vue +12 -10
  62. package/components/common/pages/tasks/Tasks.vue +4 -1
  63. package/components/common/pages/tasks/table/Table.vue +24 -22
  64. package/components/common/split/vertical/New.vue +42 -8
  65. package/components/common/split/vertical/Old.vue +31 -2
  66. package/components/common/split/vertical/Vertical.vue +4 -0
  67. package/components/common/vm/actions/add/New.vue +21 -6
  68. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +1 -1
  69. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/New.vue +5 -0
  70. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/New.vue +1 -0
  71. package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/New.vue +2 -0
  72. package/components/common/vm/actions/common/select/storage/new/lib/config/table.ts +13 -15
  73. package/components/common/vm/actions/confirm/Confirm.vue +3 -0
  74. package/components/common/vm/snapshots/DetailView.vue +6 -6
  75. package/components/common/wizards/datastore/add/New.vue +6 -0
  76. package/components/common/wizards/datastore/add/steps/nameAndDevice/NameAndDeviceNew.vue +1 -1
  77. package/components/common/wizards/datastore/add/steps/nameAndDevice/advancedOptions/New.vue +1 -1
  78. package/components/common/wizards/network/add/Add.vue +13 -2
  79. package/components/common/wizards/network/add/AddNew.vue +22 -26
  80. package/components/common/wizards/network/add/lib/config/initialData.ts +4 -4
  81. package/components/common/wizards/network/add/lib/utils/utils.ts +1 -1
  82. package/components/common/wizards/network/add/steps/ipFourSettings/IpFourSettingsNew.vue +2 -8
  83. package/components/common/wizards/network/add/steps/portProperties/PortPropertiesNew.vue +2 -8
  84. package/components/common/wizards/network/add/steps/selectTargetDevice/SelectTargetDeviceNew.vue +10 -3
  85. package/components/common/wizards/network/add/steps/selectTargetDevice/modals/new/SelectNetwork.vue +5 -1
  86. package/components/common/wizards/network/add/validations/common.ts +1 -1
  87. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/New.vue +31 -13
  88. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/clusterTable.ts +340 -0
  89. package/components/common/wizards/vm/migrate/steps/computeResource/tableView/new/lib/config/hostTable.ts +3 -1
  90. package/components/common/wizards/vm/migrate/steps/selectStorage/New.vue +5 -4
  91. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/batch/New.vue +4 -0
  92. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/batch/table/new/New.vue +3 -1
  93. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/new/lib/config/diskTable.ts +8 -3
  94. package/components/common/wizards/vm/migrate/steps/selectStorage/configure/disk/table/old/lib/config/diskTable.ts +7 -1
  95. package/lib/models/store/tasks/enums.ts +3 -0
  96. package/lib/models/store/tasks/types.ts +7 -6
  97. package/package.json +2 -2
  98. package/store/tasks/actions.ts +26 -8
  99. package/store/tasks/mappers/recentTasks.ts +1 -0
@@ -12,12 +12,13 @@ import type { UI_I_Localization } from '~/lib/models/interfaces'
12
12
  import type { UI_I_RadioItem } from '~/components/common/layout/theHeader/userMenu/lib/models/interfaces'
13
13
  import type { UI_T_TimeValue } from '~/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/models/types'
14
14
  import { formatOptionsFunc } from '~/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/config/formatOptions'
15
+ import type { UI_T_Project } from '~/lib/models/types'
15
16
 
16
17
  const timeFormat = defineModel<UI_T_TimeValue>('timeFormat')
17
18
  const props = defineProps<{
19
+ project: UI_T_Project
18
20
  newView: boolean
19
21
  }>()
20
-
21
22
  const currentComponent = computed(() =>
22
23
  props.newView
23
24
  ? defineAsyncComponent(() => import('./New.vue'))
@@ -28,11 +29,14 @@ const localization = computed<UI_I_Localization>(() => useLocal())
28
29
 
29
30
  const config = useRuntimeConfig()
30
31
 
32
+ /* TODO SC-2104 */
31
33
  const description = computed<string>(() =>
32
- localization.value.common.timeFormatDesc.replaceAll(
33
- '{trademark}',
34
- String(config.public[`TRADEMARK_${useEnvLanguage()}`])
35
- )
34
+ props.project === 'sphere'
35
+ ? localization.value.common.timeFormatDesc1
36
+ : localization.value.common.timeFormatDesc.replaceAll(
37
+ '{trademark}',
38
+ String(config.public[`TRADEMARK_${useEnvLanguage()}`])
39
+ )
36
40
  )
37
41
 
38
42
  const formatOptions = readonly<UI_I_RadioItem[]>(
@@ -15,13 +15,9 @@
15
15
  />
16
16
  </div>
17
17
 
18
- <div class="description second-description">
19
- {{ localization.myPreferences.showNotificationDescription }}
20
- </div>
21
-
22
- <div class="flex-align-center">
18
+ <div class="flex-align-center second-description">
23
19
  <label for="show-notification">{{
24
- localization.myPreferences.showNotification
20
+ localization.myPreferences.showNotificationDescription
25
21
  }}</label>
26
22
  <input
27
23
  id="show-notification"
@@ -63,10 +59,10 @@ window.tools = new Proxy(
63
59
  <style lang="scss" scoped>
64
60
  .description {
65
61
  margin-bottom: 10px;
62
+ }
66
63
 
67
- &.second-description {
68
- margin-top: 20px;
69
- }
64
+ .second-description {
65
+ margin-top: 20px;
70
66
  }
71
67
 
72
68
  label {
@@ -30,10 +30,13 @@ const currentComponent = computed(() =>
30
30
 
31
31
  const localization = computed<UI_I_Localization>(() => useLocal())
32
32
 
33
- const description = computed<string>(() => {
34
- return localization.value.common.viewDesc.replaceAll(
35
- '{trademark}',
36
- String(config.public[`TRADEMARK_${useEnvLanguage()}`])
37
- )
38
- })
33
+ /* TODO SC-2104 */
34
+ const description = computed<string>(() =>
35
+ props.project === 'sphere'
36
+ ? localization.value.common.viewDesc1
37
+ : localization.value.common.viewDesc.replaceAll(
38
+ '{trademark}',
39
+ String(config.public[`TRADEMARK_${useEnvLanguage()}`])
40
+ )
41
+ )
39
42
  </script>
@@ -143,7 +143,7 @@ const localization = computed<UI_I_Localization>(() => useLocal())
143
143
  &.pinned {
144
144
  .nav-context {
145
145
  position: relative;
146
- z-index: calc(var(--z-default) + 1);
146
+ z-index: calc(var(--z-fixed) + 2);
147
147
  }
148
148
  }
149
149
  &:not(.pinned) {
@@ -177,6 +177,8 @@ const localization = computed<UI_I_Localization>(() => useLocal())
177
177
  }
178
178
  }
179
179
  &:not(.collapsed) {
180
+ min-width: 240px;
181
+
180
182
  :deep(.tooltip-container-hover) {
181
183
  display: none;
182
184
  }
@@ -1,13 +1,13 @@
1
- export interface UI_I_PerformanceItem {
2
- id: number
3
- key: string
4
- measurement: string
5
- units: string
6
- latest: number
7
- maximum: number
8
- minimum: number
9
- average: number
10
- relatedDeviceName: string
11
- rollupType: string
12
- description: string
13
- }
1
+ export interface UI_I_PerformanceItem {
2
+ id: number
3
+ key: string
4
+ measurement: string
5
+ units: string
6
+ latest: number
7
+ maximum: number
8
+ minimum: number
9
+ average: number
10
+ relatedDeviceName: string
11
+ rollupType: string
12
+ description: string
13
+ }
@@ -1,7 +1,7 @@
1
- export type UI_T_PerformanceColumnKey =
2
- | 'key'
3
- | 'relatedDeviceName'
4
- | 'description'
5
- | 'units'
6
- | 'maximum'
7
- | 'minimum'
1
+ export type UI_T_PerformanceColumnKey =
2
+ | 'key'
3
+ | 'relatedDeviceName'
4
+ | 'description'
5
+ | 'units'
6
+ | 'maximum'
7
+ | 'minimum'
@@ -1,93 +1,93 @@
1
- <template>
2
- <div class="advanced-main-table">
3
- <ui-data-table
4
- :data="data"
5
- :options="options"
6
- :loading="props.loading"
7
- :texts="tableTexts"
8
- test-id="advanced-table"
9
- @select-row="onSelectRow"
10
- >
11
- <template #icon="{ item }">
12
- <div
13
- :style="{ backgroundColor: item.data.color }"
14
- class="color-circle"
15
- ></div>
16
- </template>
17
- <template #zone="{ item }">
18
- <span class="zone-item-block">
19
- <span class="icon vsphere-icon-vcenter"></span>
20
- <span>{{ item.text }}</span>
21
- </span>
22
- </template>
23
- <template #default-actions></template>
24
- </ui-data-table>
25
- </div>
26
- </template>
27
-
28
- <script setup lang="ts">
29
- import type {
30
- UI_I_DataTable,
31
- UI_I_DataTableOptions,
32
- UI_I_DataTableBody,
33
- UI_I_TableTexts,
34
- } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
35
- import type { UI_I_Localization } from '~/lib/models/interfaces'
36
- import type { UI_I_PerformanceItem } from '~/components/common/monitor/advanced/table/lib/models/interfaces'
37
- import {
38
- bodyOptions,
39
- headOptions,
40
- } from '~/components/common/monitor/advanced/table/tableNew/lib/config/options'
41
- import { tableTextsFunc } from '~/lib/config/uiTable'
42
-
43
- const localization = computed<UI_I_Localization>(() => useLocal())
44
-
45
- const props = defineProps<{
46
- loading: boolean
47
- items: UI_I_PerformanceItem[]
48
- }>()
49
- const emits = defineEmits<{
50
- (event: 'select', value: number[]): void
51
- }>()
52
-
53
- const data = computed<UI_I_DataTable>(() =>
54
- bodyOptions(localization.value, props.items)
55
- )
56
-
57
- const options = computed<UI_I_DataTableOptions>(() => headOptions())
58
-
59
- const onSelectRow = (data: UI_I_DataTableBody[]): void => {
60
- emits(
61
- 'select',
62
- data.map((item) => item.row)
63
- )
64
- }
65
-
66
- const tableTexts = computed<UI_I_TableTexts>(() =>
67
- tableTextsFunc(localization.value)
68
- )
69
- </script>
70
-
71
- <style scoped lang="scss">
72
- .advanced-main-table {
73
- margin: 12px 6px 16px 6px;
74
-
75
- :deep(.title-container) {
76
- height: 20px;
77
-
78
- h5 {
79
- margin-bottom: 0;
80
- }
81
- }
82
- .color-circle {
83
- width: 18px;
84
- height: 18px;
85
- border-radius: 32px;
86
- }
87
- .zone-item-block {
88
- display: flex;
89
- align-items: center;
90
- column-gap: 4px;
91
- }
92
- }
93
- </style>
1
+ <template>
2
+ <div class="advanced-main-table">
3
+ <ui-data-table
4
+ :data="data"
5
+ :options="options"
6
+ :loading="props.loading"
7
+ :texts="tableTexts"
8
+ test-id="advanced-table"
9
+ @select-row="onSelectRow"
10
+ >
11
+ <template #icon="{ item }">
12
+ <div
13
+ :style="{ backgroundColor: item.data.color }"
14
+ class="color-circle"
15
+ ></div>
16
+ </template>
17
+ <template #zone="{ item }">
18
+ <span class="zone-item-block">
19
+ <span class="icon vsphere-icon-vcenter"></span>
20
+ <span>{{ item.text }}</span>
21
+ </span>
22
+ </template>
23
+ <template #default-actions></template>
24
+ </ui-data-table>
25
+ </div>
26
+ </template>
27
+
28
+ <script setup lang="ts">
29
+ import type {
30
+ UI_I_DataTable,
31
+ UI_I_DataTableOptions,
32
+ UI_I_DataTableBody,
33
+ UI_I_TableTexts,
34
+ } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
35
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
36
+ import type { UI_I_PerformanceItem } from '~/components/common/monitor/advanced/table/lib/models/interfaces'
37
+ import {
38
+ bodyOptions,
39
+ headOptions,
40
+ } from '~/components/common/monitor/advanced/table/tableNew/lib/config/options'
41
+ import { tableTextsFunc } from '~/lib/config/uiTable'
42
+
43
+ const localization = computed<UI_I_Localization>(() => useLocal())
44
+
45
+ const props = defineProps<{
46
+ loading: boolean
47
+ items: UI_I_PerformanceItem[]
48
+ }>()
49
+ const emits = defineEmits<{
50
+ (event: 'select', value: number[]): void
51
+ }>()
52
+
53
+ const data = computed<UI_I_DataTable>(() =>
54
+ bodyOptions(localization.value, props.items)
55
+ )
56
+
57
+ const options = computed<UI_I_DataTableOptions>(() => headOptions())
58
+
59
+ const onSelectRow = (data: UI_I_DataTableBody[]): void => {
60
+ emits(
61
+ 'select',
62
+ data.map((item) => item.row)
63
+ )
64
+ }
65
+
66
+ const tableTexts = computed<UI_I_TableTexts>(() =>
67
+ tableTextsFunc(localization.value)
68
+ )
69
+ </script>
70
+
71
+ <style scoped lang="scss">
72
+ .advanced-main-table {
73
+ margin: 12px 6px 16px 6px;
74
+
75
+ :deep(.title-container) {
76
+ height: 20px;
77
+
78
+ h5 {
79
+ margin-bottom: 0;
80
+ }
81
+ }
82
+ .color-circle {
83
+ width: 18px;
84
+ height: 18px;
85
+ border-radius: 32px;
86
+ }
87
+ .zone-item-block {
88
+ display: flex;
89
+ align-items: center;
90
+ column-gap: 4px;
91
+ }
92
+ }
93
+ </style>
@@ -1,109 +1,109 @@
1
- import type { UI_I_DataTable } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
2
- import type { UI_I_DataTableOptions } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
3
- import type { UI_I_Localization } from '~/lib/models/interfaces'
4
- import type { UI_I_PerformanceItem } from '~/components/common/monitor/advanced/table/lib/models/interfaces'
5
- import { constructUsersAndGroupsTableItems } from '~/components/common/monitor/advanced/table/tableNew/lib/utils/constructBody'
6
-
7
- export const bodyOptions = (
8
- localization: UI_I_Localization,
9
- items: UI_I_PerformanceItem[]
10
- ): UI_I_DataTable => {
11
- const currentBody = constructUsersAndGroupsTableItems(items)
12
-
13
- return {
14
- id: 'advanced-main-table-config',
15
- title: `${localization.inventoryMonitor.performanceChartLegend} (${items.length})`,
16
- selectedRows: [],
17
- isAllSelected: false,
18
- header: [
19
- {
20
- col: 'col0',
21
- colName: 'key',
22
- text: localization.inventoryMonitor.chartColor,
23
- width: '96px',
24
- isSortable: false,
25
- sort: 'asc',
26
- show: true,
27
- filter: false,
28
- },
29
- {
30
- col: 'col1',
31
- colName: 'object',
32
- text: localization.inventoryMonitor.metricName,
33
- width: '150px',
34
- isSortable: true,
35
- sort: 'asc',
36
- show: true,
37
- filter: true,
38
- },
39
- {
40
- col: 'col2',
41
- colName: 'measurement',
42
- text: localization.inventoryMonitor.metricDescription,
43
- width: '192px',
44
- isSortable: true,
45
- sort: 'asc',
46
- show: true,
47
- filter: true,
48
- },
49
- {
50
- col: 'col3',
51
- colName: 'units',
52
- text: localization.inventoryMonitor.unitOfMeasurement,
53
- width: '150px',
54
- isSortable: true,
55
- sort: 'asc',
56
- show: true,
57
- filter: true,
58
- },
59
- {
60
- col: 'col4',
61
- colName: 'maximum',
62
- text: localization.common.maximum,
63
- width: '150px',
64
- isSortable: true,
65
- sort: 'asc',
66
- show: true,
67
- filter: true,
68
- },
69
- {
70
- col: 'col5',
71
- colName: 'minimum',
72
- text: localization.common.minimum,
73
- width: '150px',
74
- isSortable: true,
75
- sort: 'asc',
76
- show: true,
77
- filter: true,
78
- },
79
- {
80
- col: 'default-actions',
81
- colName: 'default-actions',
82
- text: '',
83
- show: true,
84
- },
85
- ],
86
-
87
- body: currentBody,
88
- }
89
- }
90
-
91
- export const headOptions = (): UI_I_DataTableOptions => {
92
- return {
93
- selectType: 'checkbox',
94
- perPageOptions: [
95
- { text: '20', value: 20, default: true },
96
- { text: '50', value: 50 },
97
- { text: '100', value: 100 },
98
- ],
99
- inBlock: true,
100
- isSelectable: true,
101
- showPagination: false,
102
- showPageInfo: false,
103
- isSortable: true,
104
- server: false,
105
- isResizable: true,
106
- showSearch: false,
107
- showColumnManager: true,
108
- }
109
- }
1
+ import type { UI_I_DataTable } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
2
+ import type { UI_I_DataTableOptions } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
3
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
4
+ import type { UI_I_PerformanceItem } from '~/components/common/monitor/advanced/table/lib/models/interfaces'
5
+ import { constructUsersAndGroupsTableItems } from '~/components/common/monitor/advanced/table/tableNew/lib/utils/constructBody'
6
+
7
+ export const bodyOptions = (
8
+ localization: UI_I_Localization,
9
+ items: UI_I_PerformanceItem[]
10
+ ): UI_I_DataTable => {
11
+ const currentBody = constructUsersAndGroupsTableItems(items)
12
+
13
+ return {
14
+ id: 'advanced-main-table-config',
15
+ title: `${localization.inventoryMonitor.performanceChartLegend} (${items.length})`,
16
+ selectedRows: [],
17
+ isAllSelected: false,
18
+ header: [
19
+ {
20
+ col: 'col0',
21
+ colName: 'key',
22
+ text: localization.inventoryMonitor.chartColor,
23
+ width: '96px',
24
+ isSortable: false,
25
+ sort: 'asc',
26
+ show: true,
27
+ filter: false,
28
+ },
29
+ {
30
+ col: 'col1',
31
+ colName: 'object',
32
+ text: localization.inventoryMonitor.metricName,
33
+ width: '150px',
34
+ isSortable: true,
35
+ sort: 'asc',
36
+ show: true,
37
+ filter: true,
38
+ },
39
+ {
40
+ col: 'col2',
41
+ colName: 'measurement',
42
+ text: localization.inventoryMonitor.metricDescription,
43
+ width: '192px',
44
+ isSortable: true,
45
+ sort: 'asc',
46
+ show: true,
47
+ filter: true,
48
+ },
49
+ {
50
+ col: 'col3',
51
+ colName: 'units',
52
+ text: localization.inventoryMonitor.unitOfMeasurement,
53
+ width: '150px',
54
+ isSortable: true,
55
+ sort: 'asc',
56
+ show: true,
57
+ filter: true,
58
+ },
59
+ {
60
+ col: 'col4',
61
+ colName: 'maximum',
62
+ text: localization.common.maximum,
63
+ width: '150px',
64
+ isSortable: true,
65
+ sort: 'asc',
66
+ show: true,
67
+ filter: true,
68
+ },
69
+ {
70
+ col: 'col5',
71
+ colName: 'minimum',
72
+ text: localization.common.minimum,
73
+ width: '150px',
74
+ isSortable: true,
75
+ sort: 'asc',
76
+ show: true,
77
+ filter: true,
78
+ },
79
+ {
80
+ col: 'default-actions',
81
+ colName: 'default-actions',
82
+ text: '',
83
+ show: true,
84
+ },
85
+ ],
86
+
87
+ body: currentBody,
88
+ }
89
+ }
90
+
91
+ export const headOptions = (): UI_I_DataTableOptions => {
92
+ return {
93
+ selectType: 'checkbox',
94
+ perPageOptions: [
95
+ { text: '20', value: 20, default: true },
96
+ { text: '50', value: 50 },
97
+ { text: '100', value: 100 },
98
+ ],
99
+ inBlock: true,
100
+ isSelectable: true,
101
+ showPagination: false,
102
+ showPageInfo: false,
103
+ isSortable: true,
104
+ server: false,
105
+ isResizable: true,
106
+ showSearch: false,
107
+ showColumnManager: true,
108
+ }
109
+ }
@@ -1,25 +1,25 @@
1
- import type { UI_I_DataTableBody } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
2
- import type { UI_I_PerformanceItem } from '~/components/common/monitor/advanced/table/lib/models/interfaces'
3
-
4
- export const constructUsersAndGroupsTableItems = (
5
- items: UI_I_PerformanceItem[]
6
- ): UI_I_DataTableBody[] => {
7
- const result: UI_I_DataTableBody[] = []
8
-
9
- items.forEach((item: UI_I_PerformanceItem, key: number) => {
10
- result.push({
11
- row: key,
12
- data: [
13
- { col: 'col0', key: 'icon', text: '', data: { color: item.key } },
14
- { col: 'col1', key: 'zone', text: item.relatedDeviceName },
15
- { col: 'col2', text: item.description },
16
- { col: 'col3', text: item.units },
17
- { col: 'col4', text: String(item.maximum) },
18
- { col: 'col5', text: String(item.minimum) },
19
- { col: 'default-actions', key: 'default-actions', text: '', data: {} },
20
- ],
21
- })
22
- })
23
-
24
- return result
25
- }
1
+ import type { UI_I_DataTableBody } from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
2
+ import type { UI_I_PerformanceItem } from '~/components/common/monitor/advanced/table/lib/models/interfaces'
3
+
4
+ export const constructUsersAndGroupsTableItems = (
5
+ items: UI_I_PerformanceItem[]
6
+ ): UI_I_DataTableBody[] => {
7
+ const result: UI_I_DataTableBody[] = []
8
+
9
+ items.forEach((item: UI_I_PerformanceItem, key: number) => {
10
+ result.push({
11
+ row: key,
12
+ data: [
13
+ { col: 'col0', key: 'icon', text: '', data: { color: item.key } },
14
+ { col: 'col1', key: 'zone', text: item.relatedDeviceName },
15
+ { col: 'col2', text: item.description },
16
+ { col: 'col3', text: item.units },
17
+ { col: 'col4', text: String(item.maximum) },
18
+ { col: 'col5', text: String(item.minimum) },
19
+ { col: 'default-actions', key: 'default-actions', text: '', data: {} },
20
+ ],
21
+ })
22
+ })
23
+
24
+ return result
25
+ }