19 Commits

Author SHA1 Message Date
Tony Murray
7a0d604cdd Automatic fixes for validation failures (#13930)
* Automatic fixes for validations

* webui

* lint fixes

* Fix an install issue with ConfigSeeder requesting cli input in web page.

* Do not use c_echo in validate.php print_fail()
2022-06-10 16:25:33 -05:00
Nash Kaminski
4fe3b0fd57 Fix 500 error in validations when capabilities are not supported or set (#13991)
* Fix 500 error in validations when capabilities are not supported or set

* Update Programs.php

* Update Programs.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-06-04 15:38:09 -05:00
Jellyfrog
258505ed44 Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
Jellyfrog
26b95c0ccc Apply fixes from StyleCI (#13208) 2021-09-08 23:35:56 +02:00
Dan Langille
5ceba5cdb7 Filter some validation when installed from a package (#12647)
* Filter some validation when installed from a package

Also, tell the user that fping FAILURES can be ignored if running LibreNMS in a
jail without ::1

* Filter some validation when installed from a package

Also, tell the user that fping FAILURES can be ignored if running LibreNMS in a
jail without ::1

* change this back to info

* apply styleci diff
2021-03-26 22:07:33 -05:00
Jellyfrog
20b4215204 Swich links to https (#12511)
* Switch librenms links to https

* Convert librenms links in comments

* Switch gnu.org url to https

* switch php urls to https
2021-02-09 00:29:04 +01:00
Jellyfrog
29f45ca352 Apply fixes from StyleCI (#12124) 2020-09-21 15:59:34 +02:00
Jellyfrog
0d56bbd946 Apply fixes from StyleCI (#12123) 2020-09-21 15:51:53 +02:00
Jellyfrog
77c531527c Apply fixes from StyleCI (#12117)
* Apply fixes from StyleCI

* Disable style check
2020-09-21 14:54:51 +02:00
Tony Murray
d4add95e1f reorganize code to be better 2020-06-28 20:48:11 -05:00
Tony Murray
79c46cbce0 Make fping work when fping6 is not present 2020-06-28 00:46:39 -05:00
Tony Murray
1c08c11a77 Remove Laravel helpers (#11428)
* Remove Laravel helpers

* Replace qualifier with import
2020-04-18 00:37:56 +02:00
Tony Murray
1ad7f3138b Add Laravel to LibreNMS (#8318)
* Add Laravel to LibreNMS.

* Try to set permissions during initial install and first composer update to Laravel.

* Fix composer.lock
Fix missing db config keys

* Start building v1 layout
Port ajax_setresolution, inject csrf into jquery ajax calls
Layout works, building menu
Partially done.

* Fix device group list
remove stupid count relationships

* Print messages for common boot errors.
Don't log to laravel.log file.
Log to error_log until booted, then librenms.log

* Fix up some issues with Config loading
Start of custom directives

* Custom blade directives: config, notconfig, admin

* Preflight checks
Only load config files once.

* Update the composer.lock for php 5.6

* Menu through routing

* Start of alert menu

* Better alert scopes

* reduce cruft in models

* Alerting menu more or less working :D

* Fix style

* Improved preflight

* Fix chicken-eggs!

* Remove examples

* Better alert_rule status queries
Debugbar

* fix app.env check

* User Menu

* Settings bar (dropped refresh)
Search JS

* Toastr messages

* Rename preflight

* Use hasAccess(User) on most models.
Add port counts

* Missed a Preflight -> Checks rename

* Fix some formatting

* Boot Eloquent outside of Laravel
Use Eloquent for Config and Plugins so we don't have to connect with dbFacile inside Laravel.
Move locate_binary() into Config class

* Config WIP

* Try to fix a lot of config loading issues.

* Improve menu for non-admins removing unneeded menus
url() for all in menu

* Only use eloquent if it exists

* Include APP_URL in initial .env settings

* Implement Legacy User Provider

* Helper class for using Eloquent outside of Laravel.
Allows access to DB style queries too and checking the connection status.

* Fix up tests

* Fix device groups query

* Checking Travis

* copy config.test.php earlier

* dbFacile check config before connecting
Don't use exception to check if eloquent is connected, it gets grabbed by the exception handler.
Ignore missing config.php error.

* Fix config load with database is not migrated yet.

* Remove Config::load() from early boot.

* Use laravel config settings to init db (this prefers .env settings)
Fix bgp vars not set in menu
add _ide_helper.php to .gitignore

* Restrict dependencies to versions that support php 5.6

* Update ConfigTest

* Fix a couple of installation issues

* Add unique NODE_ID to .env

* Correct handling of title image

* Fix database config not loading. Thanks @laf

* Don't prepend /

* add class_exists checks for development service providers

* Fix config value casting

* Don't use functions that may not exist

* Update dbFacile.php

* d_echo may not be defined when Config used called.

* Add SELinux configuration steps
More detailed permissions check.
Check all and give complete corrective commands in one step.

* Ignore node_modules directory

* Re-add accidetal removal
2018-05-09 08:05:17 -05:00
Nash Kaminski
f568adfe0a Do not fail validation when IPv6 is disabled by unloading the associated kernel module (#8648) 2018-05-01 13:54:35 -05:00
Tony Murray
3c3fbd3731 feature: Show composer status in web validate. (#8181)
* Show composer status in web validate.
Don't duplicate in validate.php

* Create variable to check if a group has been completed.
No longer skips database checks.
Extract a base class.
Fix locate_binary and find_executable issues (mostly exposed by lack of db)

* Update Validator.php
2018-02-27 15:57:20 +00:00
Seti
00a73a2432 Only warn if there is ipv6 disabled (#7757)
* Only warn if there ipv6 is disabled

* Change message & if condition
2017-11-18 01:36:06 -06:00
Tony Murray
de6266cb88 fix: fping6 validation when fping6 doesn't support IPv6 (#7682)
Found a version of fping6 on repoforge that doesn't support ipv6, lol.
2017-11-09 20:32:51 +00:00
Tony Murray
52784ed189 fix: Extra fping checks in validation (#7651)
* fix: Extra fping checks in validation
Don't check suid or getcap if we can execute fping (as librenms or webserver user)

* Warn about suid in webui

* Update Programs.php

* Update Programs.php

* Use locate_binary() so we match production code (it is also better)
Don't cripple capabilities check, prefer that over suid.
2017-11-07 12:32:42 -06:00
Tony Murray
51ba934e11 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
2017-10-26 07:56:09 +01:00