Commit Graph

808 Commits

Author SHA1 Message Date
Tony Murray
9e4b2fa3a3
Reject API device_add that are missing snmp info (#16314) 2024-08-27 07:08:19 -05:00
Tony Murray
e875461846
cli show string enums in snmp commands (#16317) 2024-08-26 23:06:25 -05:00
PipoCanaja
61ad4bfbbf
Plugins v2 cleanup (#16298)
* cleanup

* use Illuminate\Support\Facades\Auth;

* style

* add route:cache and revert

* add route:cache and revert

* fix   in pluginExample

* fix Example plugin

* style

* fix other Hooks with Illuminate\Contracts\Auth\Authenticatable

* style

* whitespace

* whitespace2

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2024-08-26 19:45:12 +02:00
Tony Murray
db5fdf705d
Poll device job (#16306)
* Split out single device polling to a Laravel Job
Probably totally broken :)

* Add dispatch option to device:poll

* Fix up submodules

* Add missing logger parameter

* Apply fixes from StyleCI

* Update module format in test helper

* Apply fixes from StyleCI

* Use Log facade to match other code

---------

Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
2024-08-25 19:56:50 -05:00
PipoCanaja
2face4bc4a
bug - Component "error" length issue (#15918)
* truncate component error in F5 LTM code

* sanity check in COmponent

* style

* mutators

* mutators moved

* moving

* Mutators OK, removing check from F5

* style

* fix LibreNMS/Component.php

* remove protected and see if it fixes issues

* nullable

* nullable

* nullable
2024-08-25 16:32:59 -05:00
Tony Murray
9d35fbc6a7
Entity Physical discovery: Rewrite to modern style (#16289)
* Initial entity-physical code

* Split out Entity-MIB trait

* Cisco Cellular inventory

* Fix bad test data

* alfo80hd - we now include all entPhysical entries

* Correct aos7 test data

* Add entPhysicalClass as last resort for label in ui

* aos add previously filtered data

* Fixup arista-eos data

* Update ariast_eos data

* Arris, clean garbage in Rev fields

* Aruba Instant custom inventory ported

* ArubaOS CX add vendor type mib

* aviat-wtm test data refresh

* axos add shelf fix data fields a bit

* ciena-rls

* ciena-sds

* Skip cimc for now... no test data

* Cisco updates

* Comware data update

* Update dnos

* Clean Edgeos garbage, make code from Arris shareable

* Relaxed ifIndex match, some devices cheat and send back static strings instead of formatted OIDs

* Regex refinement and updated edgeos with new clean data

* Update edgeswitch data

* Update eltex-mes21xx data

* eltex-mes23xx

* Guess at eltex-mes24xx since there is no test data

* Update eurostor, fix firmware version

* Apply fixes from StyleCI

* fixes

* Update fortigate data

* Update fortiweb, ftd, and fusion

* Update linux LSI

* Fix hexToAscii null removal with different seperator handling

* icotera add final snmprec data to avoid snmpsim bug

* Update IOS data

* Update mrv-od

* Add junos translation

* Generic data updates n-r

* ruijie workaround snmpsim bug

* Port saf-cfm

* Recode Schleifenbauer, and fix entPhysicalIndex values

* SmartAX fixes

* sm-os and tait-infra93

* timos inventory was not right, fix it up

* ubiquoss-pon

* VRP, has custom data collection on top of normal
adapt port ifIndex lookup to handle it

* VRP exceeded the string length specified in ENTITY-MIB...

* data updates

* Final data update and code cleanup

* Apply fixes from StyleCI

* Lint fixes

* Add missing SnmpResponse->pluck() code

* Update db_schema.yaml

* Fix bad test data

* Another instant-on update

* oops

* Remove some unused code

# Conflicts:
#	includes/html/pages/device/overview.inc.php

---------

Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
2024-08-21 01:12:09 -05:00
Tony Murray
5748ada02d
Allow syslog hooks to be set by lnms config:set (#16302)
Also allow --ignore-checks to work for os settings
2024-08-19 19:52:49 +02:00
Tony Murray
70c2c543f3
Plugin Update (#16291)
* Plugin Update
Extract interfaces for use in plugin packages

# Conflicts:
#	composer.lock

* Fix some issues
settings_view -> content_view
2024-08-15 15:26:47 -05:00
Ferris-0815
520e44b0ed
F5-Loadbalancer module to support an expiration check of the installed certificates (#16217)
* On branch f5-cert-expiration-check
Changes to be committed:
	modified:   app/Http/Controllers/Device/Tabs/LoadBalancerController.php
	modified:   includes/discovery/loadbalancers/f5-ltm.inc.php
	modified:   includes/html/pages/device/loadbalancer.inc.php
	new file:   includes/html/pages/device/loadbalancer/f5-cert.inc.php
	modified:   includes/polling/loadbalancers/f5-ltm.inc.php

These patches extend the F5-Loadbalancer module to support an expiration check of
the installed certificates.

* some minor corrections to (hopefully) pass the style-check

* a few more impovements to pass the style-chek

 On branch f5-cert-expiration-check
 Your branch is up to date with 'origin/f5-cert-expiration-check'.

 Changes to be committed:
	modified:   includes/discovery/loadbalancers/f5-ltm.inc.php
	modified:   includes/polling/loadbalancers/f5-ltm.inc.php

* more style-check adaptions...
2024-07-29 14:57:37 -05:00
Michael
9f4e6cbf01
add in/out erros to port table (#16073) 2024-07-26 09:09:38 -05:00
Tony Murray
b41d1b7ffb
Fix Port Channels take 2 (#16246)
* Resubmit of #16227

* Add missing new files
2024-07-26 08:45:34 -05:00
Jellyfrog
e45dd59f77
Revert "Fix Port Channel (#16227)" (#16245)
This reverts commit 0d201c44c9.
2024-07-26 15:26:04 +02:00
Tony Murray
0d201c44c9
Fix Port Channel (#16227)
* Fix expandable sizing

* Temp fix: port_id_{low,high} is actually ifIndex

* new PortsStack discovery module, store actual port_ids

* Show 4 rows of ports by default

* Add test data

* Fix up the single port view too

* Apply fixes from StyleCI

* Update db_schema.yaml

* Update base migration because sqlite cannot add primary keys

* Fix phpstan failures

---------

Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
2024-07-25 23:39:36 -05:00
Markus Viitamäki
5fc7055d54
set default_role when registering instead of at every login (#16235) 2024-07-22 16:58:34 +02:00
Tony Murray
a81a9f3cfc
Fix custom map default settings error (#16236)
and config order
2024-07-22 09:24: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
PipoCanaja
56b5eff952
Maps - Keep edge black when link is 0 bps (#16192)
* Black when link is 0bps

* style
2024-07-11 10:02:11 -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
Peca Nesovanovic
ba8d7338a3
[webui] Ports: correct sorting order when using ifName (#16170)
Signed-off-by: Peca Nesovanovic <peca.nesovanovic@sattrakt.com>
2024-07-04 14:34:13 -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
108727c500
Handle missing device when linking (#16164)
* Handle missing device when linking
Sometimes a device is gone, but data still points to it. Prevent error when that happens (even though it should not)

* Handle more gracefully

* Remove original work around

* Allow unsaved devices, we just need device_id really
2024-06-28 08:48:11 +02:00
Tony Murray
afba58cb29
Fix for lnms snmp:translate (#16159)
Wasn't handling things correctly
Disable numeric if the oid is already numeric and add ALL mibs
2024-06-27 13:04:06 -05:00
Tony Murray
6bd55dce25
Port link component easier graphs (#16147)
Allow type variable to pass into graphs of graph row
default 4 graph display so caller doesn't have to specify timeframes if they just what the default
2024-06-24 19:49:08 -05:00
Tony Murray
98fbfca027
Fix graph row lazy loading (#16145) 2024-06-19 09:20:23 -05:00
Tony Murray
a37efd2876
Device Ports settings (#16132)
* Device Ports settings

* Save port settings per user

* style

* Delete user pref if it matches the defaults

* Because we are saving settings now, we must explicitly set to make the links work
2024-06-18 23:58:10 -05:00
Tony Murray
592ea1c263
Change port pagination default to 32 (#16131)
* Change port pagination default to 32
that way this includes all ports for most switches.
Most port counts are base 2, so change pagination options to match

* ignore upstream missing closure type

* Fix style again

* more
2024-06-17 09:09:33 -05:00
Tony Murray
8c4caab81a
Fix port pagination (#16127)
* Fix ports pagination

* Style fix
2024-06-17 02:28:36 -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
PipoCanaja
105fb1748e
Bug - Sorting FDB table by devices (#16116)
* fix

* Fix the issue

The left join with the device was pulling in a "port" field which then caused Eloquent to think the port relationship was already loaded.

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2024-06-14 22:34:55 -05:00
Tony Murray
fa16c025ba
Fix popup toast messages (Remove Flasher) (#16090)
* Remove flasher
Just use a bit of custom code to interface with toastr js
This is able to retain our custom theme and work properly

* Fix style issues

* Missed reference rename

* Remove test code :)

* Fix a missed rename

* Fix one more missed reference

* Fix typo
2024-06-05 08:07:42 -05:00
Tony Murray
cf422b834c
Fix duplicate maps in relationship (#16081)
When a device is added to a map multiple times, it caused the map to show multiple times in the device overview.
2024-05-30 23:32:22 -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
6c6bdf26d0
Fix downtime in corner cases (#16040)
If somehow device outage wasn't recorded, fall back to last_polled (or now)
This should not happen in normal operation

fixes #15634
2024-05-19 09:46:16 -05:00
Tony Murray
8fdf990dd5
Fix issue loading session preferences (#16041)
during initial login

fixes #15866
2024-05-19 09:45:36 -05:00
Pikamander2
742b0154c1
Fix incorrect number of seconds in a day (#16042) 2024-05-19 09:45:11 -05:00
eskyuu
c1f955e06e
Added read permission test to the custom map model (#16030)
* Added read permission test to the custom map model

* Formatting fixes

* Moved permission check logic into SQL to avoid errors accessing undefined properties

* Update custom map permission code to avoid unneeded SQL query
2024-05-16 07:54:45 -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
Peca Nesovanovic
2ff57286f0
[webui] sort ports in VLANs blade (#15960)
* [webui] vlans blade sort

sort ports in VLANs blade

before:
gi1/0/1,gi1/0/10,gi1/0/2,gi1/0/23,gi1/0/24,gi1/0/3,gi1/0/4,gi1/0/5,gi1/0/6,gi1/0/7,gi1/0/8,gi1/0/9,Po1,te1/0/2,te1/0/3,te1/0/4

after:
gi1/0/1,gi1/0/2,gi1/0/3,gi1/0/4,gi1/0/5,gi1/0/6,gi1/0/7,gi1/0/8,gi1/0/9,gi1/0/10,gi1/0/23,gi1/0/24,te1/0/2,te1/0/3,te1/0/4,Po1

Signed-off-by: Peca Nesovanovic <peca.nesovanovic@sattrakt.com>

* sort in controller

* sortby vlan,port

---------

Signed-off-by: Peca Nesovanovic <peca.nesovanovic@sattrakt.com>
2024-05-03 22:37:34 -05:00
whitej46
2efd30fe39
Update WirelessSensor.php (#16016)
I was getting a SQL error that sensors_id was not found.  I changed the reference to sensor_id.
2024-05-03 22:35:07 -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
Tony Murray
07655c24af
Merge duplicate toBytes functions (#15994)
* Merge duplicate toBytes functions
Replace other duplicate code and add tests

* Allow space between similar to formatSI output

* Style fixes

* Match previous behavior in Docker app
2024-04-30 14:40:08 +02:00
Tony Murray
1dc62454fc
Show custom maps in device overview (#15985)
* Show custom maps in device overview

* remove extra line return

* Sort by name
2024-04-26 15:10:24 -05:00
Warren Ashcroft
1aa712e189
Fix graph_type variable (svg / png) (#15972) 2024-04-26 08:33:08 -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
ac98abbafb
On-demand map menu items (#15971)
Only show map menu items if they have data:
 * Network
 * Device Dependencies
 * Device Group Dependencies
2024-04-25 09:19:21 -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
voileux
8d99014948
add type property to Device class (#15930) 2024-04-10 15:40:43 +02:00
eskyuu
3463d85053
When a timezone is manually selected, the timezone needs to be explicity set in the session otherwise the setting changes to a blank timezone (#15890) 2024-03-11 14:55:34 -05: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