@@ -39,7 +39,9 @@ function showServerLoad(){
3939 Format the data
4040 */
4141 $ html =
42- '<table id="system_load">
42+ '<div class="systemmonitor-state systemmonitor-state- ' . $ record ['state ' ] . '">
43+ <div class="systemmonitor-state- ' . $ record ['state ' ] . '-icon">
44+ <table>
4345 <tr>
4446 <td> ' . $ app ->lng ("Server online since " ).':</td>
4547 <td> ' . $ data ['up_days ' ] . ' days, ' . $ data ['up_hours ' ] . ': ' . $ data ['up_minutes ' ] . ' hours</center></td>
@@ -60,7 +62,9 @@ function showServerLoad(){
6062 <td> ' .$ app ->lng ("System load 15 minutes " ).':</td>
6163 <td> ' . $ data ['load_15 ' ] . '</td>
6264 </tr>
63- </table> ' ;
65+ </table>
66+ </div>
67+ </div> ' ;
6468 } else {
6569 $ html = '<p> ' .$ app ->lng ("no_data_serverload_txt " ).'</p> ' ;
6670 }
@@ -80,7 +84,18 @@ function showDiskUsage () {
8084 /*
8185 Format the data
8286 */
83- $ html = '<table id="system_disk"> ' ;
87+ $ html =
88+ '<div class="systemmonitor-state systemmonitor-state- ' . $ record ['state ' ] . '">
89+ <div class="systemmonitor-state- ' . $ record ['state ' ] . '-icon">
90+ <table>
91+ <tr>
92+ <td>Filesystem</td>
93+ <td>1K-blocks</td>
94+ <td>Used</td>
95+ <td>Available</td>
96+ <td>Use%</td>
97+ <td>Mounted on</td>
98+ </tr> ' ;
8499 foreach ($ data as $ line ) {
85100 $ html .= '<tr> ' ;
86101 foreach ($ line as $ item ) {
@@ -89,6 +104,7 @@ function showDiskUsage () {
89104 $ html .= '</tr> ' ;
90105 }
91106 $ html .= '</table> ' ;
107+ $ html .= '</div></div> ' ;
92108 } else {
93109 $ html = '<p> ' .$ app ->lng ("no_data_diskusage_txt " ).'</p> ' ;
94110 }
@@ -111,7 +127,10 @@ function showMemUsage ()
111127 /*
112128 Format the data
113129 */
114- $ html = '<table id="system_memusage"> ' ;
130+ $ html =
131+ '<div class="systemmonitor-state systemmonitor-state- ' . $ record ['state ' ] . '">
132+ <div class="systemmonitor-state- ' . $ record ['state ' ] . '-icon">
133+ <table> ' ;
115134
116135 foreach ($ data as $ key => $ value ){
117136 if ($ key != '' ) {
@@ -122,6 +141,8 @@ function showMemUsage ()
122141 }
123142 }
124143 $ html .= '</table> ' ;
144+ $ html .= '</div></div> ' ;
145+
125146 } else {
126147 $ html = '<p> ' .$ app ->lng ("no_data_memusage_txt " ).'</p> ' ;
127148 }
@@ -142,7 +163,10 @@ function showCpuInfo ()
142163 /*
143164 Format the data
144165 */
145- $ html = '<table id="system_cpu"> ' ;
166+ $ html =
167+ '<div class="systemmonitor-state systemmonitor-state- ' . $ record ['state ' ] . '">
168+ <div class="systemmonitor-state- ' . $ record ['state ' ] . '-icon">
169+ <table> ' ;
146170 foreach ($ data as $ key => $ value ){
147171 if ($ key != '' ) {
148172 $ html .= '<tr>
@@ -152,6 +176,7 @@ function showCpuInfo ()
152176 }
153177 }
154178 $ html .= '</table> ' ;
179+ $ html .= '</div></div> ' ;
155180 } else {
156181 $ html = '<p> ' .$ app ->lng ("no_data_cpuinfo_txt " ).'</p> ' ;
157182 }
@@ -172,7 +197,10 @@ function showServices ()
172197 /*
173198 Format the data
174199 */
175- $ html = '<table id="system_services"> ' ;
200+ $ html =
201+ '<div class="systemmonitor-state systemmonitor-state- ' . $ record ['state ' ] . '">
202+ <div class="systemmonitor-state- ' . $ record ['state ' ] . '-icon">
203+ <table> ' ;
176204
177205 if ($ data ['webserver ' ] != -1 ) {
178206 if ($ data ['webserver ' ] == 1 ) {
@@ -260,7 +288,7 @@ function showServices ()
260288 }
261289
262290
263- $ html .= '</table></div> ' ;
291+ $ html .= '</table></div></div> ' ;
264292 } else {
265293 $ html = '<p> ' .$ app ->lng ("no_data_services_txt " ).'</p> ' ;
266294 }
@@ -277,17 +305,21 @@ function showSystemUpdate()
277305 $ record = $ app ->db ->queryOneRecord ("SELECT data, state FROM monitor_data WHERE type = 'system_update' and server_id = " . $ _SESSION ['monitor ' ]['server_id ' ] . " order by created desc " );
278306
279307 if (isset ($ record ['data ' ])) {
308+ $ html =
309+ '<div class="systemmonitor-state systemmonitor-state- ' . $ record ['state ' ] . '">
310+ <div class="systemmonitor-state- ' . $ record ['state ' ] . '-icon"> ' ;
280311 /*
281312 * First, we have to detect, if there is any monitoring-data.
282313 * If not (because the destribution is not supported) show this.
283314 */
284315 if ($ record ['state ' ] == 'no_state ' ){
285- $ html = ' <p> ' . "Your distribution is not supported for this monitoring " . ' </p> ' ;
316+ $ html .= "Your distribution is not supported for this monitoring " ;
286317 }
287318 else {
288319 $ data = unserialize ($ record ['data ' ]);
289- $ html = nl2br ($ data ['output ' ]);
320+ $ html . = nl2br ($ data ['output ' ]);
290321 }
322+ $ html .= '</div></div> ' ;
291323 } else {
292324 $ html = '<p> ' . "No Update-Data available " . '</p> ' ;
293325 }
@@ -303,17 +335,23 @@ function showRaidState()
303335 $ record = $ app ->db ->queryOneRecord ("SELECT data, state FROM monitor_data WHERE type = 'raid_state' and server_id = " . $ _SESSION ['monitor ' ]['server_id ' ] . " order by created desc " );
304336
305337 if (isset ($ record ['data ' ])) {
338+ $ html =
339+ '<div class="systemmonitor-state systemmonitor-state- ' . $ record ['state ' ] . '">
340+ <div class="systemmonitor-state- ' . $ record ['state ' ] . '-icon"> ' ;
341+
306342 /*
307343 * First, we have to detect, if there is any monitoring-data.
308344 * If not (because the destribution is not supported) show this.
309345 */
310346 if ($ record ['state ' ] == 'no_state ' ){
311- $ html = '<p> ' . "mdadm ist not installed or your Server has no supported RAID " . '</p> ' ;
347+ $ html . = '<p> ' . "mdadm ist not installed or your Server has no supported RAID " . '</p> ' ;
312348 }
313349 else {
314350 $ data = unserialize ($ record ['data ' ]);
315- $ html = nl2br ($ data ['output ' ]);
351+ $ html . = nl2br ($ data ['output ' ]);
316352 }
353+ $ html .= '</div></div> ' ;
354+
317355 } else {
318356 $ html = '<p> ' . "No RAID-Data available " . '</p> ' ;
319357 }
0 commit comments