Update to 3.1.1 (7th Nov 2014)
parent
e627b88683
commit
49a2d235c6
|
@ -2,8 +2,8 @@ Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
|
||||||
not yet released
|
v3.1.1 (released November 6, 2014)
|
||||||
----------------
|
----------------------------------
|
||||||
|
|
||||||
* #130: Added Czech translation.
|
* #130: Added Czech translation.
|
||||||
* #138: Added Polish translation.
|
* #138: Added Polish translation.
|
||||||
|
@ -14,7 +14,10 @@ not yet released
|
||||||
* #144: Updated Brazilian translation.
|
* #144: Updated Brazilian translation.
|
||||||
* #146: Updated Russian translation.
|
* #146: Updated Russian translation.
|
||||||
* #147: Updated Spanish translation.
|
* #147: Updated Spanish translation.
|
||||||
|
* #128: Added SSL/TLS option for SMTP config.
|
||||||
* #131: Allow URL and timeout to be passed as argument to the cronjob.
|
* #131: Allow URL and timeout to be passed as argument to the cronjob.
|
||||||
|
* #135: Uptime percentage above 100%.
|
||||||
|
* #151: Links in install results were stripped automatically from template.
|
||||||
|
|
||||||
|
|
||||||
v3.1.0 (released August 7, 2014)
|
v3.1.0 (released August 7, 2014)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
PHP Server Monitor
|
PHP Server Monitor
|
||||||
==================
|
==================
|
||||||
|
|
||||||
Version 3.1.0
|
Version 3.1.1
|
||||||
|
|
||||||
PHP Server Monitor is a script that checks whether your websites and servers are up and running.
|
PHP Server Monitor is a script that checks whether your websites and servers are up and running.
|
||||||
It comes with a web based user interface where you can manage your services and websites,
|
It comes with a web based user interface where you can manage your services and websites,
|
||||||
|
|
|
@ -51,7 +51,7 @@ copyright = u'2008-2014, Pepijn Over'
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '3.1.0'
|
version = '3.1.1'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = version
|
release = version
|
||||||
|
|
||||||
|
|
|
@ -413,6 +413,7 @@ function psm_build_mail($from_name = null, $from_email = null) {
|
||||||
$phpmailer->IsSMTP();
|
$phpmailer->IsSMTP();
|
||||||
$phpmailer->Host = psm_get_conf('email_smtp_host');
|
$phpmailer->Host = psm_get_conf('email_smtp_host');
|
||||||
$phpmailer->Port = psm_get_conf('email_smtp_port');
|
$phpmailer->Port = psm_get_conf('email_smtp_port');
|
||||||
|
$phpmailer->SMTPSecure = psm_get_conf('email_smtp_security');
|
||||||
|
|
||||||
$smtp_user = psm_get_conf('email_smtp_username');
|
$smtp_user = psm_get_conf('email_smtp_username');
|
||||||
$smtp_pass = psm_get_conf('email_smtp_password');
|
$smtp_pass = psm_get_conf('email_smtp_password');
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
/**
|
/**
|
||||||
* Current PSM version
|
* Current PSM version
|
||||||
*/
|
*/
|
||||||
define('PSM_VERSION', '3.1.0');
|
define('PSM_VERSION', '3.1.1');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* URL to check for updates. Will not be checked if turned off on config page.
|
* URL to check for updates. Will not be checked if turned off on config page.
|
||||||
|
|
|
@ -193,6 +193,8 @@ $sm_lang = array(
|
||||||
'email_smtp' => 'Активиране на SMTP',
|
'email_smtp' => 'Активиране на SMTP',
|
||||||
'email_smtp_host' => 'SMTP сървър',
|
'email_smtp_host' => 'SMTP сървър',
|
||||||
'email_smtp_port' => 'SMTP порт',
|
'email_smtp_port' => 'SMTP порт',
|
||||||
|
'email_smtp_security' => 'SMTP security',
|
||||||
|
'email_smtp_security_none' => 'None',
|
||||||
'email_smtp_username' => 'SMTP потребителско име',
|
'email_smtp_username' => 'SMTP потребителско име',
|
||||||
'email_smtp_password' => 'SMTP парола',
|
'email_smtp_password' => 'SMTP парола',
|
||||||
'email_smtp_noauth' => 'Оставете празно за "без аутентикация"',
|
'email_smtp_noauth' => 'Оставете празно за "без аутентикация"',
|
||||||
|
|
|
@ -193,6 +193,8 @@ $sm_lang = array(
|
||||||
'email_smtp' => 'Zapnout SMTP',
|
'email_smtp' => 'Zapnout SMTP',
|
||||||
'email_smtp_host' => 'SMTP host',
|
'email_smtp_host' => 'SMTP host',
|
||||||
'email_smtp_port' => 'SMTP port',
|
'email_smtp_port' => 'SMTP port',
|
||||||
|
'email_smtp_security' => 'SMTP security',
|
||||||
|
'email_smtp_security_none' => 'None',
|
||||||
'email_smtp_username' => 'SMTP uživatelské jméno',
|
'email_smtp_username' => 'SMTP uživatelské jméno',
|
||||||
'email_smtp_password' => 'SMTP heslo',
|
'email_smtp_password' => 'SMTP heslo',
|
||||||
'email_smtp_noauth' => 'Ponechte prázdné pro použití SMTP bez hesla',
|
'email_smtp_noauth' => 'Ponechte prázdné pro použití SMTP bez hesla',
|
||||||
|
|
|
@ -193,6 +193,8 @@ $sm_lang = array(
|
||||||
'email_smtp' => 'Aktiver SMTP',
|
'email_smtp' => 'Aktiver SMTP',
|
||||||
'email_smtp_host' => 'SMTP vært',
|
'email_smtp_host' => 'SMTP vært',
|
||||||
'email_smtp_port' => 'SMTP port',
|
'email_smtp_port' => 'SMTP port',
|
||||||
|
'email_smtp_security' => 'SMTP security',
|
||||||
|
'email_smtp_security_none' => 'None',
|
||||||
'email_smtp_username' => 'SMTP brugernavn',
|
'email_smtp_username' => 'SMTP brugernavn',
|
||||||
'email_smtp_password' => 'SMTP adgangskode',
|
'email_smtp_password' => 'SMTP adgangskode',
|
||||||
'email_smtp_noauth' => 'Efterladt blank hvis det ikke er opkrævet',
|
'email_smtp_noauth' => 'Efterladt blank hvis det ikke er opkrævet',
|
||||||
|
|
|
@ -193,6 +193,8 @@ $sm_lang = array(
|
||||||
'email_smtp' => 'SMTP-Versand aktivieren',
|
'email_smtp' => 'SMTP-Versand aktivieren',
|
||||||
'email_smtp_host' => 'SMTP Server/Host',
|
'email_smtp_host' => 'SMTP Server/Host',
|
||||||
'email_smtp_port' => 'SMTP Port',
|
'email_smtp_port' => 'SMTP Port',
|
||||||
|
'email_smtp_security' => 'SMTP security',
|
||||||
|
'email_smtp_security_none' => 'None',
|
||||||
'email_smtp_username' => 'SMTP Benutzername',
|
'email_smtp_username' => 'SMTP Benutzername',
|
||||||
'email_smtp_password' => 'SMTP Passwort',
|
'email_smtp_password' => 'SMTP Passwort',
|
||||||
'email_smtp_noauth' => 'Feld leer lassen, bei fehlender Authentifizierung',
|
'email_smtp_noauth' => 'Feld leer lassen, bei fehlender Authentifizierung',
|
||||||
|
|
|
@ -193,6 +193,8 @@ $sm_lang = array(
|
||||||
'email_smtp' => 'Enable SMTP',
|
'email_smtp' => 'Enable SMTP',
|
||||||
'email_smtp_host' => 'SMTP host',
|
'email_smtp_host' => 'SMTP host',
|
||||||
'email_smtp_port' => 'SMTP port',
|
'email_smtp_port' => 'SMTP port',
|
||||||
|
'email_smtp_security' => 'SMTP security',
|
||||||
|
'email_smtp_security_none' => 'None',
|
||||||
'email_smtp_username' => 'SMTP username',
|
'email_smtp_username' => 'SMTP username',
|
||||||
'email_smtp_password' => 'SMTP password',
|
'email_smtp_password' => 'SMTP password',
|
||||||
'email_smtp_noauth' => 'Leave blank for no authentication',
|
'email_smtp_noauth' => 'Leave blank for no authentication',
|
||||||
|
|
|
@ -194,6 +194,8 @@ $sm_lang = array(
|
||||||
'email_smtp' => 'Habilitar SMTP',
|
'email_smtp' => 'Habilitar SMTP',
|
||||||
'email_smtp_host' => 'SMTP host',
|
'email_smtp_host' => 'SMTP host',
|
||||||
'email_smtp_port' => 'SMTP port',
|
'email_smtp_port' => 'SMTP port',
|
||||||
|
'email_smtp_security' => 'SMTP security',
|
||||||
|
'email_smtp_security_none' => 'None',
|
||||||
'email_smtp_username' => 'SMTP username',
|
'email_smtp_username' => 'SMTP username',
|
||||||
'email_smtp_password' => 'SMTP contraseña',
|
'email_smtp_password' => 'SMTP contraseña',
|
||||||
'email_smtp_noauth' => 'Deja en blanco para ninguna autenticación',
|
'email_smtp_noauth' => 'Deja en blanco para ninguna autenticación',
|
||||||
|
|
|
@ -194,6 +194,8 @@ $sm_lang = array(
|
||||||
'email_smtp' => 'Utiliser un serveur SMTP',
|
'email_smtp' => 'Utiliser un serveur SMTP',
|
||||||
'email_smtp_host' => 'Adresse serveur SMTP',
|
'email_smtp_host' => 'Adresse serveur SMTP',
|
||||||
'email_smtp_port' => 'Port SMTP',
|
'email_smtp_port' => 'Port SMTP',
|
||||||
|
'email_smtp_security' => 'SMTP security',
|
||||||
|
'email_smtp_security_none' => 'None',
|
||||||
'email_smtp_username' => 'Nom utilisateur SMTP',
|
'email_smtp_username' => 'Nom utilisateur SMTP',
|
||||||
'email_smtp_password' => 'Mot de passe SMTP',
|
'email_smtp_password' => 'Mot de passe SMTP',
|
||||||
'email_smtp_noauth' => 'Laisser vide si pas d\'authentication',
|
'email_smtp_noauth' => 'Laisser vide si pas d\'authentication',
|
||||||
|
|
|
@ -193,6 +193,8 @@ $sm_lang = array(
|
||||||
'email_smtp' => 'Enable SMTP',
|
'email_smtp' => 'Enable SMTP',
|
||||||
'email_smtp_host' => 'SMTP host',
|
'email_smtp_host' => 'SMTP host',
|
||||||
'email_smtp_port' => 'SMTP port',
|
'email_smtp_port' => 'SMTP port',
|
||||||
|
'email_smtp_security' => 'SMTP security',
|
||||||
|
'email_smtp_security_none' => 'None',
|
||||||
'email_smtp_username' => 'SMTP username',
|
'email_smtp_username' => 'SMTP username',
|
||||||
'email_smtp_password' => 'SMTP password',
|
'email_smtp_password' => 'SMTP password',
|
||||||
'email_smtp_noauth' => 'Leave blank for no authentication',
|
'email_smtp_noauth' => 'Leave blank for no authentication',
|
||||||
|
|
|
@ -193,6 +193,8 @@ $sm_lang = array(
|
||||||
'email_smtp' => 'Enable SMTP',
|
'email_smtp' => 'Enable SMTP',
|
||||||
'email_smtp_host' => 'SMTP host',
|
'email_smtp_host' => 'SMTP host',
|
||||||
'email_smtp_port' => 'SMTP port',
|
'email_smtp_port' => 'SMTP port',
|
||||||
|
'email_smtp_security' => 'SMTP security',
|
||||||
|
'email_smtp_security_none' => 'None',
|
||||||
'email_smtp_username' => 'SMTP username',
|
'email_smtp_username' => 'SMTP username',
|
||||||
'email_smtp_password' => 'SMTP password',
|
'email_smtp_password' => 'SMTP password',
|
||||||
'email_smtp_noauth' => 'Leave blank for no authentication',
|
'email_smtp_noauth' => 'Leave blank for no authentication',
|
||||||
|
|
|
@ -193,6 +193,8 @@ $sm_lang = array(
|
||||||
'email_smtp' => 'SMTP gebruiken',
|
'email_smtp' => 'SMTP gebruiken',
|
||||||
'email_smtp_host' => 'SMTP host',
|
'email_smtp_host' => 'SMTP host',
|
||||||
'email_smtp_port' => 'SMTP poort',
|
'email_smtp_port' => 'SMTP poort',
|
||||||
|
'email_smtp_security' => 'SMTP beveiliging',
|
||||||
|
'email_smtp_security_none' => 'Geen',
|
||||||
'email_smtp_username' => 'SMTP gebruikersnaam',
|
'email_smtp_username' => 'SMTP gebruikersnaam',
|
||||||
'email_smtp_password' => 'SMTP wachtwoord',
|
'email_smtp_password' => 'SMTP wachtwoord',
|
||||||
'email_smtp_noauth' => 'Laat leeg voor geen authenticatie',
|
'email_smtp_noauth' => 'Laat leeg voor geen authenticatie',
|
||||||
|
|
|
@ -193,6 +193,8 @@ $sm_lang = array(
|
||||||
'email_smtp' => 'Włącz SMTP',
|
'email_smtp' => 'Włącz SMTP',
|
||||||
'email_smtp_host' => 'SMTP host',
|
'email_smtp_host' => 'SMTP host',
|
||||||
'email_smtp_port' => 'SMTP port',
|
'email_smtp_port' => 'SMTP port',
|
||||||
|
'email_smtp_security' => 'SMTP security',
|
||||||
|
'email_smtp_security_none' => 'None',
|
||||||
'email_smtp_username' => 'SMTP login',
|
'email_smtp_username' => 'SMTP login',
|
||||||
'email_smtp_password' => 'SMTP hasło',
|
'email_smtp_password' => 'SMTP hasło',
|
||||||
'email_smtp_noauth' => 'Pozostaw puste dla braku autentykacji',
|
'email_smtp_noauth' => 'Pozostaw puste dla braku autentykacji',
|
||||||
|
|
|
@ -193,6 +193,8 @@ $sm_lang = array(
|
||||||
'email_smtp' => 'Enable SMTP',
|
'email_smtp' => 'Enable SMTP',
|
||||||
'email_smtp_host' => 'SMTP host',
|
'email_smtp_host' => 'SMTP host',
|
||||||
'email_smtp_port' => 'SMTP port',
|
'email_smtp_port' => 'SMTP port',
|
||||||
|
'email_smtp_security' => 'SMTP security',
|
||||||
|
'email_smtp_security_none' => 'None',
|
||||||
'email_smtp_username' => 'SMTP username',
|
'email_smtp_username' => 'SMTP username',
|
||||||
'email_smtp_password' => 'SMTP password',
|
'email_smtp_password' => 'SMTP password',
|
||||||
'email_smtp_noauth' => 'Deixe em branco para nenhuma autenticação',
|
'email_smtp_noauth' => 'Deixe em branco para nenhuma autenticação',
|
||||||
|
|
|
@ -193,6 +193,8 @@ $sm_lang = array(
|
||||||
'email_smtp' => 'Включить SMTP',
|
'email_smtp' => 'Включить SMTP',
|
||||||
'email_smtp_host' => 'SMTP сервер',
|
'email_smtp_host' => 'SMTP сервер',
|
||||||
'email_smtp_port' => 'SMTP порт',
|
'email_smtp_port' => 'SMTP порт',
|
||||||
|
'email_smtp_security' => 'SMTP security',
|
||||||
|
'email_smtp_security_none' => 'None',
|
||||||
'email_smtp_username' => 'SMTP пользователь',
|
'email_smtp_username' => 'SMTP пользователь',
|
||||||
'email_smtp_password' => 'SMTP пароль',
|
'email_smtp_password' => 'SMTP пароль',
|
||||||
'email_smtp_noauth' => 'Оставить пустым, если без аутентификации',
|
'email_smtp_noauth' => 'Оставить пустым, если без аутентификации',
|
||||||
|
|
|
@ -193,6 +193,8 @@ $sm_lang = array(
|
||||||
'email_smtp' => 'SMTP\'yi aktif et',
|
'email_smtp' => 'SMTP\'yi aktif et',
|
||||||
'email_smtp_host' => 'SMTP sunucusu',
|
'email_smtp_host' => 'SMTP sunucusu',
|
||||||
'email_smtp_port' => 'SMTP port',
|
'email_smtp_port' => 'SMTP port',
|
||||||
|
'email_smtp_security' => 'SMTP security',
|
||||||
|
'email_smtp_security_none' => 'None',
|
||||||
'email_smtp_username' => 'SMTP kullanıcı adı',
|
'email_smtp_username' => 'SMTP kullanıcı adı',
|
||||||
'email_smtp_password' => 'SMTP şifre',
|
'email_smtp_password' => 'SMTP şifre',
|
||||||
'email_smtp_noauth' => 'Doğrulama yapmamak için boş bırakın',
|
'email_smtp_noauth' => 'Doğrulama yapmamak için boş bırakın',
|
||||||
|
|
|
@ -193,6 +193,8 @@ $sm_lang = array(
|
||||||
'email_smtp' => '使用SMTP发送',
|
'email_smtp' => '使用SMTP发送',
|
||||||
'email_smtp_host' => 'SMTP主机',
|
'email_smtp_host' => 'SMTP主机',
|
||||||
'email_smtp_port' => 'SMTP端口',
|
'email_smtp_port' => 'SMTP端口',
|
||||||
|
'email_smtp_security' => 'SMTP security',
|
||||||
|
'email_smtp_security_none' => 'None',
|
||||||
'email_smtp_username' => 'SMTP用户名',
|
'email_smtp_username' => 'SMTP用户名',
|
||||||
'email_smtp_password' => 'SMTP密码',
|
'email_smtp_password' => 'SMTP密码',
|
||||||
'email_smtp_noauth' => '留空为无验证',
|
'email_smtp_noauth' => '留空为无验证',
|
||||||
|
|
|
@ -109,8 +109,11 @@ class ConfigController extends AbstractController {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @todo these selected values can easily be rewritten in the template using twig
|
||||||
$tpl_data['sms_selected_' . $config['sms_gateway']] = 'selected="selected"';
|
$tpl_data['sms_selected_' . $config['sms_gateway']] = 'selected="selected"';
|
||||||
$tpl_data['alert_type_selected_' . $config['alert_type']] = 'selected="selected"';
|
$tpl_data['alert_type_selected_' . $config['alert_type']] = 'selected="selected"';
|
||||||
|
$smtp_sec = isset($config['email_smtp_security']) ? $config['email_smtp_security'] : '';
|
||||||
|
$tpl_data['email_smtp_security_selected_' . $smtp_sec] = 'selected="selected"';
|
||||||
$tpl_data['auto_refresh_servers'] = (isset($config['auto_refresh_servers'])) ? $config['auto_refresh_servers'] : '0';
|
$tpl_data['auto_refresh_servers'] = (isset($config['auto_refresh_servers'])) ? $config['auto_refresh_servers'] : '0';
|
||||||
$tpl_data['log_retention_period'] = (isset($config['log_retention_period'])) ? $config['log_retention_period'] : '365';
|
$tpl_data['log_retention_period'] = (isset($config['log_retention_period'])) ? $config['log_retention_period'] : '365';
|
||||||
|
|
||||||
|
@ -149,6 +152,10 @@ class ConfigController extends AbstractController {
|
||||||
'language' => $_POST['language'],
|
'language' => $_POST['language'],
|
||||||
'sms_gateway' => $_POST['sms_gateway'],
|
'sms_gateway' => $_POST['sms_gateway'],
|
||||||
'alert_type' => $_POST['alert_type'],
|
'alert_type' => $_POST['alert_type'],
|
||||||
|
'email_smtp_security' =>
|
||||||
|
in_array($_POST['email_smtp_security'], array('', 'ssl', 'tls'))
|
||||||
|
? $_POST['email_smtp_security']
|
||||||
|
: '',
|
||||||
'auto_refresh_servers' => intval(psm_POST('auto_refresh_servers', 0)),
|
'auto_refresh_servers' => intval(psm_POST('auto_refresh_servers', 0)),
|
||||||
'log_retention_period' => intval(psm_POST('log_retention_period', 365)),
|
'log_retention_period' => intval(psm_POST('log_retention_period', 365)),
|
||||||
);
|
);
|
||||||
|
@ -292,6 +299,8 @@ class ConfigController extends AbstractController {
|
||||||
'label_email_smtp' => psm_get_lang('config', 'email_smtp'),
|
'label_email_smtp' => psm_get_lang('config', 'email_smtp'),
|
||||||
'label_email_smtp_host' => psm_get_lang('config', 'email_smtp_host'),
|
'label_email_smtp_host' => psm_get_lang('config', 'email_smtp_host'),
|
||||||
'label_email_smtp_port' => psm_get_lang('config', 'email_smtp_port'),
|
'label_email_smtp_port' => psm_get_lang('config', 'email_smtp_port'),
|
||||||
|
'label_email_smtp_security' => psm_get_lang('config', 'email_smtp_security'),
|
||||||
|
'label_email_smtp_security_none' => psm_get_lang('config', 'email_smtp_security_none'),
|
||||||
'label_email_smtp_username' => psm_get_lang('config', 'email_smtp_username'),
|
'label_email_smtp_username' => psm_get_lang('config', 'email_smtp_username'),
|
||||||
'label_email_smtp_password' => psm_get_lang('config', 'email_smtp_password'),
|
'label_email_smtp_password' => psm_get_lang('config', 'email_smtp_password'),
|
||||||
'label_email_smtp_noauth' => psm_get_lang('config', 'email_smtp_noauth'),
|
'label_email_smtp_noauth' => psm_get_lang('config', 'email_smtp_noauth'),
|
||||||
|
|
|
@ -136,6 +136,7 @@ class Installer {
|
||||||
('email_smtp', ''),
|
('email_smtp', ''),
|
||||||
('email_smtp_host', ''),
|
('email_smtp_host', ''),
|
||||||
('email_smtp_port', ''),
|
('email_smtp_port', ''),
|
||||||
|
('email_smtp_security', ''),
|
||||||
('email_smtp_username', ''),
|
('email_smtp_username', ''),
|
||||||
('email_smtp_password', ''),
|
('email_smtp_password', ''),
|
||||||
('sms_status', '0'),
|
('sms_status', '0'),
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
*
|
*
|
||||||
* @package phpservermon
|
* @package phpservermon
|
||||||
* @author Jérôme Cabanis <http://lauraly.com>
|
* @author Jérôme Cabanis <http://lauraly.com>
|
||||||
* Pepijn Over <pep@neanderthal-technology.com>
|
* @author Pepijn Over <pep@neanderthal-technology.com>
|
||||||
* @copyright Copyright (c) 2008-2014 Pepijn Over <pep@neanderthal-technology.com>
|
* @copyright Copyright (c) 2008-2014 Pepijn Over <pep@neanderthal-technology.com>
|
||||||
* @license http://www.gnu.org/licenses/gpl.txt GNU GPL v3
|
* @license http://www.gnu.org/licenses/gpl.txt GNU GPL v3
|
||||||
* @version Release: @package_version@
|
* @version Release: @package_version@
|
||||||
|
@ -181,7 +181,7 @@ class HistoryGraph {
|
||||||
$records = $this->db->execute(
|
$records = $this->db->execute(
|
||||||
'SELECT *
|
'SELECT *
|
||||||
FROM `' . PSM_DB_PREFIX . "servers_$type`
|
FROM `' . PSM_DB_PREFIX . "servers_$type`
|
||||||
WHERE `server_id` = :server_id AND `date` BETWEEN :start_time AND :end_time",
|
WHERE `server_id` = :server_id AND `date` BETWEEN :start_time AND :end_time ORDER BY `date` ASC",
|
||||||
array(
|
array(
|
||||||
'server_id' => $server_id,
|
'server_id' => $server_id,
|
||||||
'start_time' => $start_time->format('Y-m-d H:i:s'),
|
'start_time' => $start_time->format('Y-m-d H:i:s'),
|
||||||
|
@ -192,7 +192,7 @@ class HistoryGraph {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generate data arrays for graphs
|
* Generate data arrays for graphs
|
||||||
* @param array $records all uptime records to parse
|
* @param array $records all uptime records to parse, MUST BE SORTED BY DATE IN ASCENDING ORDER
|
||||||
* @param array $lines array with keys as line ids to prepare (key must be available in uptime records)
|
* @param array $lines array with keys as line ids to prepare (key must be available in uptime records)
|
||||||
* @param callable $cb_if_up function to check if the server is up or down
|
* @param callable $cb_if_up function to check if the server is up or down
|
||||||
* @param string $latency_avg_key which key from uptime records to use for calculating averages
|
* @param string $latency_avg_key which key from uptime records to use for calculating averages
|
||||||
|
@ -222,10 +222,10 @@ class HistoryGraph {
|
||||||
|
|
||||||
if($cb_if_up($uptime)) {
|
if($cb_if_up($uptime)) {
|
||||||
// The server is up
|
// The server is up
|
||||||
foreach($lines as $key => &$value) {
|
foreach($lines as $key => $value) {
|
||||||
// add the value for each of the different lines
|
// add the value for each of the different lines
|
||||||
if(isset($uptime[$key])) {
|
if(isset($uptime[$key])) {
|
||||||
$value[] = '[' . $time . ',' . round((float) $uptime[$key], 4) . ']';
|
$lines[$key][] = '[' . $time . ',' . round((float) $uptime[$key], 4) . ']';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($last_date) {
|
if($last_date) {
|
||||||
|
@ -246,16 +246,16 @@ class HistoryGraph {
|
||||||
$lines_merged = array();
|
$lines_merged = array();
|
||||||
|
|
||||||
foreach($lines as $line_key => $line_value) {
|
foreach($lines as $line_key => $line_value) {
|
||||||
if(empty($value)) {
|
if(empty($line_value)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$lines_merged[] = '[' . implode(',', $line_value) . ']';
|
$lines_merged[] = '[' . implode(',', $line_value) . ']';
|
||||||
$series[] = "{label: '".psm_get_lang('servers', $line_key)."'}";
|
$series[] = "{label: '".psm_get_lang('servers', $line_key)."'}";
|
||||||
}
|
}
|
||||||
if($last_date) {
|
if($last_date) {
|
||||||
|
// if last_date is still set, the last check was "down" and we are still in down mode
|
||||||
$down[] = '[' . $last_date . ',0]';
|
$down[] = '[' . $last_date . ',0]';
|
||||||
$time = $end_time->getTimestamp() * 1000;
|
$time_down += (($end_time->getTimestamp() * 1000) - $last_date);
|
||||||
$time_down += ($time - $last_date);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($add_uptime) {
|
if($add_uptime) {
|
||||||
|
|
|
@ -100,6 +100,16 @@
|
||||||
<input type="text" class="input-small" id="email_smtp_port" name="email_smtp_port" value="{{ email_smtp_port }}" maxlength="10" placeholder="{{ label_email_smtp_port }}" />
|
<input type="text" class="input-small" id="email_smtp_port" name="email_smtp_port" value="{{ email_smtp_port }}" maxlength="10" placeholder="{{ label_email_smtp_port }}" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="email_smtp_security">{{ label_email_smtp_security }}</label>
|
||||||
|
<div class="controls">
|
||||||
|
<select id="email_smtp_security" name="email_smtp_security">
|
||||||
|
<option value="" {{ email_smtp_security_selected_|raw }}>{{ label_email_smtp_security_none }}</option>
|
||||||
|
<option value="ssl" {{ email_smtp_security_selected_ssl|raw }}>SSL</option>
|
||||||
|
<option value="tls" {{ email_smtp_security_selected_tls|raw }}>TLS</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
<label class="control-label" for="email_smtp_username">{{ label_email_smtp_username }}</label>
|
<label class="control-label" for="email_smtp_username">{{ label_email_smtp_username }}</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
|
|
Loading…
Reference in New Issue