* Iterate in javascript and separate processing
* Widget refresh/destroy events
* Remove old dom and unbind events
* fix whitespace
* Fix up bootgrid tables, they inserted a div before the first div breaking event propagation
switch to regular js function to scope variables instead of jquery
* Handle settings the same way as the normal widget
* Use standard init_map and add layer control
* May need L.Control.Locate now
* Set maxZoom for marker cluster
* Try setMaxZoom
* worldmap size 100 and resize on refresh/widget resize
* Add resize event (and throttle it a bit)
* Further worldmap cleanup
* Move most javascript to common js, will cause js errors until page is reloaded, but better in the long run
* Add support for a maintenance boolean in API results.
If a device is under maintenance, it would be nice to see that from the
API. This can help drive other automation workflows where LibreNMS forms
a cornerstone in the management source of truth.
* Revert changes made by VSCode formatting.
* Revert two more formatting changes.
* Create a new API endpoint for GETing maintenance status.
This uses the same endpoint name as for setting a device to maintenance
but with a GET verb.
---------
Co-authored-by: Joe Clarke <jclarke@cisco.com>
* Initial commit with editor.
* Added custom map models and database migrations.
Modified the controller and view to support saving the custom map settings to the database
* Added menu items and sorted out access permissions for maps and nodes
* Cleaned up some of the conditions in the javascript section of the blade
* Started work on the map data save
* Save of map nodes and edges is complete
* Got the map to load data on page load and added the delete functionality
* Fixed a typo and made link colour black if intertface is down
* Various usability fix-ups
* Show the save button on node and edge delete
* Fixed up access for users without global read
* Increase typeahead search size and standardised the way modals are triggered.
* Update data fetch to copy values into array so I can add more fields
* Convert blank array check to use count()
* Formatting changes
* More formatting fixes
* Formatting again
* DB schema update
* Revert previous commit
* Pass device id to pages
* Remove bad characters from javascript
* Re-add the - character in search results
* Update to avoid background colour being set to the current colour for offline devices
* Fixed a bug in speed detection when no suffix is given
* Fixed up the speed colour calculation and added comments
* Update default edge font size to 12
* Reduce arrow size
* Formatting fix
* Update the custom map controller to handle null interface speeds
* Alter JSON columns to be longtext instead
* Only refresh map data on successful save
* Update labels on default settings to make it clear that they are not saved
* Added timestamps to all custom map tables
Use HasFactory instead of static definitions for custom map tables
convert JSON DB fields to longtext and updated PHP to do the appropriate JSON decoding as a result
* Added missing vis.js images for the editor
* Split the custom map blade into different pages
* formatting fixes
* Initial commit with editor.
* Added custom map models and database migrations.
Modified the controller and view to support saving the custom map settings to the database
* Added menu items and sorted out access permissions for maps and nodes
* Cleaned up some of the conditions in the javascript section of the blade
* Started work on the map data save
* Save of map nodes and edges is complete
* Got the map to load data on page load and added the delete functionality
* Various usability fix-ups
* Show the save button on node and edge delete
* Fixed up access for users without global read
* Increase typeahead search size and standardised the way modals are triggered.
* Convert blank array check to use count()
* Formatting changes
* More formatting fixes
* Formatting again
* DB schema update
* Revert previous commit
* Pass device id to pages
* Remove bad characters from javascript
* Re-add the - character in search results
* Update to avoid background colour being set to the current colour for offline devices
* Reduce arrow size
* Only refresh map data on successful save
* Update labels on default settings to make it clear that they are not saved
* Added timestamps to all custom map tables
Use HasFactory instead of static definitions for custom map tables
convert JSON DB fields to longtext and updated PHP to do the appropriate JSON decoding as a result
* Added missing vis.js images for the editor
* Split the custom map blade into different pages
* Updated the custom maps to use the select2 searches for ports and devices
* Fix port search clearing with select2
* Update DB schema to add timestamps
* Add the ability to set a node alignment value where nodes will align to a grid
* Add a checkbox to re-center edge lines
* Schema update for node alignment
* Removed unused route
* Fixups after rebase
* Remove DevicePortSearchController
* Rebase fixups
* Remove unneeded controller
* Formatting fixes
* Update all network map documentation
* Fixed typo in doc
* Change background imgae database migration
* Update migration for custom map background to fix schema error
* Place a try/catch around the BLOB->MEDIUMBLOB migration
* Formatting fix
* Moved custom map background image location and added some SVG images to test as image options
* Updated the editor to use a static set of device images
* Update the image logic in the editor and added to the viewer
* DB Schema update
* Formatting
* remove svg height/width attributes
* Added some more icon options for arrows
* Added database migration to allow nodes to link to another custom map
Fixed an error in the image migration
* Added the ability to link a node to another custom map
* Formatting fixes
* DB Schema update
* Remove images-custom directory
* Explicitly cast map ID to int
* Made the image selection list dynamic based on the contents of the custom map icons directory
* Formatting fix
* Double-clicking on a link will take you to the link
* Remove whitespace
* Add translations
fix an xss and hopefully not add any new ones
refactor node image to use translations with fallback
* split modals out into separate files
return width/height to avoid js scope issues
* Formatting fixes
* refactor edit select page into a "manage" page
Still left:
validation/custom request
Controller refactor
ui tweaks
* MapSettingsRequest
* Refactor more routes, policy, controller
I think this is the last refactor. Everything is now organized in a standard way.
Missing a method to check if a user has access to a map
* Fix booleans and style
* Add versioning to the background image to prevent browser caching
* Fixed the background image update by splitting it into a separate modal
Changed the delete button on the map editor screen to return to the map list
* Formatting fix
* Added double-click actions in editor to edit nodes and edges
---------
Co-authored-by: Tony Murray <murraytony@gmail.com>
* API: get poller group
* missed string in doc
* return all poller groups if name/id aren't specified
* add missing doc link
* style fixes
* more style
---------
Co-authored-by: Tony Murray <murraytony@gmail.com>
* 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
* adding human readable version of /api/v0/fdb/{mac}/detail
* adding last seen field in human readable format
* fixing styling issue
* fixing another styling issue
* removing stale variable
* adding a limit to number of results returned in order to limit memory issues
* adding the documentation for fdb_detail api
* Wording fix
* wording fix again. smh
---------
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>
* inital commit of a new syslog sink over http
* cosmetics
* cosmetics fix...
* cosmetic fix again
* cosmetics fix again
* its nice now...
* add non blocking option
* Syslog Sink integrated as API PUT method
* lint fix
* Update includes/html/api_functions.inc.php
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Update includes/html/api_functions.inc.php
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Update includes/html/api_functions.inc.php
Co-authored-by: Tony Murray <murraytony@gmail.com>
* change to POST, fix decoding issue and json exception
* logstash/json documentation added. syslog documentation a bit re-structured
* lint fix
---------
Co-authored-by: Tony Murray <murraytony@gmail.com>
* More secure external graph access
Add @signedGraphTag() and @signedGraphUrl() blade directives
Takes either an array of graph variables or a url to a graph
Uses a signed url that is accessible without user login, embeds signature in url to authenticate access
See Laravel Signed Url for more details.
Adds Laravel route to graphs (does not change links to use it yet)
@graphImage requires the other PR
Also APP_URL is required in .env
* missing files from rebase
* Fix url parsing with a get string
* allow width and height to be omitted
* Documentation
* Add to, otherwise it will always be now
* Doc note for to and from relative security
* fix vars.inc.php (Laravel has a dummy url here)
* 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
* Add support to REST API for creating Maintenance Schedules for Device Groups
* Update documentation to include the maintenance_devicegroup API endpoint
* Fix quotes
* Fix whitespace
Co-authored-by: Tony Murray <murraytony@gmail.com>
* 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>
* 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.
* 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>
* Moved plugin admin pages to be within admin route
* Wrap html transports page in admin check
* Moved Port group controller to be admin protected
* fixed tests
* 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
* Global search: search device display
Add display field to search (also port_desc_descr, portName, and bgpPeerDescr)
Rewrite backend
update typeahead bundle
update devices and ports indexes
reduce some port field sizes so we can index them
* Style fixes
* remove nonsense
* core WIP
* try to finish up
* trim space too
and a couple of cleanups
* update test data
* put escapes back
* another net-snmp difference
* correct copy paste error
* WIP
* Use new code YAY
* a tiny bit more
* Kind of working
* Handle manual modules correctly
* convert core to modern module
* Only save metrics if modules is not overridden
* correct module exists check
* database error handling
* debug handling
* restore bad changes
* Introduce Actions
RunAlertRulesAction
UpdateDeviceGroupsAction
* tweaks to output
* Fix some issues in outside code
* Style fixes
* fixes to module status checks
* typehints!
* Use logger only and DI
* OS module not named correctly
* Work on quiet output a bit more
* generically don't change output when disabling debug if the driver is already stack
* Fix missing $device variable for legacy os polling
Fix missing dbFacile functions when no legacy modules polled in RunAlertRulesAction
* restore legacy os module shim
* use the new poller code for tests
* PollingDevice event
* Fix some issues and enable/disable error reporting around legacy modules
* typehints
* fully update baseline
* Use Process for version commands so we don't leak debug output.
* don't detect rrdtool version in ci every time
* style fixes
* Warning fixes
* more fixes
* re-update baseline
* remove diff noise
* fix up alerts
* Catch exceptions in device ip lookup
* Revert accidental snmp.inc.php poller target change
(should have been ?: not ??)
* core WIP
* try to finish up
* trim space too
and a couple of cleanups
* update test data
* put escapes back
* another net-snmp difference
* correct copy paste error
* WIP
* Use new code YAY
* a tiny bit more
* Kind of working
* Handle manual modules correctly
* convert core to modern module
* Only save metrics if modules is not overridden
* correct module exists check
* database error handling
* debug handling
* restore bad changes
* Introduce Actions
RunAlertRulesAction
UpdateDeviceGroupsAction
* tweaks to output
* Fix some issues in outside code
* Style fixes
* fixes to module status checks
* typehints!
* Use logger only and DI
* OS module not named correctly
* Work on quiet output a bit more
* generically don't change output when disabling debug if the driver is already stack
* Fix missing $device variable for legacy os polling
Fix missing dbFacile functions when no legacy modules polled in RunAlertRulesAction
* restore legacy os module shim
* use the new poller code for tests
* PollingDevice event
* Fix some issues and enable/disable error reporting around legacy modules
* typehints
* fully update baseline
* Use Process for version commands so we don't leak debug output.
* don't detect rrdtool version in ci every time
* style fixes
* Warning fixes
* more fixes
* re-update baseline
* remove diff noise
* fix up alerts
* use Blade view and Eloquent models for plugins
* move views
* fix style
* fix style
* revert mistake
* Update Plugin.php
delete test property "name"
* rename plugin function to settings
* last but not least - rename in Test.php
* Rename Test to Example
* fix typo
* fix style
* fix style
* fix style
* fix style - I hate tabs...
* Extract view calls
* fix method calls and style
* Move Models the the abstract class
* fix style
* Convert to traits
* Change the Example description
* Fix style
* Fix style
* Fix style
* Convert plugin function to Model static methods and delete .inc.php
* fix style
* fix style
* Use scope
* final methods blows up legacy code
* Config > \LibreNMS\Config
* convert the static string to a static method
* Correct placement in the page
* fix tabs
* fix style
* Rename from tait to hook
to make it easier to understand and be complient
* rename file
* Typo
* Started to change the docu
* change to a more usefully Device_Overview example
* and activate of course
* PluginManager
* fix .gitignore
* only php files in the root folder
* corrected .gitignore with all files :)
* Rename the Hooks and ExampleClass for better readability
* Fix style
* Fix style
* Exception handling (especially if DB is not present)
* Fix style and update schema
* fix indentation
* actually correct indent
* fix migration collation check include utf8mb4_bin
* stop phpstan whining
* A view lines documentation
* add typeHints
* Allow return null on handle
* lint
* fix return types
* fix logic of column collation check
* Fix MenuEntryHook
* switch to longtext instead of json type for now :D
* try phpstan on PHP 7.3
* set phpstan target version to 7.3
* all the typehints
* optional
* more
* Use namespace to prevent view collisions
disambiguate plugin and hook
no magic guessing of names in PluginManager, bad assumptions
remove unused plugins from the DB
* cleanup plugin menu
* cleanup on shutdown and ignore but log query error on cleanup
* instanceof must be called against an instance
* Allow multiple hooks per plugin
* Port plugin ui code to Laravel
* page instead of settings for v1 plugins
* actually working settings pages
a little url cleanup plugin/admin -> plugin/settings
* fix style
* Add page hook
* PHPstan
* Try to fix Illuminate\Http\RedirectResponse
* typehint
* Rewrite the doc
* Fix style
Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
* Update manifest and add service worker
cleanup icons a bit
* Push notifications WIP
* navigate working
* cleanup
* acknowledge wired up
* Set VAPID keys on composer install
* Component to control notification permissions.
* Allow all user option to validate
* Enable on browser load if transport exists.
* Check for transport before showing user permissions
translations
* Documentation
* style fixes
* access via the attribute model
* fix alerting test
* update schema
* cleanup subscription on disable
* non-configurable db and table for webpush subscriptions (respect system connection)
* revert AlertTransport change
hopefully phpstan can figure it out
* phpstan fixes
* Support custom details display
* Match transport names to brand's preferred display
* less duplicate id errors
* Tests are done in Laravel code now so
remove legacy function usage... could be better, but ok
* Style fixes
* Style fixes 2
* Fix alert test
* Doc updates requires HTTPS and GMP
* unregister subscription when permission is set to denied
* cleanup after user deletion
* delete the right thing
* fix whitespace
* update install docs to include php-gmp
* suggest ext-gmp
* update javascript
* Update functions.php
Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>