Commit Graph

550 Commits

Author SHA1 Message Date
Tony Murray
615a5ab92c Fix popup javascript (#16459)
Breaking out the code to a script tab seems to have interacted poorly with some code.
Put it in librenms.js for now to avoid issues.
2024-09-29 18:40:22 -05:00
Tony Murray
e08571c38c Transceiver Support (#16165)
* Add transceivers module

Move os specific code to OS

Fix errors and updated connector names

Add RouterOS, a lot less data there.

Add Comware

Add Exa, required a transformer function (mw to dBm)

Add Junos, revision was too short

Just starting on ui

Graphs, and more ui
some polling fixes

collapse header for small screens

refactor a bit

Missed graphs

Transceivers icon inline

Use @once on popup javascript

update db_schema.yaml

Don't show transceivers in basic view
basic view could use a review

Apply fixes from StyleCI

API functions

Comware don't fail if port is missing

Apply fixes from StyleCI

Add alert rules to collection

Device Overview

Attempt to fix bad alert rule, probably needs more

Fix up Comware and remove old sensors

Mark transceiver metrics without thresholds as Unknown

Routeros cleanup

Exa cleanup

Handle missing port

Graph allow filter by channel

More translations

Add transceiver graphs to port graphs

Add Cisco support, use entPhyscial module data if available

Fix OcNos divisors

Labels on transceiver page

Show encoding if available

Hacky OcNos port mapping

Fix up Junos optics and remove old sensors

FS switch support
Metric casts to prevent thrashing
Extra transform_function support

Add link to transceivers page from overview

Change default sort to group by type, then channel
move some code out of overview blade template
Fix bad type ocnos

Apply fixes from StyleCI

Add scales to graphs

Add some test data

Default sort order for metrcis in SQL applied by default

Transceiver metrics threshold manual settings via WebUI and API

Fixes to channels verbiage

Fix severity calculations

Add cable field for SM/MM/Copper

Apply fixes from StyleCI

update test data

Show DDM

Update DB schema file

Extend serial field to 32, even though devices shouldn't be able to have one longer than 16

Missing import

Add status field to database, that way we can support snmp implementations that only return an enum

Add missing files

Fix db_schema

Fix style

Fixes

Style fix

Work around phpstan issue

Update transceivers.blade.php

Missed getStatus() call

Prevent extra dots when channels are not changed

Update module to match upstream

Save ocnos metrics as sensors

Move to regular sensors

add entity physical index

Update UI to sensors WIP

Apply fixes from StyleCI

Forgot one change

Update ui to use sensors

Remove transceiver metrics

Remove metric os discover code
fs-switch pending

Remove transceiver metrics for fs-centec

Exa link up

Revert all test data

Fix up transceiver module interface

Remove unused Convert class

comware cache and transceiver type

Fix some transceiver metrics filtering and formatting issues

Consolidate display formatting

Coalesce commare hh3cTransceiverTable walks to prevent double walk

Use group to identify transceiver sensors

Fixup routeros

Fix up cisco

update db_schema

Small addition to docs

Improve overview layout and add graph popup

Update Junos

update css files

ddm should be nullable

Increase the field length for type and model

Cisco Improve detection when there is an intermediary container

Add transceiver test data

Apply fixes from StyleCI

Fix incorrect test data

Improve display formatting

Fix test data

Apply fixes from StyleCI

Fix up more data

Fix up more data

Fix incorrect return type in routeros

Update ocnos data

* Remove some remaining references to transceiver_metrics table
2024-09-29 11:05:44 -05:00
Neil Lathwood
c4ca7acc4d Improve reset to default button on settings page (#16436) 2024-09-25 23:17:42 -05:00
Tony Murray
d2fb66d3d5 Added global VLAN ports page (#16415)
* Global VLAN ports page

* Show a list of devices too

* Fix a little theme color issues

* oops

* Just put css in the theme

* Apply fixes from StyleCI

---------

Co-authored-by: Tony Murray <murrant@users.noreply.github.com>
Co-authored-by: Neil Lathwood <gh+n@laf.io>
2024-09-25 16:14:13 +01:00
Neil Lathwood
146e7fc5ce Updated 'from' values for port graphs to be valid (#16416) 2024-09-20 23:54:19 +01: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
Peca Nesovanovic
b2ac944b59 [webui] sort vlan tooltip by vlanid (#16266) 2024-08-03 13:06:50 +02:00
Peca Nesovanovic
a346a4ad8e [webui] fix port_row.blade generate vlan link (#16256) 2024-08-01 22:19:47 +02: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
Tony Murray
cf7b025fb1 Custom Maps configurable new map defaults (#16212) 2024-07-17 16:05:44 -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
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
bd55c3a709 Fix port link device missing (#16151) 2024-06-20 08:56:57 -05:00
Tony Murray
98fbfca027 Fix graph row lazy loading (#16145) 2024-06-19 09:20:23 -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
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
8c4caab81a Fix port pagination (#16127)
* Fix ports pagination

* Style fix
2024-06-17 02:28:36 -05:00
Tony Murray
a3d4a688a0 Fix submenu whitespace (#16123) 2024-06-16 23:54:14 -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
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
05f29ae76c Edit Current Map menu entry (#16084) 2024-06-04 11:07:50 +02: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
7c4f04ab9d Manage Maps limit width (#16055) 2024-05-22 10:04:05 -05:00
Santiago Z
d4b7dbedab Align the buttons (Edit and Delete) to the right in Map Management (#16052) 2024-05-21 22:05:02 -05:00
eskyuu
9677f75480 Do not allow the legend nodes to trigger the node edit modal (#16026)
* Do not allow the legend nodes to trigger the node edit modal

* Added newline to trigger github tests
2024-05-14 08:37: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
Tony Murray
1c5e96f8d4 Mobile menu full height (#16011)
Maybe more ease of use changes coming for mobile down the road, but this is a quick bandaid.
2024-05-03 18:18:50 -05:00
Tony Murray
fe2f8a6c81 Change custom map editor icon (#16004)
Edit icon makes more sense than map icon and makes it visually distinct from maps above it in menu.
2024-05-01 14:15:27 -05: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
Tony Murray
43e6846cbc Custom Map: Show crosshairs when adding (#15978)
* Custom Map: Show crosshairs when adding
When adding a node or edge, give cursor feedback.
Updates js deps

* Missed package-lock.json
2024-04-25 15:36:16 -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
d48d850c3e Custom Maps: Fix title update removing link (#15976) 2024-04-24 10:36:04 -05:00
Tony Murray
b0c03b29ac Custom Maps: make edit title clickable (#15965) 2024-04-23 09:57:19 +02:00
Tony Murray
19344f0584 Fix JS injection in Service Templates (#15954)
You can't put user data in any "onwhatever" attributes, there is no way to sanitize it there.
Use data attributes instead.
2024-04-18 21:45:30 -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
Tony Murray
5828907b23 Fix graph selection when to/from missing from url (#15946)
* Fix graph selection when to/from missing from url
fixes #15840

* Update js cache value
2024-04-14 16:48:01 -05:00
eskyuu
22f5b687c4 Custommap label fixes (#15875)
* Fixes for the edge label:
 - Hide when editing the default settings
 - Copy the correct value into the textbox when editing

* Show the re-render button when a label is cleared
2024-03-04 12:33:16 +01:00
Zane C. Bowers-Hadley
56471e63d7 add dhcp-stats tests and update for v3 of the extend (#15378)
* update dhcp polling for version 3 of the extend

* add initial lease display for dhcp

* note where I copied it from

* document the new ISC DHCP stuff

* add in displaying pool and subnet info

* finalize the docs the new dhcpd stuff

* rework the dhcp page to display more information in a cleaner manner

* now display port and device info if known for a lease

* minor comment cleanup for the dhcp page

* add tests

* do not display the optionbar if the extend is not 3+

* update dhcp-stats doc for -w

* poke includes/html/functions.inc.php with php-cs-fixer

* poke includes/html/pages/device/apps/dhcp-stats.inc.php with php-cs-fixer

* derp... add the tests and not the snmprec twice

* strftime -> date

* fix naming of the linux dhcp-stats test data files

* minor tweaks to the rest results

* test fix

* more test cleanup

* minor test fix

* set the data value for v3

* minor test tweak

* add sortable_table blade template

* no longer need render_table

* formatting fix

* add regexp to make sure the mac is sane

* style fix

* formatting cleanup

* some more formatting fixes
2024-02-21 21:33:17 +01:00
Nicolas
b8095d6811 Don't escape leaflet tile url in location edit map (#15695)
* Don't escape leaflet tile url

* encode config as json and get config value in controller

* fixed array style
2024-02-21 12:09:04 -06:00
eskyuu
3d94c53438 Modify the date selector to use the session timezone (#15783)
* Modified the date selector to use the session timezone

* Set the timezone in the datetime picker and make sure it is always passed a moment date object, then altered the submit javascript function to use the existing moment object instead of creating its own

* Update the poll log to display in the correct timezone

* Fix the poll log to make the search work and be timezone aware

* Fix the displayed time on the device overview event log

* Style fixes
2024-02-21 11:45:12 -06:00
eskyuu
0d6fe96d03 Some bug fixes for the custom maps: (#15810)
- Make sure the default edge config works if it is still using the original config
 - Fix the map going blank when it is resized
 - Post map data as JSON to allow for saving with no edges
 - Allow the legend to be dragged by any node
2024-02-09 06:49:43 -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
cf99657c51 Add a missing endsection (#15792) 2024-02-02 09:49:09 -06:00
eskyuu
81bf68ba88 Make all image URLs absolute and fix path for viewer (#15788) 2024-01-31 22:09:44 -06:00