Skip to content

Commit

Permalink
2.21.3 Log parser no longer shows good results as warnings, and corre…
Browse files Browse the repository at this point in the history
…cted prompted issue count when submitting - thanks [Vernon Matteson]
  • Loading branch information
classaxe committed Dec 13, 2020
1 parent a698edb commit 59acbef
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 11 deletions.
14 changes: 10 additions & 4 deletions public/js/functions.js
@@ -1,8 +1,8 @@
/*
* Project: RXX - NDB Logging Database
* Homepage: https://rxx.classaxe.com
* Version: 2.21.0
* Date: 2020-12-12
* Version: 2.21.3
* Date: 2020-12-13
* Licence: LGPL
* Copyright: 2020 Martin Francis
*/
Expand Down Expand Up @@ -1416,7 +1416,13 @@ function initListenersLogUploadForm() {
if (remaining_val !== '') {
remaining_lines = remaining_val.split("\n");
for (i in remaining_lines) {
remaining += (remaining_lines[i].substr(0,2) !== '* ' ? 1 : 0)
if (remaining_lines[i] === '') {
continue;
}
if (remaining_lines[i].substr(0,2) === '* ') {
continue;
}
remaining++;
}
}
var message = (remaining ? m[1] + "\n" + m[2].replace('COUNT', remaining) + "\n\n" + m[3] : m[1]);
Expand Down Expand Up @@ -1578,7 +1584,7 @@ function logsShowRemainder() {
if (logs[i].substr(0,2) === '* ') {
continue;
}
issues = $('table.parse tbody tr.start').eq(i).data('issues');
issues = $('#row_' + i).data('issues');
remainder.push(logs[i] + (issues ? '\n* ISSUES: ' + issues + '\n' : ''));
}
}
Expand Down
6 changes: 3 additions & 3 deletions public/js/functions.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Repository/SignalRepository.php
Expand Up @@ -1472,7 +1472,7 @@ public function updateSignalStats($signalId = false, $updateSpecs = false, $clea
}
$heardIn[] =
($old_link && ($link !== $old_link) ? '</a> ' : ' ')
. ($link && ($link !== $old_link) ? sprintf($link, $row['signalID']) : '')
. (($link ?? '') && ($link !== $old_link) ? sprintf($link, $row['signalID']) : '')
. ' '. ($row["daytime"] ? sprintf("<b>%s</b>", $row["heard_in"]) : $row["heard_in"]);
$old_link = $link;
}
Expand Down
10 changes: 8 additions & 2 deletions src/js/logs.js
Expand Up @@ -162,7 +162,13 @@ function initListenersLogUploadForm() {
if (remaining_val !== '') {
remaining_lines = remaining_val.split("\n");
for (i in remaining_lines) {
remaining += (remaining_lines[i].substr(0,2) !== '* ' ? 1 : 0)
if (remaining_lines[i] === '') {
continue;
}
if (remaining_lines[i].substr(0,2) === '* ') {
continue;
}
remaining++;
}
}
var message = (remaining ? m[1] + "\n" + m[2].replace('COUNT', remaining) + "\n\n" + m[3] : m[1]);
Expand Down Expand Up @@ -324,7 +330,7 @@ function logsShowRemainder() {
if (logs[i].substr(0,2) === '* ') {
continue;
}
issues = $('table.parse tbody tr.start').eq(i).data('issues');
issues = $('#row_' + i).data('issues');
remainder.push(logs[i] + (issues ? '\n* ISSUES: ' + issues + '\n' : ''));
}
}
Expand Down
2 changes: 1 addition & 1 deletion templates/listener/logs_upload/parse.html.twig
Expand Up @@ -131,7 +131,7 @@
{% if usb_check %}{% set issues = issues|merge(['USB changed more than ' ~ tol_offsets ~ 'Hz']) %}{% endif %}
{% if sec_check %}{% set issues = issues|merge(['Cycle time changed more than ' ~ tol_secs ~ ' sec']) %}{% endif %}

<tr class="{% if e.options|length>0 %}choice start{% endif %}{% if not o.active %} inactive{% endif %}{% if has_error %} question{% endif %}"
<tr class="{% if e.options|length>1 %}choice start{% endif %}{% if not o.active %} inactive{% endif %}{% if has_error %} question{% endif %}"
id="row_{{ loop.index -1 }}" data-issues="{{ issues|join(', ') }}"
>
<th class="jump"{% if has_issue %} id="jump_{{ jump_anchor }}"{% endif %}>
Expand Down

0 comments on commit 59acbef

Please sign in to comment.