From ceb135a33dd88e85ba81530d419358669fcd67a4 Mon Sep 17 00:00:00 2001 From: f0o Date: Wed, 23 Sep 2015 09:57:37 +0100 Subject: [PATCH] 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 02b80a0b00..2fc72a0909 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 21057ea495..6b354842f3 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;