-
+ |
|
@@ -606,10 +609,11 @@ function clearFilter() {
FROM plugin_hmib_hrSWRun_last_seen AS hrswr
WHERE name!='System Idle Time' AND name NOT LIKE '128%' AND (name IS NOT NULL AND name!='')
ORDER BY name");
+
if (sizeof($procs)) {
- foreach($procs AS $p) {
- echo "';
- }
+ foreach($procs AS $p) {
+ echo "';
+ }
}
?>
@@ -622,9 +626,9 @@ function clearFilter() {
$name) {
- echo "';
- }
+ foreach($item_rows AS $key => $name) {
+ echo "';
+ }
}
?>
@@ -656,7 +660,7 @@ function clearFilter() {
$sql_where .= (strlen($sql_where) ? ' AND':'WHERE') . ' host.id=' . get_request_var('device');
}
- if (get_request_var('type') != '-1') {
+ if (get_request_var('type') != '-1' && !isempty_request_var('type')) {
$sql_where .= (strlen($sql_where) ? ' AND':'WHERE') . ' hrs.host_type=' . get_request_var('type');
}
@@ -697,12 +701,12 @@ function clearFilter() {
$totals = db_fetch_row("SELECT
ROUND(SUM(perfCPU),2) as cpu,
- ROUND(SUM(perfMemory),2) as memory
- FROM plugin_hmib_hrSWRun AS hrswr
- INNER JOIN host ON host.id=hrswr.host_id
- INNER JOIN plugin_hmib_hrSystem AS hrs
- ON hrs.host_id=host.id
- INNER JOIN plugin_hmib_hrSystemTypes AS hrst
+ ROUND(SUM(perfMemory),2) as memory
+ FROM plugin_hmib_hrSWRun AS hrswr
+ INNER JOIN host ON host.id=hrswr.host_id
+ INNER JOIN plugin_hmib_hrSystem AS hrs
+ ON hrs.host_id=host.id
+ INNER JOIN plugin_hmib_hrSystemTypes AS hrst
ON hrst.id=hrs.host_type
$sql_where");
@@ -719,7 +723,7 @@ function clearFilter() {
'parameters' => array('display' => __('Parameters'), 'sort' => 'ASC', 'align' => 'left'),
'perfCpu' => array('display' => __('CPU (Hrs)'), 'sort' => 'DESC', 'align' => 'right'),
'perfMemory' => array('display' => __('Memory (MB)'), 'sort' => 'DESC', 'align' => 'right'),
- 'type' => array('display' => __('Type'), 'sort' => 'ASC', 'align' => 'left'),
+ 'type' => array('display' => __('Type'), 'sort' => 'ASC', 'align' => 'right'),
'status' => array('display' => __('Status'), 'sort' => 'DESC', 'align' => 'right')
);
@@ -729,23 +733,23 @@ function clearFilter() {
foreach ($rows as $row) {
form_alternate_row();
if (api_plugin_user_realm_auth('host.php')) {
- $host_url = "" . $row['hostname'] . '';
+ $host_url = "" . $row['hostname'] . '';
}else{
- $host_url = $row['hostname'];
+ $host_url = $row['hostname'];
}
- echo " | " . (strlen(get_request_var('filter')) ? preg_replace('/(' . preg_quote(get_request_var('filter')) . ')/i', "\\1", $row['description'] . ' [' . $host_url . ']'):$row['description'] . ' [' . $host_url . ']') . ' | ';
- echo "" . (strlen(get_request_var('filter')) ? preg_replace('/(' . preg_quote(get_request_var('filter')) . ')/i', "\\1", $row['name']):$row['name']) . ' | ';
- echo "" . (strlen(get_request_var('filter')) ? preg_replace('/(' . preg_quote(get_request_var('filter')) . ')/i', "\\1", title_trim($row['path'],40)):title_trim($row['path'],40)) . ' | ';
- echo "" . (strlen(get_request_var('filter')) ? preg_replace('/(' . preg_quote(get_request_var('filter')) . ')/i', "\\1", title_trim($row['parameters'], 40)):title_trim($row['parameters'],40)) . ' | ';
- echo "" . number_format_i18n($row['perfCPU']/3600,0) . ' | ';
- echo "" . number_format_i18n($row['perfMemory']/1024,2) . ' | ';
- echo "" . (isset($hmib_hrSWTypes[$row['type']]) ? $hmib_hrSWTypes[$row['type']]:'Unknown') . ' | ';
- echo "" . $hmib_hrSWRunStatus[$row['status']] . ' | ';
+ echo "" . filter_value($row['description'], get_request_var('filter')) . ' [ ' . $host_url . ' ] | ';
+ echo "" . filter_value($row['name'], get_request_var('filter')) . ' | ';
+ echo "" . filter_value($row['path'], get_request_var('filter')) . ' | ';
+ echo "" . filter_value($row['parameters'], get_request_var('filter')) . ' | ';
+ echo "" . number_format_i18n($row['perfCPU']/3600,0) . ' | ';
+ echo "" . number_format_i18n($row['perfMemory']/1024,2) . ' | ';
+ echo "" . (isset($hmib_hrSWTypes[$row['type']]) ? $hmib_hrSWTypes[$row['type']]:__('Unknown')) . ' | ';
+ echo "" . $hmib_hrSWRunStatus[$row['status']] . ' | ';
}
echo '
';
}else{
- print '