diff --git a/interface/web/monitor/lib/lang/en.lng b/interface/web/monitor/lib/lang/en.lng index c3fc8ecdd1d53ea6b4de2e3e94cfff8e25ee4b50..efe597f2a433c0eca5b1e864eb7c8a29728147fb 100644 --- a/interface/web/monitor/lib/lang/en.lng +++ b/interface/web/monitor/lib/lang/en.lng @@ -45,6 +45,8 @@ $wb['Show Clamav-Log'] = 'Show Clamav-Log'; $wb['Show ISPConfig-Log'] = 'Show ISPConfig-Log'; $wb['Show RKHunter-Log'] = 'Show RKHunter-Log'; $wb['Show Jobqueue'] = 'Show Jobqueue'; +$wb['monitor_general_serverstate_txt'] = 'Server State'; +$wb['monitor_general_systemstate_txt'] = 'System State'; $wb['monitor_diskusage_filesystem_txt'] = 'Filesystem'; $wb['monitor_diskusage_type_txt'] = 'Type'; $wb['monitor_diskusage_size_txt'] = 'Size'; @@ -52,8 +54,24 @@ $wb['monitor_diskusage_used_txt'] = 'Used'; $wb['monitor_diskusage_available_txt'] = 'Available'; $wb['monitor_diskusage_usage_txt'] = 'Use%'; $wb['monitor_diskusage_mounted_txt'] = 'Mounted on'; +$wb['monitor_logs_mail_txt'] = 'Mail - Log'; +$wb['monitor_logs_mailwarn_txt'] = 'Mail-Warn - Log'; +$wb['monitor_logs_mailerr_txt'] = 'Mail-Error - Log'; +$wb['monitor_logs_messages_txt'] = 'System Messages - Log'; +$wb['monitor_logs_ispccron_txt'] = 'ISPConfig Cron - Log'; +$wb['monitor_logs_freshclam_txt'] = 'Freshclam - Log'; +$wb['monitor_logs_clamav_txt'] = 'Clamav - Log'; +$wb['monitor_logs_ispc_txt'] = 'ISPConfig - Log'; $wb['monitor_nomdadm_txt'] = 'mdadm is not installed or your Server has no supported RAID'; $wb['monitor_norkhunter_txt'] = 'RKHunter is not installed, so there is no log data'; +$wb['monitor_serverstate_server_txt'] = 'Server'; +$wb['monitor_serverstate_state_txt'] = 'State'; +$wb['monitor_serverstate_unknown_txt'] = 'unknown'; +$wb['monitor_serverstate_info_txt'] = 'info'; +$wb['monitor_serverstate_warning_txt'] = 'warning'; +$wb['monitor_serverstate_critical_txt'] = 'critical'; +$wb['monitor_serverstate_error_txt'] = 'error'; +$wb['monitor_serverstate_moreinfo_txt'] = 'More information...'; $wb['monitor_services_online_txt'] = 'Online'; $wb['monitor_services_offline_txt'] = 'Offline'; $wb['monitor_services_web_txt'] = 'Web-Server:'; @@ -65,6 +83,7 @@ $wb['monitor_services_mydns_txt'] = 'myDNS-Server:'; $wb['monitor_services_mysql_txt'] = 'mySQL-Server:'; $wb['monitor_settings_datafromdate_txt'] = 'Data from: '; $wb['monitor_settings_datetimeformat_txt'] = 'Y-m-d H:i'; +$wb['monitor_settings_refreshsq_txt'] = 'Refresh sequence:'; $wb['monitor_settings_server_txt'] = 'Server: '; $wb['monitor_title_updatestate_txt'] = 'Update State'; $wb['monitor_title_mailq_txt'] = 'Mailqueue'; diff --git a/interface/web/monitor/lib/lang/fi.lng b/interface/web/monitor/lib/lang/fi.lng index 9f091b99c8b63192aab50d7d5b4043444a7bf504..e095f1ac7ffb6aaadddf57e5db1fd5b6c40259d0 100755 --- a/interface/web/monitor/lib/lang/fi.lng +++ b/interface/web/monitor/lib/lang/fi.lng @@ -45,6 +45,8 @@ $wb['Show ISPConfig-Log'] = 'Näytä ISPConfig-Loki'; $wb['Show ISPC Cron-Log'] = 'Näytä ISPC Cron-Loki'; $wb['Show RKHunter-Log'] = 'Näytä RKHunter-Loki'; $wb['Show Jobqueue'] = 'Näytä työjono'; +$wb['monitor_general_serverstate_txt'] = 'Palvelimen tila'; +$wb['monitor_general_systemstate_txt'] = 'Järjestelmän tila'; $wb['monitor_diskusage_filesystem_txt'] = 'Levyosio'; $wb['monitor_diskusage_type_txt'] = 'Tyyppi'; $wb['monitor_diskusage_size_txt'] = 'Koko'; @@ -52,8 +54,24 @@ $wb['monitor_diskusage_used_txt'] = 'Käytetty'; $wb['monitor_diskusage_available_txt'] = 'Vapaana'; $wb['monitor_diskusage_usage_txt'] = 'Käyttöaste'; $wb['monitor_diskusage_mounted_txt'] = 'Liitospiste'; -$wb['monitor_nomdadm_txt'] = 'mdadm ei ole asennettuna tai palelimessasi ei ole tuettuja RAID-laitteita.'; +$wb['monitor_logs_mail_txt'] = 'Postipalvelimen pääloki'; +$wb['monitor_logs_mailwarn_txt'] = 'Postipalvelimen varoitusloki'; +$wb['monitor_logs_mailerr_txt'] = 'Postipalvelimen virheloki'; +$wb['monitor_logs_messages_txt'] = 'Järjestelmän viestiloki'; +$wb['monitor_logs_ispccron_txt'] = 'ISPConfig-ajastusloki'; +$wb['monitor_logs_freshclam_txt'] = 'Freshclam-päivitysloki'; +$wb['monitor_logs_clamav_txt'] = 'Clamav-päivitysloki'; +$wb['monitor_logs_ispc_txt'] = 'ISPConfig-pääloki'; +$wb['monitor_nomdadm_txt'] = 'mdadm ei ole asennettuna tai palvelimessasi ei ole tuettuja RAID-laitteita.'; $wb['monitor_norkhunter_txt'] = 'RKHunter ei ole asennettuna, joten siitä ei ole tulostietoja.'; +$wb['monitor_serverstate_server_txt'] = 'Palvelin'; +$wb['monitor_serverstate_state_txt'] = 'Tila'; +$wb['monitor_serverstate_unknown_txt'] = 'tuntematonta'; +$wb['monitor_serverstate_info_txt'] = 'viestiä'; +$wb['monitor_serverstate_warning_txt'] = 'varoitusta'; +$wb['monitor_serverstate_critical_txt'] = 'kriittistä'; +$wb['monitor_serverstate_error_txt'] = 'virhettä'; +$wb['monitor_serverstate_moreinfo_txt'] = 'Lisätietoja...'; $wb['monitor_services_online_txt'] = 'Käynnissä'; $wb['monitor_services_offline_txt'] = 'Sammuksissa'; $wb['monitor_services_web_txt'] = 'WWW-palvelin:'; @@ -65,6 +83,7 @@ $wb['monitor_services_mydns_txt'] = 'myDNS-palvelin:'; $wb['monitor_services_mysql_txt'] = 'mySQL-palvelin:'; $wb['monitor_settings_datetimeformat_txt'] = 'd.m.Y H:i'; $wb['monitor_settings_datafromdate_txt'] = 'Tietojen päiväys: '; +$wb['monitor_settings_refreshsq_txt'] = 'Päivitysväli:'; $wb['monitor_settings_server_txt'] = 'Palvelin: '; $wb['monitor_title_updatestate_txt'] = 'Päivitysten tila'; $wb['monitor_title_mailq_txt'] = 'Sähköpostijono'; diff --git a/interface/web/monitor/show_log.php b/interface/web/monitor/show_log.php index 150ba8d6017ea1e89f97fb67c43a7b622c41d2bd..d2f91d8efb315b3c77854049e37b415b9526baa0 100644 --- a/interface/web/monitor/show_log.php +++ b/interface/web/monitor/show_log.php @@ -44,45 +44,59 @@ $app->tpl->setInclude('content_tpl','templates/show_log.htm'); $refresh = (isset($_GET["refresh"]))?intval($_GET["refresh"]):0; $logParam = $_GET["log"]; +/* Get some translations */ +$monTransDate = $app->lng("monitor_settings_datafromdate_txt"); +$monTransSrv = $app->lng("monitor_settings_server_txt"); +$monTransRefreshsq = $app->lng("monitor_settings_refreshsq_txt"); + /* Setting the db-type and the caption */ switch($logParam) { case 'log_mail': $logId = 'log_mail'; - $title = 'Mail - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')'; + $title = $app->lng("monitor_logs_mail_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')'; + $description = ''; break; case 'log_mail_warn': $logId = 'log_mail_warn'; - $title = 'Mail-Warn - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')'; + $title = $app->lng("monitor_logs_mailwarn_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')'; + $description = ''; break; case 'log_mail_err': $logId = 'log_mail_err'; - $title = 'Mail-Error - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')'; + $title = $app->lng("monitor_logs_mailerr_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')'; + $description = ''; break; case 'log_messages': $logId = 'log_messages'; - $title = 'System (Server: ' . $_SESSION['monitor']['server_name'] . ')'; + $title = $app->lng("monitor_logs_messages_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')'; + $description = ''; break; case 'log_ispc_cron': $logId = 'log_ispc_cron'; - $title = 'System (Server: ' . $_SESSION['monitor']['server_name'] . ')'; + $title = $app->lng("monitor_logs_ispccron_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')'; + $description = ''; break; case 'log_freshclam': $logId = 'log_freshclam'; - $title = 'Freshclam - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')'; + $title = $app->lng("monitor_logs_freshclam_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')'; + $description = ''; break; case 'log_clamav': $logId = 'log_clamav'; - $title = 'Clamav - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')'; + $title = $app->lng("monitor_logs_clamav_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')'; + $description = ''; break; case 'log_ispconfig': $logId = 'log_ispconfig'; - $title = 'ISP Config - Log (Server: ' . $_SESSION['monitor']['server_name'] . ')'; + $title = $app->lng("monitor_logs_ispc_txt").' ('. $monTransSrv .' : ' . $_SESSION['monitor']['server_name'] . ')'; + $description = ''; break; default: $logId = '???'; $title = '???'; + $description = ''; break; } @@ -119,7 +133,10 @@ if(isset($record['data'])) { $app->tpl->setVar("title", $title); $app->tpl->setVar("log_id",$logId); +$app->tpl->setVar("description", $description); $app->tpl->setVar("time", getDataTime($logId)); +$app->tpl->setVar("monTransDate", $monTransDate); +$app->tpl->setVar("monTransRefreshsq", $monTransRefreshsq); $app->tpl_defaults(); $app->tpl->pparse(); diff --git a/interface/web/monitor/show_sys_state.php b/interface/web/monitor/show_sys_state.php index 25db599b6673c8313ebe6386fa88d492c0a719b9..bbb19a7196a480bfc6dc87056aa64a1ee9f40e7d 100644 --- a/interface/web/monitor/show_sys_state.php +++ b/interface/web/monitor/show_sys_state.php @@ -48,19 +48,22 @@ $app->uses('tpl'); $app->tpl->newTemplate("form.tpl.htm"); $app->tpl->setInclude('content_tpl','templates/show_sys_state.htm'); +/* Get some translations */ +$monTransRefreshsq = $app->lng("monitor_settings_refreshsq_txt"); + /* * setting the content */ if ($_GET['state'] == 'server') { $output = _getServerState($_SESSION['monitor']['server_id'], $_SESSION['monitor']['server_name'], true); - $title = "Server State"; + $title = $app->lng("monitor_general_serverstate_txt"); $stateType = 'server'; } else { $output = _getSysState(); - $title = "System State"; + $title = $app->lng("monitor_general_systemstate_txt"); $stateType = 'system'; } @@ -68,6 +71,7 @@ $app->tpl->setVar("state_data",$output); $app->tpl->setVar("state_type",$stateType); $app->tpl->setVar("title",$title); $app->tpl->setVar("description",$description); +$app->tpl->setVar("monTransRefreshsq", $monTransRefreshsq); /* Creating the array with the refresh intervals @@ -142,15 +146,16 @@ function _getServerState($serverId, $serverName, $showAll) $res .= '<div class="systemmonitor-state state-'.$serverState.'">'; $res .= '<div class="systemmonitor-device device-server">'; $res .= '<div class="systemmonitor-content icons32 ico-'.$serverState.'">'; - $res .= 'Server: ' . $serverName . '<br />'; - $res .= 'State: ' . $serverState . '<br />'; + $res .= $app->lng("monitor_serverstate_server_txt") . ': ' . $serverName . '<br />'; + $res .= $app->lng("monitor_serverstate_state_txt") . ': ' . $serverState . '<br />'; // $res .= sizeof($messages['ok']) . ' ok | '; - $res .= sizeof($messages['unknown']) . ' unknown | '; - $res .= sizeof($messages['info']) . ' info | '; - $res .= sizeof($messages['warning']) . ' warning | '; - $res .= sizeof($messages['critical']) . ' critical | '; - $res .= sizeof($messages['error']) . ' error <br />'; + $res .= sizeof($messages['unknown']) . ' ' . $app->lng("monitor_serverstate_unknown_txt") . ' | '; + $res .= sizeof($messages['info']) . ' ' . $app->lng("monitor_serverstate_info_txt") . ' | '; + $res .= sizeof($messages['warning']) . ' ' . $app->lng("monitor_serverstate_warning_txt") . ' | '; + $res .= sizeof($messages['critical']) . ' ' . $app->lng("monitor_serverstate_critical_txt") . ' | '; + $res .= sizeof($messages['error']) . ' ' . $app->lng("monitor_serverstate_error_txt") . '<br />'; $res .= '<br />'; + if ($showAll){ /* * if we have to show all, then we do it... @@ -179,7 +184,7 @@ function _getServerState($serverId, $serverName, $showAll) /* * if not, we only show a link to the server... */ - $res .= "<a href='#' onclick='loadContent(\"monitor/show_sys_state.php?state=server&server=" . $serverId . '|' . $serverName . "\");'> More information...</a>"; + $res .= "<a href='#' onclick='loadContent(\"monitor/show_sys_state.php?state=server&server=" . $serverId . '|' . $serverName . "\");'>" . $app->lng("monitor_serverstate_moreinfo_txt") . "</a>"; } $res .= '</div>'; $res .= '</div>'; diff --git a/interface/web/monitor/templates/show_log.htm b/interface/web/monitor/templates/show_log.htm index 8257dd367bf51e03e003737fb8b214461338f712..6da3d5af3360c6fb3d55b907652125ab1a6430bd 100644 --- a/interface/web/monitor/templates/show_log.htm +++ b/interface/web/monitor/templates/show_log.htm @@ -3,7 +3,7 @@ <div class="panel panel_logview"> <div class="pnl_toolsarea"> - <fieldset><legend>Tools</legend> + <fieldset><legend><tmpl_var name="monTransRefreshsq"></legend> <div class="buttons"> <select name="refreshinterval" id="refreshinterval" onChange="loadContentRefresh('monitor/show_log.php?log={tmpl_var name="log_id"}')">{tmpl_var name="refresh"}</select> </div> @@ -11,7 +11,7 @@ </div> <div class="pnl_formarea"> - <fieldset><legend>Data from: <tmpl_var name="time"></legend> + <fieldset><legend><tmpl_var name="monTransDate"><tmpl_var name="time"></legend> <div class="codeview"><tmpl_var name="log_data"></div> </fieldset> </div> diff --git a/interface/web/monitor/templates/show_sys_state.htm b/interface/web/monitor/templates/show_sys_state.htm index d8d5c371c26071adc182115e6bc9f03ecbf8ecee..006163704e29a0f97e6d96306f9159461ab6794a 100644 --- a/interface/web/monitor/templates/show_sys_state.htm +++ b/interface/web/monitor/templates/show_sys_state.htm @@ -3,7 +3,7 @@ <div class="panel"> <div class="pnl_toolsarea"> - <fieldset><legend>Tools</legend> + <fieldset><legend><tmpl_var name="monTransRefreshsq"></legend> <div class="buttons"> <select name="refreshinterval" id="refreshinterval" onChange="loadContentRefresh('monitor/show_sys_state.php?state={tmpl_var name="state_type"}')">{tmpl_var name="refresh"}</select> </div>