From e57527112680fd2bd175e158e4b42ac4b8435e86 Mon Sep 17 00:00:00 2001 From: crcro Date: Sat, 13 Aug 2016 03:20:55 +0300 Subject: [PATCH] added linux os distro icon, fixed formatting --- html/ajax_mapview.php | 2 +- html/css/light.css | 18 +++++------ html/includes/common/availability-map.inc.php | 31 +++++++------------ html/js/librenms.js | 2 +- 4 files changed, 22 insertions(+), 31 deletions(-) diff --git a/html/ajax_mapview.php b/html/ajax_mapview.php index bfc2d19e0b..66c4cd34d4 100644 --- a/html/ajax_mapview.php +++ b/html/ajax_mapview.php @@ -4,4 +4,4 @@ if (isset($_REQUEST['mapView'])) { $_SESSION['mapView'] = $_REQUEST['mapView']; } header('Content-type: text/plain'); -echo $_SESSION['mapView']; \ No newline at end of file +echo $_SESSION['mapView']; diff --git a/html/css/light.css b/html/css/light.css index ab40e3bc13..ac21bcf9c4 100644 --- a/html/css/light.css +++ b/html/css/light.css @@ -87,7 +87,7 @@ 100% { -o-transform: rotate(360deg); transform: rotate(360deg); } } @-ms-keyframes pace-spinner { - 0% { -ms-transform: rotate(0deg); transform: rotate(0deg); } + 0% { -ms-transform: rotate(0deg); transform: rotate(0deg); } 100% { -ms-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes pace-spinner { @@ -95,7 +95,7 @@ 100% { transform: rotate(360deg); transform: rotate(360deg); } } -.device-availability, .service-availability{ +.device-availability, .service-availability { color:#000000; float:left; width:166px; @@ -118,11 +118,11 @@ border:1px solid #FFB733; } -.availability-label{ +.availability-label { float:right;margin:-8px; } -.service-name-label{ +.service-name-label { float:left;margin:-8px; } @@ -157,13 +157,13 @@ .page-availability-title { font-size:26px; - font-weight: bold; + font-weight:bold; line-height:40px; } .page-availability-report-select { font-size:24px; - font-weight: bold; + font-weight:bold; padding-right:10px; } @@ -185,10 +185,10 @@ .widget-availability-host { float:left; - margin-bottom: 10px; + margin-bottom:10px; } .widget-availability-service { float:right; - margin-bottom: 10px; -} \ No newline at end of file + margin-bottom:10px; +} diff --git a/html/includes/common/availability-map.inc.php b/html/includes/common/availability-map.inc.php index decaad5c48..bf82cdc363 100644 --- a/html/includes/common/availability-map.inc.php +++ b/html/includes/common/availability-map.inc.php @@ -54,7 +54,7 @@ if (defined('show_settings')) { if ($mode == 0 || $mode == 2) { // Only show devices if mode is 0 or 2 (Only Devices or both) - $sql = 'SELECT `D`.`hostname`,`D`.`device_id`,`D`.`status`,`D`.`uptime`, `D`.`os` FROM `devices` AS `D`'; + $sql = 'SELECT `D`.`hostname`,`D`.`device_id`,`D`.`status`,`D`.`uptime`, `D`.`os`, `D`.`icon` FROM `devices` AS `D`'; if (is_normal_user() === true) { $sql .= ' , `devices_perms` AS P WHERE D.`device_id` = P.`device_id` AND P.`user_id` = ? AND'; $param = array( @@ -83,8 +83,7 @@ if (defined('show_settings')) { $host_down_count++; } - if($directpage == "yes") - { + if($directpage == "yes") { $deviceIcon = getImage($device); $temp_output[] = ''; @@ -104,7 +103,7 @@ if (defined('show_settings')) { } if ($mode == 1 || $mode == 2) { - $service_query = 'select `S`.`service_type`, `S`.`service_id`, `S`.`service_desc`, `S`.`service_status`, `D`.`hostname`, `D`.`device_id`, `D`.`os` from services S, devices D where `S`.`device_id` = `D`.`device_id`;'; + $service_query = 'select `S`.`service_type`, `S`.`service_id`, `S`.`service_desc`, `S`.`service_status`, `D`.`hostname`, `D`.`device_id`, `D`.`os`, `D`.`icon` from services S, devices D where `S`.`device_id` = `D`.`device_id`;'; foreach (dbFetchRows($service_query) as $service) { if ($service['service_status'] == '0') { $serviceLabel = "label-success"; @@ -116,8 +115,7 @@ if (defined('show_settings')) { $service_down_count += 1; } - if($directpage == "yes") - { + if($directpage == "yes") { $deviceIcon = getImage($service); $temp_output[] = ''; @@ -136,8 +134,7 @@ if (defined('show_settings')) { } } - if($directpage == "yes") - { + if($directpage == "yes") { $temp_header[] = '
'; $temp_header[] = 'Availability map for'; $temp_header[] = '
'; $temp_header[] = '
'; - } - if ($mode == 0 || $mode == 2) - { - if($directpage == "yes") - { + if ($mode == 0 || $mode == 2) { + if($directpage == "yes") { $temp_header[] = '
'; $temp_header[] = 'Hosts report:'; $temp_header[] = '
'; @@ -172,13 +166,10 @@ if (defined('show_settings')) { } else { $temp_header[] = '
Total hosts '.$host_up_count.' '.$host_warn_count.' '.$host_down_count.'
'; } - } - if ($mode == 1 || $mode == 2) - { - if($directpage == "yes") - { + if ($mode == 1 || $mode == 2) { + if($directpage == "yes") { $temp_header[] = '
'; $temp_header[] = 'Services report:'; @@ -197,7 +188,7 @@ if (defined('show_settings')) { } $temp_header[] = '
'; - $temp_header[] = '
'; + $temp_header[] = '
'; $common_output = array_merge($temp_header, $temp_output); -} \ No newline at end of file +} diff --git a/html/js/librenms.js b/html/js/librenms.js index 84cc1b6694..8bed8ff000 100644 --- a/html/js/librenms.js +++ b/html/js/librenms.js @@ -254,4 +254,4 @@ $(document).ready(function() { }); } }); -}); \ No newline at end of file +});