mirror of
https://github.com/Av0idD4rk/packmate.git
synced 2026-10-25 11:29:24 +00:00
Show timing between packets
This commit is contained in:
parent
1107eb78e3
commit
079e8e95b6
@ -307,7 +307,3 @@
|
|||||||
padding-top: 55px; /* Space for fixed navbar */
|
padding-top: 55px; /* Space for fixed navbar */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
@import "~bootstrap-darkmode/scss/darktheme";
|
|
||||||
</style>
|
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="{'packet-incoming': packet.incoming, 'packet-outgoing': !packet.incoming}">
|
<div :class="{'packet-incoming': packet.incoming, 'packet-outgoing': !packet.incoming}">
|
||||||
<div>#{{ packet.id }} at {{ dateToText(packet.timestamp) }}, {{ printPacketFlags(packet) }}
|
<div>#{{ packet.id }} at {{ dateToText(packet.timestamp) }}
|
||||||
|
<template v-if="offset !== null"> (+{{ offset }} ms)</template>
|
||||||
|
{{ printPacketFlags(packet) }}
|
||||||
<button @click.prevent="copyRaw" class="btn btn-link">Copy HEX</button>
|
<button @click.prevent="copyRaw" class="btn btn-link">Copy HEX</button>
|
||||||
<button @click.prevent="copyText" class="btn btn-link">Copy text</button>
|
<button @click.prevent="copyText" class="btn btn-link">Copy text</button>
|
||||||
<button @click.prevent="copyPythonBytes" class="btn btn-link">Copy as Python bytes</button>
|
<button @click.prevent="copyPythonBytes" class="btn btn-link">Copy as Python bytes</button>
|
||||||
@ -29,6 +31,7 @@
|
|||||||
tlsDecrypted: Boolean(),
|
tlsDecrypted: Boolean(),
|
||||||
content: String(),
|
content: String(),
|
||||||
},
|
},
|
||||||
|
offset: Number(),
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
hexdata() {
|
hexdata() {
|
||||||
|
|||||||
@ -9,6 +9,7 @@ import store from './store';
|
|||||||
import 'bootstrap/dist/css/bootstrap.css';
|
import 'bootstrap/dist/css/bootstrap.css';
|
||||||
import 'bootstrap-vue/dist/bootstrap-vue.css';
|
import 'bootstrap-vue/dist/bootstrap-vue.css';
|
||||||
import '@fortawesome/fontawesome-free/css/all.css';
|
import '@fortawesome/fontawesome-free/css/all.css';
|
||||||
|
import "bootstrap-darkmode/scss/darktheme.scss";
|
||||||
|
|
||||||
Vue.config.productionTip = false;
|
Vue.config.productionTip = false;
|
||||||
Vue.use(BootstrapVue);
|
Vue.use(BootstrapVue);
|
||||||
|
|||||||
@ -5,9 +5,10 @@
|
|||||||
<span style="background: var(--response-packet-color); box-shadow: 0 0 3px 3px var(--response-packet-color);">response</span>.
|
<span style="background: var(--response-packet-color); box-shadow: 0 0 3px 3px var(--response-packet-color);">response</span>.
|
||||||
<ThemeButton class="d-inline float-right" style="margin-top: -0.25rem" />
|
<ThemeButton class="d-inline float-right" style="margin-top: -0.25rem" />
|
||||||
</p>
|
</p>
|
||||||
<Packet v-for="packet in packets"
|
<Packet v-for="packetWithOffset in packetsWithOffsets"
|
||||||
:key="packet.id"
|
:key="packetWithOffset.packet.id"
|
||||||
:packet="packet"/>
|
:packet="packetWithOffset.packet"
|
||||||
|
:offset="packetWithOffset.offset" />
|
||||||
<infinite-loading @infinite="infiniteLoadingHandler" ref="infiniteLoader">
|
<infinite-loading @infinite="infiniteLoadingHandler" ref="infiniteLoader">
|
||||||
<span slot="no-results"></span>
|
<span slot="no-results"></span>
|
||||||
</infinite-loading>
|
</infinite-loading>
|
||||||
@ -26,6 +27,19 @@
|
|||||||
packets: [],
|
packets: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
packetsWithOffsets: function() {
|
||||||
|
return this.packets.map((el, i) => {
|
||||||
|
let offset = null;
|
||||||
|
|
||||||
|
if (i !== 0) {
|
||||||
|
offset = el.timestamp - this.packets[i - 1].timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
return {packet: el, offset: offset,}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$route.params.streamId': function () {
|
'$route.params.streamId': function () {
|
||||||
this.packets = [];
|
this.packets = [];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user