blob: 07aab1d5f3c0c3c39b768c40ef4870a8cb511d2b [file] [log] [blame]
Dixsie Wolmers97d86b32019-12-02 05:07:57 -06001<template>
Dixsie Wolmersf65ee342020-01-22 19:47:56 -06002 <div>
3 <b-list-group v-for="logData in eventLogData" :key="logData.id">
4 <b-list-group-item href="#" class="flex-column align-items-start">
Derick Montaguee2fd1562019-12-20 13:26:53 -06005 {{ '#' + logData.logId }}
Dixsie Wolmersf65ee342020-01-22 19:47:56 -06006 <b-badge variant="danger">{{ logData.priority }}</b-badge>
7 <div class="d-flex w-100 justify-content-between">
8 <small>{{
Derick Montaguee2fd1562019-12-20 13:26:53 -06009 logData.Timestamp | date('MMM DD YYYY HH:MM:SS A ZZ')
Dixsie Wolmersf65ee342020-01-22 19:47:56 -060010 }}</small>
11 <ChevronRight16 />
12 </div>
13 <p class="mb-1">{{ logData.eventID }}: {{ logData.description }}</p>
14 </b-list-group-item>
15 </b-list-group>
16 <b-list-group v-if="!eventLogData">
17 There are no high priority events to display at this time.
18 </b-list-group>
19 </div>
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060020</template>
21
22<script>
Derick Montaguee2fd1562019-12-20 13:26:53 -060023import ChevronRight16 from '@carbon/icons-vue/es/chevron--right/16';
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060024export default {
Derick Montaguee2fd1562019-12-20 13:26:53 -060025 name: 'events',
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060026 components: {
27 ChevronRight16
28 },
Dixsie Wolmersf65ee342020-01-22 19:47:56 -060029 created() {
30 this.getEventLogData();
31 },
32 computed: {
33 eventLogData() {
Derick Montaguee2fd1562019-12-20 13:26:53 -060034 return this.$store.getters['eventLog/eventLogData'];
Dixsie Wolmersf65ee342020-01-22 19:47:56 -060035 }
36 },
37 methods: {
38 getEventLogData() {
Derick Montaguee2fd1562019-12-20 13:26:53 -060039 this.$store.dispatch('eventLog/getEventLogData');
Dixsie Wolmersf65ee342020-01-22 19:47:56 -060040 }
Dixsie Wolmers97d86b32019-12-02 05:07:57 -060041 }
42};
43</script>