mirror of
https://github.com/Av0idD4rk/packmate.git
synced 2026-10-23 21:42:06 +00:00
Обновлена пагинация
This commit is contained in:
parent
9ff0cefd57
commit
b5d3074f76
@ -41,9 +41,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import SidebarStream from './SidebarStream';
|
import SidebarStream from './SidebarStream';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Sidebar',
|
name: 'Sidebar',
|
||||||
props: ['servicePort', 'streamId',],
|
props: ['servicePort', 'streamId',],
|
||||||
data() {
|
data() {
|
||||||
@ -134,11 +134,10 @@
|
|||||||
if (ourStreams?.length && ourStreams[ourStreams.length - 1]) {
|
if (ourStreams?.length && ourStreams[ourStreams.length - 1]) {
|
||||||
startsFrom = ourStreams[ourStreams.length - 1].id;
|
startsFrom = ourStreams[ourStreams.length - 1].id;
|
||||||
} else {
|
} else {
|
||||||
startsFrom = Number.MAX_SAFE_INTEGER;
|
startsFrom = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$http.post(`/stream/${this.$route?.params?.servicePort || 'all'}`, {
|
this.$http.post(`/stream/${this.$route?.params?.servicePort || 'all'}`, {
|
||||||
direction: 'DESC',
|
|
||||||
startingFrom: startsFrom,
|
startingFrom: startsFrom,
|
||||||
pageSize: this.$store.state.pageSize,
|
pageSize: this.$store.state.pageSize,
|
||||||
pattern: this.$route.query.pattern ? {id: this.$route.query.pattern,} : null,
|
pattern: this.$route.query.pattern ? {id: this.$route.query.pattern,} : null,
|
||||||
|
|||||||
@ -37,11 +37,10 @@
|
|||||||
if (packets && packets.length && packets[packets.length - 1]) {
|
if (packets && packets.length && packets[packets.length - 1]) {
|
||||||
startsFrom = packets[packets.length - 1].id;
|
startsFrom = packets[packets.length - 1].id;
|
||||||
} else {
|
} else {
|
||||||
startsFrom = 0;
|
startsFrom = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$http.post(`packet/${this.$route.params.streamId}`, {
|
this.$http.post(`packet/${this.$route.params.streamId}`, {
|
||||||
direction: 'ASC',
|
|
||||||
startingFrom: startsFrom,
|
startingFrom: startsFrom,
|
||||||
pageSize: this.$store.state.pageSize,
|
pageSize: this.$store.state.pageSize,
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
|
|||||||
@ -39,7 +39,7 @@ export default {
|
|||||||
console.debug('Form is invalid');
|
console.debug('Form is invalid');
|
||||||
return;
|
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)
|
this.$http.post(`pattern/${this.patternId}/lookback`, this.minutes)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user