* Plugin update (breaking)
A couple breaking changes regarding property types and method arguments.
Add a setting to allow plugin errors to be shown instead of automatically disabling the plugin.
All default hooks now use Dependency Injection to make it easy to get access to whatever you need (such as settings)
Add a ton of comments and examples in the PHP code.
Expand a bit on the documentation, it could still use more help
Fix a bug in the settings and page view where the included blade file was output before the page headers, etc
* Apply fixes from StyleCI
---------
Co-authored-by: StyleCI Bot <bot@styleci.io>
* Refactor MAC utils to a new utility class
* Apply fixes from StyleCI
* Inline functions
Add tests
Handle bridgeid format
* Apply fixes from StyleCI
* Dedicated code path for stp bridge parsing, and improve STP output a bit
* Correctly parse dot1dBaseBridgeAddress and don't store int in bool field
* trim any unexpected character from bridge addresses, add extra test data.
* better comment
* barsBridge can handle dot1dBaseBridgeAddress correctly now
* parseBridge, check for properly formatted mac first.
* update test data, empty data = empty mac
* Fix new usage after rebase
* import
---------
Co-authored-by: StyleCI Bot <bot@styleci.io>
* Adding a NAC global port page
* style
* filter_menu_entry
* typo
* ->when()
* device_id always returned
* use request
* laravel conversion, let see how it goes
* styleci
* ->with('device') to avoid 1 query per item processed
* and rewrote on @murrant advice
* any -> get
Suggested by @murrant
Co-authored-by: Tony Murray <murraytony@gmail.com>
* @push('scripts')
* style
* @endpush
---------
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Install bouncer
* Seeder and level migration
* Display and edit roles
* remove unused deluser page
* Update Radius and SSO to assign roles
* update AlertUtil direct level check to use roles instead
* rewrite ircbot auth handling
* Remove legacy auth getUserlist and getUserlevel methods, add getRoles
Set roles in LegacyUserProvider
* Small cleanups
* centralize role sync code
show roles on user preferences page
* VueSelect component WIP and a little docs
* WIP
* SelectControllers id and text fields.
* LibrenmsSelect component extracted from SettingSelectDynamic
* Handle multiple selections
* allow type coercion
* full width settings
* final style adjustments
* Final compiled assets update
* Style fixes
* Fix SSO tests
* Lint cleanups
* small style fix
* don't use json yet
* Update baseline for usptream package issues
* Change schema, not 100% sure it is correct
not sure why xor doesn't work
* Only load popup graphs when popup is shown
Might cause a small delay, but pre-loading all the graphs was causing a lot of un-needed work. Slowing down page loading.
fixes#343
* remove extra div
* Add a global setting for Ctrl-F focus (improve #14947)
* Move this new global setting to user setting (improve #14947)
* Update preferences.blade.php
Cleaner wording, and Copy & Paste bled through.
* Fix indents and @endif position in menu.blade.php
---------
Co-authored-by: Justin Lentz <monkeybrains7@gmail.com>
* Added support for user timezones and user browser timezone byt default
* Formatting fixes
* Use the timezone for alert log display
also added validation for the timezone because it's being used in SQL.
* Formatting fixes
* Added return type
* Formatting"
* Update the latency graphs to use the user timezone
* Simplify the web routes config
* Update phpstan to ignore type error
* Fixed up the phpstan config
* Reverse phpstan change
* Re-apply phpstan override
* Remove the option to unset the session timezone
* Formatting fix
* Update outge and event logs to use session timezone
* Fix route for the timezone control
* Made the timezone more dynamic
* Fix a logic error that was stopping the timezone from being set automatically on login
* Prevent getPref from being called twice
* again prevent getPref double call
* getPref double call
* Fixed typo made during merge
* Fixed merge error in phpstan-baseline.neon
* Change spaces to tabs in phpstan-baseline.neon
* Update error count
---------
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Convert the inventory page to Laravel
Fix several XSS issues (hopefully no new ones snuck in)
Small improvement to the SelectController to allow filtering by filterFields()
* style fixes
* Fix lint issues
* Fix part device filter
* Move `resources/lang` folder
* Shift registered middleware
* Remove `fruitcake/laravel-cors` dependency
* Streamline `$commands` property
* Upgrade to Flysystem 3.0
* Shift core files
* Convert `optional()` to nullsafe operator
* Remove unnecessary `$model` property
* Convert route options to fluent methods
Laravel 8 adopts the tuple syntax for controller actions. Since the old options array is incompatible with this syntax, Shift converted them to use modern, fluent methods.
* Convert deprecated `$dates` property to `$casts`
* Shift config files
* Default config files
In an effort to make upgrading the constantly changing config files
easier, Shift defaulted them and merged your true customizations -
where ENV variables may not be used.
* Bump Laravel dependencies
* Use `<env>` tags for configuration
`<env>` tags have a lower precedence than system environment variables making it easier to overwrite PHPUnit configuration values in additional environments, such a CI.
Review this blog post for more details on configuration precedence when testing Laravel: https://jasonmccreary.me/articles/laravel-testing-configuration-precedence/
* Fix error provider
* Match new symfony syntax
* Match upstream syntax
* Fix route syntax
* generate composer.lock
* Sync back configs
* routes
* composer
* Fix more flare
* fix cors
* sync lang
* Apply fixes from StyleCI (#14517)
Co-authored-by: StyleCI Bot <bot@styleci.io>
* bump larastan
* update packages
* wip
* Temporarily lower phpstan level
* Update phpstan.neon
* wip
* wip
* wip
* Apply fixes from StyleCI (#14592)
Co-authored-by: StyleCI Bot <bot@styleci.io>
* test
* Update CiHelper.php
* Update test.yml
* Update CiHelper.php
* Update CiHelper.php
* Apply fixes from StyleCI (#14616)
Co-authored-by: StyleCI Bot <bot@styleci.io>
* test?
* fix phpstan problems
* dont run snmpsim on github ci
* Fix whitespace
* More whitespace
* More whitespace ???
* I think the space broke it
* fix the reset of the whitespace
* hard code auth guard
---------
Co-authored-by: Shift <shift@laravelshift.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Tony Murray <murraytony@gmail.com>
Previously, the code would query all the oids it received. Now it will split it up into multiple queries if too many are sent.
Prevents some devices snmp service from crashing.
* Fix empty output on validation test
* tried to fix indentation issue
* tried to fix indentation issue again
* tried to fix stylci test error
* remove trailing spaces
* Applied styleci diff
* Fix for displaying user description when F2A isnt used
* Revert "Fix for displaying user description when F2A isnt used"
This reverts commit d9f170d7e6.
* Fix for displaying user description when F2A isnt used
* Cleanup and optimize the availability widget
Default sort is display name
Sort applies to services too (services always last)
May need to refresh the page to get new css
* style
* We don't need request (lint fix)
* Wrong service field name
* Fix IPv6 in service check host (#13939)
* Add hostName cleaning to Clean
* Apply RFC 5952 formatting to Clean::hostName output
* Use more liberal cleaning for hostnames
* Remove unwanted whitespace
* Apply Clean::hostName() to all relevant fields
* Fix docstring
* Use IP::isValid inline
* Update Clean.php
* Update services.inc.php
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Add sorting support for additional columns + dual column
Additional columns are Display Name (display) and System Name (sysName)
Dual column means that first is sorted after status, then within
each status group another sort is done (every columns from single column
sorting is possible).
* Change code for styleCI
* Expand availability map sorting menu
Also change sysName to System Name – there is no real reason for
that short form.
* Add german translation for avail. map sorting/display options
* Adjust sorting behaviour in Availability Map
The dropdown now presents two options:
- Display Text: Sort by the selected value of the dropdown 'Display Text'
- Status: Sort by status, then by selected value of dropdown 'Display Text'
As the field 'display' (The display name) may contain template functions
etc., sorting is not done by SQL means; instead custom sorting is done
within the controller.
* Apply fix for styleCI
* Apply fix for styleCI, part 2
* Update availability-map.blade.php
* Update availability-map.blade.php
* Update availability-map.blade.php
* Update de.json
* Update AvailabilityMapController.php
* Update AvailabilityMapController.php
* Update availability-map.blade.php
* Update de.json
Co-authored-by: Sander Steffann <sander@steffann.nl>
Co-authored-by: Tony Murray <murraytony@gmail.com>
* use component to discover if xDSL polling is needed
use component to discover if xDSL polling is needed
* Components OK, Polling in correct files, no DB for VDSL
* GUI
GUI_suite
* per port as well
* rename
* interface listing
* draytek_snmpsim
* fix arraymerge
fix names and max value
* schema
schema
style
* remove one dbFetchRows
remove 2x dbFetchCell
style
style
remove Legacy dbFetchRow
tests
tests
eloquent
more eloquent
more eloquent
one more gone
* fix properties access
eloquent_insert_update
style
tests
tests
tests
tests
* tests
tests
tests
* adslLineCoding
* Models
* fix not nullable cols in DB from code
default values
typo
rename
typo
schema
fix
fix
vdsl fix now
typo
typo
fix size
fix size
* Power values for VDSL
Power values for VDSL
Power values for VDSL
DB
* cleanup
* Rrd::checkRrdExists
* always enable DSL discovery
style
* xdsl module
* cleanup and move to Module
cleanup and move to Module
cleanup and move to Module
cleanup and move to Module
* Fix display
* fix polling and tenth
* remove legacy poller
* Style and Cosmetics
Cosmetics
Cleanup
* Translations
Translations
* exists
exists
* add test support for xdsl
* remove last component call
unused
* translations
* remove non standard onclick event on xdsl line
* Update Discovery Support.md
Update Poller Support.md
toner_gone
* Notification for removal of lnms config:set enable_ports_adsl true
* enable on devices with potential DSL interfaces
* tests are working now
fix teldat tests
* os_schema
* teldat
* move to new module structure
* move to new module structure
* wrong dump function
* wrong dump function
* laravel_through_key hidden
* Update notifications.rss
* Update notifications.rss
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Email embed graphs
* Allow attachment for non-html
Add setting to webui
Correct $auth setting
* Cleanups, throw RrdGraphException instead of returning an error image.
Generate the error image later, giving more control.
Reduce code duplication a little
* Style and lint fixes
Change to flags
* Add baseline for lint errors I don't know how to resolve
* oopsie, changed the code after generating the baseline
* Tiny cleanups. Make set DeviceCache primary, it is free.
* Docs.
* email_html note
* Allow control of graph embed at the email transport level to override the global config.
* Allow control of graph embed at the email transport level to override the global config.
* Add INLINE_BASE64 to make it easier to create inline image tags
* Error reporting
* Move code to ErrorReportingProvider
Enable reporting of error (and warning) messages.
report module exceptions
* Restore flare key
Not needed to set late anymore. We set up filtering before it is initialized.
* Remove unnecessary and maybe double Flare report
* lint
* Cannot use typed properties yet, use phpdoc
* fix handleError return type
* Filter both exceptions and reports (so we don't miss any)
Consolidate the check if reporting should be enabled
* Cache reportingEnabled check for the runtime
* Split out middleware to improve readability
Logging of why reporting is disabled
Fix reportingEnabled cache
* Style
* Return some user data
* Change to class based middleware, it looks nicer
* Fix error page error id report, add url.
* also rewrite intended url
* remove link
* Move ignition to production and update flare-client
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Add group case
Add group case for portgroup URL query
* Add PortGroups to MenuComposer
* Add PortGroups to Menu blade
Adds to menu blade, using a similar behavior as Locations.
* Make PortCount into link
Make port count into like similar to DeviceGroups device count.
* Update MenuComposer.php
Make StyleCI happy
* Update MenuComposer.php
Make StyleCI happy
* Update ports.inc.php
Make StyleCI happy
* Update menu.blade.php
Menu fix.
* Update Menu so Manage Groups always displays.
* Adding Group function
* Add group to filterFields
* Trying suggested change
* Subquery
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Add devicegroup filterFields
* add Devicegroup to post function
* StyleCI
* Add GUI Element
* Less wordy
Dropped "View" from the link. Made it too wordy for such a small GUI insertion.
* Moved DeviceGroup Ports link to a separate column
I realized how it could be confusing to have links to two different items in the same column, so I separated the Ports out.
* New Poller validations
Seperated poller and distributed poller validations to make poller validations generally available
One auto fixer added
Translatable strings
* lint and style fixes
* and style
* and style
* Update LibreNMS/Validations/Poller/CheckLocking.php
Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
* Update CheckPythonWrapper.php
* Try to check if cron is even installed before warning about not being able to read the cron files.
Likely most systems they won't be readable, but also, it is very unlikely we hit the cron check and it is meaningfully different than the first Poller::exists() check.
* Work on poller validation
Remove errors/warnings when at least one poller of the other type is active.
* style fixes
Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
* lnms device:poll better feedback
Feedback when 0 devices are found to poll or 0 devices are polled.
Make devices polled summary string translatable.
* additional note on what the wildcard is
* Fix style
* Add option STARTTLS for authentication via AD
* Fix dangling spaces
* Moved starttls code to the correct place
* tabs vs spaces...
* Update ActiveDirectoryAuthorizer.php
Co-authored-by: Tony Murray <murraytony@gmail.com>
* 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()
* Dashboard Cleanup
Remove static widgets table, list of available widgets should not be in the database.
Remove legacy ajax scripts
Cleanup and reorganize controllers
* reorganize code to put all dashboard things into it's controller
better url scheme while supporting the original
* lint clean ups
* properly formatted language file
* style fixes
* update schema
* show all Device Types in Location Overview
* .
* .
* .
* get device types from config_definition
* reduce column to present device types
* .
* fixes
* .
* show/hide columns, even device types which are not present
* only show top n used device groups
* .
* .
* .
* Device Type Widget
* .
* .
* linter fix
* Update DeviceTypeController.php
Co-authored-by: Tony Murray <murraytony@gmail.com>
* implement support for usernames comming from reverse proxies
* add configurable auth header
* Move implementation to AuthorisationBase class
* refactored default value handling
* fixed external user check
* Adding an option (auth_ldap_skip_group_check) to bypass ldap_compare if the server does not support the option
* add auth_ldap_skip_group_check to config_definitions.json
* update resources/lang/en/settings.php
* add missing comma
* rename auth_ldap_skip_group_check to auth_ldap_require_groupmembership and change logic
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Allow unordered OIDs (global and per-os)
Fix global no_bulk setting, was ignored before
(to fix global needed to rework Config::getCombined() a bit to allow a global prefix to be specified)
Removed invalid use of getCombined and updated tests
* fix whitespace
* update os schema
* Revamp validate web page
to load page then validate, instead of validate then load page
* style fixes
* lint cleanups
* fixes
* translations and a couple fixes
* style fixes
* move result serialization into the class.
* Migrate addhost.php to lnms device:add
Have snmp-scan.py call lnms device:add (make exit codes line up so this works)
Fix issue with ping only devices trying to detect os via snmp
Reorder options in device:add help and improve formatting
Update docs to remove references to addhost.php
Fix a bit of code that was in functional code
* fixes
* fix snmp version message
* Update it.json
Removed all \'/ single quote, very common in italian , to avoid problem on page loading
* Update it.json
small fix
* Update it.json
Small updates
* Update it.json
* Add files via upload
* Delete modules.php
* Delete syslog.php
* Delete install.php
* Add files via upload
* Update plugins.php
* Update validation.php
* [WebUI] Position the buttons in the center
* Update preferences.blade.php
* Position the buttons in the center on user preferences page
* Position the buttons in the center on user preferences page
* Aligning with the form
* It is not necessary
* New device:add code
pre-requisite for updating other code paths
includes option to set display name
separate validation code from device creation
* remove duplicate community and v3 creds
* style fixes
* some lint fixes
* fix phpstan
* Exception cleanup
improved messages and translations
* port association mode to enum
well, pseudo enum
* defaults and cleanups
* fixed/improved validation messages
* fix tests
* fix stupid ide refactor mistake
* lint fixes
* Implement OAuth and SAML2 support via Socialite
* Add socialite docs
* fixes
* Additional information added
* wip
* 22.3.0 targeted version
* Allow mysql auth as long as there is a password saved
Co-authored-by: laf <gh+n@laf.io>
Co-authored-by: Tony Murray <murraytony@gmail.com>
* STP module rewrite WIP
* Finish rewrite
* Ignore disabled and log root/topology changes
* Remove interfaces for now
* fix style
* Lint fixes
* Document ResolvesPortIds and hide map functions
* whitespace fixes
* Revert to stpInstances in case someone writes mstp support
* missed one
* phpstan fixes
* Handle table and oids separately
* forgot to register observer
* Test data and correct non-table handling in SnmpResponse->table()
* update test
* test data
* revert aos7 silly things
* minimal polling
* Update test data
* order ports_ntp and rename new field to port_index
* forgot the db_schema
* revert ciena-sds port things
* MSTP support, maybe
* Adding test data
* Filter bad lines instead of discarding the entire snmp response
and capture fixes and test data
* fresh data
* add os data
* update data, ignore unfound ports, obviously bad device implementation.
* fixes
* Ignore context files in os detection test
* Remove empty table data
* add ciena-sds vlan
* designatedCost column is too small
* Update stp webui
* Refactor code to interfaces, to allow vendor mibs
* update schema
* fix issues added by abstraction
* STP fixes
* Default to no context for vlan 1
* never store vlan 1
* Update test data
* remove eltex brokenness
* fix style
* fix stan
* Fix Rewrite MAC to Hex padding with floats
* fix sqlite migration
* forcewalk param
* [snmp][no_bulk]
* var names, test, schema
* Key off OIDs, not mibs
luminato is POC and needs to be reverted before merge.
* fix up os schema
* docs
* remove luminato arbitrary changes
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Fix settings language file to include Distributed Poller labels.
Copied title and help from Poller.php
* Fix key order and update to specific strings
Co-authored-by: Tony Murray <murraytony@gmail.com>