Add spinner when loading actionlog in admin

This commit is contained in:
Emmy Leke
2022-12-22 17:04:54 +01:00
committed by EmmyMay
parent a4bbd7727d
commit aff5a655e2
2 changed files with 10 additions and 2 deletions
@@ -98,6 +98,7 @@
hover
class="mb-0 small"
head-variant="light"
:busy="processing"
:items="items"
:fields="fields"
tbody-tr-class="pointer"
@@ -109,11 +110,10 @@
<div class="text-center m-5">
<div>
<b-spinner
small
class="align-middle m-2"
/>
</div>
<div>{{ $t('loading') }}</div>
{{ $t('loading') }}
</div>
</template>
<template #cell(timestamp)="{ item: a }">
@@ -321,6 +321,8 @@ export default {
return {
id: 'actionlog',
processing: true,
filter: {
from: undefined,
to: undefined,
@@ -433,10 +435,15 @@ export default {
this.$delete(this.filter, 'resource')
}
this.processing = true
this.procListResults(this.$SystemAPI.actionlogList({ ...this.filter, ...this.pagination }))
.then(rr => {
this.items.push(...rr)
})
.finally(() => {
this.processing = false
})
}, 300),
// Resets pagination & sorting and adds filtering params for drill-down
@@ -7,6 +7,7 @@ list:
resource: Resource
severity: Severity
timestamp: Timestamp
loading: Loading actions
details:
id: 'ID'
header: 'Details'