diff --git a/html/includes/print-map.inc.php b/html/includes/print-map.inc.php
index b79e9f54a..899b1b9f0 100644
--- a/html/includes/print-map.inc.php
+++ b/html/includes/print-map.inc.php
@@ -37,7 +37,8 @@ $tmp_ids = array();
$tmp_links = array();
$tmp_link_ids = array();
-$ports = dbFetchRows("SELECT
+if (in_array('mac',$config['map_items'])) {
+ $ports = dbFetchRows("SELECT
`D1`.`device_id` AS `local_device_id`,
`D1`.`os` AS `local_os`,
`D1`.`hostname` AS `local_hostname`,
@@ -73,8 +74,10 @@ $ports = dbFetchRows("SELECT
$sql
GROUP BY `P1`.`port_id`,`P2`.`port_id`
", $sql_array);
+}
-$devices = dbFetchRows("SELECT
+if (in_array('xdp', $config['map_items'])) {
+ $devices = dbFetchRows("SELECT
`D1`.`device_id` AS `local_device_id`,
`D1`.`os` AS `local_os`,
`D1`.`hostname` AS `local_hostname`,
@@ -112,6 +115,7 @@ $devices = dbFetchRows("SELECT
$sql
GROUP BY `P1`.`port_id`,`P2`.`port_id`
", $sql_array);
+}
$list = array_merge($ports,$devices);
@@ -218,7 +222,7 @@ var options = {
face: 'sans',
background: 'white',
strokeWidth:3,
- align: 'bottom'
+ align: 'horizontal'
}
},
"physics": {
diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php
index 85ce76508..6d0afb363 100644
--- a/includes/defaults.inc.php
+++ b/includes/defaults.inc.php
@@ -319,6 +319,7 @@ $config['map_legend'] = array(
'90' => '#ff6600',
'100' => '#ff0000',
);
+$config['map_items'] = array('xdp','mac');
// Device page options
$config['show_overview_tab'] = true;