diff --git a/html/includes/table/devices.inc.php b/html/includes/table/devices.inc.php
index 93e301dbe8..3d41063a5c 100644
--- a/html/includes/table/devices.inc.php
+++ b/html/includes/table/devices.inc.php
@@ -1,4 +1,17 @@
$extra,
- 'msg' => $msg,
'list_type' => $subformat,
'icon' => $image,
'hostname' => $hostname,
diff --git a/html/pages/devices.inc.php b/html/pages/devices.inc.php
index d7dc657d14..5a65b7bf2e 100644
--- a/html/pages/devices.inc.php
+++ b/html/pages/devices.inc.php
@@ -1,33 +1,42 @@
Lists: ';
+$listoptions = 'Lists: ';
$menu_options = array('basic' => 'Basic', 'detail' => 'Detail');
$sep = "";
foreach ($menu_options as $option => $text) {
- echo($sep);
+ $listoptions .= $sep;
if ($vars['format'] == "list_" . $option) {
- echo '';
}
$sep = " | ";
}
-echo ' | Graphs: ';
+$listoptions .= ' Graphs: ';
$menu_options = array('bits' => 'Bits',
'processor' => 'CPU',
@@ -42,20 +51,18 @@ $menu_options = array('bits' => 'Bits',
);
$sep = "";
foreach ($menu_options as $option => $text) {
- echo $sep;
+ $listoptions .= $sep;
if ($vars['format'] == 'graph_' . $option) {
- echo '';
}
$sep = " | ";
}
-echo '
';
-
-$graphs_types = '
';
if (isset($vars['searchbar']) && $vars['searchbar'] == "hide") {
- echo('
Restore Search');
+ $headeroptions .= '
Restore Search';
} else {
- echo('
Remove Search');
+ $headeroptions .= '
Remove Search';
}
-echo(" | ");
+$headeroptions .= ' | ';
if (isset($vars['bare']) && $vars['bare'] == "yes") {
- echo('
Restore Header');
+ $headeroptions .= '
Restore Header';
} else {
- echo('
Remove Header');
+ $headeroptions .= '
Remove Header';
}
-print_optionbar_end();
-
-echo '
';
-
list($format, $subformat) = explode("_", $vars['format'], 2);
if ($format == "graph") {
@@ -228,7 +229,7 @@ if ($format == "graph") {
$graph_array_zoom['width'] = '400';
$graph_array_zoom['legend'] = 'yes';
- $link_array = $graph_array;
+ $link_array = $graph_array;
$link_array['page'] = 'graphs';
$link_array['type'] = $graph_type;
$link_array['device'] = $device['device_id'];
@@ -259,8 +260,8 @@ if ($format == "graph") {
}
- $os_options = '';
- $os_options .= '';
+ $os_options = "";
+ $os_options .= "";
foreach (dbFetch($os, $param) as $data) {
if ($data['os']) {
$tmp_os = clean_bootgrid($data['os']);
@@ -269,13 +270,13 @@ if ($format == "graph") {
} else {
$os_selected = '';
}
- $os_options .= '';
+ $os_options .= "";
}
}
- $os_options .= '';
+ $os_options .= "";
- $ver_options = '';
- $ver_options .= '';
+ $ver_options = "";
+ $ver_options .= "";
foreach (dbFetch($ver, $param) as $data) {
if ($data['version']) {
$tmp_version = clean_bootgrid($data['version']);
@@ -284,13 +285,14 @@ if ($format == "graph") {
} else {
$ver_selected = '';
}
- $ver_options .= '';
+ $ui_version = strlen($tmp_version) > 15 ? substr($tmp_version, 0, 15) . "..." : $tmp_version;
+ $ver_options .= "";
}
}
- $ver_options .= '';
+ $ver_options .= "";
- $platform_options = '';
- $platform_options .= '';
+ $platform_options = "";
+ $platform_options .= "";
foreach (dbFetch($platform, $param) as $data) {
if ($data['hardware']) {
$tmp_hardware = clean_bootgrid($data['hardware']);
@@ -299,14 +301,14 @@ if ($format == "graph") {
} else {
$platform_selected = '';
}
- $platform_options .= '';
+ $platform_options .= "";
}
}
- $platform_options .= '';
+ $platform_options .= "";
- $features_options = '';
- $features_options .= '';
+ $features_options = "";
+ $features_options .= "";
foreach (dbFetch($features, $param) as $data) {
if ($data['features']) {
$tmp_features = clean_bootgrid($data['features']);
@@ -315,13 +317,13 @@ if ($format == "graph") {
} else {
$feature_selected = '';
}
- $features_options .= '';
+ $features_options .= "";
}
}
- $features_options .= '';
+ $features_options .= "";
- $locations_options = '';
- $locations_options .= '';
+ $locations_options = "";
+ $locations_options .= "";
foreach (getlocations() as $location) {
if ($location) {
$location = clean_bootgrid($location);
@@ -330,13 +332,15 @@ if ($format == "graph") {
} else {
$location_selected = '';
}
- $locations_options .= '';
+
+ $ui_location = strlen($location) > 15 ? substr($location, 0, 15) . "..." : $location;
+ $locations_options .= "";
}
}
- $locations_options .= '';
+ $locations_options .= "";
- $types_options = '';
- $types_options .= '';
+ $types_options = "";
+ $types_options .= "";
foreach (dbFetch($types, $param) as $data) {
if ($data['type']) {
if ($data['type'] == $vars['type']) {
@@ -344,42 +348,28 @@ if ($format == "graph") {
} else {
$type_selected = '';
}
- $types_options .= '';
+ $types_options .= "";
}
}
- $types_options .= '';
-
- if (isset($vars['searchbar']) && $vars['searchbar'] == "hide") {
- $searchbar = '';
- } else {
- $searchbar = '
-
-
-
- ';
- }
-
- echo $searchbar;
+ $types_options .= "";
echo '
+
+
+
+
+ ' . $listoptions . '
+
+
+ ' . $headeroptions . '
+
+
+
-
+
- | Status |
+ |
';
if ($subformat == "detail") {
@@ -408,6 +398,7 @@ if ($format == "graph") {
+
';
?>
@@ -419,14 +410,17 @@ if ($format == "graph") {
columnSelection: true,
formatters: {
"status": function (column, row) {
- return "" + row.msg + "";
+ return "";
+ },
+ "msg": function (column, row) {
+ return "" + row.msg + "";
},
"icon": function (column, row) {
return "" + row.icon + "";
}
},
templates: {
- header: ""
+ header: ""
},
post: function () {
@@ -449,7 +443,30 @@ if ($format == "graph") {
url: "ajax_table.php"
});
+
+ $(".devices-headers-table-menu").append(
+ "" +
+ "" +
+ "
"
+ );
+
-