Commit Graph

79 Commits

Author SHA1 Message Date
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
Jellyfrog
4039d88b3b
Update dependencies (#15869)
* Update dependencies

* fix new phpstan errors

* Update phpstan.neon
2024-03-03 22:45:09 +01:00
Tony Murray
f09d1d9c47
Update PHP dependencies (#15737)
* Update PHP dependencies
  - Removing doctrine/annotations (2.0.1)
  - Upgrading barryvdh/laravel-debugbar (v3.8.1 => v3.9.2)
  - Locking carbonphp/carbon-doctrine-types (2.1.0)
  - Upgrading composer/ca-bundle (1.3.7 => 1.4.0)
  - Upgrading composer/composer (2.6.4 => 2.6.6)
  - Upgrading composer/pcre (3.1.0 => 3.1.1)
  - Upgrading composer/spdx-licenses (1.5.7 => 1.5.8)
  - Upgrading doctrine/dbal (3.6.5 => 3.7.2)
  - Upgrading doctrine/deprecations (v1.1.1 => 1.1.2)
  - Upgrading dragonmantank/cron-expression (v3.3.2 => v3.3.3)
  - Upgrading egulias/email-validator (4.0.1 => 4.0.2)
  - Upgrading ezyang/htmlpurifier (v4.16.0 => v4.17.0)
  - Upgrading fakerphp/faker (v1.23.0 => v1.23.1)
  - Upgrading filp/whoops (2.15.3 => 2.15.4)
  - Upgrading friendsofphp/php-cs-fixer (v3.22.0 => v3.46.0)
  - Upgrading fruitcake/php-cors (v1.2.0 => v1.3.0)
  - Upgrading graham-campbell/result-type (v1.1.1 => v1.1.2)
  - Upgrading guzzlehttp/guzzle (7.7.0 => 7.8.1)
  - Upgrading guzzlehttp/promises (2.0.0 => 2.0.2)
  - Upgrading guzzlehttp/psr7 (2.5.0 => 2.6.2)
  - Upgrading guzzlehttp/uri-template (v1.0.1 => v1.0.3)
  - Upgrading laravel/dusk (v7.9.0 => v7.12.1)
  - Upgrading laravel/framework (v10.16.1 => v10.40.0)
  - Locking laravel/prompts (v0.1.15)
  - Upgrading laravel/serializable-closure (v1.3.1 => v1.3.3)
  - Upgrading laravel/socialite (v5.8.0 => v5.11.0)
  - Upgrading laravel/tinker (v2.8.1 => v2.9.0)
  - Upgrading laravel/ui (v4.2.2 => v4.3.0)
  - Upgrading league/commonmark (2.4.0 => 2.4.1)
  - Upgrading league/flysystem (3.15.1 => 3.23.0)
  - Upgrading league/flysystem-local (3.15.0 => 3.23.0)
  - Upgrading league/mime-type-detection (1.11.0 => 1.14.0)
  - Upgrading maximebf/debugbar (v1.18.2 => v1.19.1)
  - Upgrading mews/purifier (3.4.0 => 3.4.1)
  - Upgrading mockery/mockery (1.6.4 => 1.6.7)
  - Upgrading monolog/monolog (3.4.0 => 3.5.0)
  - Upgrading nesbot/carbon (2.68.1 => 2.72.1)
  - Upgrading nette/schema (v1.2.3 => v1.2.5)
  - Upgrading nette/utils (v4.0.0 => v4.0.3)
  - Upgrading nikic/php-parser (v4.16.0 => v4.18.0)
  - Upgrading nunomaduro/collision (v7.1.0 => v7.10.0)
  - Upgrading nunomaduro/larastan (v2.6.3 => v2.8.1)
  - Upgrading pear/net_dns2 (v1.5.3 => v1.5.4)
  - Upgrading php-amqplib/php-amqplib (v3.5.4 => v3.6.0)
  - Upgrading php-flasher/flasher (v1.15.3 => v1.15.8)
  - Upgrading php-flasher/flasher-laravel (v1.15.3 => v1.15.8)
  - Upgrading php-webdriver/webdriver (1.14.0 => 1.15.1)
  - Upgrading phpdocumentor/type-resolver (1.7.2 => 1.8.0)
  - Upgrading phpmailer/phpmailer (v6.8.0 => v6.9.1)
  - Upgrading phpmyadmin/sql-parser (5.8.0 => 5.8.2)
  - Upgrading phpoption/phpoption (1.9.1 => 1.9.2)
  - Upgrading phpseclib/phpseclib (3.0.34 => 3.0.35)
  - Upgrading phpstan/phpdoc-parser (1.23.0 => 1.25.0)
  - Upgrading phpstan/phpstan (1.10.26 => 1.10.55)
  - Upgrading phpstan/phpstan-deprecation-rules (1.1.3 => 1.1.4)
  - Upgrading phpstan/phpstan-mockery (1.1.1 => 1.1.2)
  - Upgrading phpunit/php-code-coverage (9.2.27 => 9.2.30)
  - Upgrading phpunit/phpunit (9.6.10 => 9.6.15)
  - Upgrading predis/predis (v2.2.0 => v2.2.2)
  - Locking psr/clock (1.0.0)
  - Upgrading psr/http-client (1.0.2 => 1.0.3)
  - Upgrading psy/psysh (v0.11.19 => v0.12.0)
  - Upgrading ramsey/uuid (4.7.4 => 4.7.5)
  - Upgrading react/promise (v3.0.0 => v3.1.0)
  - Upgrading sebastian/complexity (2.0.2 => 2.0.3)
  - Upgrading sebastian/global-state (5.0.5 => 5.0.6)
  - Upgrading sebastian/lines-of-code (1.0.3 => 1.0.4)
  - Upgrading seld/jsonlint (1.10.0 => 1.10.1)
  - Upgrading socialiteproviders/manager (v4.3.0 => v4.4.0)
  - Upgrading spatie/flare-client-php (1.4.1 => 1.4.3)
  - Upgrading spatie/ignition (1.9.0 => 1.12.0)
  - Upgrading spatie/laravel-ignition (2.2.0 => 2.4.1)
  - Upgrading symfony/console (v6.3.4 => v6.4.2)
  - Upgrading symfony/css-selector (v6.3.0 => v6.4.0)
  - Upgrading symfony/deprecation-contracts (v3.3.0 => v3.4.0)
  - Upgrading symfony/error-handler (v6.3.0 => v6.4.0)
  - Upgrading symfony/event-dispatcher (v6.3.0 => v6.4.2)
  - Upgrading symfony/event-dispatcher-contracts (v3.3.0 => v3.4.0)
  - Upgrading symfony/filesystem (v6.3.1 => v6.4.0)
  - Upgrading symfony/finder (v6.3.3 => v6.4.0)
  - Upgrading symfony/http-foundation (v6.3.1 => v6.4.2)
  - Upgrading symfony/http-kernel (v6.3.1 => v6.4.2)
  - Upgrading symfony/mailer (v6.3.0 => v6.4.2)
  - Upgrading symfony/mime (v6.3.0 => v6.4.0)
  - Upgrading symfony/options-resolver (v6.3.0 => v6.4.0)
  - Upgrading symfony/polyfill-intl-idn (v1.27.0 => v1.28.0)
  - Upgrading symfony/polyfill-php72 (v1.27.0 => v1.28.0)
  - Upgrading symfony/polyfill-php83 (v1.27.0 => v1.28.0)
  - Upgrading symfony/polyfill-uuid (v1.27.0 => v1.28.0)
  - Upgrading symfony/process (v6.3.4 => v6.4.2)
  - Upgrading symfony/routing (v6.3.1 => v6.4.2)
  - Upgrading symfony/service-contracts (v3.3.0 => v3.4.1)
  - Upgrading symfony/stopwatch (v6.3.0 => v6.4.0)
  - Upgrading symfony/string (v6.3.2 => v6.4.2)
  - Upgrading symfony/translation (v6.3.0 => v6.4.2)
  - Upgrading symfony/translation-contracts (v3.3.0 => v3.4.1)
  - Upgrading symfony/uid (v6.3.0 => v6.4.0)
  - Upgrading symfony/var-dumper (v6.3.1 => v6.4.2)
  - Upgrading symfony/yaml (v6.3.0 => v6.4.0)
  - Upgrading tecnickcom/tcpdf (6.6.2 => 6.6.5)
  - Upgrading theseer/tokenizer (1.2.1 => 1.2.2)
  - Upgrading tightenco/ziggy (v1.6.0 => v1.8.1)
  - Upgrading tijsverkoyen/css-to-inline-styles (2.2.6 => v2.2.7)
  - Upgrading vlucas/phpdotenv (v5.5.0 => v5.6.0)
  - Upgrading web-token/jwt-core (3.2.7 => 3.2.9)
  - Upgrading web-token/jwt-key-mgmt (3.2.7 => 3.2.9)
  - Upgrading web-token/jwt-signature (3.2.7 => 3.2.9)
  - Upgrading web-token/jwt-signature-algorithm-ecdsa (3.2.7 => 3.2.9)
  - Upgrading web-token/jwt-util-ecc (3.2.7 => 3.2.9)

* update baseline

* remove unneeded annotation
2024-01-16 18:04:40 +01:00
PipoCanaja
b12ee04bda
bug - timos MPLS - more poller fixes (#15624)
* fix 1, ErrorException: Undefined array key sdpFarEndInetAddress in /opt/librenms/LibreNMS/OS/Timos.php:584

* fix2: don't try mplsSdpBinds polling if prerequisites not met

* fix 3: ErrorException: Attempt to read property lsp_path_id on null in /opt/librenms/LibreNMS/OS/Timos.php:790

* style

* fix phpstan

* schema_update

* schema

* migration_style

* migration drops and recreate

* migration drops and recreate

* migration drops and recreate

* style
2023-12-17 20:15:46 -06:00
Tony Murray
0540c56d0f
Add application metrics model and relationships (#15417)
* Add application metrics model and relationships

* update schema check file

* Add missed index

* Update testing definition

* sqlite can't create the id later

* update schema dumps

* update testing_persistent schema

* update baseline
2023-10-12 02:24:27 -05:00
Tony Murray
c87c6e8b8e
Remove legacy addhost code (#15376)
* Remove legacy addhost code
Update webui addhost
Update device snmp settings page
Update discovery protocols device discovery (no longer force full new device discovery in process)

* remove baseline exceptions

* Apply fixes from StyleCI

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-10-07 22:02:45 -05:00
Tony Murray
8466d537c6
Additional contact options for email transports (#15266)
* Additional options for email transports
Similar system email options will be deprecated

* Fix lint and style issues
2023-09-08 09:27:23 -05:00
Tony Murray
c737788727
Roles user add fix (#15257)
* Fix user add command doesn't allow roles

* update baseline
2023-08-28 10:27:56 -05: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
523e76db71
Fix sensor discovery fetch issue (#15193)
* Fix sensor discovery fetch issue

* value is not in an array

* Fix type

* remove exception...

* Update HarmonyEnhanced

* update test data
2023-08-04 13:25:19 +02:00
Tony Murray
13547225b4
Dependency Updates (#15149)
* symfony/finder (v6.2.7 => v6.3.0)
symfony/var-dumper (v6.2.10 => v6.3.1)
symfony/css-selector (v6.2.7 => v6.3.0)
symfony/uid (v6.2.7 => v6.3.0)
symfony/routing (v6.2.8 => v6.3.1)
symfony/process (v6.2.10 => v6.3.0)
symfony/mime (v6.2.10 => v6.3.0)
symfony/service-contracts (v3.2.1 => v3.3.0)
symfony/event-dispatcher-contracts (v3.2.1 => v3.3.0)
symfony/event-dispatcher (v6.2.8 => v6.3.0)
symfony/mailer (v6.2.8 => v6.3.0)
symfony/polyfill-php83 (v1.27.0)
symfony/deprecation-contracts (v3.2.1 => v3.3.0)
symfony/http-foundation (v6.2.10 => v6.3.1)
symfony/error-handler (v6.2.10 => v6.3.0)
symfony/http-kernel (v6.2.10 => v6.3.1)
symfony/string (v6.2.8 => v6.3.0)
symfony/console (v6.2.10 => v6.3.0)
symfony/translation-contracts (v3.2.1 => v3.3.0)
symfony/translation (v6.2.8 => v6.3.0)
nesbot/carbon (2.66.0 => 2.68.1)
monolog/monolog (3.3.1 => 3.4.0)
doctrine/inflector (2.0.6 => 2.0.8)
laravel/framework (v10.11.0 => v10.15.0)
phpstan/phpdoc-parser (1.21.0 => 1.22.1)
doctrine/deprecations (v1.0.0 => v1.1.1)
phpdocumentor/type-resolver (1.7.1 => 1.7.2)
nikic/php-parser (v4.15.5 => v4.16.0)
doctrine/dbal (3.6.2 => 3.6.4)
composer/class-map-generator (1.0.0 => 1.1.0)
barryvdh/reflection-docblock (v2.1.0 => v2.1.1)
symfony/filesystem (v6.2.10 => v6.3.1)
composer/ca-bundle (1.3.5 => 1.3.6)
composer/composer (2.5.5 => 2.5.8)
fakerphp/faker (v1.22.0 => v1.23.0)
symfony/stopwatch (v6.2.7 => v6.3.0)
symfony/options-resolver (v6.2.7 => v6.3.0)
friendsofphp/php-cs-fixer (v3.17.0 => v3.22.0)
laravel/dusk (v7.7.1 => v7.8.0)
psy/psysh (v0.11.18 => v0.11.19)
mockery/mockery (1.5.1 => 1.6.2)
filp/whoops (2.15.2 => 2.15.3)
phpstan/phpstan (1.10.15 => 1.10.25)
phpmyadmin/sql-parser (5.7.0 => 5.8.0)
nunomaduro/larastan (v2.6.0 => v2.6.3)
nunomaduro/laravel-console-summary (v1.9.1 => v1.10.0)
phpseclib/phpseclib (3.0.19 => 3.0.21)
php-amqplib/php-amqplib (v3.5.3 => v3.5.4)
php-flasher/flasher (v1.13.1 => v1.15.3)
php-flasher/flasher-laravel (v1.13.1 => v1.15.3)
phpunit/phpunit (9.6.8 => 9.6.10)
predis/predis (v2.1.2 => v2.2.0)
laravel/socialite (v5.6.1 => v5.8.0)
spatie/backtrace (1.4.0 => 1.5.3)
spatie/flare-client-php (1.3.6 => 1.4.1)
spatie/ignition (1.7.0 => 1.9.0)
spatie/laravel-ignition (2.1.2 => 2.2.0)
symfony/yaml (v6.2.10 => v6.3.0)

* Typehint update

* update baseline for fixed issues
2023-07-17 08:18:10 -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
Jellyfrog
153be4d583
Tests: Fix Dusk tests after 13626 (#15057) 2023-05-23 19:23:15 +02:00
Tony Murray
04bb75f5f3
Alert transport cleanup, no_proxy support and other proxy cleanups (#14763)
* Add no_proxy and other proxy related settings
Set user agent on all http client requests
Unify http client usage

* Style fixes

* Remove useless use statements

* Correct variable, good job phpstan

* Add tests
fix https_proxy bug
add tcp:// to the config settings format

* style and lint fixes

* Remove guzzle from the direct dependencies

* Use built in Laravel testing functionality

* update baseline
2023-05-23 09:25:17 -05:00
eskyuu
ce0734ff5d
Added support for user timezones and user browser timezone by default (incomplete) (#13626)
* 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>
2023-05-09 10:24:48 -05:00
Jellyfrog
7e8e11f097
phpstan: new baseline (#15015)
* phpstan: new baseline

* wip
2023-04-28 17:13:55 +02:00
Tony Murray
52f5f10231
Fix some lint issues (#14962) 2023-04-15 09:02:41 -05:00
Skylark
473a7d360b
Allows GEO lookup with detailed internal Location information wrapped inside parentheses. (#14799)
* Ignore everyting inside () during GEO lookup

I location info is: "1100 Congress Ave, Austin, TX 78701 (3rd floor meeting room)" then the GEO locator will look up "1100 Congress Ave, Austin, TX 78701"

* update info

* small typo

* typo fix

* getting verify

* style fix

* commitment issues

* updating wiki

* tweaking the document format

* more tweaks

* Im starting to hate md

* cleanup
2023-03-18 22:07:52 -05:00
GeantRA
2da5d4505b
Refactored Juniper SLA to include support for TWAMP and remove ambigu… (#14787) 2023-02-24 13:09:52 +01:00
carbinefreak
d869b879d1
Nokia PMC Microwave Improvements (#14761) 2023-01-19 23:31:57 +01:00
Tony Murray
1d3440b943
Unify time interval formatting (#14733)
* Unify time interval formatting
Use carbon for formatting, it supports locales.

* fix style

* remove baseline exceptions

* fixes found by lint
2022-12-15 15:52:53 -06:00
Tony Murray
752bbc1531
Port search API search more than one fields (#14646)
* Fix port search columns

* Port search API search more than one fields
Fixup port APIs
Change validate_column_list api helper to throw a renderable exception on error and return the valid columns
DeviceCache::get() can handle a bigger range of input

* whitespace

* Refactor exceptions a bit

* change throws type to be more generic

* Lint fixes
2022-11-18 16:27:56 -06:00
Tony Murray
1dbe8cf0fa
DeviceCache::get() allow hostname (#14649)
* DeviceCache::get() allow hostname

* whitespace fix
2022-11-18 12:09:56 -06:00
Tony Murray
b9d8a7c33c
Improved AIX os information collection (#14595)
* Improved AIX os information collection

* Fix-up merged data

* remove baseline
2022-11-09 12:04:56 +01:00
Jellyfrog
71d740770b
Remove Log::event (#14526)
* Remove Log::event

Use the Eventlog class directly instead

* wip

* wip

* wip

* Apply fixes from StyleCI

* Update Eventlog.php
2022-11-09 09:47:19 +01:00
Tony Murray
0801af7a81
Consolidate and improve snmptranslate usage (#14567)
* Consolidate and improve snmptranslate usage

* Fix style

* lint fixes

* fix typo

* allow multiple mib directories

* Only add mib if it is not already set

* oid first, in case we have key length issues

* if there is a full oid, don't add other mibs

* debug in ci

* more debug in ci

* better debug in ci

* remove debug

* Use numeric index

* revert dlink change

* Don't add -On twice

* unit tests and hopefully better heuristics

* remove dump and add one more set of tests

* style fixes

* handle bad input in old functions

* shortcut whole snmp_translate function
2022-11-07 12:00:47 -06:00
Tony Murray
26318dc4b3
Improve trap testing (#14546)
* Improve trap testing
Add helper log() to Trap
Avoid saving to the database at all

* style

* Move all traps to $trap->log()

* Update tests

* Lint and style fixes

* Use correct partial mock call

* more style

* Add docs

* debug in ci

* use the correct log function....................

* all, I guess

* not the first??

* 3rd?

* use event_id to order
2022-11-05 14:43:54 -05:00
Félix Bouynot
b59cf980ca
Type API methods and properties (#14476)
* Type properties

* Comment method

* Update base_uri child property

* Update BingApi.php

* Update GoogleMapsApi.php

* Update MapquestApi.php

* Update NominatimApi.php

* Update RipeApi.php

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* Fix indent

* Fix escaping

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* Update phpstan-baseline.neon

* StyleCI indent

* Update phpstan-baseline.neon

* Make possible for $client to be null

* Remove comments

* Remove comments

* Remove comments

* Update MapquestApi.php

* Update NominatimApi.php

* Remove comments

* Remove comments

* $base_uri not nullable

* $base_uri not nullable

* $base_uri not nullable

* $base_uri not nullable

* $base_uri not nullable

* $base_uri not nullable

* Type method and properties

* Type method and properties

* Type method and properties

* Type method and properties

* Type method and properties

* Type method and properties

* Type $client

* Type method and properties

* Remove errors not matched anymore

* Fix type errors in graylogapi

* Mixed can't be ORed

* uri never null

* Update app/ApiClients/GraylogApi.php

* Fix getAdresses Type

* Collection changed its folder?

* Fix directory, there was just a backslash missing

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-11-02 01:06:15 +01:00
Tony Murray
4b65dc41d2
Graphing cleanup (#14492)
* WIP

* Fixes and cleanups

* Move parseAtTime to Time util class

* lint fixes, explicitly define variables

* Style fixes
2022-10-28 08:06:29 -05:00
Jellyfrog
34a58c3f9f
Miscellaneous cleanup, mostly undefined variables - part2 (#14445)
* Miscellaneous cleanup, mostly undefined variables - part2

* wip

* Update Number.php

* Update BridgeMib.php

* Update Xdsl.php

* Update cisco.inc.php

* Update Cisco.php

* Update entity-sensor.inc.php

* Update entity-sensor.inc.php

* Update entity-sensor.inc.php

* Update avtech.inc.php

* Update functions.inc.php

* Update HostResources.php

* Update ports.inc.php

* Update route.inc.php

* Update cisco.inc.php

* Update Cisco.php
2022-10-18 13:30:42 +02:00
Jellyfrog
be1a2cec50
Miscellaneous fixes, mostly undefined variables (#14432)
* Miscellaneous fixes, mostly undefined variables

* Update phpstan-baseline.neon
2022-10-11 11:30:00 +02:00
sembeek
4e1f958e16
Fix ping.php skipped results (#14368)
* Update PingCheck.php

* Update PingCheck.php

* Update phpstan-baseline.neon

* Update PingCheck.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-09-19 15:10:26 -05:00
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
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
Jellyfrog
36e9c5e0b9
PHPStan: Remove PHP version constraint (#14314) 2022-09-06 23:43:51 +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
673ad552a1
Device settings: attempt to open related tab (#14250)
* Device settings: attempt to open related tab

* remove baseline
2022-08-28 21:45:52 -05:00
Tony Murray
08c4d7f3b3
Allow SnmpQuery to optionally abort walks if one fails (#14255)
* Allow SnmpQuery to optionally abort walks if one fails

* style

* remove baseline
2022-08-28 19:47:20 -05:00
Tony Murray
6e8224565f
AD Auth PHP8.1 fixes (#14215) 2022-08-18 21:47:14 -05:00
Tony Murray
1c2e446326
New Poller validations (#14148)
* New Poller validations
Seperated poller and distributed poller validations to make poller validations generally available
One auto fixer added
Translatable strings

* lint and style fixes

* and style

* and style

* Update LibreNMS/Validations/Poller/CheckLocking.php

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>

* Update CheckPythonWrapper.php

* Try to check if cron is even installed before warning about not being able to read the cron files.
Likely most systems they won't be readable, but also, it is very unlikely we hit the cron check and it is meaningfully different than the first Poller::exists() check.

* Work on poller validation
Remove errors/warnings when at least one poller of the other type is active.

* style fixes

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2022-08-02 16:02:37 -05:00
Tony Murray
9f749ae778
Update Larastan (#14031)
* Update Larastan

* fix as many as I can

* update baseline for the remaining

* fix style

* Update Log::event phpdoc
2022-06-13 08:57:21 +02:00
Tony Murray
7a0d604cdd
Automatic fixes for validation failures (#13930)
* 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()
2022-06-10 16:25:33 -05:00
Tony Murray
32f1ce494e
Dashboard code cleanup (#13996)
* 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
2022-05-31 08:08:40 -05:00
Tony Murray
014213680f
Move Config loading to a service provider (#13927)
* Move Config loading to a service provider
That way other service providers can depend on it
Move various random listener registrations into the EventServiceProvider
Various startup cleanup

* Config::persist Set live variable before persisting incase db update fail

* Disable strict mode for legacy code (init.php)

* Disable debug after os test data is gathered

* remove Eloquent::boot it is never used

* remove Eloquent::version

* lint fixes

* style fixes

* there is no c_echo here
2022-04-22 19:12:07 -05:00
Tony Murray
d026e9f0cc
Allow unordered OIDs (global and per-os) (#13923)
* Allow unordered OIDs (global and per-os)
Fix global no_bulk setting, was ignored before
(to fix global needed to rework Config::getCombined() a bit to allow a global prefix to be specified)
Removed invalid use of getCombined and updated tests

* fix whitespace

* update os schema
2022-04-21 21:49:26 -05:00
Tony Murray
9c126572a2
Fix validation page (#13929)
* Validation web page fixes

* Validation web page fixes

* update baseline
2022-04-17 08:38:16 -05:00
Tony Murray
0a84098211
Port Validation Page to Laravel (#13921)
* 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.
2022-04-14 11:22:40 -05:00
Tony Murray
1bfd411995
New device:add code (#13842)
* 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
2022-03-12 16:14:32 -06:00