| | |
| | | return $html; |
| | | } |
| | | |
| | | |
| | | function showOpenVzBeancounter() { |
| | | global $app; |
| | | |
| | | /* fetch the Data from the DB */ |
| | | $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'openvz_beancounter' and server_id = " . $_SESSION['monitor']['server_id'] . " order by created desc"); |
| | | |
| | | if(isset($record['data'])) { |
| | | $html = |
| | | '<div class="systemmonitor-state state-'.$record['state'].'"> |
| | | <div class="systemmonitor-content icons32 ico-'.$record['state'].'">'; |
| | | /* |
| | | * First, we have to detect, if there is any monitoring-data. |
| | | * If not (because the server is not a VE) show this. |
| | | */ |
| | | $data = unserialize($record['data']); |
| | | if ((!isset($data)) || ($data == '')) { |
| | | $html .= '<p>'.$app->lng("monitor_beancounter_nosupport_txt").'</p>'; |
| | | } |
| | | else { |
| | | $html .= '<pre>' . nl2br($data) . '</pre>'; |
| | | } |
| | | $html .= '</div></div>'; |
| | | } else { |
| | | $html = '<p>'.$app->lng("no_data_updates_txt").'</p>'; |
| | | } |
| | | |
| | | return $html; |
| | | } |
| | | |
| | | function showRaidState() { |
| | | global $app; |
| | | |