* Fix disabling of built-in commands when using ./lnms in production
It wasn't working correctly after Laravel upstream changes
* Use nunomaduro/laravel-console-summary
* fix command name
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Shift HTTP kernel and middleware
* Shift service providers
* Shift console routes
* Shift to class based factories
* Namespace seeders
* Shift PSR-4 autoloading
* Default config files
In an effort to make upgrading the constantly changing config files
easier, Shift defaulted them. This allows you to review the commit
diff for once for customizations when you are done Shifting.
Moving forward, consider using ENV variables or create a separate
config file to allow the core config files to remain as default
as possible.
* Shift Laravel dependencies
* 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
* Shift cleanup
* console routes
* composer update
* factories
* phpunit
* bootstrap pagination
* model factory
* wip
* Apply fixes from StyleCI (#12236)
* wip
* Apply fixes from StyleCI (#12238)
* wip
* wip
* wip
* wip
* Apply fixes from StyleCI (#12240)
* wip
* Apply fixes from StyleCI (#12242)
* composer update
* Bump to PHP 7.3 minimum
Co-authored-by: Laravel Shift <shift@laravelshift.com>
* Poller settings WIP
* Poller settings WIP2
* working on SettingMultiple
* setting multiple working
* settings sent with all required info
* fix translation
* Fix keys
* fix groups setting
* Apply settings to service
fixes and validations for setting
* don't error when no poller_cluster entry exists
* hid tab when no poller cluster entries
* Authorization
* make prod
* daily maintenance toggle should be advanced
* Update schema def
* Implement OS specific information discovery
That way it doesn't have to be fetched during polling
Also improve discovery process, os is only detected once, in the core module.
EXA is the test os, a couple improvements there.
* Use local variable, then unset it so we don't pollute.
* fix style issues
* test and other fixes
* attribute update fixes
* Update exa data, need new source data
* null missing "os" values
* fix ftos odd character
* fix ftos odd character
* only null for new style or we will reset to null every discovery
* Move device observer to own class
* Handle location, relocate event logging
* update exa e7-2 data
* update ird test data, apparently unicode is now working.
* update Linux ntc, now uses correct icon
* Only load all os on the web, also, we can't load existing the the database isn't connected.
* only for devices that have a location
* revert ftos test data apparently
* revert ird
* Throw some shit together, rough outline.
* Reorganize tabs, use tab controllers
* Implement performance (into the latency tab)
* Update resources/views/device/header.blade.php
Co-Authored-By: Jellyfrog <Jellyfrog@users.noreply.github.com>
* Add more tabs
* All controllers created
* Implement routes
* Implement smokeping
* routing and auth
* fix smokeping check
* Implement device dropdown menu
* Update deviceUrl to new style
* Use Gates
* Fix style
* use more appropriate gates
* add show-config gate
remove Laravel helper
* Only show vlan tab if VLANs exist for the device :D
* Fix rancid file check will return false
* revert over-zealous file name changes
* don't need to request the location parameter, just cast to string to avoid bugs when not found
* Move latency tab (ping/performance) to the position of performance instead of ping.
Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
* Use model::class instead of string for binding
Originally from laravel shift
Shift bindings
PHP 5.5.9+ adds the new static `class` property which provides the fully qualified class name. This is preferred over using class name strings as these references are checked by the parser.
* Shift cleanup
* Global Settings - Alert Default Settings
* Revert "Global Settings - Alert Default Settings"
This reverts commit a1af62b146af3c5e352e07cfce130d642201d00a.
* Widget Eventlog - Sensors link and overlib Image
* travis fix
* handling via AppServiceProvider
* collect function
* Travis ...
* static list of Sensor Types
* adding all sensor graph_types
* remove collect
* correct getTypes - remove change to lower case
* class sensor_descr switch
* class sensor_descr switch - revert
* Use standard sensor type names
* move types to attribute list
* going back to changes from 9eee7fad582edfdbc5f7552b24f877fe6e29b765
Co-authored-by: Tony Murray <murraytony@gmail.com>
* 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
* 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
* Device Cache
also some additional device related models
* attribs from cache
* replace common attribute functions
* remove legacy cache usage
tidy up some collection manipulation
remove some unused or single use functions
* cleanup some items
* always return a device, to prevent bugs
* clear device cache when testing after each test
* fix double assignment
* Clean up function to take advantage of null object
* 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
* Device Groups rewrite
Updated web ui
Static or dynamic groups allowed
Alert rule query builder
Translation support
Permissions support
* cleanup, make relationship save, and validate it
* builder WIP
* rules builder and rules saving/loading
* Parse query builder to Laravel Fluent query
* Upgrade existing groups when editing.
Properly update only dynamic groups when polling.
* remove unused old code
Update API and other places to use Eloquent
* debug output in poller restored
* Fix up some things
creating static
improved validation
fix js error on creation
Fix static groups in polling
* hide pattern for static group
* Implement authorization
Use in the menu too
* update schema
* fix rollback
* Don't abort on invalid queries
* fixes to query builder
* add test data, looks like macros aren't handled (omitted them because groups don't use them generally)
* Add macro support for QueryBuilderFluentParser
* add test for macro that accepts value
* More space in forms
Retain rules when converted to static
no duplicate names allowed
* Better error feedback
Update related devices on save
* Add button icon
* format
* update docs
* fix tests
* Fix some QueryBuilderFluentParser issues with OR
updated/more test data
* Show device groups runtime
fix querybuilder.json format
* Store table joins in the rules to minimize polling time
Update group joins in daily.sh (and when they are saved)
* Update daily.php
* Add units to time
* Device Groups rewrite
Updated web ui
Static or dynamic groups allowed
Alert rule query builder
Translation support
Permissions support
* cleanup, make relationship save, and validate it
* builder WIP
* rules builder and rules saving/loading
* Parse query builder to Laravel Fluent query
* Upgrade existing groups when editing.
Properly update only dynamic groups when polling.
* remove unused old code
Update API and other places to use Eloquent
* debug output in poller restored
* Fix up some things
creating static
improved validation
fix js error on creation
Fix static groups in polling
* hide pattern for static group
* Implement authorization
Use in the menu too
* update schema
* fix rollback
* Don't abort on invalid queries
* fixes to query builder
* add test data, looks like macros aren't handled (omitted them because groups don't use them generally)
* Add macro support for QueryBuilderFluentParser
* add test for macro that accepts value
* More space in forms
Retain rules when converted to static
no duplicate names allowed
* Better error feedback
Update related devices on save
* Add button icon
* format
* update docs
* fix tests
* Rewrite user management.
Error management
Revert edituser legacy page
Connect user permissions button to legacy page for now.
Implement user creation
Refine form
Remove PingCheck.php accidental add :)
Fixes for redirection and deletion
More fixes: realname accidental validation setting, hide can modify for read-only auths
Use a panel to improve style
Add icon to panel-title
Not allowed to delete own user (at least via the click of a button)
Use request validation to reduce complexity of controller.
Improve protection against users doing things they should not.
Switch to horizontal form and not nearly as wide of layout :)
delete without refresh.
Fix for buttons
Include all users (not just from this auth)
Hide the auth column if there is only one auth type
Show username if real name isn't set
Don't allow creation of demo users via the webui
a fix to the lnms user:add command, it didn't set auth_id
update edituser.inc.php to current
just redirect to users page
* Remove TwoFactorTest for now
* Update edituser.inc.php
* Update .env.dusk.testing
* Enable 2fa for 2fa test...
* Reorganize trap tests
* Testing db DRIVER to prevent .env from interfering
* New code to detect if Laravel is booted. Hopefully more reliable.
* WIP external test process
* revert module test helper
* Use .env in Eloquent::boot()
* Fix test database settings loading
* fix undefined classes
(didn't find the one I needed)
* Fix incorrect Config usages
And RrdDefinition return type
* fix .env loading
* use the right DB
* slightly more accurate isConnected
* Move db_name to DBSetupTest specifically
* restore $_SERVER in AuthSSOTest
* missed item
* WIP
* tear down in the correct order.
* some testing cleanups
* remove check for duplicate event listener, it's not working right
* Don't need this change anymore
* Implement Log::event to replace legacy function log_event()
* fix port tests
* fix up tests
* remove pointless TrapTestCase class
* fix style
* Fix db config not being merged...
* skip env check for tests
* defer database operations until after Laravel is booted.
* don't include dbFaciale...
* redundant use
* Reorganize trap tests
* Testing db DRIVER to prevent .env from interfering
* New code to detect if Laravel is booted. Hopefully more reliable.
* WIP external test process
* revert module test helper
* Use .env in Eloquent::boot()
* Fix test database settings loading
* fix undefined classes
(didn't find the one I needed)
* Fix incorrect Config usages
And RrdDefinition return type
* fix .env loading
* use the right DB
* slightly more accurate isConnected
* Move db_name to DBSetupTest specifically
* restore $_SERVER in AuthSSOTest
* missed item
* WIP
* tear down in the correct order.
* some testing cleanups
* remove check for duplicate event listener, it's not working right
* Don't need this change anymore
* Implement Log::event to replace legacy function log_event()
* fix port tests
* fix up tests
* remove pointless TrapTestCase class
* fix style
* Add lnms user:add command
Uses events to mark past notifications as read (even for non-manually added users)
* Filter out previous options from auto-completion
* use validation to check cli input
* Warn if using other auth
* abstract LnmsCommand
* Use setPassword helper for hashing instead of mutator
* Extract validation function
* add migrate:install to lnms, but hide it
* Fix Database migration validation
* remove extra import
* Don't allow install to continue if db build fails
* Port RIPE whois to Laravel
* remove netcmd.php and port to laravel.
Escape CLI and set it to stream output live.
* fix browser buffer bust on a few browsers.
* Add librenms command
Hook up to artisan. Hide dev commands and most other commands if app environment is production.
Register all commands for php artisan or when not in production.
* remove dead end line
* Console application name and version.
Had to shift some stuff from legacy code, but deferred others as it was too extensive of a change.
* switch check order
* always get local version now
* update array format
* whitepace
* fix style
* add AlertSchedule model and relationships
change table structure to match the expected layout
* Update maint schedule map ui
* better index name
* Laravel queries
fix some issues with the ui: restricting start incorrectly and loading empty days error
* handle date limiting properly
* Another attempt add schedule constraints
* use Auth
* Update WorldMap widget to use check isUnderMaintenance
* Rename 275.sql to 276.sql
* Rename 276.sql to 277.sql
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.
Implemented in Laravel
Doesn't use legacy PHP session
Several widgets have new features and settings, for example:
- Multiple ports in one graph
- Maps settings are configurable and override system settings but default to system settings
- Graylog stream and/or device selection
- Much improved graph widget selection
- Many more
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.
- Fix location so it is a regular database relation (this allows multiple devices to be accurately linked to one location and saves api calls)
- Parse coordinates from the location more consistently
- Add settings to webui
- ~~Used [PHP Geocoder](http://geocoder-php.org/), which has lots of backends and is well tested. (also includes reverse and geoip)~~
- Google Maps, Bing, Mapquest, and OpenStreetMap supported initially.
- Default to OpenStreetMap, which doesn't require a key. They will liberally hand out bans if you exceed 1 query per second though.
- All other Geocoding APIs require an API key. (Google requires a credit card on file, but seems to be the most accurate)
- Update all (I think) sql queries to handle the new structure
- Remove final vestiges of override_sysLocation as a device attribute
- Update existing device groups and rules in DB
- Tested all APIs with good/bad location, no/bad/good key, and no connection.
- Cannot fix advanced queries that use location
This blocks #8868
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.
Does more harm than good. Need to find a more robust solution for proxy + subdirectory -> non-subdirectory.
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.
* Force root url if set by user
If user sets APP_URL, force the root url to that. Empty strings result in default behavior.
Fix some of the urls in the laravel templates.
* Docs update
* Add base_url
* Keeps the dashboard sessions from expiring.
Route dashboard ajax calls through Laravel.
Boots minimal cookies and sessions.
Does not fix other pages for now, real fix is to fully port.
* Check Laravel auth for the legacy calls.
Display Laravel errors in the dashboard.
legacy auth checks are mostly extraneous now.
* AD Authorization fixes
Remove mres() and $_SESSION usage.
Remove broken addUser function and use Mysql addUser.
* AD Authorization fixes
Remove mres() and $_SESSION usage.
Remove broken addUser function and use Mysql addUser.
Extract common AD auth code to ADUtils
* AD Authorization fixes
Remove mres() and $_SESSION usage.
Remove broken addUser function and use Mysql addUser.
Extract common AD auth code to ADUtils
* Send no user info to log instead of toast.
* Remove commented code
* add abstract getConnection() method that is required.
* Actually return the value