diff --git a/Inventory/Server-Detail.php b/Inventory/Server-Detail.php index 0d867d5..8fd093b 100644 --- a/Inventory/Server-Detail.php +++ b/Inventory/Server-Detail.php @@ -173,8 +173,8 @@ $wwpns = ""; if($luns[0]['lun'] == 0){$luns = "Some LUNs are owned by cluster";}else{$luns = $luns[0]['lun']." LUNs";} if(is_array($Qvm)){$wwpns = str_replace("|",", ",$Qvm[0]['WWPNs']);} - echo "
".$luns.""; - if($wwpns != ""){echo " WWPNs :".$wwpns."

";}else{echo "
";} + echo "
" .$luns.""; + if($wwpns != ""){echo " WWPNs :".$wwpns."

";}else{echo "
";} } ?>
@@ -287,8 +287,4 @@
- + diff --git a/Inventory/Z_data_aix.php b/Inventory/Z_data_aix.php index 19fbac7..b979de9 100644 --- a/Inventory/Z_data_aix.php +++ b/Inventory/Z_data_aix.php @@ -30,9 +30,9 @@ $data = []; // Get CPU & Memory Items foreach ($items as $item) { $isMemory = strpos(strtolower($item['name']), 'memory') !== false; - $valueType = isset($item['value_type']) ? $item['value_type'] : ($isMemory ? 3 : 0); + $valueType = $item['value_type'] ?? ($isMemory ? 3 : 0); $tableMap = [0 => 'history', 1 => 'history_str', 2 => 'history_log', 3 => 'history_uint', 4 => 'history_text']; - $table = isset($tableMap[$valueType]) ? $tableMap[$valueType] : ($isMemory ? 'history_uint' : 'history'); + $table = $tableMap[$valueType] ?? ($isMemory ? 'history_uint' : 'history'); // Get History Data $sql = "SELECT FROM_UNIXTIME(FLOOR(clock / 600) * 600) AS datetime, AVG(value) AS avg_value @@ -51,7 +51,6 @@ foreach ($items as $item) { } $data[$item['name']] = $results; } -// Send Json back +// Send JSON back echo json_encode($data, JSON_NUMERIC_CHECK); -?> \ No newline at end of file diff --git a/Inventory/Z_data_linux.php b/Inventory/Z_data_linux.php index 552cb19..ca92bdd 100644 --- a/Inventory/Z_data_linux.php +++ b/Inventory/Z_data_linux.php @@ -30,9 +30,9 @@ $data = []; // Get CPU & Memory Items foreach ($items as $item) { $isMemory = strpos(strtolower($item['name']), 'memory') !== false; - $valueType = isset($item['value_type']) ? $item['value_type'] : ($isMemory ? 3 : 0); + $valueType = $item['value_type'] ?? ($isMemory ? 3 : 0); $tableMap = [0 => 'history', 1 => 'history_str', 2 => 'history_log', 3 => 'history_uint', 4 => 'history_text']; - $table = isset($tableMap[$valueType]) ? $tableMap[$valueType] : ($isMemory ? 'history_uint' : 'history'); + $table = $tableMap[$valueType] ?? ($isMemory ? 'history_uint' : 'history'); // Get History Data $sql = "SELECT FROM_UNIXTIME(FLOOR(clock / 600) * 600) AS datetime, AVG(value) AS avg_value @@ -51,7 +51,6 @@ foreach ($items as $item) { } $data[$item['name']] = $results; } -// Send Json back +// Send JSON back echo json_encode($data, JSON_NUMERIC_CHECK); -?> \ No newline at end of file diff --git a/Inventory/Z_data_windows.php b/Inventory/Z_data_windows.php index b2388f4..237835a 100644 --- a/Inventory/Z_data_windows.php +++ b/Inventory/Z_data_windows.php @@ -1,4 +1,4 @@ - 'history', 1 => 'history_str', 2 => 'history_log', 3 => 'history_uint', 4 => 'history_text']; - $table = isset($tableMap[$valueType]) ? $tableMap[$valueType] : ($isMemory ? 'history_uint' : 'history'); + $table = $tableMap[$valueType] ?? ($isMemory ? 'history_uint' : 'history'); // Get History Data $sql = "SELECT FROM_UNIXTIME(FLOOR(clock / 600) * 600) AS datetime, AVG(value) AS avg_value @@ -51,7 +51,6 @@ foreach ($items as $item) { } $data[$item['name']] = $results; } -// Send Json back +// Send JSON back echo json_encode($data, JSON_NUMERIC_CHECK); -?> \ No newline at end of file diff --git a/Inventory/search_servers.php b/Inventory/search_servers.php index cb958ab..a7a90d0 100644 --- a/Inventory/search_servers.php +++ b/Inventory/search_servers.php @@ -21,4 +21,3 @@ } echo json_encode($result); } -?> \ No newline at end of file