mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
feature: Added web validation (#7474)
* refactor: convert validations to modules to prep for gui integration * accidentally dropped, schema update * fix accidental output to webui * mention discovery-wrapper.py and re-arrange. * refine some fix statements * rename the Config validation group to Configuration. * fix some scrutinizer issues remove as many local functions from validator.php as possible move extensions from pre-check remove duplicate timezone check looks like there is some db schema differences between mariadb 10.1 and 10.2, investigating * mariadb version diff take2 * Check schema version first for database. Remove stop to go back to command line for install docs. Add helpful link when there is no devices added to /addhost * fix incorrect validation for empty string defaults * Fix style * Add additional file permissions checks * catch exception and fail for invalid timezone Change visuals a bit. * add php version warning * fix space
This commit is contained in:
committed by
Neil Lathwood
parent
383557f628
commit
51ba934e11
@@ -72,7 +72,7 @@ function nicecase($item)
|
||||
|
||||
case 'nfs-v3-stats':
|
||||
return 'NFS v3 Stats';
|
||||
|
||||
|
||||
case 'nfs-server':
|
||||
return 'NFS Server';
|
||||
|
||||
@@ -111,7 +111,7 @@ function nicecase($item)
|
||||
|
||||
case 'fbsd-nfs-server':
|
||||
return 'FreeBSD NFS Server';
|
||||
|
||||
|
||||
case 'php-fpm':
|
||||
return 'PHP-FPM';
|
||||
|
||||
@@ -163,6 +163,20 @@ function toner2colour($descr, $percent)
|
||||
}//end toner2colour()
|
||||
|
||||
|
||||
/**
|
||||
* Find all links in some text and turn them into html links.
|
||||
*
|
||||
* @param string $text
|
||||
* @return string
|
||||
*/
|
||||
function linkify($text)
|
||||
{
|
||||
$regex = "/(http|https|ftp|ftps):\/\/[a-z0-9\-.]+\.[a-z]{2,5}(\/\S*)?/i";
|
||||
|
||||
return preg_replace($regex, '<a href="$0">$0</a>', $text);
|
||||
}
|
||||
|
||||
|
||||
function generate_link($text, $vars, $new_vars = array())
|
||||
{
|
||||
return '<a href="'.generate_url($vars, $new_vars).'">'.$text.'</a>';
|
||||
|
Reference in New Issue
Block a user