From ceb135a33dd88e85ba81530d419358669fcd67a4 Mon Sep 17 00:00:00 2001 From: f0o Date: Wed, 23 Sep 2015 09:57:37 +0100 Subject: [PATCH 1/2] Add default width for availability map's tiles --- html/includes/common/availability-map.inc.php | 4 ++-- includes/defaults.inc.php | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/html/includes/common/availability-map.inc.php b/html/includes/common/availability-map.inc.php index 02b80a0b0..2fc72a090 100644 --- a/html/includes/common/availability-map.inc.php +++ b/html/includes/common/availability-map.inc.php @@ -32,7 +32,7 @@ if (defined('show_settings')) { else { require_once 'includes/object-cache.inc.php'; - $tile_width = $widget_settings['tile_width']; + $tile_width = $widget_settings['tile_width']?:$config['availability-map-width']; $sql = 'SELECT `D`.`hostname`,`D`.`device_id`,`D`.`status`,`D`.`uptime` FROM `devices` AS `D`'; @@ -65,7 +65,7 @@ else { $temp_output[] = ''; + )) . '" role="button" class="btn ' . $btn_type . ' btn-xs" title="' . $device['hostname'] . " - " . formatUptime($device['uptime']) . '" style="min-height:' . $tile_width . 'px; min-width: ' . $tile_width . 'px; border-radius:0px; margin:0px; padding:0px;">'; } $temp_rows = count($temp_output); diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php index 21057ea49..6b354842f 100644 --- a/includes/defaults.inc.php +++ b/includes/defaults.inc.php @@ -783,3 +783,6 @@ $config['navbar']['manage_groups']['hide'] = 0; // Show errored ports in the summary table on the dashboard $config['summary_errors'] = 0; + +// Default width of the availability map's tiles +$config['availability-map-width'] = 20; From 096023a6eb361da90989193a70ec98c9fab2c94b Mon Sep 17 00:00:00 2001 From: f0o Date: Wed, 23 Sep 2015 12:26:29 +0100 Subject: [PATCH 2/2] Set default width to 25px --- includes/defaults.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php index 6b354842f..20fb803e4 100644 --- a/includes/defaults.inc.php +++ b/includes/defaults.inc.php @@ -785,4 +785,4 @@ $config['navbar']['manage_groups']['hide'] = 0; $config['summary_errors'] = 0; // Default width of the availability map's tiles -$config['availability-map-width'] = 20; +$config['availability-map-width'] = 25;