bfg-common 1.4.839 → 1.4.841
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.
- package/assets/localization/local_be.json +17 -4
- package/assets/localization/local_en.json +17 -4
- package/assets/localization/local_hy.json +17 -4
- package/assets/localization/local_kk.json +17 -4
- package/assets/localization/local_ru.json +18 -5
- package/assets/localization/local_zh.json +17 -4
- package/components/atoms/collapse/CollapseNav.vue +4 -4
- package/components/atoms/dropdown/dropdown/Dropdown.vue +12 -0
- package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +2 -2
- package/components/atoms/table/dataGrid/lib/utils/export.ts +1 -1
- package/components/common/graph/GraphNew.vue +176 -176
- package/components/common/modals/confirmByInput/ConfirmByInput.vue +57 -177
- package/components/common/modals/confirmByInput/ConfirmByInputNew.vue +103 -0
- package/components/common/modals/confirmByInput/ConfirmByInputOld.vue +204 -0
- package/components/common/monitor/advanced/Advanced.vue +196 -170
- package/components/common/monitor/advanced/AdvancedNew.vue +181 -206
- package/components/common/monitor/advanced/AdvancedOld.vue +12 -40
- package/components/common/monitor/advanced/graphView/GraphView.vue +181 -170
- package/components/common/monitor/advanced/graphView/GraphViewNew.vue +35 -35
- package/components/common/monitor/advanced/graphView/GraphViewOld.vue +56 -56
- package/components/common/monitor/advanced/table/Table.vue +31 -31
- package/components/common/monitor/advanced/table/tableNew/TableNew.vue +85 -85
- package/components/common/monitor/advanced/table/tableNew/lib/config/options.ts +139 -139
- package/components/common/monitor/advanced/table/tableNew/lib/utils/constructBody.ts +27 -27
- package/components/common/monitor/advanced/tools/Tools.vue +304 -163
- package/components/common/monitor/advanced/tools/ToolsNew.vue +220 -366
- package/components/common/monitor/advanced/tools/ToolsOld.vue +29 -165
- package/components/common/pages/tasks/Tasks.vue +3 -1
- package/components/common/pages/tasks/table/Table.vue +1 -0
- package/components/common/pages/tasks/table/errorInfo/ErrorInfo.vue +23 -7
- package/components/common/pages/tasks/table/expandDetails/ExpandDetails.vue +1 -0
- package/components/common/pages/tasks/table/lib/config/config.ts +2 -2
- package/components/common/portlets/customAttributes/Portlet.vue +9 -2
- package/components/common/portlets/customAttributes/lib/config/config.ts +7 -0
- package/components/common/portlets/tag/Portlet.vue +9 -2
- package/components/common/portlets/tag/lib/config/config.ts +7 -0
- package/components/common/tools/Actions.vue +5 -2
- package/lib/config/uiTable.ts +20 -20
- package/lib/models/store/interfaces.ts +1 -0
- package/package.json +2 -2
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="advanced-main-table">
|
|
3
|
-
<ui-data-table
|
|
4
|
-
test-id="advanced-table"
|
|
5
|
-
:data="data"
|
|
6
|
-
:options="options"
|
|
7
|
-
:loading="props.loading"
|
|
8
|
-
:texts="tableTexts"
|
|
9
|
-
@select-row="onSelectRow"
|
|
10
|
-
>
|
|
11
|
-
<template #icon="{ item }">
|
|
12
|
-
<div
|
|
13
|
-
class="color-circle"
|
|
14
|
-
:style="{ backgroundColor: item.data.color }"
|
|
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
|
-
</ui-data-table>
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<script setup lang="ts">
|
|
28
|
-
import type {
|
|
29
|
-
UI_I_DataTable,
|
|
30
|
-
UI_I_DataTableOptions,
|
|
31
|
-
UI_I_DataTableBody,
|
|
32
|
-
UI_I_TableTexts,
|
|
33
|
-
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
34
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
35
|
-
import type { UI_I_PerformanceItem } from '~/components/common/monitor/advanced/table/lib/models/interfaces'
|
|
36
|
-
import {
|
|
37
|
-
bodyOptions,
|
|
38
|
-
headOptions,
|
|
39
|
-
} from '~/components/common/monitor/advanced/table/tableNew/lib/config/options'
|
|
40
|
-
import { tableTextsFunc } from '~/lib/config/uiTable'
|
|
41
|
-
|
|
42
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
43
|
-
|
|
44
|
-
const props = defineProps<{
|
|
45
|
-
loading: boolean
|
|
46
|
-
items: UI_I_PerformanceItem[]
|
|
47
|
-
}>()
|
|
48
|
-
const emits = defineEmits<{
|
|
49
|
-
(event: 'select', str: number[]): void
|
|
50
|
-
}>()
|
|
51
|
-
|
|
52
|
-
const data = computed<UI_I_DataTable>(() =>
|
|
53
|
-
bodyOptions(localization.value, props.items)
|
|
54
|
-
)
|
|
55
|
-
|
|
56
|
-
const options = computed<UI_I_DataTableOptions>(() => headOptions())
|
|
57
|
-
|
|
58
|
-
const onSelectRow = (data: UI_I_DataTableBody[]): void => {
|
|
59
|
-
emits(
|
|
60
|
-
'select',
|
|
61
|
-
data.map((item) => item.row)
|
|
62
|
-
)
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const tableTexts = computed<UI_I_TableTexts>(() =>
|
|
66
|
-
tableTextsFunc(localization.value)
|
|
67
|
-
)
|
|
68
|
-
</script>
|
|
69
|
-
|
|
70
|
-
<style scoped lang="scss">
|
|
71
|
-
.advanced-main-table {
|
|
72
|
-
margin: 12px 6px 0 6px;
|
|
73
|
-
|
|
74
|
-
.color-circle {
|
|
75
|
-
width: 18px;
|
|
76
|
-
height: 18px;
|
|
77
|
-
border-radius: 32px;
|
|
78
|
-
}
|
|
79
|
-
.zone-item-block {
|
|
80
|
-
display: flex;
|
|
81
|
-
align-items: center;
|
|
82
|
-
column-gap: 4px;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="advanced-main-table">
|
|
3
|
+
<ui-data-table
|
|
4
|
+
test-id="advanced-table"
|
|
5
|
+
:data="data"
|
|
6
|
+
:options="options"
|
|
7
|
+
:loading="props.loading"
|
|
8
|
+
:texts="tableTexts"
|
|
9
|
+
@select-row="onSelectRow"
|
|
10
|
+
>
|
|
11
|
+
<template #icon="{ item }">
|
|
12
|
+
<div
|
|
13
|
+
class="color-circle"
|
|
14
|
+
:style="{ backgroundColor: item.data.color }"
|
|
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
|
+
</ui-data-table>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
import type {
|
|
29
|
+
UI_I_DataTable,
|
|
30
|
+
UI_I_DataTableOptions,
|
|
31
|
+
UI_I_DataTableBody,
|
|
32
|
+
UI_I_TableTexts,
|
|
33
|
+
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
34
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
35
|
+
import type { UI_I_PerformanceItem } from '~/components/common/monitor/advanced/table/lib/models/interfaces'
|
|
36
|
+
import {
|
|
37
|
+
bodyOptions,
|
|
38
|
+
headOptions,
|
|
39
|
+
} from '~/components/common/monitor/advanced/table/tableNew/lib/config/options'
|
|
40
|
+
import { tableTextsFunc } from '~/lib/config/uiTable'
|
|
41
|
+
|
|
42
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
43
|
+
|
|
44
|
+
const props = defineProps<{
|
|
45
|
+
loading: boolean
|
|
46
|
+
items: UI_I_PerformanceItem[]
|
|
47
|
+
}>()
|
|
48
|
+
const emits = defineEmits<{
|
|
49
|
+
(event: 'select', str: number[]): void
|
|
50
|
+
}>()
|
|
51
|
+
|
|
52
|
+
const data = computed<UI_I_DataTable>(() =>
|
|
53
|
+
bodyOptions(localization.value, props.items)
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
const options = computed<UI_I_DataTableOptions>(() => headOptions())
|
|
57
|
+
|
|
58
|
+
const onSelectRow = (data: UI_I_DataTableBody[]): void => {
|
|
59
|
+
emits(
|
|
60
|
+
'select',
|
|
61
|
+
data.map((item) => item.row)
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const tableTexts = computed<UI_I_TableTexts>(() =>
|
|
66
|
+
tableTextsFunc(localization.value)
|
|
67
|
+
)
|
|
68
|
+
</script>
|
|
69
|
+
|
|
70
|
+
<style scoped lang="scss">
|
|
71
|
+
.advanced-main-table {
|
|
72
|
+
margin: 12px 6px 0 6px;
|
|
73
|
+
|
|
74
|
+
.color-circle {
|
|
75
|
+
width: 18px;
|
|
76
|
+
height: 18px;
|
|
77
|
+
border-radius: 32px;
|
|
78
|
+
}
|
|
79
|
+
.zone-item-block {
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
column-gap: 4px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
</style>
|
|
@@ -1,139 +1,139 @@
|
|
|
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: 'find-user-or-group-modal-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.common.key,
|
|
23
|
-
width: '150px',
|
|
24
|
-
isSortable: false,
|
|
25
|
-
sort: 'asc',
|
|
26
|
-
show: true,
|
|
27
|
-
filter: false,
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
col: 'col1',
|
|
31
|
-
colName: 'object',
|
|
32
|
-
text: localization.common.object,
|
|
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.common.measurement,
|
|
43
|
-
width: '150px',
|
|
44
|
-
isSortable: true,
|
|
45
|
-
sort: 'asc',
|
|
46
|
-
show: true,
|
|
47
|
-
filter: true,
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
col: 'col3',
|
|
51
|
-
colName: 'rollup',
|
|
52
|
-
text: localization.common.rollup,
|
|
53
|
-
width: '150px',
|
|
54
|
-
isSortable: true,
|
|
55
|
-
sort: 'asc',
|
|
56
|
-
show: true,
|
|
57
|
-
filter: true,
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
col: 'col4',
|
|
61
|
-
colName: 'units',
|
|
62
|
-
text: localization.common.units,
|
|
63
|
-
width: '150px',
|
|
64
|
-
isSortable: true,
|
|
65
|
-
sort: 'asc',
|
|
66
|
-
show: true,
|
|
67
|
-
filter: true,
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
col: 'col5',
|
|
71
|
-
colName: 'latest',
|
|
72
|
-
text: localization.common.latest,
|
|
73
|
-
width: '150px',
|
|
74
|
-
isSortable: true,
|
|
75
|
-
sort: 'asc',
|
|
76
|
-
show: true,
|
|
77
|
-
filter: true,
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
col: 'col6',
|
|
81
|
-
colName: 'maximum',
|
|
82
|
-
text: localization.common.maximum,
|
|
83
|
-
width: '150px',
|
|
84
|
-
isSortable: true,
|
|
85
|
-
sort: 'asc',
|
|
86
|
-
show: true,
|
|
87
|
-
filter: true,
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
col: 'col7',
|
|
91
|
-
colName: 'minimum',
|
|
92
|
-
text: localization.common.minimum,
|
|
93
|
-
width: '150px',
|
|
94
|
-
isSortable: true,
|
|
95
|
-
sort: 'asc',
|
|
96
|
-
show: true,
|
|
97
|
-
filter: true,
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
col: 'col8',
|
|
101
|
-
colName: 'average',
|
|
102
|
-
text: localization.common.average,
|
|
103
|
-
width: '150px',
|
|
104
|
-
isSortable: true,
|
|
105
|
-
sort: 'asc',
|
|
106
|
-
show: true,
|
|
107
|
-
filter: true,
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
col: 'col9',
|
|
111
|
-
colName: 'default-actions',
|
|
112
|
-
text: '',
|
|
113
|
-
show: true,
|
|
114
|
-
},
|
|
115
|
-
],
|
|
116
|
-
|
|
117
|
-
body: currentBody,
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export const headOptions = (): UI_I_DataTableOptions => {
|
|
122
|
-
return {
|
|
123
|
-
selectType: 'checkbox',
|
|
124
|
-
perPageOptions: [
|
|
125
|
-
{ text: '20', value: 20, default: true },
|
|
126
|
-
{ text: '50', value: 50 },
|
|
127
|
-
{ text: '100', value: 100 },
|
|
128
|
-
],
|
|
129
|
-
inBlock: true,
|
|
130
|
-
isSelectable: true,
|
|
131
|
-
showPagination: false,
|
|
132
|
-
showPageInfo: false,
|
|
133
|
-
isSortable: true,
|
|
134
|
-
server: false,
|
|
135
|
-
isResizable: true,
|
|
136
|
-
showSearch: false,
|
|
137
|
-
showColumnManager: true,
|
|
138
|
-
}
|
|
139
|
-
}
|
|
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: 'find-user-or-group-modal-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.common.key,
|
|
23
|
+
width: '150px',
|
|
24
|
+
isSortable: false,
|
|
25
|
+
sort: 'asc',
|
|
26
|
+
show: true,
|
|
27
|
+
filter: false,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
col: 'col1',
|
|
31
|
+
colName: 'object',
|
|
32
|
+
text: localization.common.object,
|
|
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.common.measurement,
|
|
43
|
+
width: '150px',
|
|
44
|
+
isSortable: true,
|
|
45
|
+
sort: 'asc',
|
|
46
|
+
show: true,
|
|
47
|
+
filter: true,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
col: 'col3',
|
|
51
|
+
colName: 'rollup',
|
|
52
|
+
text: localization.common.rollup,
|
|
53
|
+
width: '150px',
|
|
54
|
+
isSortable: true,
|
|
55
|
+
sort: 'asc',
|
|
56
|
+
show: true,
|
|
57
|
+
filter: true,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
col: 'col4',
|
|
61
|
+
colName: 'units',
|
|
62
|
+
text: localization.common.units,
|
|
63
|
+
width: '150px',
|
|
64
|
+
isSortable: true,
|
|
65
|
+
sort: 'asc',
|
|
66
|
+
show: true,
|
|
67
|
+
filter: true,
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
col: 'col5',
|
|
71
|
+
colName: 'latest',
|
|
72
|
+
text: localization.common.latest,
|
|
73
|
+
width: '150px',
|
|
74
|
+
isSortable: true,
|
|
75
|
+
sort: 'asc',
|
|
76
|
+
show: true,
|
|
77
|
+
filter: true,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
col: 'col6',
|
|
81
|
+
colName: 'maximum',
|
|
82
|
+
text: localization.common.maximum,
|
|
83
|
+
width: '150px',
|
|
84
|
+
isSortable: true,
|
|
85
|
+
sort: 'asc',
|
|
86
|
+
show: true,
|
|
87
|
+
filter: true,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
col: 'col7',
|
|
91
|
+
colName: 'minimum',
|
|
92
|
+
text: localization.common.minimum,
|
|
93
|
+
width: '150px',
|
|
94
|
+
isSortable: true,
|
|
95
|
+
sort: 'asc',
|
|
96
|
+
show: true,
|
|
97
|
+
filter: true,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
col: 'col8',
|
|
101
|
+
colName: 'average',
|
|
102
|
+
text: localization.common.average,
|
|
103
|
+
width: '150px',
|
|
104
|
+
isSortable: true,
|
|
105
|
+
sort: 'asc',
|
|
106
|
+
show: true,
|
|
107
|
+
filter: true,
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
col: 'col9',
|
|
111
|
+
colName: 'default-actions',
|
|
112
|
+
text: '',
|
|
113
|
+
show: true,
|
|
114
|
+
},
|
|
115
|
+
],
|
|
116
|
+
|
|
117
|
+
body: currentBody,
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export const headOptions = (): UI_I_DataTableOptions => {
|
|
122
|
+
return {
|
|
123
|
+
selectType: 'checkbox',
|
|
124
|
+
perPageOptions: [
|
|
125
|
+
{ text: '20', value: 20, default: true },
|
|
126
|
+
{ text: '50', value: 50 },
|
|
127
|
+
{ text: '100', value: 100 },
|
|
128
|
+
],
|
|
129
|
+
inBlock: true,
|
|
130
|
+
isSelectable: true,
|
|
131
|
+
showPagination: false,
|
|
132
|
+
showPageInfo: false,
|
|
133
|
+
isSortable: true,
|
|
134
|
+
server: false,
|
|
135
|
+
isResizable: true,
|
|
136
|
+
showSearch: false,
|
|
137
|
+
showColumnManager: true,
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -1,27 +1,27 @@
|
|
|
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.measurement },
|
|
16
|
-
{ col: 'col3', text: item.rollupType },
|
|
17
|
-
{ col: 'col4', text: item.units },
|
|
18
|
-
{ col: 'col5', text: String(item.latest) },
|
|
19
|
-
{ col: 'col6', text: String(item.maximum) },
|
|
20
|
-
{ col: 'col7', text: String(item.minimum) },
|
|
21
|
-
{ col: 'col8', text: String(item.average) },
|
|
22
|
-
],
|
|
23
|
-
})
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
return result
|
|
27
|
-
}
|
|
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.measurement },
|
|
16
|
+
{ col: 'col3', text: item.rollupType },
|
|
17
|
+
{ col: 'col4', text: item.units },
|
|
18
|
+
{ col: 'col5', text: String(item.latest) },
|
|
19
|
+
{ col: 'col6', text: String(item.maximum) },
|
|
20
|
+
{ col: 'col7', text: String(item.minimum) },
|
|
21
|
+
{ col: 'col8', text: String(item.average) },
|
|
22
|
+
],
|
|
23
|
+
})
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
return result
|
|
27
|
+
}
|