@@ -125,9 +125,6 @@ function _getServerState($serverId, $serverName, $showAll)
125125 /* The State of the server */
126126 $ serverState = 'ok ' ;
127127
128- /** The Number of several infos, warnings, errors, ... */
129- $ count = array ('unknown ' => 0 , 'info ' => 0 , 'warning ' => 0 , 'critical ' => 0 , 'error ' => 0 );
130-
131128 /** The messages */
132129 $ messages = array ();
133130
@@ -148,12 +145,12 @@ function _getServerState($serverId, $serverName, $showAll)
148145 $ res .= '<div class="systemmonitor-content icons32 ico- ' .$ serverState .'"> ' ;
149146 $ res .= $ app ->lng ("monitor_serverstate_server_txt " ) . ': ' . $ serverName . '<br /> ' ;
150147 $ res .= $ app ->lng ("monitor_serverstate_state_txt " ) . ': ' . $ serverState . '<br /> ' ;
151- // $res .= sizeof($messages['ok' ]) . ' ok | ';
152- $ res .= sizeof ($ messages [' unknown ' ]) . ' ' . $ app ->lng ("monitor_serverstate_unknown_txt " ) . ' | ' ;
153- $ res .= sizeof ($ messages [' info ' ]) . ' ' . $ app ->lng ("monitor_serverstate_info_txt " ) . ' | ' ;
154- $ res .= sizeof ($ messages [' warning ' ]) . ' ' . $ app ->lng ("monitor_serverstate_warning_txt " ) . ' | ' ;
155- $ res .= sizeof ($ messages [' critical ' ]) . ' ' . $ app ->lng ("monitor_serverstate_critical_txt " ) . ' | ' ;
156- $ res .= sizeof ($ messages [' error ' ]) . ' ' . $ app ->lng ("monitor_serverstate_error_txt " ) . '<br /> ' ;
148+ // $res .= sizeof($messages[$app->lng("monitor_serverstate_listok_txt") ]) . ' ok | ';
149+ $ res .= sizeof ($ messages [$ app -> lng ( " monitor_serverstate_listunknown_txt " ) ]) . ' ' . $ app ->lng ("monitor_serverstate_unknown_txt " ) . ' | ' ;
150+ $ res .= sizeof ($ messages [$ app -> lng ( " monitor_serverstate_listinfo_txt " ) ]) . ' ' . $ app ->lng ("monitor_serverstate_info_txt " ) . ' | ' ;
151+ $ res .= sizeof ($ messages [$ app -> lng ( " monitor_serverstate_listwarning_txt " ) ]) . ' ' . $ app ->lng ("monitor_serverstate_warning_txt " ) . ' | ' ;
152+ $ res .= sizeof ($ messages [$ app -> lng ( " monitor_serverstate_listcritical_txt " ) ]) . ' ' . $ app ->lng ("monitor_serverstate_critical_txt " ) . ' | ' ;
153+ $ res .= sizeof ($ messages [$ app -> lng ( " monitor_serverstate_listerror_txt " ) ]) . ' ' . $ app ->lng ("monitor_serverstate_error_txt " ) . '<br /> ' ;
157154 $ res .= '<br /> ' ;
158155
159156 if ($ showAll ){
@@ -218,8 +215,6 @@ function _processDbState($type, $serverId, &$serverState, &$messages)
218215 $ record = $ app ->db ->queryOneRecord ("SELECT state FROM monitor_data WHERE type = ' " . $ type . "' and server_id = " . $ serverId . " order by created desc " );
219216 // change the new state to the highest state
220217 $ serverState = _setState ($ serverState , $ record ['state ' ]);
221- // count the states
222- $ count [$ record ['state ' ]]+= 1 ;
223218
224219 /*
225220 * The message depands on the type and the state
0 commit comments