From 07574b27d8dc7dbe91857753bb94f7a714cf046c Mon Sep 17 00:00:00 2001 From: Bennett Blodinger Date: Thu, 22 Sep 2016 10:44:17 -0400 Subject: [PATCH] Move to Font Awesome Keeps the look more in line with the navigation bar icons. In the future with Bootstrap 4, Glyphicons will not be included, so this starts the transistions away. --- html/includes/common/alerts.inc.php | 8 +- html/includes/functions.inc.php | 6 +- html/includes/print-alert-rules.php | 21 +-- html/includes/print-alert-templates.php | 8 +- html/includes/print-alerts.inc.php | 32 ++-- html/includes/print-interface.inc.php | 2 +- html/includes/table/alertlog.inc.php | 34 ++-- html/includes/table/alerts.inc.php | 6 +- html/includes/table/edit-ports.inc.php | 4 +- html/js/librenms.js | 6 +- html/pages/alert-log.inc.php | 6 +- html/pages/alert-map.inc.php | 4 +- html/pages/device-groups.inc.php | 4 +- html/pages/device/edit/health.inc.php | 16 +- html/pages/device/edit/ports.inc.php | 24 +-- html/pages/device/processes.inc.php | 2 +- html/pages/device/routing/cisco-otv.inc.php | 4 +- html/pages/device/services.inc.php | 4 +- html/pages/health/mempool.inc.php | 2 +- html/pages/health/processor.inc.php | 2 +- html/pages/health/storage.inc.php | 2 +- html/pages/routing/cisco-otv.inc.php | 2 +- html/pages/services.inc.php | 4 +- html/pages/settings/alerting.inc.php | 164 ++++++++++++++------ 24 files changed, 222 insertions(+), 145 deletions(-) diff --git a/html/includes/common/alerts.inc.php b/html/includes/common/alerts.inc.php index 5d0a84decf..23f9263100 100644 --- a/html/includes/common/alerts.inc.php +++ b/html/includes/common/alerts.inc.php @@ -227,7 +227,7 @@ var alerts_grid = $("#alerts_'.$unique_id.'").bootgrid({ return "

" + row.msg + "

"; }, "ack": function(column,row) { - return ""; + return ""; }, "proc": function(column,row) { return ""; @@ -248,7 +248,7 @@ var alerts_grid = $("#alerts_'.$unique_id.'").bootgrid({ }).on("click", function(e) { var target = $(this).data("target"); $(target).collapse(\'toggle\'); - $(this).toggleClass(\'glyphicon-plus glyphicon-minus\'); + $(this).toggleClass(\'fa-plus fa-minus\'); }); alerts_grid.find(".incident").each( function() { $(this).parent().addClass(\'col-lg-4 col-md-4 col-sm-4 col-xs-4\'); @@ -258,8 +258,8 @@ var alerts_grid = $("#alerts_'.$unique_id.'").bootgrid({ $(this).find(".incident-toggle").fadeOut(200); }).on("click", "td:not(.incident-toggle-td)", function() { var target = $(this).parent().find(".incident-toggle").data("target"); - if( $(this).parent().find(".incident-toggle").hasClass(\'glyphicon-plus\') ) { - $(this).parent().find(".incident-toggle").toggleClass(\'glyphicon-plus glyphicon-minus\'); + if( $(this).parent().find(".incident-toggle").hasClass(\'fa-plus\') ) { + $(this).parent().find(".incident-toggle").toggleClass(\'fa-plus fa-minus\'); $(target).collapse(\'toggle\'); } }); diff --git a/html/includes/functions.inc.php b/html/includes/functions.inc.php index 628e335b29..2a988d6c47 100644 --- a/html/includes/functions.inc.php +++ b/html/includes/functions.inc.php @@ -1209,7 +1209,7 @@ function generate_dynamic_config_panel($title, $config_groups, $items = array(), $output .= '
-
+
'; if ($item['type'] == 'checkbox') { @@ -1217,7 +1217,7 @@ function generate_dynamic_config_panel($title, $config_groups, $items = array(), } elseif ($item['type'] == 'text') { $output .= ' - + '; } elseif ($item['type'] == 'select') { $output .= ' @@ -1242,7 +1242,7 @@ function generate_dynamic_config_panel($title, $config_groups, $items = array(), } $output .=' - + '; } $output .= ' diff --git a/html/includes/print-alert-rules.php b/html/includes/print-alert-rules.php index 2c240479f6..8b3ee73eb7 100644 --- a/html/includes/print-alert-rules.php +++ b/html/includes/print-alert-rules.php @@ -162,13 +162,13 @@ $full_query = $full_query.$query." LIMIT $start,$results"; foreach (dbFetchRows($full_query, $param) as $rule) { $sub = dbFetchRows('SELECT * FROM alerts WHERE rule_id = ? ORDER BY `state` DESC, `id` DESC LIMIT 1', array($rule['id'])); - $ico = 'ok'; + $ico = 'check'; $col = 'success'; $extra = ''; if (sizeof($sub) == 1) { $sub = $sub[0]; if ((int) $sub['state'] === 0) { - $ico = 'ok'; + $ico = 'check'; $col = 'success'; } elseif ((int) $sub['state'] === 1 || (int) $sub['state'] === 2) { $ico = 'remove'; @@ -205,9 +205,9 @@ foreach (dbFetchRows($full_query, $param) as $rule) { echo ''.htmlentities($rule['rule']).''; echo ''.$rule['severity'].''; - echo " "; + echo " "; if ($rule_extra['mute'] === true) { - echo ""; + echo ""; } echo 'Max: '.$rule_extra['count'].'
Delay: '.$rule_extra['delay'].'
Interval: '.$rule_extra['interval'].'
'; @@ -219,8 +219,9 @@ foreach (dbFetchRows($full_query, $param) as $rule) { echo ''; echo ''; if ($_SESSION['userlevel'] >= '10') { - echo " "; - echo ""; + echo "
"; + echo " "; + echo ""; } echo ''; @@ -297,15 +298,15 @@ $('input[name="alert-rule"]').on('switchChange.bootstrapSwitch', function(event success: function(msg) { if(msg.indexOf("ERROR:") <= -1) { if(state) { - $('#alert-rule-'+alert_id).removeClass('glyphicon-pause'); - $('#alert-rule-'+alert_id).addClass('glyphicon-'+orig_state); + $('#alert-rule-'+alert_id).removeClass('fa-pause'); + $('#alert-rule-'+alert_id).addClass('fa-'+orig_state); $('#alert-rule-'+alert_id).removeClass('text-default'); $('#alert-rule-'+alert_id).addClass('text-'+orig_colour); $('#row_'+alert_id).removeClass('active'); $('#row_'+alert_id).addClass(orig_class); } else { - $('#alert-rule-'+alert_id).removeClass('glyphicon-'+orig_state); - $('#alert-rule-'+alert_id).addClass('glyphicon-pause'); + $('#alert-rule-'+alert_id).removeClass('fa-'+orig_state); + $('#alert-rule-'+alert_id).addClass('fa-pause'); $('#alert-rule-'+alert_id).removeClass('text-'+orig_colour); $('#alert-rule-'+alert_id).addClass('text-default'); $('#row_'+alert_id).removeClass('warning'); diff --git a/html/includes/print-alert-templates.php b/html/includes/print-alert-templates.php index 0af128a766..0541291e5b 100644 --- a/html/includes/print-alert-templates.php +++ b/html/includes/print-alert-templates.php @@ -79,9 +79,11 @@ foreach (dbFetchRows($full_query, $param) as $template) { '.$template['name'].' '; if ($_SESSION['userlevel'] >= '10') { - echo " "; - echo " "; - echo ""; + echo "
"; + echo " "; + echo " "; + echo "
"; echo ''; echo ''; } diff --git a/html/pages/device-groups.inc.php b/html/pages/device-groups.inc.php index 0f1dd6a8fe..6d84020aeb 100644 --- a/html/pages/device-groups.inc.php +++ b/html/pages/device-groups.inc.php @@ -16,8 +16,8 @@ if (!empty($group_count_check)) { echo ''.$group['desc'].''; echo ''.$group['pattern'].''; echo ''; - echo " "; - echo ""; + echo " "; + echo ""; echo ''; echo ''; } diff --git a/html/pages/device/edit/health.inc.php b/html/pages/device/edit/health.inc.php index e5f104fa97..8073e19b39 100644 --- a/html/pages/device/edit/health.inc.php +++ b/html/pages/device/edit/health.inc.php @@ -58,13 +58,17 @@ foreach (dbFetchRows("SELECT * FROM sensors WHERE device_id = ? AND sensor_delet
- +
- +
@@ -128,18 +132,18 @@ $( ".sensor" ).blur(function() { dataType: "html", success: function(data){ $this.closest('.form-group').addClass('has-success'); - $this.next().addClass('glyphicon-ok'); + $this.next().addClass('fa-check'); setTimeout(function(){ $this.closest('.form-group').removeClass('has-success'); - $this.next().removeClass('glyphicon-ok'); + $this.next().removeClass('fa-check'); }, 2000); }, error:function(){ $(this).closest('.form-group').addClass('has-error'); - $this.next().addClass('glyphicon-remove'); + $this.next().addClass('fa-times'); setTimeout(function(){ $this.closest('.form-group').removeClass('has-error'); - $this.next().removeClass('glyphicon-remove'); + $this.next().removeClass('fa-times'); }, 2000); } }); diff --git a/html/pages/device/edit/ports.inc.php b/html/pages/device/edit/ports.inc.php index bd37f5cb2f..86aedef1cc 100644 --- a/html/pages/device/edit/ports.inc.php +++ b/html/pages/device/edit/ports.inc.php @@ -41,28 +41,28 @@ success: function (data) { if (data.status == 'ok') { $this.closest('.form-group').addClass('has-success'); - $this.next().addClass('glyphicon-ok'); + $this.next().addClass('fa-check'); setTimeout(function(){ $this.closest('.form-group').removeClass('has-success'); - $this.next().removeClass('glyphicon-ok'); + $this.next().removeClass('fa-check'); }, 2000); } else if (data.status == 'na') { } else { $(this).closest('.form-group').addClass('has-error'); - $this.next().addClass('glyphicon-remove'); + $this.next().addClass('fa-times'); setTimeout(function(){ $this.closest('.form-group').removeClass('has-error'); - $this.next().removeClass('glyphicon-remove'); + $this.next().removeClass('fa-times'); }, 2000); } }, error: function () { $(this).closest('.form-group').addClass('has-error'); - $this.next().addClass('glyphicon-remove'); + $this.next().addClass('fa-times'); setTimeout(function(){ $this.closest('.form-group').removeClass('has-error'); - $this.next().removeClass('glyphicon-remove'); + $this.next().removeClass('fa-times'); }, 2000); } }); @@ -82,29 +82,29 @@ success: function (data) { if (data.status == 'ok') { $this.closest('.form-group').addClass('has-success'); - $this.next().addClass('glyphicon-ok'); + $this.next().addClass('fa-check'); $this.val(speed); setTimeout(function(){ $this.closest('.form-group').removeClass('has-success'); - $this.next().removeClass('glyphicon-ok'); + $this.next().removeClass('fa-check'); }, 2000); } else if (data.status == 'na') { } else { $(this).closest('.form-group').addClass('has-error'); - $this.next().addClass('glyphicon-remove'); + $this.next().addClass('fa-times'); setTimeout(function(){ $this.closest('.form-group').removeClass('has-error'); - $this.next().removeClass('glyphicon-remove'); + $this.next().removeClass('fa-times'); }, 2000); } }, error: function () { $(this).closest('.form-group').addClass('has-error'); - $this.next().addClass('glyphicon-remove'); + $this.next().addClass('fa-times'); setTimeout(function(){ $this.closest('.form-group').removeClass('has-error'); - $this.next().removeClass('glyphicon-remove'); + $this.next().removeClass('fa-times'); }, 2000); } }); diff --git a/html/pages/device/processes.inc.php b/html/pages/device/processes.inc.php index 299b5ec0da..0ca7f1a7ce 100644 --- a/html/pages/device/processes.inc.php +++ b/html/pages/device/processes.inc.php @@ -72,7 +72,7 @@ foreach ($heads as $head => $extra) { $bhead = 'asc'; $icon = ''; if ('`'.$lhead.'`' == $order) { - $icon = " class='glyphicon glyphicon-chevron-"; + $icon = " class='fa fa-chevron-"; if ($by == 'asc') { $bhead = 'desc'; $icon .= 'up'; diff --git a/html/pages/device/routing/cisco-otv.inc.php b/html/pages/device/routing/cisco-otv.inc.php index 00d8794abb..da68ecca11 100644 --- a/html/pages/device/routing/cisco-otv.inc.php +++ b/html/pages/device/routing/cisco-otv.inc.php @@ -11,7 +11,7 @@ global $config; ?>
-

Overlay's & Adjacencies

+

Overlay's & Adjacencies

$adjacency) { $gli = "list-group-item-danger"; } ?> - - + -
- - + +
diff --git a/html/pages/health/mempool.inc.php b/html/pages/health/mempool.inc.php index 47a430d4da..f69374ff4d 100644 --- a/html/pages/health/mempool.inc.php +++ b/html/pages/health/mempool.inc.php @@ -29,7 +29,7 @@ return "

" + row.msg + "

"; }, "ack": function(column,row) { - return ""; + return ""; } }, templates: { diff --git a/html/pages/health/processor.inc.php b/html/pages/health/processor.inc.php index cfef63060d..1ff103d1ba 100644 --- a/html/pages/health/processor.inc.php +++ b/html/pages/health/processor.inc.php @@ -28,7 +28,7 @@ return "

" + row.msg + "

"; }, "ack": function(column,row) { - return ""; + return ""; } }, templates: { diff --git a/html/pages/health/storage.inc.php b/html/pages/health/storage.inc.php index acb7e70ed5..9c6ab38b0e 100644 --- a/html/pages/health/storage.inc.php +++ b/html/pages/health/storage.inc.php @@ -29,7 +29,7 @@ return "

" + row.msg + "

"; }, "ack": function(column,row) { - return ""; + return ""; } }, templates: { diff --git a/html/pages/routing/cisco-otv.inc.php b/html/pages/routing/cisco-otv.inc.php index 17c7ac3c6d..41fa98ce2f 100644 --- a/html/pages/routing/cisco-otv.inc.php +++ b/html/pages/routing/cisco-otv.inc.php @@ -39,7 +39,7 @@ foreach ($COMPONENTS as $DEVICE_ID => $COMP) { $GLI = "list-group-item-danger"; } ?> - - + - - - + + API URL ('.$api_method.')
- +
@@ -328,7 +330,9 @@ foreach ($api_urls as $api_url) {
- +
@@ -371,10 +375,12 @@ if (empty($config_groups['alert.transports.pagerduty']['config_value']) === fals
-
+
- +
@@ -390,7 +396,7 @@ if (empty($config_groups['alert.transports.pagerduty']['config_value']) === fals
-
+
@@ -429,7 +435,9 @@ foreach ($slack_urls as $slack_url) {
- +
@@ -438,7 +446,9 @@ foreach ($slack_urls as $slack_url) {
- +
'; @@ -449,7 +459,9 @@ foreach ($slack_urls as $slack_url) {
- +
@@ -497,7 +509,9 @@ foreach ($hipchat_urls as $hipchat_url) {
- +
@@ -507,20 +521,26 @@ foreach ($hipchat_urls as $hipchat_url) {
- +
- +
- +
'; @@ -531,7 +551,9 @@ foreach ($hipchat_urls as $hipchat_url) {
- +
@@ -541,14 +563,18 @@ foreach ($hipchat_urls as $hipchat_url) {
- +
- +
@@ -592,7 +618,9 @@ foreach ($pushover_appkeys as $pushover_appkey) {
- +
@@ -602,13 +630,17 @@ foreach ($pushover_appkeys as $pushover_appkey) {
- +
- +
'; @@ -619,7 +651,9 @@ echo '
- +
@@ -629,7 +663,9 @@ echo '
- +
@@ -672,7 +708,9 @@ foreach ($boxcar_appkeys as $boxcar_appkey) {
- +
@@ -681,7 +719,9 @@ foreach ($boxcar_appkeys as $boxcar_appkey) {
- +
'; @@ -692,7 +732,9 @@ echo '
- +
@@ -717,10 +759,12 @@ echo '
-
+
- +
@@ -736,10 +780,12 @@ echo '
-
+
- +
@@ -767,14 +813,18 @@ echo '
- +
- +
@@ -803,35 +853,45 @@ echo '
- +
- +
- +
- +
- +
@@ -855,35 +915,45 @@ echo '
- +
- +
- +
- +
- +
@@ -1242,17 +1312,17 @@ echo ' success: function (data) { if (data.status == 'ok') { $this.closest('.form-group').addClass('has-success'); - $this.next().addClass('glyphicon-ok'); + $this.next().addClass('fa-check'); setTimeout(function(){ $this.closest('.form-group').removeClass('has-success'); - $this.next().removeClass('glyphicon-ok'); + $this.next().removeClass('fa-check'); }, 2000); } else { $(this).closest('.form-group').addClass('has-error'); - $this.next().addClass('glyphicon-remove'); + $this.next().addClass('fa-times'); setTimeout(function(){ $this.closest('.form-group').removeClass('has-error'); - $this.next().removeClass('glyphicon-remove'); + $this.next().removeClass('fa-times'); }, 2000); } }, @@ -1275,17 +1345,17 @@ echo ' success: function (data) { if (data.status == 'ok') { $this.closest('.form-group').addClass('has-success'); - $this.next().addClass('glyphicon-ok'); + $this.next().addClass('fa-check'); setTimeout(function(){ $this.closest('.form-group').removeClass('has-success'); - $this.next().removeClass('glyphicon-ok'); + $this.next().removeClass('fa-check'); }, 2000); } else { $(this).closest('.form-group').addClass('has-error'); - $this.next().addClass('glyphicon-remove'); + $this.next().addClass('fa-times'); setTimeout(function(){ $this.closest('.form-group').removeClass('has-error'); - $this.next().removeClass('glyphicon-remove'); + $this.next().removeClass('fa-times'); }, 2000); } },