Skip to content

Commit c600a92

Browse files
committed
Fixing Issue #120 and other minor
* SQL syntax error for syslog when click browser back button * Fixing some row spacing issue on log tab.
1 parent fad565c commit c600a92

3 files changed

Lines changed: 13 additions & 5 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ that.
157157

158158
--- develop ---
159159

160+
* issue#120: SQL syntax error for syslog when click browser back button
161+
160162
* issue: Syslog stats not reporting properly
161163

162164
* issue: Internationalization issues on console

functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ function syslog_log_row_color($severity, $tip_title) {
530530
break;
531531
}
532532

533-
print "<tr class='$class'>\n";
533+
print "<tr class='tableRow selectable $class'>\n";
534534
}
535535

536536
/** function syslog_row_color()

syslog.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,18 +303,24 @@ function syslog_statistics() {
303303
}
304304

305305
if (cacti_sizeof($records)) {
306+
$i = 0;
307+
306308
foreach ($records as $r) {
307309
$time = date($date_format, strtotime($r['insert_time']));
308310

309-
form_alternate_row();
311+
form_alternate_row('line' . $i);
312+
310313
print '<td>' . (get_request_var('host') != '-2' ? $r['host']:'-') . '</td>';
311314
print '<td>' . (get_request_var('facility') != '-2' ? ucfirst($r['facility']):'-') . '</td>';
312315
print '<td>' . (get_request_var('priority') != '-2' ? ucfirst($r['priority']):'-') . '</td>';
313316
print '<td>' . (get_request_var('program') != '-2' ? ucfirst($r['program']):'-') . '</td>';
314317
//print '<td class="right">' . $r['insert_time'] . '</td>';
315318
print '<td class="right">' . $time . '</td>';
316319
print '<td class="right">' . number_format_i18n($r['records'], -1) . '</td>';
320+
317321
form_end_row();
322+
323+
$i++;
318324
}
319325
} else {
320326
print "<tr><td colspan='4'><em>" . __('No Syslog Statistics Found', 'syslog') . "</em></td></tr>";
@@ -1159,13 +1165,13 @@ function exportRecords() {
11591165
}
11601166

11611167
function clearFilter() {
1162-
strURL = 'syslog.php?header=false&clear=true';
1163-
1168+
strURL = 'syslog.php?tab=' + pageTab;
1169+
strURL += '&header=false&clear=true';
11641170
loadPageNoHeader(strURL);
11651171
}
11661172

11671173
function saveSettings() {
1168-
strURL = 'syslog.php?action=save';
1174+
strURL = 'syslog.php?action=save&tab=' + pageTab;
11691175
strURL += '&trimval='+$('#trimval').val();
11701176
strURL += '&rows='+$('#rows').val();
11711177
strURL += '&removal='+$('#removal').val();

0 commit comments

Comments
 (0)