Skip to content

Commit

Permalink
feature: Migrate all Syslog Images to Fontawesome Glyphs
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWitness committed Oct 2, 2020
1 parent 850e962 commit f0287ab
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

* issue#133: Saving Settings on the Syslog Tab are not retained in latest Cacti

* feature: Migrate all Syslog Images to Fontawesome Glyphs

--- 2.9 ---

* issue#120: SQL syntax error for syslog when click browser back button
Expand Down
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ function syslog_row_color($priority, $message) {
break;
}

print "<tr title='" . html_escape($message) . "' class='selectable $class syslogRow'>\n";
print "<tr title='" . html_escape($message) . "' class='tableRow selectable $class syslogRow'>";
}

function sql_hosts_where($tab) {
Expand Down
2 changes: 1 addition & 1 deletion setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -1177,7 +1177,7 @@ function syslog_graph_buttons($graph_elements = array()) {
$host_id = syslog_db_fetch_cell('SELECT host_id FROM syslog_hosts ' . $sql_where);

if ($host_id) {
print "<a class='iconLink' href='" . htmlspecialchars($config['url_path'] . 'plugins/syslog/syslog.php?tab=syslog&reset=1&host=' . $host_id . '&date1=' . $date1 . '&date2=' . $date2) . "'><img src='" . $config['url_path'] . "plugins/syslog/images/view_syslog.png' alt='' title='" . __('Display Syslog in Range', 'syslog') . "'></a><br>";
print "<a class='iconLink' href='" . htmlspecialchars($config['url_path'] . 'plugins/syslog/syslog.php?tab=syslog&reset=1&host=' . $host_id . '&date1=' . $date1 . '&date2=' . $date2) . "' title='" . __('Display Syslog in Range', 'syslog') . "'><i class='deviceRecovering fas fa-exclamation-triangle'></i></a><br>";
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions syslog.php
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,7 @@ function syslog_syslog_legend() {
global $disabled_color, $notmon_color, $database_default;

html_start_box('', '100%', '', '3', 'center', '');
print '<tr>';
print '<tr class="">';
print "<td width='10%' class='logEmergency'>" . __('Emergency', 'syslog') . '</td>';
print "<td width='10%' class='logCritical'>" . __('Critical', 'syslog') . '</td>';
print "<td width='10%' class='logAlert'>" . __('Alert', 'syslog') . '</td>';
Expand All @@ -1519,7 +1519,7 @@ function syslog_log_legend() {
global $disabled_color, $notmon_color, $database_default;

html_start_box('', '100%', '', '3', 'center', '');
print '<tr>';
print '<tr class="">';
print "<td width='10%' class='logCritical'>" . __('Critical', 'syslog') . '</td>';
print "<td width='10%' class='logWarning'>" . __('Warning', 'syslog') . '</td>';
print "<td width='10%' class='logNotice'>" . __('Notice', 'syslog') . '</td>';
Expand Down Expand Up @@ -1651,8 +1651,8 @@ function syslog_messages($tab = 'syslog') {
if (api_plugin_user_realm_auth('syslog_alerts.php')) {
$url = '';
if ($sm['mtype'] == 'main') {
$url .= "<a style='padding:1px' href='" . html_escape('syslog_alerts.php?id=' . $sm[$syslog_incoming_config['id']] . '&action=newedit&type=0') . "'><img src='" . $config['url_path'] . "plugins/syslog/images/add.png'></a>";
$url .= "<a style='padding:1px' href='" . html_escape('syslog_removal.php?id=' . $sm[$syslog_incoming_config['id']] . '&action=newedit&type=new&type=0') . "'><img src='" . $config['url_path'] . "plugins/syslog/images/delete.png'></a>";
$url .= "<a style='padding:1px' href='" . html_escape('syslog_alerts.php?id=' . $sm[$syslog_incoming_config['id']] . '&action=newedit&type=0') . "'><i class='deviceUp fas fa-plus-circle'></i>";
$url .= "<a style='padding:1px' href='" . html_escape('syslog_removal.php?id=' . $sm[$syslog_incoming_config['id']] . '&action=newedit&type=new&type=0') . "'><i class='deviceDown fas fa-minus-circle'></i>";
}

form_selectable_cell($url, $sm['seq'], '', 'left');
Expand Down

0 comments on commit f0287ab

Please sign in to comment.