diff --git a/dashboard/src/views/EventlogView.vue b/dashboard/src/views/EventlogView.vue index 41e53bf9c..f12f8156f 100644 --- a/dashboard/src/views/EventlogView.vue +++ b/dashboard/src/views/EventlogView.vue @@ -2,7 +2,7 @@ import { ref, reactive, onMounted, watch } from 'vue'; import { Button, TextInput, MultiSelect } from 'pankow'; -import { useDebouncedRef, prettyDate, prettyLongDate } from 'pankow/utils'; +import { useDebouncedRef, prettyDate, prettyLongDate, copyToClipboard } from 'pankow/utils'; import AppsModel from '../models/AppsModel.js'; import EventlogsModel from '../models/EventlogsModel.js'; import { eventlogDetails, eventlogSource } from '../utils.js'; @@ -110,11 +110,6 @@ async function onRefresh() { refreshBusy.value = false; } -function onEventLogDetails(id) { - if (activeId.value === id) activeId.value = null; - else activeId.value = id; -} - async function onScroll(event) { if (event.target.scrollTop + event.target.clientHeight >= event.target.scrollHeight) { page.value++; @@ -132,6 +127,11 @@ async function onScroll(event) { } } +function onCopySource(eventlog) { + copyToClipboard(eventlog.raw.source.ip); + window.pankow.notify({ type: 'success', text: 'Copied' }); +} + watch(actions, onRefresh); watch(search, onRefresh); @@ -168,14 +168,14 @@ onMounted(async () => {
-Source IP: {{ eventlog.raw.source.ip }}
{{ JSON.stringify(eventlog.raw.data, null, 4) }}