1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

feat(UI): modal that shows process query

This commit is contained in:
2021-03-04 19:34:18 +01:00
parent 049143d143
commit 07f60c3917
6 changed files with 52 additions and 29 deletions

View File

@ -1,7 +1,7 @@
<template>
<div class="modal active">
<a class="modal-overlay" @click.stop="closeModal" />
<div class="modal-container p-0">
<div class="modal-container p-0 pb-4">
<div class="modal-header pl-2">
<div class="modal-title h6">
<div class="d-flex">
@ -34,7 +34,7 @@
type="range"
min="0"
max="30"
step="1"
step="0.5"
@change="setRefreshInterval"
>
</div>
@ -42,12 +42,16 @@
</div>
<div class="workspace-query-info">
<div v-if="sortedResults.length">
{{ $t('word.results') }}: <b>{{ sortedResults.length.toLocaleString() }}</b>
{{ $t('word.processes') }}: <b>{{ sortedResults.length.toLocaleString() }}</b>
</div>
</div>
</div>
<div ref="tableWrapper" class="modal-body py-0">
<div class="vscroll workspace-query-results" :style="{'height': resultsSize+'px'}">
<div class="modal-body py-0 workspace-query-results">
<div
ref="tableWrapper"
class="vscroll"
:style="{'height': resultsSize+'px'}"
>
<div ref="table" class="table table-hover">
<div class="thead">
<div class="tr">
@ -84,18 +88,13 @@
class="process-row"
:row="row"
@contextmenu="contextMenu"
@show-info="showInfoModal"
@stop-refresh="stopRefresh"
/>
</template>
</BaseVirtualScroll>
</div>
</div>
</div>
<div class="modal-footer text-light">
<button class="btn btn-link" @click.stop="closeModal">
{{ $t('word.close') }}
</button>
</div>
</div>
</div>
</template>
@ -213,7 +212,7 @@ export default {
},
resizeResults () {
if (this.$refs.resultTable) {
const el = this.$refs.tableWrapper;
const el = this.$refs.tableWrapper.parentElement;
if (el) {
const size = el.offsetHeight;
@ -241,7 +240,7 @@ export default {
this.currentSort = '';
this.currentSortDir = 'asc';
},
showInfoModal () {
stopRefresh () {
this.autorefreshTimer = 0;
this.clearRefresh();
},