Started with new streaming implementation
Some checks failed
continuous-integration/drone Build is failing
Some checks failed
continuous-integration/drone Build is failing
This commit is contained in:
parent
30af9d31ec
commit
fd372d09fc
@ -1,7 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="height: 100%; width: 100%">
|
<div style="height: 100%; width: 100%; text-align: right">
|
||||||
|
<v-btn
|
||||||
|
color="blue-grey"
|
||||||
|
class="ma-2"
|
||||||
|
:prepend-icon="streaming ? 'mdi-pause' :'mdi-play'"
|
||||||
|
@click="toggleFilterQueryStreaming"
|
||||||
|
>
|
||||||
|
Stream new lines
|
||||||
|
</v-btn>
|
||||||
<ag-grid-vue
|
<ag-grid-vue
|
||||||
style="width: 100%; height: 100%;"
|
style="width: 100%; height: calc(100% - 52px);"
|
||||||
class="ag-theme-material"
|
class="ag-theme-material"
|
||||||
@grid-ready="onGridReady"
|
@grid-ready="onGridReady"
|
||||||
:defaultColDef="defaultColDef"
|
:defaultColDef="defaultColDef"
|
||||||
@ -22,6 +30,7 @@
|
|||||||
import { AgGridVue } from "ag-grid-vue3";
|
import { AgGridVue } from "ag-grid-vue3";
|
||||||
import "ag-grid-community/styles//ag-grid.css";
|
import "ag-grid-community/styles//ag-grid.css";
|
||||||
import "ag-grid-community/styles//ag-theme-material.css";
|
import "ag-grid-community/styles//ag-theme-material.css";
|
||||||
|
import { VBtn } from 'vuetify/components/VBtn'
|
||||||
import ExamineLogModal from "./Modal/ExamineLogModal.vue";
|
import ExamineLogModal from "./Modal/ExamineLogModal.vue";
|
||||||
import ComboboxFilter from "./Filter/ComboboxFilter.js";
|
import ComboboxFilter from "./Filter/ComboboxFilter.js";
|
||||||
import flattenObj from "../helpers/flattenObj";
|
import flattenObj from "../helpers/flattenObj";
|
||||||
@ -33,7 +42,8 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
ExamineLogModal,
|
ExamineLogModal,
|
||||||
AgGridVue,
|
AgGridVue,
|
||||||
ComboboxFilter
|
ComboboxFilter,
|
||||||
|
VBtn
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -46,14 +56,18 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
filterQuery() {
|
...mapGetters([
|
||||||
return this.$store.state.filterQuery
|
'filterQuery',
|
||||||
},
|
'streaming',
|
||||||
|
]),
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
filterQuery() {
|
filterQuery() {
|
||||||
this.setupStream()
|
this.setupStream()
|
||||||
},
|
},
|
||||||
|
streaming() {
|
||||||
|
this.setupStream()
|
||||||
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// TODO: monitor actual URL
|
// TODO: monitor actual URL
|
||||||
@ -63,6 +77,7 @@ export default {
|
|||||||
...mapActions({
|
...mapActions({
|
||||||
setFilterOptions: 'setFilterOptions',
|
setFilterOptions: 'setFilterOptions',
|
||||||
setFilterQuery: 'setFilterQuery',
|
setFilterQuery: 'setFilterQuery',
|
||||||
|
toggleFilterQueryStreaming: 'toggleFilterQueryStreaming',
|
||||||
}),
|
}),
|
||||||
setupStream() {
|
setupStream() {
|
||||||
this.es && this.es.close();
|
this.es && this.es.close();
|
||||||
@ -103,6 +118,7 @@ export default {
|
|||||||
query[column.colId] = column.filterActive
|
query[column.colId] = column.filterActive
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
query['streaming'] = this.streaming
|
||||||
this.setFilterQuery(query)
|
this.setFilterQuery(query)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -3,9 +3,12 @@ import { createStore } from "vuex"
|
|||||||
const store = createStore({
|
const store = createStore({
|
||||||
state: {
|
state: {
|
||||||
filterOptions: {},
|
filterOptions: {},
|
||||||
filterQuery: {}
|
filterQuery: {},
|
||||||
},
|
},
|
||||||
getters: {
|
getters: {
|
||||||
|
streaming (state) {
|
||||||
|
return state.filterQuery['streaming'] ?? false
|
||||||
|
},
|
||||||
filterQuery (state) {
|
filterQuery (state) {
|
||||||
return state.filterQuery
|
return state.filterQuery
|
||||||
}
|
}
|
||||||
@ -17,6 +20,9 @@ const store = createStore({
|
|||||||
setFilterQuery(context, payload) {
|
setFilterQuery(context, payload) {
|
||||||
context.commit("SET_FILTER_QUERY", payload);
|
context.commit("SET_FILTER_QUERY", payload);
|
||||||
},
|
},
|
||||||
|
toggleFilterQueryStreaming(context) {
|
||||||
|
context.commit("TOGGLE_FILTER_QUERY_STREAMING");
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
SET_FILTER_OPTIONS(state, payload) {
|
SET_FILTER_OPTIONS(state, payload) {
|
||||||
@ -25,6 +31,11 @@ const store = createStore({
|
|||||||
SET_FILTER_QUERY(state, payload) {
|
SET_FILTER_QUERY(state, payload) {
|
||||||
state.filterQuery = payload
|
state.filterQuery = payload
|
||||||
},
|
},
|
||||||
|
TOGGLE_FILTER_QUERY_STREAMING(state) {
|
||||||
|
let query = state.filterQuery
|
||||||
|
query['streaming'] = !(query['streaming'] ?? false)
|
||||||
|
state.filterQuery = query
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user