Commit Graph

19530 Commits

Author SHA1 Message Date
Tony Murray
ad8580d694 Cleanup and optimize the availability widget (#14329)
* 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
2022-09-09 18:22:58 +02:00
Tony Murray
fbcaccdbd4 Update dependencies (#14319)
* Update dependencies
 hpdocumentor/reflection-docblock (5.3.0)
 hpspec/prophecy (v1.15.0)
 ymfony/debug (v4.4.41)
 barryvdh/laravel-debugbar (v3.6.7 => v3.7.0)
 composer/ca-bundle (1.3.2 => 1.3.3)
 composer/class-map-generator (1.0.0)
 composer/composer (2.3.7 => 2.4.1)
 doctrine/annotations (1.13.2 => 1.13.3)
 doctrine/event-manager (1.1.1 => 1.1.2)
 doctrine/inflector (2.0.4 => 2.0.5)
 fakerphp/faker (v1.19.0 => v1.20.0)
 graham-campbell/result-type (v1.0.4 => v1.1.0)
 guzzlehttp/guzzle (7.4.5 => 7.5.0)
 guzzlehttp/promises (1.5.1 => 1.5.2)
 guzzlehttp/psr7 (2.4.0 => 2.4.1)
 laravel/dusk (v6.24.0 => v6.25.1)
 laravel/framework (v8.83.16 => v8.83.23)
 laravel/serializable-closure (v1.2.0 => v1.2.1)
 laravel/socialite (v5.5.2 => v5.5.5)
 maximebf/debugbar (v1.18.0 => v1.18.1)
 mews/purifier (3.3.7 => 3.3.8)
 mockery/mockery (1.5.0 => 1.5.1)
 monolog/monolog (2.7.0 => 2.8.0)
 nesbot/carbon (2.58.0 => 2.62.1)
 nikic/php-parser (v4.14.0 => v4.15.1)
 paragonie/constant_time_encoding (v2.6.1 => v2.6.3)
 phpmailer/phpmailer (v6.6.0 => v6.6.4)
 phpoption/phpoption (1.8.1 => 1.9.0)
 phpseclib/phpseclib (3.0.14 => 3.0.16)
 phpstan/phpstan (1.7.12 => 1.8.5)
 phpunit/php-code-coverage (9.2.15 => 9.2.17)
 phpunit/phpunit (9.5.20 => 9.5.24)
 psy/psysh (v0.11.5 => v0.11.8)
 sebastian/type (3.0.0 => 3.1.0)
 seld/phar-utils (1.2.0 => 1.2.1)
 seld/signal-handler (2.0.1)
 symfony/console (v5.4.9 => v5.4.12)
 symfony/css-selector (v5.4.3 => v5.4.11)
 symfony/deprecation-contracts (v2.5.1 => v2.5.2)
 symfony/error-handler (v5.4.9 => v5.4.11)
 symfony/event-dispatcher-contracts (v2.5.1 => v2.5.2)
 symfony/filesystem (v5.4.9 => v5.4.12)
 symfony/finder (v5.4.8 => v5.4.11)
 symfony/http-foundation (v5.4.9 => v5.4.12)
 symfony/http-kernel (v5.4.9 => v5.4.12)
 symfony/mime (v5.4.9 => v5.4.12)
 symfony/options-resolver (v5.4.3 => v5.4.11)
 symfony/process (v5.4.8 => v5.4.11)
 symfony/routing (v5.4.8 => v5.4.11)
 symfony/service-contracts (v2.5.1 => v2.5.2)
 symfony/string (v5.4.9 => v5.4.12)
 symfony/translation (v5.4.9 => v5.4.12)
 symfony/translation-contracts (v2.5.1 => v2.5.2)
 symfony/var-dumper (v5.4.9 => v5.4.11)
 symfony/yaml (v4.4.37 => v4.4.45)
 tecnickcom/tcpdf (6.4.4 => 6.5.0)

* changes

* try again

* Fix some issues because the message is changing between versions, just avoids it.
2022-09-09 09:55:59 -05:00
Jellyfrog
152497a098 PHPStan: Enable more checks (#14318)
* PHPStan: Enable more checks

* Fixes

* Fixes

* Deprecation fixes
2022-09-09 07:08:06 -05:00
bp0
6cc9694780 docs/API: Move list_locations from devices to locations (#14328)
* Remove list_locations from devices

Moving to locations

* Add list_locations to locations

Moved from devices
2022-09-08 22:16:52 -05:00
Jellyfrog
8692abb830 Prevent errors when hrStorageTable doesn't exist (#14327)
Prevents Illegal string offset 'hrStorageDescr'
2022-09-08 21:52:33 -05:00
PipoCanaja
7970a7f9c7 Tests - cleanup names (#14322)
* remove underscores

* TooMuch
2022-09-08 19:26:20 -05:00
PipoCanaja
a9441c17fe rename mibs (#14323) 2022-09-08 19:18:14 -05:00
Maikel de Boer
bd02df14b6 Added support for UHP VSAT modems (#14317)
* Started UHP VSAT support

* continue uhp

* end of day

* uhp  support

* fixed icon / logo

* cleanup

* added test data

* Delete Uhp.php

If the file is empty let's delete it

* added test data

* Update uhp.yaml

spacing fix

* Fixed identation

* New test data

* Fixed

* styling

* fix

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2022-09-08 15:27:51 +02:00
Tony Murray
fdbee0f5ee Revert "ZTE ZXA10 Update (Added dBm graphs) (#14049)" (#14320)
This reverts commit 6e98139cd1.
2022-09-08 09:04:37 +02:00
Marek Wobst
22f84ef3d8 Add additional sorting options for Availability Map (#14073)
* 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>
2022-09-07 20:02:00 -05:00
PipoCanaja
53bfb24ef9 Migrate xDSL code to module, and add support for VDSL2 MIB (#14207)
* 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>
2022-09-07 19:29:17 -05:00
Tony Murray
b44f1546a2 Improved Modern Modules (#14315)
* Improved Modern Modules
Modules now report module dependencies and can dump data for testing
This should serve to the process of building a module more obvious.
cleanup now only requires a device, not an os wrapped around a device
Helper to create a modern module (including the legacy adapter) from a name.

* return false correctly for dump and handle it.

* make sure test data is in the right format.

* wrong isis table name

* sort

* Fix style and lint issues
2022-09-07 23:53:16 +02:00
Tony Murray
6342d69b18 Do not include _token in legacy vars (#14313) 2022-09-07 16:17:08 -05:00
Tony Murray
ae15c8eb2a Port pages fixes and cleanups (#14310)
* Port pages fixes and cleanups
Fix mac display on device port page
Move ports query building into the graph page where it is used
Add the filter ui to the all ports graphs pages

* whitespace
2022-09-07 15:33:29 -05:00
Tony Murray
8a4d8037e8 Don't include null os when loading defs (#14312) 2022-09-07 09:27:06 +02:00
Tony Murray
dc050711ec 2fa not all routes have names (#14311) 2022-09-07 09:06:24 +02:00
Jellyfrog
36e9c5e0b9 PHPStan: Remove PHP version constraint (#14314) 2022-09-06 23:43:51 +02:00
Tony Murray
c3f31c14e0 Handle connection timed out errors in unix agent (#14286)
* handle connection timed out errors in unix agent

* Update unix-agent.inc.php
2022-09-06 12:00:35 -05:00
electrocret
e458f95bd8 Billing module fix/cleanup (#14309)
* Delete autoadd definitions

Never actually used. Inherited from Observium.

* Allow Billing API to set dir_95th (for agg bills)

Currently we're unable to set dir_95th via API to configure Aggregate bills. This should fix that.
2022-09-06 11:49:15 -05:00
Tony Murray
9fdc213f25 Return GraphImage to include more metadata (#14307)
* Return GraphImage to include more metadata
Allows things like including title.
Implements __toString for backwards compatability
getImageData to allow controlling the output through flags

* Style and Lint
2022-09-06 07:33:57 -05:00
Tony Murray
69d1c2022a SnmpResponse filterBadLines fix (#14306)
Actually filter lines (instead of full responses) with No Such Instance regex
2022-09-06 12:10:29 +02:00
Martin22
3f27d89278 Ray2 - Oid repair for BER sensor (#14302)
* Ray2 - Oid repair at ber
* Fix double dots
* New test data created
2022-09-06 09:38:17 +02:00
Tony Murray
302a989d4e Email Transport: embed graphs by default (#14270)
* 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
2022-09-05 20:41:55 -05:00
Tony Murray
ec8629fb63 Discord ability to attach graph images (#14276)
* Discord ability to attach graph images
Must use @signedGraphTag()
Needs more work on the graph side of things still: issues with CORs and other.

* Fixes

* alert data is an array for transports

* No need to decode, that was a bug before
2022-09-05 16:20:10 -05:00
Jellyfrog
2264229b8b Silence return type mismatch (#14298)
* Silence return type mismatch

To keep PHP7 compatibility

* Update QueryBuilderFilter.php

* Update DynamicConfigItem.php

* Update ObjectCache.php

* Update DynamicConfigItem.php
2022-09-05 16:19:39 -05:00
Peca Nesovanovic
93572cd5d3 empty, not empty (#14304) 2022-09-05 16:06:42 -05:00
Jellyfrog
9e5ced28d4 Fix hrStorageType being undefined (#14260) 2022-09-05 22:34:59 +02:00
Tony Murray
bdf903818b Linux distro images require feature field (#14301)
No reason to check them if feature is empty
2022-09-05 22:32:04 +02:00
Jellyfrog
214ee9588c Check correct class (#14297) 2022-09-05 11:13:47 -05:00
Tony Murray
4614183cca Fix undefined variable (#14287)
https://flareapp.io/errors/1540406-undefined-variable-i/latest#F4
2022-09-05 18:12:43 +02:00
Tony Murray
14799ecdd3 cisco-sla module was renamed to slas (#14288)
Cleanup references to it.
2022-09-05 09:25:36 +02:00
Tony Murray
09c6c725a1 Check if polling module exists (#14289)
Users have old configurations defined, do not try to include them and post a message about it
2022-09-05 09:22:59 +02:00
Tony Murray
8f5582f85a Fix more percent calculations (#14294) 2022-09-05 09:22:42 +02:00
Tony Murray
c03954cfc3 Error Reporting (#14291)
Don't try to enable Ignition and Flare when the user has too old of flare-client-php
2022-09-05 09:02:53 +02:00
Tony Murray
c592811477 Error Reporting, strict check (#14293)
Strict check to reduce chances for accidental enabling.
2022-09-05 09:00:12 +02:00
Tony Murray
ad9868b8b3 Fix issue causing error reporting to be incorrectly enabled (#14292)
for some reason, the reporting.error.dump merged with reporting.error to store an array instead of a bool.
2022-09-04 23:05:36 -05:00
Tony Murray
04b7b1cb03 Fix rounding null in mempools module (#14290) 2022-09-04 21:26:02 +02:00
Tony Murray
c2761b4e12 Remove unused function (#14283)
duplicates other functionality
2022-09-04 13:04:55 +03:00
Tony Murray
9f39acd615 Update docs around APP_URL (#14282)
* Update docs around APP_URL
it is required in more cases than implied such as signed graphs

* Some require public urls

* Update Templates.md
2022-09-03 23:46:16 -05:00
Tony Murray
2e42326e34 Remove reference to unused variable (#14280) 2022-09-03 23:45:12 -05:00
Tony Murray
152bf6e8de Allow dumping of errors and warnings (#14275)
`lnms config:set reporting.error.dump true`
2022-09-03 20:57:26 -05:00
Tony Murray
842c454e7b url alias fix (#14281) 2022-09-03 13:02:25 -05:00
Tony Murray
5c76890373 Add @signedGraphTag() and @signedGraphUrl() blade directives (#14269)
* 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)
2022-09-03 12:48:43 -05:00
Tony Murray
a95b1c408c move #14222 code so it doesn't run on every page (#14279) 2022-09-03 09:48:35 -05:00
Keenan Tims
c1f6c90aac Don't send zeros to Graphite for missing metrics (#14262) 2022-09-02 21:09:07 -05:00
Tim de Boer
cae5e01d20 Disable Gridster after window resize when Gridster is/should be disabled (#14222)
* Disable Gridster after window resize when Gridster is/should be disabled

* Identation fix on next line after code addition
2022-09-02 21:07:32 -05:00
Tony Murray
ef1076dd7b Cleanup some RunAlerts issues (#14274) 2022-09-03 03:19:21 +03:00
Tony Murray
f9ff0ad82b Remove Caffeine (#14277)
It is not required anymore since the session lifetime is 24 days
2022-09-02 11:11:14 +03:00
Lucas Gasenzer
e075e8d7d7 changed viewbox and scale as fix for safari (#14271) 2022-09-01 22:55:43 -05:00
Jellyfrog
127776e28c Fix a bunch of "Since fakerphp/faker 1.14: Accessing property.." (#14267) 2022-09-01 12:31:25 -05:00