Skip to content

Commit

Permalink
Add a banner when displaying processing timeline events
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaptperez committed Jan 8, 2025
1 parent 66e62ec commit 901a0b6
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions timesketch/frontend-ng/src/components/Explore/EventList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ limitations under the License.
-->
<template>
<div>
<v-alert
v-model="showBanner"
dense
dismissible
type="info"
>
Processing timelines can be enabled but their events may be incomplete.
</v-alert>

<v-dialog v-model="exportDialog" width="700">
<v-card flat class="pa-5">
<v-progress-circular indeterminate size="20" width="1"></v-progress-circular>
Expand Down Expand Up @@ -581,6 +590,7 @@ export default {
showHistogram: false,
branchParent: null,
sortOrderAsc: true,
showBanner: false,
}
},
computed: {
Expand Down Expand Up @@ -873,6 +883,7 @@ export default {
.then((response) => {
this.eventList.objects = response.data.objects
this.eventList.meta = response.data.meta
this.updateShowBanner()
this.searchInProgress = false
EventBus.$emit('updateCountPerTimeline', response.data.meta.count_per_timeline)
this.$emit('countPerTimeline', response.data.meta.count_per_timeline)
Expand Down Expand Up @@ -1026,6 +1037,15 @@ export default {
})
.catch((e) => {})
},
updateShowBanner: function() {
// Show banner only when processing timelines are enabled and at
// least one enabled timeline is the "processing" state.
this.showBanner =
this.settings.showProcessingTimelineEvents &&
this.$store.state.sketch.active_timelines
.filter(tl => tl.id in this.$store.state.enabledTimelines)
.some(tl => tl.status && tl.status[0].status === 'processing')
},
},
watch: {
tableOptions: {
Expand Down Expand Up @@ -1065,6 +1085,11 @@ export default {
},
deep: true,
},
'settings.showProcessingTimelineEvents': {
handler() {
this.updateShowBanner()
},
},
},
created() {
if (Object.keys(this.queryRequest).length) {
Expand Down

0 comments on commit 901a0b6

Please sign in to comment.