Skip to content

Commit

Permalink
Fixing Issue #120 and other minor
Browse files Browse the repository at this point in the history
* SQL syntax error for syslog when click browser back button
* Fixing some row spacing issue on log tab.
  • Loading branch information
TheWitness committed Mar 27, 2020
1 parent fad565c commit c600a92
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ that.

--- develop ---

* issue#120: SQL syntax error for syslog when click browser back button

* issue: Syslog stats not reporting properly

* issue: Internationalization issues on console
Expand Down
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ function syslog_log_row_color($severity, $tip_title) {
break;
}

print "<tr class='$class'>\n";
print "<tr class='tableRow selectable $class'>\n";
}

/** function syslog_row_color()
Expand Down
14 changes: 10 additions & 4 deletions syslog.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,18 +303,24 @@ function syslog_statistics() {
}

if (cacti_sizeof($records)) {
$i = 0;

foreach ($records as $r) {
$time = date($date_format, strtotime($r['insert_time']));

form_alternate_row();
form_alternate_row('line' . $i);

print '<td>' . (get_request_var('host') != '-2' ? $r['host']:'-') . '</td>';
print '<td>' . (get_request_var('facility') != '-2' ? ucfirst($r['facility']):'-') . '</td>';
print '<td>' . (get_request_var('priority') != '-2' ? ucfirst($r['priority']):'-') . '</td>';
print '<td>' . (get_request_var('program') != '-2' ? ucfirst($r['program']):'-') . '</td>';
//print '<td class="right">' . $r['insert_time'] . '</td>';
print '<td class="right">' . $time . '</td>';
print '<td class="right">' . number_format_i18n($r['records'], -1) . '</td>';

form_end_row();

$i++;
}
} else {
print "<tr><td colspan='4'><em>" . __('No Syslog Statistics Found', 'syslog') . "</em></td></tr>";
Expand Down Expand Up @@ -1159,13 +1165,13 @@ function exportRecords() {
}

function clearFilter() {
strURL = 'syslog.php?header=false&clear=true';

strURL = 'syslog.php?tab=' + pageTab;
strURL += '&header=false&clear=true';
loadPageNoHeader(strURL);
}

function saveSettings() {
strURL = 'syslog.php?action=save';
strURL = 'syslog.php?action=save&tab=' + pageTab;
strURL += '&trimval='+$('#trimval').val();
strURL += '&rows='+$('#rows').val();
strURL += '&removal='+$('#removal').val();
Expand Down

0 comments on commit c600a92

Please sign in to comment.