mirror of
https://github.com/craigerl/aprsd.git
synced 2024-11-17 22:01:49 -05:00
Added messages count to admin messages list.
This patch adds a simple count of packets shown in the messages list on the admin ui.
This commit is contained in:
parent
ccaab72124
commit
5afc7fb664
@ -11,6 +11,8 @@ window.chartColors = {
|
||||
black: 'rgb(0, 0, 0)'
|
||||
};
|
||||
|
||||
function size_dict(d){c=0; for (i in d) ++c; return c}
|
||||
|
||||
function start_charts() {
|
||||
Chart.scaleService.updateScaleDefaults('linear', {
|
||||
ticks: {
|
||||
@ -221,6 +223,10 @@ function update_packets( data ) {
|
||||
|
||||
$('.ui.accordion').accordion('refresh');
|
||||
|
||||
// Update the count of messages shown
|
||||
cnt = size_dict(packet_list);
|
||||
console.log("packets list " + cnt)
|
||||
$('#packets_count').html(cnt);
|
||||
|
||||
const html_pretty = Prism.highlight(JSON.stringify(data, null, '\t'), Prism.languages.json, 'json');
|
||||
$("#packetsjson").html(html_pretty);
|
||||
|
@ -80,7 +80,7 @@
|
||||
</div>
|
||||
|
||||
<div class="ui tab" data-tab="msgs-tab">
|
||||
<h3>Messages</h3>
|
||||
<h3>Messages (<span id="packets_count">0</span>)</h3>
|
||||
<div class="ui styled fluid accordion" id="accordion">
|
||||
<div id="packetsDiv">
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user