mirror of https://github.com/reiseburo/offtopic
Add display of timestamps for when we receive the message
It doesn't look like we can know from the Message in Kafka when it was actually received by Kafka, so this will be enough to give us some semblence of time FIxes #20
This commit is contained in:
parent
d15f1adb5e
commit
9bdcb2138d
|
@ -36,6 +36,7 @@
|
|||
{{=<% %>=}}
|
||||
<script id="message-display-template" type="text/x-handlebars-template">
|
||||
<div id="{{message_id}}" class="list-group-item message-container">
|
||||
<div class="message-timestamp">{{timestamp}}</div>
|
||||
<code>{{topic}}:{{partition}}</code>
|
||||
<span class="offset">(offset: {{offset}})</span>
|
||||
<pre class="pre-scrollable message-raw">{{raw}}</pre>
|
||||
|
@ -47,6 +48,7 @@
|
|||
</script>
|
||||
<%={{ }}=%>
|
||||
|
||||
<script src="/js/moment.min.js"></script>
|
||||
<script src="/js/ws.js"></script>
|
||||
<script type="text/javascript">
|
||||
watchTopic("{{name}}");
|
||||
|
|
|
@ -22,3 +22,7 @@ body {
|
|||
font-family: monospace;
|
||||
font-size: 0.7em;
|
||||
}
|
||||
|
||||
.message-timestamp {
|
||||
float: right;
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -23,7 +23,8 @@ function watchTopic(name) {
|
|||
partition: data.partition,
|
||||
offset: data.offset,
|
||||
raw: data.raw,
|
||||
b64: data.b64
|
||||
b64: data.b64,
|
||||
timestamp: moment(data.tstamp, 'x').format('MMM Do YYYY, H:mm:ss')
|
||||
}));
|
||||
|
||||
$("#" + el_id).click(function(ev) {
|
||||
|
|
Loading…
Reference in New Issue