Commit Graph

53 Commits

Author SHA1 Message Date
Tony Murray
f296464dae
validate.php proper exit code (#16274)
some fixes around database & poller checks
2024-08-08 20:00:56 -05:00
Tony Murray
cf7b025fb1
Custom Maps configurable new map defaults (#16212) 2024-07-17 16:05:44 -05:00
Tony Murray
1cceafb887
Improve Snmpsim usage to ease testing (#15471)
* Snmpsim use python venv
Patch to enable listening while minimizing output
Update lnms dev:simulate, tests, and ./scripts/save-test-data.php
removed old option to start snmpsim from older scripts, use lnms dev:simulate

* Apply fixes from StyleCI

* various fixes

* Remove patch official package is updated

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2024-07-17 16:05:07 -05:00
fabriciotm
c071768fe7
Support to Brazilian Portuguese (#16209)
* Added Portuguese - Brasil language

* Update auth.php

* Add files via upload

* Update auth.php

* Update passwords.php

* Update passwords.php

* Update settings.php

* Update settings.php

* Update settings.php

* Update settings.php

* Update settings.php

* Update settings.php

* Update settings.php

* Update pt-BR.json

* Update widgets.php

* Update widgets.php

* Update validation.php
2024-07-17 01:20:35 -05:00
Walkablenormal
99f72823bb
InfluxDBv2 allow filter by group and disable debug by default (#16186)
* CHG: Dynamic debug flag and ability to exclude networks.

* Update config_definitions.json

* Update settings.php

* Update documentation.

* FIX: StyleCI Fixes.

* FIX: StyleCI Fixes.

* CHG: Changed excluding by network to by group membership

* Update settings.php

* Update config_definitions.json

* Update documentation.

* FIX: StyleCI Fixes.

* FIX: StyleCI Fixes.

* FIX: Fetch device data from cache.

* Add a check to see if we are trying to exclude by group before fetching groups.

* remove whitespace

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2024-07-14 18:17:02 -05:00
Tony Murray
1baf8f4a1f
lnms snmp:translate always show textual and numeric translations (#16187)
* lnms snmp:translate always show textual and numeric translations
accept os name as device spec for translate
values output tidy up for translate and one result

* ingore phpstan
2024-07-09 12:04:18 -05:00
Tony Murray
5ab2f685b4
Fix device ports VRF display (#16146)
impossible to display before
2024-06-28 08:45:50 -05:00
Tony Murray
097d4a3f94
Fix port neighbors unknown local port (#16128)
Fix issue when somehow the local port is unknown.  Likely this is faulty polling or snmp implementation.
2024-06-17 02:42:15 -05:00
Tony Murray
075ba4c932
Ports UI update (#16115)
* WIP Device Ports porting to Laravel

* WIP port links

* Port Links WIP

* Port Links

* in_array -> isset

* Add request to DeviceTab data

* Add initial Pagination

* Missing select component

* Collapsed and expandable port neighbors
New expandable component

* Port sorting

* Fix port transfer

* Use menu entries to filter ports

* Add translatable strings

* style fixes and cleanup

* update css

* graph views and tidy controller
basic port link view

* cleanup

* port row blade to reuse in legacy port view

* Legacy tab url handling
work properly in subdirectory
remove includes from sub tab directory to prevent oddity

* fallback to detail list when the view doesn't exist

* Use named variable to simplify

* Fix issue from file that was a symlink

* Submenu handle sub items and query string urls

* extract pageLinks to improve readability

* fix typo

* Apply fixes from StyleCI

* phpstan was not happy using the relationship HasMany query

* Don't allow *bps etc to be on a second line

* Improve table on small screens

* Fix sort

---------

Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
2024-06-16 11:29:06 -05:00
Tony Murray
7ac1b3303f
ESRI ArcGIS geo map support (#16059) 2024-06-05 08:16:33 -05:00
whitej46
eed83061e6
Add nfsen_base to config_definitions.json (#16065)
* Update config_definitions.json

Added nfsen_base so that nfsen stats feature works.  I had to add as an array as it was the way I was able to make it work, even though another type may make more sense from a user interface perspective.  I put it in order 10 as there seemed to be a gap there, but one could argue that it should be higher and other nfsen items renumbered.

* Update config_definitions.json

Fixed typo

* Update config_definitions.json

* Update settings.php

Added Default NFSen Base Directory

* Update settings.php

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2024-05-29 08:06:09 -05:00
Tony Murray
f0966f4d23
Widget hot refresh & worldmap cleanup (#16053)
* 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
2024-05-22 21:23:39 -05:00
Tony Murray
0d246a6ffc
Custom Maps: geo map and color backgrounds (#16020)
* Custom Maps: geo map and color background
tabs blade component
geo-map blade component and related script enhancements

* Update css/js

* style fixes

* update db_schema.yaml

* fix db_schema hand edit

* ignore phpstan being wrong

* Handle null

* another possible null spot

* Use standard file cache for custom map background images

* Create map->image as jpeg so we can compress it

* whitespace fix

* Fix background cancel button when other type is selected than the saved type

* Save and restore layer

* Map must exist before creating static image

* Don't show set as image button for Google and Bing.
Bing gives an odd error, but Google won't work.
2024-05-13 08:12:59 -05:00
Tony Murray
5b20886732
Map Management: Show Groups (#16005)
* Map Management: Show Groups

* reorganize group selector a bit

* Use uuid to prevent issues with unicode strings and other oddities

* Edit buttons should not be primary

* Reactivity for small screens
2024-05-03 18:30:03 -05:00
sogadm
3313949ea7
Massive changes to the Chinese interface translation. (#16009)
* Chinese translation fixes

Chinese translation fixes

* Update settings.php

Chinese translation fixes

* [Chinese Translation]

Massive changes to the Chinese interface translation.

* [Chinese Translation]

Massive changes to the Chinese interface translation.

* Update validation.php

Fix syntax errors

* Update validation.php

Fix syntax errors

* Chinese

Massive changes to the Chinese interface translation.

* Update auth.php

* Update bgp.php

* Update commands.php

* Update commands.php

* Update components.php

* Update components.php

* Update device.php

* Update exceptions.php

* Update install.php

* Update inventory.php

* Update map.php

* Update modules.php

* Update pagination.php

* Update passwords.php

* Update plugins.php

* Update poller.php

* Update port.php

* Update preferences.php

* Update sensors.php

* Update settings.php

* Update syslog.php

* Update validation.php

* Update widgets.php

* Update settings.php

* Update settings.php

* Update settings.php
2024-05-03 18:19:59 -05:00
sogadm
15aa91d546
Chinese translation fixesChinese translation fixes (#15991)
* Chinese translation fixes

Chinese translation fixes

* Update settings.php

Chinese translation fixes
2024-04-29 09:29:59 -05:00
Tony Murray
f78edf4d11
New Map Menu (#15969)
* Map Menu
New top level Map menu.
Ability to group custom maps.
Ajax Select controller improvements

* Fix style
2024-04-25 15:32:33 -05:00
Tony Murray
49f8269262
Improved Latency graph (#15940)
* Improved Latency graph
Store loss+jitter info in rrd instead of database
New graph icmp_perf (legacy ping_perf still valid referencing part of the newer data)
Delete device_perf table

* Change loss to an area so it is more visible

* Style fixes

* Cleanups from phpstan & tests

* exit_code fix

* Remove alert usage of device_perf

* Don't use magic __get

* Add test for bulkPing
Add host to previous tests

* style fixes

* Fix issue fping error responses
2024-04-18 09:57:01 -05:00
Jason Cheng
06ef3d3552
Fix wrong terminology (#15920) 2024-04-02 12:44:46 +02:00
Walkablenormal
c855d6c2fe
Support for InfluxDB V2 API (#15861)
* Addition of influxdb-client-php to Composer.

* Addtion of InfluxDBv2 support.

* Addition of front-end options.

* Addition of documentation.

* Addition of the acknowledgement of the PHP library used.

* Fixed a unneeded bracket.

* Addition of a basic datastore test.

* StyleCI fixes.

* StyleCI fixes.

* StyleCI fixes.

* Fixed exception class.

* Revert accidental change.

* Fix to composer lock to not update all packages.

* Fix to composer lock to not update all packages, but still include the new Influx lib.

* Another attempt at getting Composer to behave the way I think it should work.

* Fixed merge-conflict in Composer due to #15869.

* Update composer.json

* Update composer.lock

* Update composer.json

* Update composer.lock

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2024-03-07 12:26:21 -06:00
eskyuu
cb09ae0d54
Additional custom map features (#15806)
* Added options on edges for a label and to show graphs as bps as well as percentages

I think that vis.js needs to be updated to allow both bps and percentages at the same time.

* Add database migration

* Try to avoid putting multiple mid points in the same position

* Added a URL parameter for screenshot mode, where node labels are blanked out
Also fixed up the node labels in the editor

* Added legend to the editor as well as database options for reversing arrows and adjusting the edge separation

All features have been implemented in the editor, but need to be implemented in the viewer

* Fix missing defaults on the edit map list page
Added arrow reverse code to the viewer
Added legend code to the viewer
Added code to the editor to correclty handle moving the legend

* Formatting fixes and DB schema update

* Remove view from database schema
2024-02-07 11:42:35 -06:00
eskyuu
30953c386f
Add functionality for custom maps (weathermaps) (#15633)
* 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>
2024-01-31 08:56:59 -06:00
PipoCanaja
a7a6e67e87
NAC - Improve search in WebUI - Keep Historical data (#15629)
* search improvement for PortNac

* rename func

* style

* DB migration for timestamps

* style

* rules

* fix manually db_schema

* remove vlan only search for now

* add a bool column to ident historical nac entries

* add columns to the table

* queryByOui renamed everywhere

* age value instead of delete

* style

* style

* use Illuminate\Support\Facades\DB;

* tests fix

* module_tables.yaml

* dump model instead of tests/module_tables.yaml

* tests

* testVrp

* daily

* config

* display historical NAC entries in global view

* same for NAC device page

* nac tab on device/port view

* and display the tab link if necessary

* filter by port as well

* historical data in port tab

* formatters
2024-01-24 09:15:40 +01:00
Dan Langille
4d2ff3465e
Change MySQl -> MySQL - upper case that l (#15744) 2024-01-14 19:36:38 +01:00
Tony Murray
db1e28c040
Mark old alert email settings as deprecated (#15650)
Use the mail alert transport instead, it can now handle all use cases of the old "contacts" code
2023-12-15 09:59:19 -06:00
Tony Murray
917aa743f9
Add bad port settings to webui (#15649)
* Update manifest

* update regex text

* remove unused translations
2023-12-15 09:39:16 -06:00
Peter Childs
90927be973
Add support for Okta Group claims to set Roles (#15592)
* Add support for Okta Group claims to set Roles

* styleci changes

* make Stan happy
2023-11-27 20:38:41 -06:00
not-known
cf69a00cd0
Add option to disable the send of acknowledgement alerts. (#15208) 2023-11-13 21:56:06 -06:00
Justin Lentz
678213fa15
Remove api_demo config setting (#15563)
* Update settings.php

* Update config_definitions.json

* Update settings.php

* Update settings.php

* Update settings.php

* Update settings.php

* Update settings.php

* Update settings.php
2023-11-11 00:26:37 -06:00
Tony Murray
7c006e9625
Disable GET login by default (#15558)
* Disable GET login by default
GET login allows users to put username and password in the url, this is helpful for displays where you cannot login interactively.
Unfortunately, the plaintext password will be in the access logs.
GET login also allows brute force attacks against your install.

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-11-07 16:25:28 -06:00
Tony Murray
cefbe901e4
Wifi module does not exist anymore, delete (#15549) 2023-11-05 20:24:59 -03:00
Wheel
f0bbab2419
Minor fix and tweak for graylog integration (#15455)
* Minor fix and tweak for graylog integration

* More flexible in other use cases

* fix again?
2023-11-01 22:35:44 -05:00
Peter Childs
828be4bb52
add auth_ldap_cacertfile and auth_ldap_ignorecert options (#15526)
* add auth_ldap_cacertfile and auth_ldap_ignorecert options

* style-ci
2023-11-01 20:48:44 -05:00
Tony Murray
183f9559f4
New command: lnms report:devices (#15539)
* New report:devices command
Print out a list of devices with user specified fields, optionally in csv format

* Polish

* Apply fixes from StyleCI

* Use spaces instead of tab for none type

* Fix method call

* other commands use whereDeviceSpec

* Apply fixes from StyleCI

* update command help and back to tab for separator

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-11-01 13:52:21 -05:00
Galileo77
651a437e5a
German and English typo correction (#15503)
* Update sensors.php

fixed a typo, and changed Energiemenge

* Update sensors.php

fixed a typo
2023-10-24 21:00:56 +02:00
Galileo77
661171f901
German translation corrected and some visual improvements added. (#15502)
* Update auth.php

* Update sensors.php

* Update settings.php

* Update syslog.php

* Update validation.php
2023-10-24 11:08:36 -05:00
Tony Murray
8f91fb3877
Fix polling down retry (and other items) (#15483)
* Only update last_polled if polled
Because availability now runs always, we need to check if we ran any other modules successfully, if so, we can update last_polled

* Tally results and act accordingly

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-10-19 06:55:41 -05:00
Tony Murray
46e2c873c1
Missing device ip translation (#15465) 2023-10-16 07:14:18 -05:00
SourceDoctor
0f0f49697f
muteabel acknowledged alert notifications (#15456) 2023-10-13 22:20:51 -05:00
Tony Murray
087d588102
Vmware vminfo modernize (#15008)
* Vmware vminfo
Remove legacy file and migrate to OS discovery

* tighter

* ios_stp-vlans working correctly now

* Make vmwVmGuestOS nullable

* Discover os info too

* VM Info module

* Apply fixes from StyleCI

* Fix log severity

* Fix log severity (more)

* VM Info module

* Poll with ESXi too because it is lightweight
add test data

* poller data now too

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-10-05 19:49:26 -05:00
Tony Murray
bec7a9f449
Throttle error reporting (#15391)
* Throttle error reporting
Sets how frequently errors can be reported (across all pollers)
Also has the side effect of at most 1 error reported per run
To disable, set reporting.throttle to 0 (for development and testing purposes)

* Don't crash if Cache provider is unavailable, refactor
2023-10-05 17:24:28 -05:00
Tony Murray
c6d815999f
Rearrange AD auth settings (#15363)
so it makes more sense, add missing settings
2023-10-04 02:08:56 -05:00
Tony Murray
b51ae39e71
Radius enforce roles (#15294)
Add new setting to specify if user roles will be set at login or not.
Without this setting enabled, roles are only set when the user is first created and never after that. If roles set via Filter-ID attribute or radius.default_roles change, they will never be reflected on existing users.
For that reason, the default is set to enabled.  Historically, radius did not enforce roles.
2023-09-07 11:28:35 -05:00
Tony Murray
30b5c40961
Add ui description for reporting dump_errors (#15264)
* Add ui description for reporting dump_errors
People were enabling this setting and breaking their installs for some reason.
Hopefully, this makes them think a little before enabling this setting.
It is intended for debugging purposes only.

* Fix style
2023-08-30 19:33:39 +02:00
Tony Murray
2cd207028a
Implement RBAC (only built in roles) (#15212)
* 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
2023-08-28 00:13:40 -05:00
Tony Murray
12f8bb2040
MAC Vendor OUI use scheduler (#15187)
* MAC Vendor OUI use scheduler
Add command to update `lnms maintenance:fetch-ouis`
Show vendor column in tables if mac_oui.enabled is set to true
Improve scheduler validation handle non-standard install directories and systems without systemd
Add index to table to improve speed and improve mac->vendor lookup speed
Scheduled weekly with random wait to prevent stampeding herd issues for upstream
drop oui update from daily

* MAC Vendor OUI use scheduler
Add command to update `lnms maintenance:fetch-ouis`
Show vendor column in tables if mac_oui.enabled is set to true

* Lint fixes and better prefix detection

* update schema file
2023-08-03 19:29:30 -05:00
Tony Murray
a2f906c3f4
Allow dispatcher service master timeout to be set (#15161)
and increase default to 20s from 10s
20s should still be fast enough to prevent gaps, but larger installs can take longer than 10s (or even 20s) to do dispatch work.
2023-07-25 11:27:34 -05:00
VP
6901884d45
Added missing zh-tw translation. (#15125)
Signed-off-by: VP <51seer.vincent@gmail.com>
2023-06-27 22:26:01 -05:00
Tony Murray
63fd62ca12
Yaml value filling improvements (#15116)
* Yaml value filling improvements
search all data for fully qualified oids (to prevent incorrect matches)
Reduce searches when not needed
subindex code optimization

* fix aos7

* fix e3meterdc

* Cleanups

* fix hpe-mapdu

* fix timos add note to dev:check

* remove inconsistent Str::contains usage
2023-06-23 13:57:44 -05:00
Jellyfrog
2b3575a5e9
Laravel 10.x Shift (#14995)
* Apply code style

* Remove explicit call to register policies

* Shift core files

* 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

* Add type hints for Laravel 10

* Shift cleanup

* wip

* wip

* sync translation

* Sync back config

* Public Path Binding

* QueryException

* monolog

* db::raw

* monolog

* db::raw

* fix larastan collections

* fix phpstan bug looping forever

* larastan errors

* larastan: fix column type

* styleci

* initialize array

* fixes

* fixes

---------

Co-authored-by: Shift <shift@laravelshift.com>
2023-05-24 22:21:54 +02:00