Commit Graph

34 Commits

Author SHA1 Message Date
Jellyfrog
3985ce74ce
Update PHPUnit to 8.x (#11635)
* Shift return type of base TestCase methods

From the [PHPUnit 8 release notes][1], the `TestCase` methods below now declare a `void` return type:

- `setUpBeforeClass()`
- `setUp()`
- `assertPreConditions()`
- `assertPostConditions()`
- `tearDown()`
- `tearDownAfterClass()`
- `onNotSuccessfulTest()`

[1]: https://phpunit.de/announcements/phpunit-8.html

* Update PHPUnit to 8.x

Part of Laravel 6 upgrade

* Bump php versions

Co-authored-by: Laravel Shift <shift@laravelshift.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-05-19 16:31:50 +02:00
Tony Murray
f0d68a1ad8
Update PHP dependencies (#11377)
* Update composer dependencies
Fix PSR-4 violations

* Actually support PHP 7.1 :D

* all trap tests should extend SnmpTrapTestCase
2020-04-03 17:13:18 -05:00
Tony Murray
217969e140
Update php-codesniffer (#11368)
* PHPCS 3.5+

* Fix newly detected style issues
2020-04-03 08:41:24 -05:00
Tony Murray
5a48b6f2a7
Update dusk-updater (#11311) 2020-03-20 16:37:36 -05:00
Tony Murray
df16de9d2f
Refactor Datastores to allow future improvements. OpenTSDB Tags. (#11283)
* Datastores to object oriented code, using the Laravel IoC container

Change instantiation
better DI
move OpenTSDB

Small re-orgs

remove unused stuff

Fix graphs and other scripts

Use DI for all except rrd

fix up connection error handling

Add tests, fix up a "few" things
Add Config::forget()

Style fixes

Don't reference legacy code

remove accidental code paste

Add datastores phpunit groups

some tests

* rebase fixes

* some test fixes

* shorter tests

* shorter tests

* Don't except when rrdtool can't be started.

* restore tests

* fix rrd tests

* fix iterable change upstream

* fix isValidDataset

* fix invalid data bug

* fix mysql incorrect ds

* fix issue with data that is too long

* use regular data_update()

* Use log facade

* OpenTSDB mis-ordered arguments fix

* Making a singleton with different options makes different singletons.  Just use the global config settings to disable datastores.

* only filter tags for datastores that won't it don't modify the tags permanently

* Update copyrights to include original authors.

* Stats for all datastores

* Fix mysql sends different rrd / other ds names

* fix snmp last stats not initialized
remove unused function

* remove unused function and move single use function closer to its use

* InfluxDB does not need to update null or U values.
Skip write if all fields are empty

* Fix smart value checks

* fix style issues

* Make sure port data is stored the same way as before for Graphite and OpenTSDB
Add ifIndex tag to all to be compatible

* Missed rrdtool_tune() call

* Test update WIP

* OpenTSDB now includes tags

* fix style
2020-03-16 09:17:58 -05:00
Tony Murray
7fe895bd08
Revert "Refactor datastores to classes (#9179)" (#11273)
This reverts commit e5dad7a64e.
2020-03-11 07:52:52 -05:00
Tony Murray
e5dad7a64e
Refactor datastores to classes (#9179)
* Datastores to object oriented code, using the Laravel IoC container

Change instantiation
better DI
move OpenTSDB

Small re-orgs

remove unused stuff

Fix graphs and other scripts

Use DI for all except rrd

fix up connection error handling

Add tests, fix up a "few" things
Add Config::forget()

Style fixes

Don't reference legacy code

remove accidental code paste

Add datastores phpunit groups

some tests

* rebase fixes

* some test fixes

* shorter tests

* shorter tests

* Don't except when rrdtool can't be started.

* restore tests

* fix rrd tests

* fix iterable change upstream

* fix isValidDataset

* fix invalid data bug

* fix mysql incorrect ds

* fix issue with data that is too long

* use regular data_update()

* Use log facade

* OpenTSDB mis-ordered arguments fix

* Making a singleton with different options makes different singletons.  Just use the global config settings to disable datastores.

* only filter tags for datastores that won't it don't modify the tags permanently

* Update copyrights to include original authors.

* Stats for all datastores

* Fix mysql sends different rrd / other ds names

* fix snmp last stats not initialized
remove unused function

* remove unused function and move single use function closer to its use

* InfluxDB does not need to update null or U values.
Skip write if all fields are empty

* Fix smart value checks

* fix style issues
2020-03-10 19:08:00 -05:00
Tony Murray
1f24a6783e
Update dependencies (#10830)
* Update dependencies

* Opsie, need to restrict to php 7.1
2019-11-22 05:09:53 +00:00
Tony Murray
6e99e897e9
Prevent sessions from expiring (#10798)
when the page is left open.  If the page session expires because laptop was asleep, or something, refresh the page.
2019-11-13 06:03:44 +00:00
Tony Murray
90bd2275cf
Unbundle javascript language files (#10788)
* Unbundle javascript language files
automatically generated for each install

* update docs

* update laravel-vue-i18n-generator
a newer (unreleased) verison is need for English fallback to work
2019-11-08 15:18:41 +00:00
Tony Murray
699aa8a042
Consolidate configuration settings and implement dynamic webui settings (#9809)
* initial db/defaults dump

* numeric values

* Remove $config['time']

* Use config_definitions.json

* try setting definition as a complete array

* a little more

* fix format

* WIP converting dynamic setting pages

* rewriting the webui

* remove legacy and add translations

* finish email section

* improve navigation
update js a bit

* Import the remaining existing settings

* Update backend still some wip
migration

* fix config loading (db not overriding defaults)

* some cleanup

* more array collapsing

* update settings

* Settings search

* add purge settings to ui, order groups and sections

* collapse more arrays

* Auth definitions WIP

* remove needless slash escapes

* add warning to json

* moving settings from defaults.inc

* remove slow_statistics

* Move rrdtool settings to the poller section

* Use translations more consistently

* removing more settings from defaults.inc.php

* show setting name in tooltip

* allow help text to be shown on mobile

* disable settings that are set in config.php

* Implement undo and reset to default.

* Vue.js functional

* Vue.js WIP

* Implement tabs component

* accordion WIP

* lodash ver update

* two items

* Accordion somewhat working

* hash navigation

* Refine Accordion

* Fix up tab styling a bit

* Cleaner tab selected property
Hide html while loading

* spinner?

* Icon support
property for accordion to active

* WIP

* Tabs/Sections from ajax

* Setting Component skeletons

* Dynamic Component resolution

* Basic functionality

* toggle class

* Refactor components

* translate tabs and accordions

* simple array attempt

* improve readonly tooltip

* array styling

* array value editing

* organize snmp info

* Handle initial tab/section in url

* Use Laravel to parse tab/section, dump old

* Draggable array entries

* v-tooltip, for clickable (and touch) help tooltips
disable draggable

* Navigation WIP

* Navigation WIP

* groups computed

* filter settings

* fix event reference

* vue.js i18n initial

* missing description = just setting name

* en fallback

* tidy up the language support and js generation

* persist value to db

* fix issue with 0

* Delete settings from DB instead of setting them to default

* ldap-groups
fixup style

* Default dashboard selection

* fix array of options instead of object

* allow custom validation for settings

* translate options in SettingSelect

* SNMP v3 WIP

* fix setting arrays

* Split persist out of set

* Hook up events for SNMP v3 Auth
correct Config::persist behaviour with arrays

* dependent settings (primitive for now)
actually update the settings values in the LibrenmsSettings component

* more complex "when" behaviour

* remove un-needed seeder

* add poller_modules.cisco-qfp

* remove en.json (disable warning)

* don't set default for log_dir or log_file, otherwise it won't be processed correctly

* Fix module order
add some missing settings

* more config corrections

* correct graphs
correct loading values set to null (although it should have no difference)
remove project_name_version

* Add nfsen settings.  Docs are very confusing, so might have flubbed something
remove option for array definition of select option as numeric indexes messes it up

* Correct more upstream config differences

* Config cleanup after a bunch of merges.

* Fixes

* add version tags to js/css files
remove old js

* Print out full settings list read-only

* Add http_proxy setting
fix indents in config_definitions.json

* repeaters default is 0 (aka 20)

* cleanups

* rewrite the dynamic config docs

* add language docs

* Don't show snmp v3 auth add/remove if disabled by config.php
2019-10-16 21:22:05 +00:00
Tony Murray
42fd5afb23
Laravel 5.8 and updated dependencies (#10489)
* Laravel 5.8
and dependencies

* Fix cache time

* upstream base file changes

* Accidentally ran composer with PHP 7.3

* fix test error

* one more

* one more

* one more

* fix dotenv loading
2019-08-05 15:54:58 -05:00
Tony Murray
89fae9be1d
Move API routing to Laravel (#10457)
* Add more api helper functions
to centralize code more

* Enable cors

* Initial Legacy route in Laravel

* Force api v0 responses to json
Add a couple more routes

* more paths, pretty print the json response
pass parameters to the api function

* devices basic functions

* Port generic graph function
check permissions function accepts callback to avoid lots of if statements

* move vlans

* links

* graphs

* fdb

* health

* wireless

* port graphs

* ip functions
split em up

* port_stack

* components

* compoment add/edit/delete

* get_device_groups

* port stats

* port graphs

* get_devices_by_group

* port_groups

* api_get_graph

* show_endpoints

* get_bill

* get_bill_graph

* get_bill_graphdata

* get_bill_history

* get_bill_history_graph

* remaining bill functions

* list_alerts

* ack/unmute alert

* Some cleanups

* Some cleanups

* list_alert_rules

* alert rule add/edit/delete

* inventory

* list_cbgp

* vrf

* list_ipsec

* list_fdb

* list_links (fix both usages)

* list_locations

* list_locations

* list_vlans

* list_ip_addresses

* list_arp

* list_ip_networks

* cleanup

* services

* list_logs and fix authlog.......

* cleanup

* cleanup 2

* remove slim

* don't load schema more than once

* basic test

* fix style

* downgrade laravel-cors to a version that supports PHP 7.1
2019-07-29 16:32:37 -05:00
Tony Murray
6e7908a49e
Update dependencies (#10325)
* Update dependencies
Removed symfony/contracts (v1.0.2)
Installed kylekatarnls/update-helper (1.1.1)
Updated symfony/polyfill-ctype (v1.10.0 => v1.11.0)
Updated symfony/yaml (v4.2.4 => v4.3.1)
Updated influxdb/influxdb-php (1.14.7 => 1.15.0)
Updated symfony/process (v4.2.4 => v4.3.1)
Updated symfony/finder (v4.2.4 => v4.3.1)
Updated symfony/filesystem (v4.2.4 => v4.3.1)
Updated symfony/polyfill-mbstring (v1.10.0 => v1.11.0)
Installed symfony/service-contracts (v1.1.2)
Installed symfony/polyfill-php73 (v1.11.0)
Updated symfony/console (v4.2.4 => v4.3.1)
Updated symfony/debug (v4.2.4 => v4.3.1)
Updated composer/xdebug-handler (1.3.2 => 1.3.3)
Updated composer/spdx-licenses (1.5.0 => 1.5.1)
Updated composer/semver (1.4.2 => 1.5.0)
Updated composer/composer (1.8.4 => 1.8.5)
Updated symfony/css-selector (v4.2.4 => v4.3.1)
Updated symfony/polyfill-php72 (v1.10.0 => v1.11.0)
Updated symfony/var-dumper (v4.2.4 => v4.3.1)
Updated symfony/routing (v4.2.4 => v4.3.1)
Updated symfony/polyfill-intl-idn (v1.10.0 => v1.11.0)
Installed symfony/mime (v4.3.1)
Updated symfony/http-foundation (v4.2.4 => v4.3.1)
Installed symfony/event-dispatcher-contracts (v1.1.1)
Updated symfony/event-dispatcher (v4.2.4 => v4.3.1)
Updated symfony/http-kernel (v4.2.4 => v4.3.1)
Updated symfony/polyfill-iconv (v1.10.0 => v1.11.0)
Updated egulias/email-validator (2.1.7 => 2.1.8)
Updated swiftmailer/swiftmailer (v6.2.0 => v6.2.1)
Updated opis/closure (3.1.6 => 3.3.0)
Installed symfony/translation-contracts (v1.1.2)
Updated symfony/translation (v4.2.4 => v4.3.1)
Updated nesbot/carbon (1.36.2 => 1.38.4)
Updated league/flysystem (1.0.50 => 1.0.52)
Updated erusev/parsedown (v1.7.2 => 1.7.3)
Updated dragonmantank/cron-expression (v2.2.0 => v2.3.0)
Updated lcobucci/jwt (3.2.5 => 3.3.1)
Installed psr/http-factory (1.0.1)
Updated zendframework/zend-diactoros (1.8.6 => 2.1.2)
Updated nexmo/client (1.6.3 => 1.8.1)
Updated barryvdh/laravel-ide-helper (v2.6.1 => v2.6.2)
Updated laravel/dusk (v5.0.2 => v5.1.0)
Updated sebastian/environment (4.1.0 => 4.2.2)
Updated phpunit/php-timer (2.1.1 => 2.1.2)
Updated theseer/tokenizer (1.1.0 => 1.1.2)
Updated phpdocumentor/reflection-docblock (4.3.0 => 4.3.1)
Updated doctrine/instantiator (1.1.0 => 1.2.0)
Updated myclabs/deep-copy (1.8.1 => 1.9.1)
Updated phpunit/phpunit (7.5.7 => 7.5.12)
Updated staudenmeir/dusk-updater (v1.0.3 => v1.1.1)
Updated symfony/dotenv (v3.4.23 => v3.4.28)
Updated nikic/php-parser (v4.2.1 => v4.2.2)

* Fix tests
2019-06-11 21:37:01 -05:00
Tony Murray
d44dd55239
Fix chrome driver version mis-match (#10154) 2019-04-26 21:52:33 -05:00
Tony Murray
f7b071a221
Also fixes warning about mismatched composer.json hash (#10002)
Update dependencies
  - Updating symfony/var-dumper (v4.2.3 => v4.2.4)
  - Updating symfony/console (v4.2.3 => v4.2.4)
  - Updating symfony/debug (v4.2.3 => v4.2.4)
  - Updating nikic/php-parser (v4.2.0 => v4.2.1)
  - Updating symfony/css-selector (v4.2.3 => v4.2.4)
  - Updating symfony/routing (v4.2.3 => v4.2.4)
  - Updating symfony/process (v4.2.3 => v4.2.4)
  - Updating symfony/http-foundation (v4.2.3 => v4.2.4)
  - Updating symfony/event-dispatcher (v4.2.3 => v4.2.4)
  - Updating symfony/http-kernel (v4.2.3 => v4.2.4)
  - Updating symfony/finder (v4.2.3 => v4.2.4)
  - Installing symfony/polyfill-intl-idn (v1.10.0)
  - Installing symfony/polyfill-iconv (v1.10.0)
  - Updating swiftmailer/swiftmailer (v6.1.3 => v6.2.0)
  - Updating opis/closure (3.1.5 => 3.1.6)
  - Updating symfony/translation (v4.2.3 => v4.2.4)
  - Updating erusev/parsedown (1.7.1 => v1.7.2)
  - Updating laravel/framework (v5.7.26 => v5.7.28)
  - Updating nexmo/client (1.6.2 => 1.6.3)
  - Updating laravel/laravel (v5.7.19 => v5.7.28)
  - Updating symfony/yaml (v4.2.3 => v4.2.4)
  - Updating fico7489/laravel-pivot (3.0.0 => 3.0.1)
  - Updating barryvdh/laravel-debugbar (v3.2.2 => v3.2.3)
  - Updating symfony/filesystem (v4.2.3 => v4.2.4)
  - Updating barryvdh/laravel-ide-helper (v2.5.3 => v2.6.1)
  - Updating laravel/dusk (v5.0.0 => v5.0.2)
  - Updating phpunit/php-timer (2.0.0 => 2.1.1)
  - Updating phpunit/phpunit (7.5.4 => 7.5.7)
  - Updating symfony/dotenv (v3.4.22 => v3.4.23)
2019-03-20 09:25:33 -05:00
Felicián Hoppál
942dc65122 Update to PHPMailer 6.0 (PHP 7.3 support) (#9818) 2019-02-15 00:53:41 -06: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
6e8e2eed0d add dbal so users can update the database 2019-01-16 09:52:56 -06:00
Tony Murray
d33d87931e
Update dependencies (#9657)
* Update dependencies
phpmailer/phpmailer (v5.2.26 => v5.2.27)
symfony/dotenv (v3.4.15 => v3.4.21)
amenadiel/jpgraph (3.6.20 => 3.6.21)
tecnickcom/tcpdf (6.2.22 => 6.2.26)
php-amqplib/php-amqplib (v2.0.2 => v2.8.1)
symfony/polyfill-ctype (v1.9.0 => v1.10.0)
symfony/yaml (v2.8.45 => v2.8.49)
vlucas/phpdotenv (v2.5.1 => v2.5.2)
symfony/css-selector (v3.4.15 => v4.2.2)
symfony/polyfill-mbstring (v1.9.0 => v1.10.0)
symfony/var-dumper (v3.4.15 => v3.4.21)
symfony/process (v3.4.15 => v3.4.21)
paragonie/random_compat (v2.0.17 => v2.0.18)
symfony/polyfill-php70 (v1.9.0 => v1.10.0)
symfony/http-foundation (v3.4.15 => v3.4.21)
symfony/contracts (v1.0.2)
symfony/event-dispatcher (v3.4.15 => v4.2.2)
psr/log (1.0.2 => 1.1.0)
symfony/debug (v3.4.15 => v3.4.21)
symfony/http-kernel (v3.4.15 => v3.4.21)
symfony/finder (v3.4.15 => v3.4.21)
symfony/console (v3.4.15 => v3.4.21)
nesbot/carbon (1.33.0 => 1.36.2)
monolog/monolog (1.23.0 => 1.24.0)
league/flysystem (1.0.47 => 1.0.49)
doctrine/inflector (v1.1.0 => v1.3.0)
ralouphie/getallheaders (2.0.5)
guzzlehttp/psr7 (1.4.2 => 1.5.2)
jakub-onderka/php-console-color (0.1 => v0.2)
nikic/php-parser (v3.1.5 => v4.1.1)
fico7489/laravel-pivot (2.3.7 => 3.0.0)
fideloper/proxy (4.0.0 => 4.1.0)
squizlabs/php_codesniffer (2.9.1 => 2.9.2)
barryvdh/reflection-docblock (v2.0.4 => v2.0.6)
symfony/class-loader (v3.4.15 => v3.4.21)
jakub-onderka/php-console-highlighter (v0.3.2 => v0.4)
psy/psysh (v0.9.8 => v0.9.9)
laravel/tinker (v1.0.7 => v1.0.8)
myclabs/deep-copy (1.7.0 => 1.8.1)
doctrine/instantiator (1.0.5 => 1.1.0)
webmozart/assert (1.3.0 => 1.4.0)
phpdocumentor/reflection-docblock (3.3.2 => 4.3.0)
phpunit/php-token-stream (1.4.12 => 2.0.2)

* limit laravel-pivot to <3.x because that requires laravel >= 5.5

* don't disable requirements

* update to master and exclude vendor database migrations and seeds

* a couple more updates
2019-01-15 17:34:05 -06:00
Tony Murray
daec72f8a0 Move ext-mysqlnd to suggested for now (even though it is actually required) (#9229)
* Move ext-mysqlnd to suggested for now (even though it is actually required)
Remove extra dependency version locks, they are more trouble than they are worth.  I just run composer with php 5.6 when updating composer.lock.
Update dependencies.

* Trigger full build on composer updates

* Update composer.json
2018-09-20 00:05:10 +01:00
Tony Murray
79333c45f6
Allow trusted proxy via APP_TRUSTED_PROXIES (#9196)
* Allow trusted proxy via APP_TRUSTED_PROXIES
Set to '*' by default to emulate legacy behavior.
Set up doc describing environment variables

* Create helper to parse environment variables into arrays properly.

* Update doc blocks
2018-09-13 07:26:42 -05:00
Tony Murray
1e55601409 Update validate to check for mysqlnd (#9043)
Ran into some annoying bugs with the old mysql library driver and BIGINT.
2018-08-20 23:56:47 +01:00
TheGreatDoc
9940c884f5 Fixed snmptraps. (#8898)
* Fixed snmptraps.

* Fixed space

* Added bgp down/up and authentication failure

* Fixed typo

* Fixed some typos, arrays, astext and format_hostname

* Updated documentation

* Moved code to a function

* Some refactor

* Minor fixes

* Minor fixes 2

* More minor fixes

* Changes requested by Tony

* Minor fixes

* Moved include to snmptrap.php

* Refactor traps to use object oriented code.

Should trigger events too/instead, but we'll leave that.
Testing todo

* Add tests and fix things so they actually work
Not checking events yet.

* Fixed typo and severity level

* Update composer deps, I think the lock file wasn't right.
add json and mbstring extension deps while I'm at it.

* Fix several issues with phpunit fixtures
2018-08-11 16:37:44 -05:00
Tony Murray
9bc0c542a5 Allow ping checks to be ran separately from polling (#8821)
Allows ping checks at intervals not tied to the poller.  Pointless if you are not alerting on device status.
I updated the rrdstep.php script to treat ping-perf files separately and made it so it only converts if needed.

Docs here: https://docs.librenms.org/Extensions/Fast-Ping-Check/

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-07-30 22:58:38 +01:00
Tony Murray
310f7ca401 Downgrade phpdotenv dependency (#8902)
https://github.com/vlucas/phpdotenv/issues/276

Fixes values in .env starting with # being empty.

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-07-16 16:54:06 +01:00
Neil Lathwood
ad6ec7f72a
Refactor alert templates to use Laravel Blade templating engine (#8803)
* Initial start on new templating support

* further updates

* more updates

* More working version

* Last fixes

* Small updates

* modified test to look for dbname.

* Schema update

* Added fix for not being able to disable Philips Hue transport

* Updated sql file

* Updated db_schema

* Set myclabs/deep-copy to be 1.7.x version in composer

* Fixes from murrant

* Forced nikic/php-parser to version 3.1.x in composer

* Updated composer to use custom fork of string-blade-compiler + fixed transport use

* Updated to always use correct template

* Merged legacy and blade templating engines

* Removed template type + fixed test-alert.php

* Added more template placeholders

* Added ability to reference data in templates as $alert->X

* Updated docs for templates

* Updated db_schema.yaml

* Added $alert->builder

* Clarify the use of $alert->builder

* Fixed the use of $alert->transport

* renamed schema file

* Added template validation

* Small update to fix travis issue

* Add Docs text to title bar

* Updated amqp to new of version

* Consistency in alert rule and template title bars
2018-07-14 22:15:43 +01:00
Tony Murray
e736f5efec Updated YAML schema validation (#8808)
Changed some values to be explicitly boolean


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-06-15 09:45: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
Tony Murray
7b6e4f95c0 Library update (#8311)
* Library update
amenadiel/jpgraph 3.6.12 > 3.6.14
ezyang/htmlpurifier 4.9.3 > 4.10.0
tecnickcom/tcpdf 6.2.13 > 6.2.17

Also, make composer.lock match our composer.json to avoid a warning.

* Remove php snmp extension, we don't actually use it.
2018-03-02 19:32:09 +00:00
Tony Murray
7a2e5f4e40
Update to phpunit 5 (#8217)
remove array_column it is no longer needed
2018-02-07 20:45:56 -06:00
Tony Murray
609676a9f8
Move InfluxDB to vendor and update dependencies. (#8184)
Update all dependencies

Updated event-dispatcher too far
2018-02-02 22:57:31 -06:00
Tony Murray
6878df8c12
Prep for composer changes (#8075)
* Prep for composer changes

* Update composer.json, composer.lock and a small update to phpmailer and Yaml

* Prevent accidental `composer update` runs

* Add  --no-interaction to daily.sh
2018-01-22 08:16:37 -06:00