Обновлена пагинация

This commit is contained in:
sshkurov 2022-02-06 10:46:18 +03:00
parent 9ff0cefd57
commit b5d3074f76
3 changed files with 5 additions and 7 deletions

View File

@ -41,9 +41,9 @@
</template>
<script>
import SidebarStream from './SidebarStream';
import SidebarStream from './SidebarStream';
export default {
export default {
name: 'Sidebar',
props: ['servicePort', 'streamId',],
data() {
@ -134,11 +134,10 @@
if (ourStreams?.length && ourStreams[ourStreams.length - 1]) {
startsFrom = ourStreams[ourStreams.length - 1].id;
} else {
startsFrom = Number.MAX_SAFE_INTEGER;
startsFrom = null;
}
this.$http.post(`/stream/${this.$route?.params?.servicePort || 'all'}`, {
direction: 'DESC',
startingFrom: startsFrom,
pageSize: this.$store.state.pageSize,
pattern: this.$route.query.pattern ? {id: this.$route.query.pattern,} : null,

View File

@ -37,11 +37,10 @@
if (packets && packets.length && packets[packets.length - 1]) {
startsFrom = packets[packets.length - 1].id;
} else {
startsFrom = 0;
startsFrom = null;
}
this.$http.post(`packet/${this.$route.params.streamId}`, {
direction: 'ASC',
startingFrom: startsFrom,
pageSize: this.$store.state.pageSize,
}).then(response => {

View File

@ -39,7 +39,7 @@ export default {
console.debug('Form is invalid');
return;
}
console.debug('Looking back with pattern TODO');
console.debug(`Looking back with pattern ${this.patternId}`);
this.$http.post(`pattern/${this.patternId}/lookback`, this.minutes)
.then(() => {