bfg-common 1.4.484 → 1.4.486
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/components/common/pages/home/widgets/services/Services.vue +1 -0
- package/components/common/pages/home/widgets/services/ServicesNew.vue +21 -6
- package/components/common/pages/home/widgets/services/ServicesOld.vue +1 -1
- package/components/common/pages/home/widgets/services/lib/config/config.ts +15 -21
- package/components/common/{home/servicesTable/ServicesTable.vue → pages/home/widgets/services/table/Table.vue} +1 -1
- package/components/common/pages/home/widgets/warnings/Warnings.vue +1 -0
- package/components/common/pages/home/widgets/warnings/WarningsNew.vue +25 -5
- package/components/common/pages/home/widgets/warnings/lib/config/config.ts +15 -21
- package/package.json +1 -1
- /package/components/common/{home/servicesTable → pages/home/widgets/services/table}/lib/config/config.ts +0 -0
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
<template v-if="props.loading">
|
|
4
4
|
<!-- skeleton -->
|
|
5
5
|
</template>
|
|
6
|
-
<div v-else>
|
|
6
|
+
<div v-else class="services-table">
|
|
7
|
+
<h1>{{ localization.home.services }}</h1>
|
|
8
|
+
|
|
7
9
|
<ui-data-table
|
|
8
|
-
test-id="
|
|
10
|
+
test-id="home-services-table-main"
|
|
9
11
|
:data="data"
|
|
10
12
|
:options="options"
|
|
11
13
|
:loading="props.loading"
|
|
12
14
|
server-off
|
|
13
|
-
class="resent-task-table"
|
|
14
15
|
>
|
|
15
16
|
<template #icon="{ item }">
|
|
16
17
|
<span class="flex-align-center">
|
|
@@ -36,6 +37,7 @@ import type {
|
|
|
36
37
|
UI_I_DataTableHeader,
|
|
37
38
|
UI_I_DataTableBody,
|
|
38
39
|
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
40
|
+
import type { UI_I_Service } from '~/components/common/home/lib/models/interfaces'
|
|
39
41
|
import {
|
|
40
42
|
options,
|
|
41
43
|
getHeaderDataFunc,
|
|
@@ -43,7 +45,7 @@ import {
|
|
|
43
45
|
} from '~/components/common/pages/home/widgets/services/lib/config/config'
|
|
44
46
|
|
|
45
47
|
const props = defineProps<{
|
|
46
|
-
|
|
48
|
+
services: UI_I_Service[]
|
|
47
49
|
loading: boolean
|
|
48
50
|
}>()
|
|
49
51
|
|
|
@@ -61,8 +63,8 @@ const resentTaskHeadItems = computed<UI_I_DataTableHeader[]>(() =>
|
|
|
61
63
|
|
|
62
64
|
const resentTaskBodyItems = ref<UI_I_DataTableBody[]>([])
|
|
63
65
|
watch(
|
|
64
|
-
() => props.
|
|
65
|
-
(newValue) => {
|
|
66
|
+
() => props.services,
|
|
67
|
+
(newValue: UI_I_Service[]) => {
|
|
66
68
|
if (!newValue?.length) return
|
|
67
69
|
|
|
68
70
|
resentTaskBodyItems.value = getBodyDataFunc(newValue, localization.value)
|
|
@@ -72,6 +74,19 @@ watch(
|
|
|
72
74
|
</script>
|
|
73
75
|
|
|
74
76
|
<style lang="scss" scoped>
|
|
77
|
+
.services-table {
|
|
78
|
+
:deep(.default-layout) {
|
|
79
|
+
box-shadow: none;
|
|
80
|
+
padding: 0;
|
|
81
|
+
}
|
|
82
|
+
& > h1 {
|
|
83
|
+
color: var(--widget-text-first);
|
|
84
|
+
font-size: 16px;
|
|
85
|
+
font-weight: 500;
|
|
86
|
+
line-height: 19.36px;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
75
90
|
.target-link {
|
|
76
91
|
font-family: Inter, serif;
|
|
77
92
|
font-size: 13px;
|
|
@@ -4,7 +4,6 @@ import type {
|
|
|
4
4
|
UI_I_DataTableOptions,
|
|
5
5
|
UI_I_DataTableHeader,
|
|
6
6
|
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
7
|
-
import type { UI_I_RecentTaskItem } from '~/lib/models/store/tasks/interfaces'
|
|
8
7
|
import { UI_E_RecentTaskStatus } from '~/lib/models/store/tasks/enums'
|
|
9
8
|
import { E_NodeIconsByState } from '~/lib/models/enums'
|
|
10
9
|
// import { E_TabsByType } from '~/components/templates/inventory/lib/models/enums'
|
|
@@ -12,63 +11,58 @@ import {
|
|
|
12
11
|
E_RTaskChipColor,
|
|
13
12
|
E_RTaskStatusIcon,
|
|
14
13
|
} from '~/components/common/pages/home/widgets/services/lib/models/enums'
|
|
15
|
-
import type { T_TypeNodes } from '~/lib/models/types'
|
|
16
14
|
|
|
17
15
|
export const getHeaderDataFunc = (
|
|
18
16
|
localization: UI_I_Localization
|
|
19
17
|
): UI_I_DataTableHeader[] => [
|
|
20
18
|
{
|
|
21
19
|
col: 0,
|
|
22
|
-
colName: '
|
|
23
|
-
text: localization.
|
|
20
|
+
colName: 'item',
|
|
21
|
+
text: localization.common.item,
|
|
24
22
|
isSortable: true,
|
|
25
23
|
sort: 'asc',
|
|
26
24
|
sortColumn: true,
|
|
27
|
-
width: '
|
|
25
|
+
width: '33.3%',
|
|
28
26
|
show: true,
|
|
29
27
|
filter: true,
|
|
30
28
|
},
|
|
31
29
|
{
|
|
32
30
|
col: 1,
|
|
33
|
-
colName: '
|
|
34
|
-
text: localization.common.
|
|
31
|
+
colName: 'alerts',
|
|
32
|
+
text: localization.common.alerts,
|
|
35
33
|
isSortable: true,
|
|
36
34
|
sort: 'asc',
|
|
37
|
-
width: '
|
|
35
|
+
width: '33.3%',
|
|
38
36
|
show: true,
|
|
39
37
|
filter: true,
|
|
40
38
|
},
|
|
41
39
|
{
|
|
42
40
|
col: 2,
|
|
43
|
-
colName: '
|
|
44
|
-
text: localization.common.
|
|
41
|
+
colName: 'warnings',
|
|
42
|
+
text: localization.common.warnings,
|
|
45
43
|
isSortable: true,
|
|
46
44
|
sort: 'asc',
|
|
47
|
-
width: '
|
|
45
|
+
width: '33.3%',
|
|
48
46
|
show: true,
|
|
49
47
|
filter: true,
|
|
50
48
|
},
|
|
51
49
|
]
|
|
52
50
|
|
|
53
51
|
export const options: UI_I_DataTableOptions = {
|
|
54
|
-
perPageOptions: [
|
|
55
|
-
{ text: '10', value: 10 },
|
|
56
|
-
{ text: '50', value: 50 },
|
|
57
|
-
{ text: '100', value: 100 },
|
|
58
|
-
],
|
|
52
|
+
perPageOptions: [],
|
|
59
53
|
isSelectable: false,
|
|
60
54
|
isFocusable: false,
|
|
61
|
-
showPagination:
|
|
62
|
-
showPageInfo:
|
|
55
|
+
showPagination: false,
|
|
56
|
+
showPageInfo: false,
|
|
63
57
|
isSortable: true,
|
|
64
58
|
server: false,
|
|
65
|
-
isResizable:
|
|
59
|
+
isResizable: false,
|
|
66
60
|
showSearch: false,
|
|
67
|
-
showColumnManager:
|
|
61
|
+
showColumnManager: false,
|
|
68
62
|
}
|
|
69
63
|
|
|
70
64
|
export const getBodyDataFunc = (
|
|
71
|
-
bodyData:
|
|
65
|
+
bodyData: any,
|
|
72
66
|
localization: UI_I_Localization
|
|
73
67
|
): UI_I_DataTableBody[] => {
|
|
74
68
|
return bodyData.map((task, index: number) => {
|
|
@@ -33,7 +33,7 @@ import type {
|
|
|
33
33
|
import type { UI_T_SelectedRow } from '~/components/atoms/table/dataGrid/lib/models/types'
|
|
34
34
|
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
35
35
|
import type { UI_I_Service } from '~/components/common/home/lib/models/interfaces'
|
|
36
|
-
import * as table from '~/components/common/home/
|
|
36
|
+
import * as table from '~/components/common/pages/home/widgets/services/table/lib/config/config'
|
|
37
37
|
|
|
38
38
|
const props = defineProps<{
|
|
39
39
|
dataTable: UI_I_Service[]
|
|
@@ -3,9 +3,14 @@
|
|
|
3
3
|
<template v-if="props.loading">
|
|
4
4
|
<!-- skeleton -->
|
|
5
5
|
</template>
|
|
6
|
-
<div v-else>
|
|
6
|
+
<div v-else class="warnings-table">
|
|
7
|
+
<div class="warnings-table__title">
|
|
8
|
+
<h1>{{ localization.home.objectsWithMostAlerts }}</h1>
|
|
9
|
+
<span>({{ props.alerts.length }})</span>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
7
12
|
<ui-data-table
|
|
8
|
-
test-id="
|
|
13
|
+
test-id="home-warnings-table-main"
|
|
9
14
|
:data="data"
|
|
10
15
|
:options="options"
|
|
11
16
|
:loading="props.loading"
|
|
@@ -36,6 +41,7 @@ import type {
|
|
|
36
41
|
UI_I_DataTableHeader,
|
|
37
42
|
UI_I_DataTableBody,
|
|
38
43
|
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
44
|
+
import type { UI_I_Alert } from '~/components/common/home/lib/models/interfaces'
|
|
39
45
|
import {
|
|
40
46
|
options,
|
|
41
47
|
getHeaderDataFunc,
|
|
@@ -43,6 +49,7 @@ import {
|
|
|
43
49
|
} from '~/components/common/pages/home/widgets/warnings/lib/config/config'
|
|
44
50
|
|
|
45
51
|
const props = defineProps<{
|
|
52
|
+
alerts: UI_I_Alert[]
|
|
46
53
|
loading: boolean
|
|
47
54
|
}>()
|
|
48
55
|
|
|
@@ -60,8 +67,8 @@ const resentTaskHeadItems = computed<UI_I_DataTableHeader[]>(() =>
|
|
|
60
67
|
|
|
61
68
|
const resentTaskBodyItems = ref<UI_I_DataTableBody[]>([])
|
|
62
69
|
watch(
|
|
63
|
-
() => props.
|
|
64
|
-
(newValue) => {
|
|
70
|
+
() => props.alerts,
|
|
71
|
+
(newValue: UI_I_Alert[]) => {
|
|
65
72
|
if (!newValue?.length) return
|
|
66
73
|
|
|
67
74
|
resentTaskBodyItems.value = getBodyDataFunc(newValue, localization.value)
|
|
@@ -70,4 +77,17 @@ watch(
|
|
|
70
77
|
)
|
|
71
78
|
</script>
|
|
72
79
|
|
|
73
|
-
<style lang="scss" scoped
|
|
80
|
+
<style lang="scss" scoped>
|
|
81
|
+
.warnings-table {
|
|
82
|
+
:deep(.default-layout) {
|
|
83
|
+
box-shadow: none;
|
|
84
|
+
padding: 0;
|
|
85
|
+
}
|
|
86
|
+
& > h1 {
|
|
87
|
+
color: var(--widget-text-first);
|
|
88
|
+
font-size: 16px;
|
|
89
|
+
font-weight: 500;
|
|
90
|
+
line-height: 19.36px;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
</style>
|
|
@@ -4,7 +4,6 @@ import type {
|
|
|
4
4
|
UI_I_DataTableOptions,
|
|
5
5
|
UI_I_DataTableHeader,
|
|
6
6
|
} from '~/node_modules/bfg-uikit/components/ui/dataTable/models/interfaces'
|
|
7
|
-
import type { UI_I_RecentTaskItem } from '~/lib/models/store/tasks/interfaces'
|
|
8
7
|
import { UI_E_RecentTaskStatus } from '~/lib/models/store/tasks/enums'
|
|
9
8
|
import { E_NodeIconsByState } from '~/lib/models/enums'
|
|
10
9
|
// import { E_TabsByType } from '~/components/templates/inventory/lib/models/enums'
|
|
@@ -12,63 +11,58 @@ import {
|
|
|
12
11
|
E_RTaskChipColor,
|
|
13
12
|
E_RTaskStatusIcon,
|
|
14
13
|
} from '~/components/common/pages/home/widgets/services/lib/models/enums'
|
|
15
|
-
import type { T_TypeNodes } from '~/lib/models/types'
|
|
16
14
|
|
|
17
15
|
export const getHeaderDataFunc = (
|
|
18
16
|
localization: UI_I_Localization
|
|
19
17
|
): UI_I_DataTableHeader[] => [
|
|
20
18
|
{
|
|
21
19
|
col: 0,
|
|
22
|
-
colName: '
|
|
23
|
-
text: localization.
|
|
20
|
+
colName: 'item',
|
|
21
|
+
text: localization.common.item,
|
|
24
22
|
isSortable: true,
|
|
25
23
|
sort: 'asc',
|
|
26
24
|
sortColumn: true,
|
|
27
|
-
width: '
|
|
25
|
+
width: '33.3%',
|
|
28
26
|
show: true,
|
|
29
27
|
filter: true,
|
|
30
28
|
},
|
|
31
29
|
{
|
|
32
30
|
col: 1,
|
|
33
|
-
colName: '
|
|
34
|
-
text: localization.common.
|
|
31
|
+
colName: 'status',
|
|
32
|
+
text: localization.common.status,
|
|
35
33
|
isSortable: true,
|
|
36
34
|
sort: 'asc',
|
|
37
|
-
width: '
|
|
35
|
+
width: '33.3%',
|
|
38
36
|
show: true,
|
|
39
37
|
filter: true,
|
|
40
38
|
},
|
|
41
39
|
{
|
|
42
40
|
col: 2,
|
|
43
|
-
colName: '
|
|
44
|
-
text: localization.common.
|
|
41
|
+
colName: 'version',
|
|
42
|
+
text: localization.common.version,
|
|
45
43
|
isSortable: true,
|
|
46
44
|
sort: 'asc',
|
|
47
|
-
width: '
|
|
45
|
+
width: '33.3%',
|
|
48
46
|
show: true,
|
|
49
47
|
filter: true,
|
|
50
48
|
},
|
|
51
49
|
]
|
|
52
50
|
|
|
53
51
|
export const options: UI_I_DataTableOptions = {
|
|
54
|
-
perPageOptions: [
|
|
55
|
-
{ text: '10', value: 10 },
|
|
56
|
-
{ text: '50', value: 50 },
|
|
57
|
-
{ text: '100', value: 100 },
|
|
58
|
-
],
|
|
52
|
+
perPageOptions: [],
|
|
59
53
|
isSelectable: false,
|
|
60
54
|
isFocusable: false,
|
|
61
|
-
showPagination:
|
|
62
|
-
showPageInfo:
|
|
55
|
+
showPagination: false,
|
|
56
|
+
showPageInfo: false,
|
|
63
57
|
isSortable: true,
|
|
64
58
|
server: false,
|
|
65
|
-
isResizable:
|
|
59
|
+
isResizable: false,
|
|
66
60
|
showSearch: false,
|
|
67
|
-
showColumnManager:
|
|
61
|
+
showColumnManager: false,
|
|
68
62
|
}
|
|
69
63
|
|
|
70
64
|
export const getBodyDataFunc = (
|
|
71
|
-
bodyData:
|
|
65
|
+
bodyData: any,
|
|
72
66
|
localization: UI_I_Localization
|
|
73
67
|
): UI_I_DataTableBody[] => {
|
|
74
68
|
return bodyData.map((task, index: number) => {
|
package/package.json
CHANGED
|
File without changes
|