Commit Graph

11 Commits

Author SHA1 Message Date
Jellyfrog
b7676e4cc8
Update to Composer 2 (#12263)
* Update to Composer 2

No need to roll our own checks anymore since this is now built in.
Also limit the update check to once a week.

* update

* Make Composer wrapper report correct exit code

* Update composer_wrapper.php

* re-enable extension check

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-11-09 00:28:07 -06:00
Tony Murray
c6e719b9be
Check PHP version first (#10473)
Check PHP version before anything so we can inform the user instead of them getting generic error 500.
2019-08-01 06:58:22 -05:00
Tony Murray
63de34e295
php artisan serve and dusk testing (#9422)
* php artisan serve and dusk testing

* Fix style

* move if into, in case we need to have different configs

* fix travis yml

* Add missing folders files

* Try to fixup Travis-ci

* revert variable, change check

* skip browser tests for phpunit runs
set up env correctly

* maybe bg is needed

* attempt to fix env

* install Chrome

* Update tests
fix migrations

* Move pylint to python2

* use testing .env

* Running chrome on port 9515 conflicts with the instance started by the tests.  It is probably not needed.

* suppress some artisan serve output

* remove the unused updater
2019-02-14 09:06:10 -06:00
Tony Murray
e18f4522d5
Update to Laravel 5.7 (PHP 7.3 support) (#9800)
* Move assets to 5.7 location

* Add 5.7 SVGs

* add cache data dir

* update QUEUE_DRIVER -> QUEUE_CONNECTION

* Update trusted proxy config

* update composer.json

* 5.5 command loading

* @php and @endphp can't be inline

* Laravel 5.6 logging, Nice!

* Update blade directives

* improved redirects

* remove unneeded service providers

* Improved debugbar loading

* no need to emulate renderable exceptions anymore

* merge updated 5.7 files (WIP)

* Enable CSRF

* database_path() call causes issue in init.php

* fix old testcase name

* generic phpunit 7 fixes

* add missed file_get_contents
Keep migrations table content

* fix duplicate key

* Drop old php versions from travis-ci

* remove hhvm

* fix code climate message

* remove use of deprecated function assertInternalType

* Disable CSRF, we'll enable it separately.
All forms need to be updated to work.

* Update document references
2019-02-12 17:45:04 -06:00
Tony Murray
964235a82b
Restore gitignore file contents (#9784)
* Restore gitignore file contents
Set permissions to 664
Add tests to check existence, mode, and size of .gitignore files

* add trailing line return

* git only cares about executable bit, just check that.

* define gitignores separately
2019-02-06 06:57:44 -06:00
ipptac
db488807e4 New Device: Bluecat Networks appliances (#9758)
* New Device: Bluecat Networks appliances
2019-02-03 07:57:20 +01:00
Tony Murray
0b724c3fbe Better handling of log file failures (#9539)
Fix issues when APP_LOG is empty, unwritable , or pointed at a directory.
APP_LOG takes precedence over $config['log_file'] now.

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.
2018-12-16 21:26:20 +00:00
Tony Murray
46ca1fd45e
Revert "Attempt to make proxy sub-dir -> app no subdir work" (#9341)
* Revert "Attempt to make proxy sub-dir -> app no subdir work (#9317)"

This reverts commit df850a3ed9.
2018-10-18 09:15:48 -05:00
Tony Murray
df850a3ed9 Attempt to make proxy sub-dir -> app no subdir work (#9317)
Set APP_URL and APP_URL_SUFFIX in .env
2018-10-17 17:07:26 +01:00
Tony Murray
a2e33efba8 Use PDO for MySQL queries (#8935)
Gut dbFacile
mres() now does nothing... could have some vulnerable queries, but most are ok

TODO
- [x] IRC client broke
- [x] Install broke

DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
2018-08-17 21:29:20 +01: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