Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 1 | <template> |
Dixsie Wolmers | f65ee34 | 2020-01-22 19:47:56 -0600 | [diff] [blame] | 2 | <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 Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame^] | 5 | {{ '#' + logData.logId }} |
Dixsie Wolmers | f65ee34 | 2020-01-22 19:47:56 -0600 | [diff] [blame] | 6 | <b-badge variant="danger">{{ logData.priority }}</b-badge> |
| 7 | <div class="d-flex w-100 justify-content-between"> |
| 8 | <small>{{ |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame^] | 9 | logData.Timestamp | date('MMM DD YYYY HH:MM:SS A ZZ') |
Dixsie Wolmers | f65ee34 | 2020-01-22 19:47:56 -0600 | [diff] [blame] | 10 | }}</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 Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 20 | </template> |
| 21 | |
| 22 | <script> |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame^] | 23 | import ChevronRight16 from '@carbon/icons-vue/es/chevron--right/16'; |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 24 | export default { |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame^] | 25 | name: 'events', |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 26 | components: { |
| 27 | ChevronRight16 |
| 28 | }, |
Dixsie Wolmers | f65ee34 | 2020-01-22 19:47:56 -0600 | [diff] [blame] | 29 | created() { |
| 30 | this.getEventLogData(); |
| 31 | }, |
| 32 | computed: { |
| 33 | eventLogData() { |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame^] | 34 | return this.$store.getters['eventLog/eventLogData']; |
Dixsie Wolmers | f65ee34 | 2020-01-22 19:47:56 -0600 | [diff] [blame] | 35 | } |
| 36 | }, |
| 37 | methods: { |
| 38 | getEventLogData() { |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame^] | 39 | this.$store.dispatch('eventLog/getEventLogData'); |
Dixsie Wolmers | f65ee34 | 2020-01-22 19:47:56 -0600 | [diff] [blame] | 40 | } |
Dixsie Wolmers | 97d86b3 | 2019-12-02 05:07:57 -0600 | [diff] [blame] | 41 | } |
| 42 | }; |
| 43 | </script> |