bfg-common 1.5.673 → 1.5.674
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/CODE_STYLE.md +109 -109
- package/assets/img/icons/icons-sprite-dark-3.svg +227 -227
- package/assets/img/icons/icons-sprite-dark-5.svg +488 -488
- package/assets/img/icons/icons-sprite-light-3.svg +227 -227
- package/assets/img/icons/icons-sprite-light-5.svg +488 -488
- package/components/atoms/TheIcon3.vue +50 -50
- package/components/atoms/collapse/CollapseNav.vue +170 -170
- package/components/atoms/perPage/PerPage.vue +58 -58
- package/components/atoms/table/dataGrid/DataGrid.vue +1718 -1718
- package/components/atoms/table/dataGrid/DataGridPagination.vue +97 -97
- package/components/atoms/table/dataGrid/lib/config/settingsTable.ts +94 -94
- package/components/atoms/table/dataGrid/lib/utils/export.ts +16 -16
- package/components/common/backup/storage/actions/add/lib/utils.ts +51 -51
- package/components/common/browse/blocks/contents/filesNew/Skeleton.vue +18 -18
- package/components/common/diagramMain/modals/lib/config/vCenterModal.ts +48 -48
- package/components/common/diagramMain/port/Port.vue +580 -580
- package/components/common/layout/bottomPanel/BottomPanel.vue +80 -0
- package/components/common/layout/bottomPanel/New.vue +239 -0
- package/components/common/layout/bottomPanel/Old.vue +154 -0
- package/components/common/layout/bottomPanel/alarms/Alarms.vue +76 -0
- package/components/common/layout/bottomPanel/alarms/lib/models/interfaces.ts +23 -0
- package/components/common/layout/bottomPanel/alarms/new/New.vue +212 -0
- package/components/common/layout/bottomPanel/alarms/new/lib/config/config.ts +193 -0
- package/components/common/layout/bottomPanel/alarms/new/lib/models/enums.ts +10 -0
- package/components/common/layout/bottomPanel/alarms/new/lib/models/interfaces.ts +12 -0
- package/components/common/layout/bottomPanel/alarms/old/Old.vue +191 -0
- package/components/common/layout/bottomPanel/alarms/old/lib/config/alarmTables.ts +89 -0
- package/components/common/layout/bottomPanel/alarms/old/lib/config/tableKeys.ts +11 -0
- package/components/common/layout/bottomPanel/alarms/old/lib/models/types.ts +8 -0
- package/components/common/layout/bottomPanel/lib/config/statusFilter.ts +19 -0
- package/components/common/layout/bottomPanel/lib/models/types.ts +1 -0
- package/components/common/layout/bottomPanel/recentTasks/RecentTasks.vue +43 -0
- package/components/common/layout/bottomPanel/recentTasks/lib/models/interfaces.ts +14 -0
- package/components/common/layout/bottomPanel/recentTasks/new/New.vue +419 -0
- package/components/common/layout/bottomPanel/recentTasks/new/lib/config/config.ts +259 -0
- package/components/common/layout/bottomPanel/recentTasks/old/Old.vue +275 -0
- package/components/common/layout/bottomPanel/recentTasks/old/lib/config/recentTaskTable.ts +240 -0
- package/components/common/layout/bottomPanel/recentTasks/old/lib/config/tableKeys.ts +15 -0
- package/components/common/layout/bottomPanel/recentTasks/old/lib/models/types.ts +14 -0
- package/components/common/layout/theHeader/TheHeaderNew.vue +315 -315
- package/components/common/layout/theHeader/TheHeaderOld.vue +262 -262
- package/components/common/layout/theHeader/helpMenu/About.vue +79 -79
- package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +79 -79
- package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePassword.vue +93 -93
- package/components/common/layout/theHeader/userMenu/modals/changePassword/New.vue +193 -193
- package/components/common/layout/theHeader/userMenu/modals/preferences/PreferencesOld.vue +144 -144
- package/components/common/layout/theHeader/userMenu/modals/preferences/lib/models/types.ts +7 -7
- package/components/common/layout/theHeader/userMenu/modals/preferences/security/Old.vue +216 -216
- package/components/common/layout/theHeader/userMenu/modals/preferences/security/Security.vue +31 -31
- package/components/common/pages/backups/DetailView.vue +52 -52
- package/components/common/pages/backups/lib/models/interfaces.ts +36 -36
- package/components/common/pages/backups/modals/Modals.vue +243 -243
- package/components/common/pages/backups/modals/createBackup/configuration/maxBandwidth/lib/config/options.ts +6 -6
- package/components/common/pages/backups/modals/createBackup/lib/config/readyToCompleteOptions.ts +69 -69
- package/components/common/pages/backups/modals/lib/config/restore.ts +115 -115
- package/components/common/pages/backups/modals/lib/models/interfaces.ts +186 -186
- package/components/common/pages/backups/modals/restore/name/lib/models/interfaces.ts +6 -6
- package/components/common/pages/home/lib/models/interfaces.ts +48 -48
- package/components/common/pages/home/widgets/hosts/Hosts.vue +27 -27
- package/components/common/pages/home/widgets/hosts/lib/config/items.ts +23 -23
- package/components/common/pages/home/widgets/vms/VmsOld.vue +35 -35
- package/components/common/pages/home/widgets/vms/lib/config/items.ts +19 -19
- package/components/common/pages/scheduledTasks/lib/utils/utils.ts +84 -84
- package/components/common/qr/Qr.vue +57 -57
- package/components/common/readyToComplete/ReadyToComplete.vue +17 -17
- package/components/common/select/radio/RadioGroup.vue +137 -137
- package/components/common/spiceConsole/Drawer.vue +420 -420
- package/components/common/spiceConsole/SpiceConsole.vue +184 -184
- package/components/common/spiceConsole/lib/models/interfaces.ts +5 -5
- package/components/common/tools/Actions.vue +207 -207
- package/components/common/treeView/TreeView.vue +52 -52
- package/components/common/vm/actions/clone/lib/config/steps.ts +295 -295
- package/components/common/vm/actions/clone/new/New.vue +438 -438
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +698 -698
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/shares/lib/config/options.ts +28 -28
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +283 -283
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +489 -489
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +156 -156
- package/components/common/vm/actions/common/select/compatibility/Old.vue +107 -107
- package/components/common/vm/actions/common/select/createType/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/options/New.vue +264 -264
- package/components/common/vm/actions/common/select/options/Old.vue +110 -110
- package/components/common/vm/actions/common/select/options/Options.vue +58 -58
- package/components/common/vm/actions/common/select/storage/Old.vue +125 -125
- package/components/common/vm/actions/common/select/storage/new/New.vue +311 -311
- package/components/common/vm/actions/common/select/storage/new/lib/models/interfaces.ts +5 -5
- package/components/common/vm/actions/common/select/storage/new/lib/utils/utils.ts +21 -21
- package/components/common/vm/actions/common/select/template/old/Old.vue +50 -50
- package/components/common/vm/actions/editSettings/new/Skeleton.vue +88 -88
- package/components/common/wizards/common/compatibility/Compatibility.vue +35 -35
- package/components/common/wizards/common/compatibility/New.vue +99 -99
- package/components/common/wizards/common/compatibility/Old.vue +53 -53
- package/components/common/wizards/common/steps/computeResource/New.vue +93 -93
- package/components/common/wizards/common/steps/name/Name.vue +178 -178
- package/components/common/wizards/common/steps/name/New.vue +221 -221
- package/components/common/wizards/common/steps/name/Old.vue +121 -121
- package/components/common/wizards/common/steps/name/lib/models/interfaces.ts +4 -4
- package/components/common/wizards/common/steps/name/location/New.vue +40 -40
- package/components/common/wizards/datastore/add/Add.vue +228 -228
- package/components/common/wizards/datastore/add/lib/utils.ts +85 -85
- package/components/common/wizards/datastore/add/steps/typeMode/lib/config/typeOptions.ts +43 -43
- package/composables/useAppVersion.ts +21 -21
- package/composables/useEnvLanguage.ts +22 -22
- package/composables/useLocal.ts +6 -6
- package/composables/useLocalCommon.ts +39 -39
- package/lib/models/enums.ts +65 -1
- package/package.json +1 -1
- package/plugins/console.ts +21 -21
- package/plugins/mouse.ts +21 -21
- package/plugins/panelStates.ts +70 -70
- package/plugins/text.ts +59 -59
- package/public/spice-console/application/clientgui.js +854 -854
- package/public/spice-console/application/packetfactory.js +211 -211
- package/public/spice-console/application/virtualmouse.js +147 -147
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/public/spice-console/network/spicechannel.js +440 -440
- package/public/spice-console/process/cursorprocess.js +128 -128
- package/public/spice-console/process/inputprocess.js +227 -227
- package/public/spice-console/process/mainprocess.js +212 -212
- package/public/spice-console/run.js +210 -210
- package/store/main/mutations.ts +7 -7
- package/store/main/state.ts +7 -7
- package/store/tasks/actions.ts +165 -165
- package/store/tasks/mappers/recentTasks.ts +123 -123
- package/store/tasks/mutations.ts +82 -82
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="currentComponent"
|
|
4
|
+
v-model:selected-tab="activeTabModel"
|
|
5
|
+
:panel-collapsed-model="panelCollapsedModel"
|
|
6
|
+
:tab-list="props.tabList"
|
|
7
|
+
:data-table-recent-tasks="props.dataTableRecentTasks"
|
|
8
|
+
:total-items-recent-tasks="props.totalItemsRecentTasks"
|
|
9
|
+
:total-pages-recent-tasks="props.totalPagesRecentTasks"
|
|
10
|
+
:pagination-recent-tasks="props.paginationRecentTasks"
|
|
11
|
+
:loading-recent-tasks="props.loadingRecentTasks"
|
|
12
|
+
:data-table-alarms="props.dataTableAlarms"
|
|
13
|
+
:loading-alarms="props.loadingAlarms"
|
|
14
|
+
@collapse-panel="onCollapseBottomPanel"
|
|
15
|
+
@change-tab="emits('change-tab')"
|
|
16
|
+
@sort-recent-task="emits('sort-recent-task', $event)"
|
|
17
|
+
@pagination-recent-task="emits('pagination-recent-task', $event)"
|
|
18
|
+
@pause-global-refresh-alarms="emits('pause-global-refresh-alarms')"
|
|
19
|
+
@get-alarms="emits('get-alarms', $event)"
|
|
20
|
+
/>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script setup lang="ts">
|
|
24
|
+
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
25
|
+
import type { UI_I_RecentTaskItem } from '~/lib/models/store/tasks/interfaces'
|
|
26
|
+
import type { UI_T_NodeType } from '~/components/common/pages/home/lib/models/types'
|
|
27
|
+
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
28
|
+
import type {
|
|
29
|
+
UI_I_Alarm,
|
|
30
|
+
UI_I_AlarmPayload,
|
|
31
|
+
} from '~/components/common/layout/bottomPanel/alarms/lib/models/interfaces'
|
|
32
|
+
import type { UI_T_BottomPanelTabType } from '~/components/common/layout/bottomPanel/lib/models/types'
|
|
33
|
+
|
|
34
|
+
const panelCollapsedModel = defineModel<boolean>('panelCollapsed', {
|
|
35
|
+
required: true,
|
|
36
|
+
})
|
|
37
|
+
const activeTabModel = defineModel<UI_T_BottomPanelTabType>('selectedTab', {
|
|
38
|
+
required: true,
|
|
39
|
+
})
|
|
40
|
+
const props = withDefaults(
|
|
41
|
+
defineProps<{
|
|
42
|
+
tabList: UI_I_CollapseNavItem[]
|
|
43
|
+
dataTableRecentTasks: UI_I_RecentTaskItem<UI_T_NodeType>[]
|
|
44
|
+
totalItemsRecentTasks: number
|
|
45
|
+
totalPagesRecentTasks: number
|
|
46
|
+
paginationRecentTasks: UI_I_Pagination
|
|
47
|
+
loadingRecentTasks: boolean
|
|
48
|
+
dataTableAlarms?: UI_I_Alarm | null
|
|
49
|
+
loadingAlarms?: boolean
|
|
50
|
+
}>(),
|
|
51
|
+
{
|
|
52
|
+
dataTableAlarms: null,
|
|
53
|
+
loadingAlarms: false,
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
const emits = defineEmits<{
|
|
58
|
+
(event: 'change-tab'): void
|
|
59
|
+
(event: 'sort-recent-task', value: string): void
|
|
60
|
+
(event: 'pagination-recent-task', value: UI_I_Pagination | null): void
|
|
61
|
+
(event: 'pause-global-refresh-alarms'): void
|
|
62
|
+
(event: 'get-alarms', value: UI_I_AlarmPayload): void
|
|
63
|
+
}>()
|
|
64
|
+
|
|
65
|
+
const { $store }: any = useNuxtApp()
|
|
66
|
+
|
|
67
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
68
|
+
|
|
69
|
+
const currentComponent = computed(() =>
|
|
70
|
+
isNewView.value
|
|
71
|
+
? defineAsyncComponent(() => import('./New.vue'))
|
|
72
|
+
: defineAsyncComponent(() => import('./Old.vue'))
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
const onCollapseBottomPanel = (): void => {
|
|
76
|
+
panelCollapsedModel.value = !panelCollapsedModel.value
|
|
77
|
+
}
|
|
78
|
+
</script>
|
|
79
|
+
|
|
80
|
+
<style scoped lang="scss"></style>
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:class="[
|
|
4
|
+
'bottom-panel flex flex-col h-full',
|
|
5
|
+
{ collapsed: props.panelCollapsedModel },
|
|
6
|
+
]"
|
|
7
|
+
>
|
|
8
|
+
<div class="bottom-panel__tab-list flex">
|
|
9
|
+
<div class="bottom-panel__collapse relative">
|
|
10
|
+
<button
|
|
11
|
+
id="bottom-panel-collapse"
|
|
12
|
+
data-id="bottom-panel-toggle-button"
|
|
13
|
+
class="btn-collapse flex items-center"
|
|
14
|
+
@click="emits('collapse-panel')"
|
|
15
|
+
>
|
|
16
|
+
<ui-icon class="collapse-icon" name="arrow" />
|
|
17
|
+
</button>
|
|
18
|
+
</div>
|
|
19
|
+
<ui-tabs
|
|
20
|
+
v-model="activeTabModel"
|
|
21
|
+
:tabs="tabListLocal"
|
|
22
|
+
test-id="bottom-panel-tab-list"
|
|
23
|
+
type="underline"
|
|
24
|
+
class="bottom-panel__tab"
|
|
25
|
+
@change="emits('change-tab')"
|
|
26
|
+
>
|
|
27
|
+
</ui-tabs>
|
|
28
|
+
|
|
29
|
+
<div
|
|
30
|
+
v-show="isShowRecentTasksActions"
|
|
31
|
+
class="actions flex items-center gap-4 pr-4"
|
|
32
|
+
>
|
|
33
|
+
<ui-select
|
|
34
|
+
v-model="statusFilter"
|
|
35
|
+
:items="statusFilterItems"
|
|
36
|
+
test-id="status-filter"
|
|
37
|
+
class="status-filter-select"
|
|
38
|
+
/>
|
|
39
|
+
<ui-button
|
|
40
|
+
test-id="more-tasks-button"
|
|
41
|
+
variant="primary"
|
|
42
|
+
type="text"
|
|
43
|
+
class="more-tasks-button"
|
|
44
|
+
is-without-sizes
|
|
45
|
+
@click="onNavigateToTasksPage"
|
|
46
|
+
>
|
|
47
|
+
{{ localization.tasks.moreTasks }}
|
|
48
|
+
</ui-button>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<div
|
|
52
|
+
v-show="!props.panelCollapsedModel"
|
|
53
|
+
class="bottom-panel__table-wrapper overflow-hidden"
|
|
54
|
+
>
|
|
55
|
+
<common-layout-bottom-panel-recent-tasks
|
|
56
|
+
v-show="activeTabModel === 'recentTask'"
|
|
57
|
+
:data-table="props.dataTableRecentTasks"
|
|
58
|
+
:total-items="props.totalItemsRecentTasks"
|
|
59
|
+
:total-pages="props.totalPagesRecentTasks"
|
|
60
|
+
:pagination="props.paginationRecentTasks"
|
|
61
|
+
:loading="props.loadingRecentTasks"
|
|
62
|
+
@sort="emits('sort-recent-task', $event)"
|
|
63
|
+
@pagination="emits('pagination-recent-task', $event)"
|
|
64
|
+
/>
|
|
65
|
+
<common-layout-bottom-panel-alarms
|
|
66
|
+
v-show="activeTabModel === 'alarms'"
|
|
67
|
+
:data-table="props.dataTableAlarms"
|
|
68
|
+
:is-loading="props.loadingAlarms"
|
|
69
|
+
@pause-global-refresh="emits('pause-global-refresh-alarms')"
|
|
70
|
+
@get-alarms="emits('get-alarms', $event)"
|
|
71
|
+
/>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
</template>
|
|
75
|
+
|
|
76
|
+
<script setup lang="ts">
|
|
77
|
+
import type { UI_I_TabItem } from '~/node_modules/bfg-uikit/components/ui/tabs/models/interfaces'
|
|
78
|
+
import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
|
|
79
|
+
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
80
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
81
|
+
import type { UI_T_BottomPanelTabType } from '~/components/common/layout/bottomPanel/lib/models/types'
|
|
82
|
+
import type { UI_I_RecentTaskItem } from '~/lib/models/store/tasks/interfaces'
|
|
83
|
+
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
84
|
+
import type { UI_T_NodeType } from '~/components/common/pages/home/lib/models/types'
|
|
85
|
+
import type {
|
|
86
|
+
UI_I_Alarm,
|
|
87
|
+
UI_I_AlarmPayload,
|
|
88
|
+
} from '~/components/common/layout/bottomPanel/alarms/lib/models/interfaces'
|
|
89
|
+
import { statusFilterItemsFunc } from '~/components/common/layout/bottomPanel/lib/config/statusFilter'
|
|
90
|
+
|
|
91
|
+
const activeTabModel = defineModel<UI_T_BottomPanelTabType>('selectedTab', {
|
|
92
|
+
required: true,
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
const props = defineProps<{
|
|
96
|
+
panelCollapsedModel: boolean
|
|
97
|
+
tabList: UI_I_CollapseNavItem[]
|
|
98
|
+
dataTableRecentTasks: UI_I_RecentTaskItem<UI_T_NodeType>[]
|
|
99
|
+
totalItemsRecentTasks: number
|
|
100
|
+
totalPagesRecentTasks: number
|
|
101
|
+
paginationRecentTasks: UI_I_Pagination
|
|
102
|
+
loadingRecentTasks: boolean
|
|
103
|
+
dataTableAlarms: UI_I_Alarm | null
|
|
104
|
+
loadingAlarms: boolean
|
|
105
|
+
}>()
|
|
106
|
+
|
|
107
|
+
const emits = defineEmits<{
|
|
108
|
+
(event: 'collapse-panel'): void
|
|
109
|
+
(event: 'change-tab'): void
|
|
110
|
+
(event: 'sort-recent-task', value: string): void
|
|
111
|
+
(event: 'pagination-recent-task', value: UI_I_Pagination | null): void
|
|
112
|
+
(event: 'pause-global-refresh-alarms'): void
|
|
113
|
+
(event: 'get-alarms', value: UI_I_AlarmPayload): void
|
|
114
|
+
}>()
|
|
115
|
+
|
|
116
|
+
const tabListLocal = computed<UI_I_TabItem[]>(() =>
|
|
117
|
+
props.tabList.map(({ value, text: name, testId, development }) => ({
|
|
118
|
+
name,
|
|
119
|
+
development,
|
|
120
|
+
value: value + '',
|
|
121
|
+
testId: testId + '',
|
|
122
|
+
}))
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
126
|
+
const statusFilter = ref<number>(-1)
|
|
127
|
+
const statusFilterItems = ref<UI_I_Dropdown[]>(
|
|
128
|
+
statusFilterItemsFunc(localization.value)
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
const onNavigateToTasksPage = (): void => {
|
|
132
|
+
const router = useRouter()
|
|
133
|
+
router.push('/tasks')
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
const isShowRecentTasksActions = computed<boolean>(
|
|
137
|
+
() => activeTabModel.value === 'recentTask' && !props.panelCollapsedModel
|
|
138
|
+
)
|
|
139
|
+
</script>
|
|
140
|
+
|
|
141
|
+
<style>
|
|
142
|
+
:root {
|
|
143
|
+
--bottom-pannel-bg-color: #fff;
|
|
144
|
+
--bottom-pannel-border-color: #e9ebed;
|
|
145
|
+
--bottom-pannel-rtask-link-text: #008fd6;
|
|
146
|
+
--bottom-pannel-rtask-link-hover-text: #0081c1;
|
|
147
|
+
--bottom-pannel-divider-color: #e9ebeda3;
|
|
148
|
+
--bottom-pannel-collapse-button-icon: #213444;
|
|
149
|
+
}
|
|
150
|
+
:root.dark-theme {
|
|
151
|
+
--bottom-pannel-bg-color: #213444;
|
|
152
|
+
--bottom-pannel-border-color: #e9ebed1f;
|
|
153
|
+
--bottom-pannel-rtask-link-text: #2ba2de;
|
|
154
|
+
--bottom-pannel-rtask-link-hover-text: #008fd6;
|
|
155
|
+
--bottom-pannel-divider-color: #e9ebed1f;
|
|
156
|
+
--bottom-pannel-collapse-button-icon: #e9eaec;
|
|
157
|
+
}
|
|
158
|
+
</style>
|
|
159
|
+
<style scoped lang="scss">
|
|
160
|
+
@import '~/assets/scss/common/mixins';
|
|
161
|
+
.bottom-panel {
|
|
162
|
+
background-color: var(--bottom-pannel-bg-color);
|
|
163
|
+
|
|
164
|
+
&__tab-list {
|
|
165
|
+
border-bottom: 1px solid var(--bottom-pannel-border-color);
|
|
166
|
+
}
|
|
167
|
+
&__tab {
|
|
168
|
+
align-items: flex-end;
|
|
169
|
+
margin-left: 16px;
|
|
170
|
+
|
|
171
|
+
&.tabs-wrapper.is-link:before {
|
|
172
|
+
display: none;
|
|
173
|
+
}
|
|
174
|
+
.collapsed &.tabs-wrapper.is-link {
|
|
175
|
+
:deep(.tab-item.active.tab-underline) {
|
|
176
|
+
border-bottom: 3px solid transparent;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
&__table-wrapper {
|
|
181
|
+
height: inherit;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.btn-collapse {
|
|
185
|
+
border: 0;
|
|
186
|
+
outline: none;
|
|
187
|
+
background-color: transparent;
|
|
188
|
+
cursor: pointer;
|
|
189
|
+
|
|
190
|
+
.collapse-icon {
|
|
191
|
+
width: 20px;
|
|
192
|
+
height: 20px;
|
|
193
|
+
transform: rotate(180deg);
|
|
194
|
+
color: var(--bottom-pannel-collapse-button-icon);
|
|
195
|
+
|
|
196
|
+
.collapsed & {
|
|
197
|
+
transform: rotate(0deg);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
&__collapse {
|
|
202
|
+
padding: 12px 16px;
|
|
203
|
+
|
|
204
|
+
&:before {
|
|
205
|
+
content: '';
|
|
206
|
+
position: absolute;
|
|
207
|
+
top: 8px;
|
|
208
|
+
right: 0;
|
|
209
|
+
bottom: 8px;
|
|
210
|
+
width: 1px;
|
|
211
|
+
background-color: var(--bottom-pannel-divider-color);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.actions {
|
|
216
|
+
flex: 1;
|
|
217
|
+
justify-content: flex-end;
|
|
218
|
+
|
|
219
|
+
.more-tasks-button {
|
|
220
|
+
width: auto;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
:deep(.ui-select-toggle-button) {
|
|
224
|
+
height: 24px;
|
|
225
|
+
min-width: 80px;
|
|
226
|
+
padding: 4px 4px 4px 8px;
|
|
227
|
+
border-radius: 6px;
|
|
228
|
+
}
|
|
229
|
+
:deep(.ui-popup-window) {
|
|
230
|
+
border-radius: 6px;
|
|
231
|
+
width: unset !important;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
:deep(.table-container.default-layout) {
|
|
237
|
+
border-radius: 0;
|
|
238
|
+
}
|
|
239
|
+
</style>
|
|
@@ -0,0 +1,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
|
+
:data-table="props.dataTableRecentTasks"
|
|
37
|
+
:total-items="props.totalItemsRecentTasks"
|
|
38
|
+
:total-pages="props.totalPagesRecentTasks"
|
|
39
|
+
:pagination="props.paginationRecentTasks"
|
|
40
|
+
:loading="props.loadingRecentTasks"
|
|
41
|
+
@sort="emits('sort-recent-task', $event)"
|
|
42
|
+
@pagination="emits('pagination-recent-task', $event)"
|
|
43
|
+
/>
|
|
44
|
+
<common-layout-bottom-panel-alarms
|
|
45
|
+
v-show="activeTabModel === 'alarms'"
|
|
46
|
+
:data-table="props.dataTableAlarms"
|
|
47
|
+
:is-loading="props.loadingAlarms"
|
|
48
|
+
@pause-global-refresh="emits('pause-global-refresh-alarms')"
|
|
49
|
+
@get-alarms="emits('get-alarms', $event)"
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<script setup lang="ts">
|
|
56
|
+
import type { UI_I_CollapseNavItem } from '~/components/atoms/collapse/lib/models/interfaces'
|
|
57
|
+
import type { UI_I_RecentTaskItem } from '~/lib/models/store/tasks/interfaces'
|
|
58
|
+
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
59
|
+
import type {
|
|
60
|
+
UI_I_Alarm,
|
|
61
|
+
UI_I_AlarmPayload,
|
|
62
|
+
} from '~/components/common/layout/bottomPanel/alarms/lib/models/interfaces'
|
|
63
|
+
import type { UI_T_NodeType } from '~/components/common/pages/home/lib/models/types'
|
|
64
|
+
import type { UI_T_BottomPanelTabType } from '~/components/common/layout/bottomPanel/lib/models/types'
|
|
65
|
+
|
|
66
|
+
const activeTabModel = defineModel<UI_T_BottomPanelTabType>('selectedTab', {
|
|
67
|
+
required: true,
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
const props = defineProps<{
|
|
71
|
+
panelCollapsedModel: boolean
|
|
72
|
+
tabList: UI_I_CollapseNavItem[]
|
|
73
|
+
dataTableRecentTasks: UI_I_RecentTaskItem<UI_T_NodeType>[]
|
|
74
|
+
totalItemsRecentTasks: number
|
|
75
|
+
totalPagesRecentTasks: number
|
|
76
|
+
paginationRecentTasks: UI_I_Pagination
|
|
77
|
+
loadingRecentTasks: boolean
|
|
78
|
+
dataTableAlarms: UI_I_Alarm | null
|
|
79
|
+
loadingAlarms: boolean
|
|
80
|
+
}>()
|
|
81
|
+
|
|
82
|
+
const emits = defineEmits<{
|
|
83
|
+
(event: 'collapse-panel'): void
|
|
84
|
+
(event: 'change-tab'): void
|
|
85
|
+
(event: 'sort-recent-task', value: string): void
|
|
86
|
+
(event: 'pagination-recent-task', value: UI_I_Pagination | null): void
|
|
87
|
+
(event: 'pause-global-refresh-alarms'): void
|
|
88
|
+
(event: 'get-alarms', value: UI_I_AlarmPayload): void
|
|
89
|
+
}>()
|
|
90
|
+
</script>
|
|
91
|
+
|
|
92
|
+
<style scoped lang="scss">
|
|
93
|
+
@import '~/assets/scss/common/mixins';
|
|
94
|
+
.bottom-panel {
|
|
95
|
+
background-color: var(--pannel-bg-color);
|
|
96
|
+
& > div:first-child {
|
|
97
|
+
height: 36px;
|
|
98
|
+
}
|
|
99
|
+
&__table-wrapper {
|
|
100
|
+
height: inherit;
|
|
101
|
+
:deep(.datagrid-outer-wrapper) {
|
|
102
|
+
padding-top: 0;
|
|
103
|
+
.datagrid {
|
|
104
|
+
border-radius: 0;
|
|
105
|
+
margin-top: 0;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
&__tabs {
|
|
110
|
+
&.collapsed {
|
|
111
|
+
:deep(button.nav-link) {
|
|
112
|
+
box-shadow: none;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&.collapsed {
|
|
118
|
+
.btn-trigger {
|
|
119
|
+
.trigger-icon {
|
|
120
|
+
transform: rotate(0deg);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
.btn-trigger {
|
|
125
|
+
height: 31px;
|
|
126
|
+
border: 0;
|
|
127
|
+
outline: none;
|
|
128
|
+
background-color: transparent;
|
|
129
|
+
padding-left: 15px;
|
|
130
|
+
cursor: pointer;
|
|
131
|
+
.trigger-icon {
|
|
132
|
+
width: 16px;
|
|
133
|
+
height: 16px;
|
|
134
|
+
fill: var(--triger-icon-color);
|
|
135
|
+
transform: rotate(180deg);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
&__trigger {
|
|
139
|
+
padding-right: 15px;
|
|
140
|
+
margin-right: 15px;
|
|
141
|
+
border-right: 0.05rem solid #ccc;
|
|
142
|
+
box-shadow: inset 0 -0.05rem 0 var(--nav-panel-border-color);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
</style>
|
|
146
|
+
|
|
147
|
+
<style>
|
|
148
|
+
:root {
|
|
149
|
+
--pannel-bg-color: #fafafa;
|
|
150
|
+
}
|
|
151
|
+
:root.dark-theme {
|
|
152
|
+
--pannel-bg-color: #1b2a32;
|
|
153
|
+
}
|
|
154
|
+
</style>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component
|
|
3
|
+
:is="currentComponent"
|
|
4
|
+
:data-table="props.dataTable?.items || []"
|
|
5
|
+
:total-items="props.dataTable?.items.length || 1"
|
|
6
|
+
:total-pages="1"
|
|
7
|
+
:pagination="pagination"
|
|
8
|
+
:loading="props.isLoading"
|
|
9
|
+
@pagination="onUpdatePagination"
|
|
10
|
+
@sort="onSortTable"
|
|
11
|
+
/>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import type { UI_I_Pagination } from '~/lib/models/table/interfaces'
|
|
16
|
+
import type {
|
|
17
|
+
UI_I_Alarm,
|
|
18
|
+
UI_I_AlarmPayload,
|
|
19
|
+
} from '~/components/common/layout/bottomPanel/alarms/lib/models/interfaces'
|
|
20
|
+
|
|
21
|
+
const props = defineProps<{
|
|
22
|
+
dataTable: UI_I_Alarm | null
|
|
23
|
+
isLoading: boolean
|
|
24
|
+
}>()
|
|
25
|
+
|
|
26
|
+
const emits = defineEmits<{
|
|
27
|
+
(event: 'pause-global-refresh'): void
|
|
28
|
+
(event: 'get-alarms', value: UI_I_AlarmPayload): void
|
|
29
|
+
}>()
|
|
30
|
+
|
|
31
|
+
const { $store }: any = useNuxtApp()
|
|
32
|
+
|
|
33
|
+
const isNewView = computed<boolean>(() => $store.getters['main/getIsNewView'])
|
|
34
|
+
|
|
35
|
+
const currentComponent = computed(() =>
|
|
36
|
+
isNewView.value
|
|
37
|
+
? defineAsyncComponent(() => import('./new/New.vue'))
|
|
38
|
+
: defineAsyncComponent(() => import('./old/Old.vue'))
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
const sort = ref<string | null>(null)
|
|
42
|
+
const pagination = ref<UI_I_Pagination>({
|
|
43
|
+
page: 1,
|
|
44
|
+
pageSize: 35,
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
const getAlarms = (): void => {
|
|
48
|
+
pauseGlobalRefresh()
|
|
49
|
+
|
|
50
|
+
const payload: UI_I_AlarmPayload = {
|
|
51
|
+
...pagination.value,
|
|
52
|
+
sortBy: sort.value || '',
|
|
53
|
+
}
|
|
54
|
+
emits('get-alarms', payload)
|
|
55
|
+
}
|
|
56
|
+
const pauseGlobalRefresh = (): void => {
|
|
57
|
+
emits('pause-global-refresh')
|
|
58
|
+
}
|
|
59
|
+
getAlarms()
|
|
60
|
+
|
|
61
|
+
const onUpdatePagination = (event: UI_I_Pagination): void => {
|
|
62
|
+
pagination.value = event
|
|
63
|
+
getAlarms()
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const onSortTable = (event: string): void => {
|
|
67
|
+
sort.value = event
|
|
68
|
+
getAlarms()
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
onUnmounted(() => {
|
|
72
|
+
pauseGlobalRefresh()
|
|
73
|
+
})
|
|
74
|
+
</script>
|
|
75
|
+
|
|
76
|
+
<style scoped lang="scss"></style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
API_UI_I_DataTable,
|
|
3
|
+
UI_I_Pagination,
|
|
4
|
+
} from '~/lib/models/table/interfaces'
|
|
5
|
+
|
|
6
|
+
export interface UI_I_AlarmPayload extends UI_I_Pagination {
|
|
7
|
+
sortBy: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface UI_API_I_AlarmItem {
|
|
11
|
+
id: number
|
|
12
|
+
object: string
|
|
13
|
+
status: string
|
|
14
|
+
name: string
|
|
15
|
+
triggered: string
|
|
16
|
+
acknowledged: string
|
|
17
|
+
acknowledged_by: string
|
|
18
|
+
triggering_event: string
|
|
19
|
+
statusIcon: string
|
|
20
|
+
}
|
|
21
|
+
export interface UI_I_AlarmItem extends UI_API_I_AlarmItem {}
|
|
22
|
+
|
|
23
|
+
export interface UI_I_Alarm extends API_UI_I_DataTable<UI_I_AlarmItem> {}
|