bfg-common 1.5.674 → 1.5.675
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/layout/bottomPanel/BottomPanel.vue +84 -80
- package/components/common/layout/bottomPanel/New.vue +243 -239
- package/components/common/layout/bottomPanel/Old.vue +160 -154
- package/components/common/layout/bottomPanel/recentTasks/RecentTasks.vue +49 -43
- package/components/common/layout/bottomPanel/recentTasks/new/New.vue +430 -419
- package/components/common/layout/bottomPanel/recentTasks/old/Old.vue +277 -275
- package/package.json +1 -1
|
@@ -1,154 +1,160 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
:class="[
|
|
4
|
-
'bottom-panel flex flex-col h-full',
|
|
5
|
-
{ collapsed: props.panelCollapsedModel },
|
|
6
|
-
]"
|
|
7
|
-
>
|
|
8
|
-
<div class="flex">
|
|
9
|
-
<div class="bottom-panel__trigger">
|
|
10
|
-
<button
|
|
11
|
-
id="bottom-panel-trigger"
|
|
12
|
-
data-id="bottom-panel-toggle-button"
|
|
13
|
-
class="btn-trigger flex items-center"
|
|
14
|
-
@click="emits('collapse-panel')"
|
|
15
|
-
>
|
|
16
|
-
<atoms-the-icon class="trigger-icon" name="angle" />
|
|
17
|
-
</button>
|
|
18
|
-
</div>
|
|
19
|
-
<atoms-nav-bar
|
|
20
|
-
v-model="activeTabModel"
|
|
21
|
-
:items="props.tabList"
|
|
22
|
-
:class="[
|
|
23
|
-
'bottom-panel__tabs',
|
|
24
|
-
props.panelCollapsedModel && 'collapsed',
|
|
25
|
-
]"
|
|
26
|
-
test-id="bottom-panel-nav-bar"
|
|
27
|
-
@change="emits('change-tab')"
|
|
28
|
-
/>
|
|
29
|
-
</div>
|
|
30
|
-
<div
|
|
31
|
-
v-show="!props.panelCollapsedModel"
|
|
32
|
-
class="bottom-panel__table-wrapper overflow-hidden"
|
|
33
|
-
>
|
|
34
|
-
<common-layout-bottom-panel-recent-tasks
|
|
35
|
-
v-show="activeTabModel === 'recentTask'"
|
|
36
|
-
:
|
|
37
|
-
:
|
|
38
|
-
:total-
|
|
39
|
-
:
|
|
40
|
-
:
|
|
41
|
-
|
|
42
|
-
@
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
:
|
|
48
|
-
|
|
49
|
-
@
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
import type {
|
|
58
|
-
import type {
|
|
59
|
-
import type {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
import type {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
:
|
|
149
|
-
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="[
|
|
4
|
+
'bottom-panel flex flex-col h-full',
|
|
5
|
+
{ collapsed: props.panelCollapsedModel },
|
|
6
|
+
]"
|
|
7
|
+
>
|
|
8
|
+
<div class="flex">
|
|
9
|
+
<div class="bottom-panel__trigger">
|
|
10
|
+
<button
|
|
11
|
+
id="bottom-panel-trigger"
|
|
12
|
+
data-id="bottom-panel-toggle-button"
|
|
13
|
+
class="btn-trigger flex items-center"
|
|
14
|
+
@click="emits('collapse-panel')"
|
|
15
|
+
>
|
|
16
|
+
<atoms-the-icon class="trigger-icon" name="angle" />
|
|
17
|
+
</button>
|
|
18
|
+
</div>
|
|
19
|
+
<atoms-nav-bar
|
|
20
|
+
v-model="activeTabModel"
|
|
21
|
+
:items="props.tabList"
|
|
22
|
+
:class="[
|
|
23
|
+
'bottom-panel__tabs',
|
|
24
|
+
props.panelCollapsedModel && 'collapsed',
|
|
25
|
+
]"
|
|
26
|
+
test-id="bottom-panel-nav-bar"
|
|
27
|
+
@change="emits('change-tab')"
|
|
28
|
+
/>
|
|
29
|
+
</div>
|
|
30
|
+
<div
|
|
31
|
+
v-show="!props.panelCollapsedModel"
|
|
32
|
+
class="bottom-panel__table-wrapper overflow-hidden"
|
|
33
|
+
>
|
|
34
|
+
<common-layout-bottom-panel-recent-tasks
|
|
35
|
+
v-show="activeTabModel === 'recentTask'"
|
|
36
|
+
v-model:status-filter="statusFilter"
|
|
37
|
+
:data-table="props.dataTableRecentTasks"
|
|
38
|
+
:total-items="props.totalItemsRecentTasks"
|
|
39
|
+
:total-pages="props.totalPagesRecentTasks"
|
|
40
|
+
:pagination="props.paginationRecentTasks"
|
|
41
|
+
:loading="props.loadingRecentTasks"
|
|
42
|
+
@sort="emits('sort-recent-task', $event)"
|
|
43
|
+
@pagination="emits('pagination-recent-task', $event)"
|
|
44
|
+
/>
|
|
45
|
+
<common-layout-bottom-panel-alarms
|
|
46
|
+
v-show="activeTabModel === 'alarms'"
|
|
47
|
+
:data-table="props.dataTableAlarms"
|
|
48
|
+
:is-loading="props.loadingAlarms"
|
|
49
|
+
@pause-global-refresh="emits('pause-global-refresh-alarms')"
|
|
50
|
+
@get-alarms="emits('get-alarms', $event)"
|
|
51
|
+
/>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
<script setup lang="ts">
|
|
57
|
+
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
58
|
+
import type { UI_I_RecentTaskItem } from '~/lib/models/store/tasks/interfaces'
|
|
59
|
+
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
60
|
+
import type {
|
|
61
|
+
UI_I_Alarm,
|
|
62
|
+
UI_I_AlarmPayload,
|
|
63
|
+
} from '~/components/common/layout/bottomPanel/alarms/lib/models/interfaces'
|
|
64
|
+
import type { UI_T_NodeType } from '~/components/common/pages/home/lib/models/types'
|
|
65
|
+
import type { UI_T_BottomPanelTabType } from '~/components/common/layout/bottomPanel/lib/models/types'
|
|
66
|
+
import type { UI_T_SelectedStatus } from '~/components/common/layout/bottomPanel/recentTasks/old/lib/models/types'
|
|
67
|
+
|
|
68
|
+
const statusFilter = defineModel<UI_T_SelectedStatus>('statusFilter', {
|
|
69
|
+
required: true,
|
|
70
|
+
})
|
|
71
|
+
|
|
72
|
+
const activeTabModel = defineModel<UI_T_BottomPanelTabType>('selectedTab', {
|
|
73
|
+
required: true,
|
|
74
|
+
})
|
|
75
|
+
|
|
76
|
+
const props = defineProps<{
|
|
77
|
+
panelCollapsedModel: boolean
|
|
78
|
+
tabList: UI_I_CollapseNavItem[]
|
|
79
|
+
dataTableRecentTasks: UI_I_RecentTaskItem<UI_T_NodeType>[]
|
|
80
|
+
totalItemsRecentTasks: number
|
|
81
|
+
totalPagesRecentTasks: number
|
|
82
|
+
paginationRecentTasks: UI_I_Pagination
|
|
83
|
+
loadingRecentTasks: boolean
|
|
84
|
+
dataTableAlarms: UI_I_Alarm | null
|
|
85
|
+
loadingAlarms: boolean
|
|
86
|
+
}>()
|
|
87
|
+
|
|
88
|
+
const emits = defineEmits<{
|
|
89
|
+
(event: 'collapse-panel'): void
|
|
90
|
+
(event: 'change-tab'): void
|
|
91
|
+
(event: 'sort-recent-task', value: string): void
|
|
92
|
+
(event: 'pagination-recent-task', value: UI_I_Pagination | null): void
|
|
93
|
+
(event: 'pause-global-refresh-alarms'): void
|
|
94
|
+
(event: 'get-alarms', value: UI_I_AlarmPayload): void
|
|
95
|
+
}>()
|
|
96
|
+
</script>
|
|
97
|
+
|
|
98
|
+
<style scoped lang="scss">
|
|
99
|
+
@import '~/assets/scss/common/mixins';
|
|
100
|
+
.bottom-panel {
|
|
101
|
+
background-color: var(--pannel-bg-color);
|
|
102
|
+
& > div:first-child {
|
|
103
|
+
height: 36px;
|
|
104
|
+
}
|
|
105
|
+
&__table-wrapper {
|
|
106
|
+
height: inherit;
|
|
107
|
+
:deep(.datagrid-outer-wrapper) {
|
|
108
|
+
padding-top: 0;
|
|
109
|
+
.datagrid {
|
|
110
|
+
border-radius: 0;
|
|
111
|
+
margin-top: 0;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
&__tabs {
|
|
116
|
+
&.collapsed {
|
|
117
|
+
:deep(button.nav-link) {
|
|
118
|
+
box-shadow: none;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
&.collapsed {
|
|
124
|
+
.btn-trigger {
|
|
125
|
+
.trigger-icon {
|
|
126
|
+
transform: rotate(0deg);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
.btn-trigger {
|
|
131
|
+
height: 31px;
|
|
132
|
+
border: 0;
|
|
133
|
+
outline: none;
|
|
134
|
+
background-color: transparent;
|
|
135
|
+
padding-left: 15px;
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
.trigger-icon {
|
|
138
|
+
width: 16px;
|
|
139
|
+
height: 16px;
|
|
140
|
+
fill: var(--triger-icon-color);
|
|
141
|
+
transform: rotate(180deg);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
&__trigger {
|
|
145
|
+
padding-right: 15px;
|
|
146
|
+
margin-right: 15px;
|
|
147
|
+
border-right: 0.05rem solid #ccc;
|
|
148
|
+
box-shadow: inset 0 -0.05rem 0 var(--nav-panel-border-color);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
</style>
|
|
152
|
+
|
|
153
|
+
<style>
|
|
154
|
+
:root {
|
|
155
|
+
--pannel-bg-color: #fafafa;
|
|
156
|
+
}
|
|
157
|
+
:root.dark-theme {
|
|
158
|
+
--pannel-bg-color: #1b2a32;
|
|
159
|
+
}
|
|
160
|
+
</style>
|
|
@@ -1,43 +1,49 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<component
|
|
3
|
-
:is="currentComponent"
|
|
4
|
-
:
|
|
5
|
-
:
|
|
6
|
-
:total-
|
|
7
|
-
:
|
|
8
|
-
:
|
|
9
|
-
|
|
10
|
-
@
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import type {
|
|
17
|
-
import type {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="currentComponent"
|
|
4
|
+
v-model:status-filter="statusFilter"
|
|
5
|
+
:data-table="props.dataTable"
|
|
6
|
+
:total-items="props.totalItems"
|
|
7
|
+
:total-pages="props.totalPages"
|
|
8
|
+
:pagination="props.pagination"
|
|
9
|
+
:loading="props.loading"
|
|
10
|
+
@pagination="emits('pagination', $event)"
|
|
11
|
+
@sort="emits('sort', $event)"
|
|
12
|
+
/>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
import type { UI_I_RecentTaskItem } from '~/lib/models/store/tasks/interfaces'
|
|
17
|
+
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
18
|
+
import type { UI_T_NodeType } from '~/components/common/pages/home/lib/models/types'
|
|
19
|
+
import type { UI_T_SelectedStatus } from '~/components/common/layout/bottomPanel/recentTasks/old/lib/models/types'
|
|
20
|
+
|
|
21
|
+
const statusFilter = defineModel<UI_T_SelectedStatus>('statusFilter', {
|
|
22
|
+
required: true,
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
const props = defineProps<{
|
|
26
|
+
dataTable: UI_I_RecentTaskItem<UI_T_NodeType>[]
|
|
27
|
+
totalItems: number
|
|
28
|
+
totalPages: number
|
|
29
|
+
pagination: UI_I_Pagination
|
|
30
|
+
loading: boolean
|
|
31
|
+
}>()
|
|
32
|
+
|
|
33
|
+
const emits = defineEmits<{
|
|
34
|
+
(event: 'pagination', value: UI_I_Pagination | null): void
|
|
35
|
+
(event: 'sort', value: string): void
|
|
36
|
+
}>()
|
|
37
|
+
|
|
38
|
+
const { $store }: any = useNuxtApp()
|
|
39
|
+
|
|
40
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
41
|
+
|
|
42
|
+
const currentComponent = computed(() =>
|
|
43
|
+
isNewView.value
|
|
44
|
+
? defineAsyncComponent(() => import('./new/New.vue'))
|
|
45
|
+
: defineAsyncComponent(() => import('./old/Old.vue'))
|
|
46
|
+
)
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<style scoped lang="scss"></style>
|