Merge 8e4f98c5da
into 50ab06640e
commit
0c6c3f8737
|
@ -289,15 +289,15 @@ $sm_lang = array(
|
|||
),
|
||||
// for newlines in the email messages use <br/>
|
||||
'notifications' => array(
|
||||
'off_sms' => 'Server \'%LABEL%\' is DOWN: ip=%IP%, port=%PORT%. Error=%ERROR%',
|
||||
'off_email_subject' => 'IMPORTANT: Server \'%LABEL%\' is DOWN',
|
||||
'off_sms' => '[CNM] Warning: \'%LABEL%\' is Offline!',
|
||||
'off_email_subject' => '[CNM] Warning: \'%LABEL%\' is Offline!',
|
||||
'off_email_body' => "Failed to connect to the following server:<br/><br/>Server: %LABEL%<br/>IP: %IP%<br/>Port: %PORT%<br/>Error: %ERROR%<br/>Date: %DATE%",
|
||||
'off_pushover_title' => 'Server \'%LABEL%\' is DOWN',
|
||||
'off_pushover_title' => '[CNM] Warning: \'%LABEL%\' is Offline!',
|
||||
'off_pushover_message' => "Failed to connect to the following server:<br/><br/>Server: %LABEL%<br/>IP: %IP%<br/>Port: %PORT%<br/>Error: %ERROR%<br/>Date: %DATE%",
|
||||
'on_sms' => 'Server \'%LABEL%\' is RUNNING: ip=%IP%, port=%PORT%',
|
||||
'on_email_subject' => 'IMPORTANT: Server \'%LABEL%\' is RUNNING',
|
||||
'on_email_body' => "Server '%LABEL%' is running again:<br/><br/>Server: %LABEL%<br/>IP: %IP%<br/>Port: %PORT%<br/>Date: %DATE%",
|
||||
'on_pushover_title' => 'Server \'%LABEL%\' is RUNNING',
|
||||
'on_sms' => '[CNM] Notice: \'%LABEL%\' is back online.',
|
||||
'on_email_subject' => '[CNM] Notice: \'%LABEL%\' is back online.',
|
||||
'on_email_body' => "'%LABEL%' is running again:<br/><br/>Server: %LABEL%<br/>IP: %IP%<br/>Port: %PORT%<br/>Date: %DATE%",
|
||||
'on_pushover_title' => '[CNM] \'%LABEL%\' is back online.',
|
||||
'on_pushover_message' => 'Server \'%LABEL%\' is running again:<br/><br/>Server: %LABEL%<br/>IP: %IP%<br/>Port: %PORT%<br/>Date: %DATE%',
|
||||
),
|
||||
'login' => array(
|
||||
|
|
|
@ -92,7 +92,7 @@ class ServerValidator {
|
|||
throw new \InvalidArgumentException('server_ip_bad_website');
|
||||
}
|
||||
break;
|
||||
case 'service':
|
||||
case 'service' or 'ping':
|
||||
if(
|
||||
!filter_var($value, FILTER_VALIDATE_IP)
|
||||
// domain regex as per http://stackoverflow.com/questions/106179/regular-expression-to-match-hostname-or-ip-address :
|
||||
|
@ -101,11 +101,6 @@ class ServerValidator {
|
|||
throw new \InvalidArgumentException('server_ip_bad_service');
|
||||
}
|
||||
break;
|
||||
case 'ping':
|
||||
if(!filter_var($value, FILTER_VALIDATE_IP)) {
|
||||
throw new \InvalidArgumentException('server_ip_bad_service');
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -71,4 +71,4 @@ setInterval(function(){
|
|||
});
|
||||
}, {{ auto_refresh_seconds }} * 1000);
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue