Add overlay which indicates that rows are being loaded
continuous-integration/drone Build is passing Details

This commit is contained in:
Erki Aas 2022-11-15 20:12:01 +02:00
parent 2573eb6675
commit ca467005a7
3 changed files with 26 additions and 1 deletions

View File

@ -28,4 +28,11 @@ div#app {
:root { :root {
--vs-font-size: 1em!important; --vs-font-size: 1em!important;
}
.ag-overlay-panel {
display: flex;
width: 100%;
height: calc(100% - 56px);
margin-top: 56px;
} }

View File

@ -0,0 +1,7 @@
export default {
template: `
<div class="ag-overlay-loading-center">
Loading
</div>
`,
};

View File

@ -34,6 +34,7 @@
:enable-scrolling="true" :enable-scrolling="true"
:isExternalFilterPresent="() => {return true}" :isExternalFilterPresent="() => {return true}"
:doesExternalFilterPass="doesExternalFilterPass" :doesExternalFilterPass="doesExternalFilterPass"
:loadingOverlayComponent="'loadingOverlay'"
></ag-grid-vue> ></ag-grid-vue>
<ExamineLogModal :examine-log-content="examineLogContent" :close-modal="closeExamineLog" /> <ExamineLogModal :examine-log-content="examineLogContent" :close-modal="closeExamineLog" />
</div> </div>
@ -54,6 +55,7 @@ import parseEventData from "../helpers/parseEventData";
import {mapActions, mapGetters} from 'vuex'; import {mapActions, mapGetters} from 'vuex';
import config from "./Grid/Main/config"; import config from "./Grid/Main/config";
import Datepicker from "./Grid/Main/Filter/Datepicker.vue"; import Datepicker from "./Grid/Main/Filter/Datepicker.vue";
import loadingOverlay from "./Grid/Main/loadingOverlay";
export default { export default {
components: { components: {
@ -64,7 +66,8 @@ export default {
ErrLevelRenderer, ErrLevelRenderer,
VBtn, VBtn,
VRow, VRow,
VCol VCol,
loadingOverlay
}, },
directives: { directives: {
Resize Resize
@ -128,7 +131,11 @@ export default {
es.onmessage = (e) => this.handleReceiveMessage(e) es.onmessage = (e) => this.handleReceiveMessage(e)
es.addEventListener("filters", (e) => this.handleReceiveFilters(e)) es.addEventListener("filters", (e) => this.handleReceiveFilters(e))
es.addEventListener("timeout", (e) => this.handleReceiveTimeout(e)) es.addEventListener("timeout", (e) => this.handleReceiveTimeout(e))
es.addEventListener("completed", (e) => this.handleAllReceived(e))
this.es = es this.es = es
if (this.gridApi) {
this.gridApi.showLoadingOverlay();
}
} }
url.searchParams.delete('initial') url.searchParams.delete('initial')
if (url.searchParams.get('streaming') === 'false') { if (url.searchParams.get('streaming') === 'false') {
@ -235,6 +242,10 @@ export default {
position: "top-right", position: "top-right",
}); });
setTimeout(this.$toast.clear, 3000); setTimeout(this.$toast.clear, 3000);
this.gridApi.hideOverlay();
},
handleAllReceived () {
this.gridApi.hideOverlay();
}, },
doesExternalFilterPass(node) { doesExternalFilterPass(node) {
if (node.data && this.filterQuery.from && this.filterQuery.to) { if (node.data && this.filterQuery.from && this.filterQuery.to) {