diff --git a/src/components/Header/ConnectionMonitor.vue b/src/components/Header/ConnectionMonitor.vue
new file mode 100644
index 0000000..77f83bf
--- /dev/null
+++ b/src/components/Header/ConnectionMonitor.vue
@@ -0,0 +1,85 @@
+
+
+
+ mdi-server
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/Header/Header.vue b/src/components/Header/Header.vue
new file mode 100644
index 0000000..45335bc
--- /dev/null
+++ b/src/components/Header/Header.vue
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+ Logmower
+
+
+
+
+ Stream new lines
+
+
+
+
+
+
+
diff --git a/src/components/LogViewer.vue b/src/components/LogViewer.vue
index 46c55c7..0eee891 100644
--- a/src/components/LogViewer.vue
+++ b/src/components/LogViewer.vue
@@ -1,23 +1,6 @@
-
-
-
-
-
- Logmower
-
-
-
- Stream new lines
-
-
-
+
this.handleReceiveMessage(e)
+ es.addEventListener("ping", (e) => this.handleReceivePing())
es.addEventListener("filters", (e) => this.handleReceiveFilters(e))
es.addEventListener("timeout", (e) => this.handleReceiveTimeout(e))
es.addEventListener("completed", (e) => this.handleAllReceived(e))
@@ -247,6 +226,9 @@ export default {
handleAllReceived () {
this.gridApi.hideOverlay();
},
+ handleReceivePing () {
+ this.setLastPingReceived()
+ },
doesExternalFilterPass(node) {
if (node.data && this.filterQuery.from && this.filterQuery.to) {
let ts = new Date(node.data['@timestamp']).getTime()
diff --git a/src/stores/index.js b/src/stores/index.js
index db2373f..66cb780 100644
--- a/src/stores/index.js
+++ b/src/stores/index.js
@@ -4,6 +4,7 @@ const store = createStore({
state: {
filterOptions: {},
filterQuery: {},
+ lastPingReceived: null,
},
getters: {
streaming (state) {
@@ -11,7 +12,10 @@ const store = createStore({
},
filterQuery (state) {
return state.filterQuery
- }
+ },
+ lastPingReceived (state) {
+ return state.lastPingReceived
+ },
},
actions: {
setFilterOptions(context, payload) {
@@ -30,6 +34,9 @@ const store = createStore({
query.streaming = false
commit("SET_FILTER_QUERY", query);
},
+ setLastPingReceived(context) {
+ context.commit("SET_LAST_PING_RECEIVED");
+ },
},
mutations: {
SET_FILTER_OPTIONS(state, payload) {
@@ -55,6 +62,9 @@ const store = createStore({
state.filterQuery = query
},
+ SET_LAST_PING_RECEIVED(state) {
+ state.lastPingReceived = (new Date()).getTime()
+ }
},
});
diff --git a/vite.config.js b/vite.config.js
index 02ed03f..246999d 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -22,5 +22,10 @@ export default {
vuetify: {
// https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vuetify-loader
}
- }
+ },
+ optimizeDeps: {
+ exclude: [
+ "@meforma/vue-toaster"
+ ]
+ },
}