Commit Graph

116 Commits

Author SHA1 Message Date
Tony Murray
39ca9eb25c
Fix sodium_compat 32bit (#16303)
Fix upstream stupidity.  They required 32bit in 2.0.0, but didn't mark it then released 2.0.1 to fix that, but didn't pull 2.0.0.
Add explicit requirement for <2.0 to avoid the whole mess for now.  But that means we'll have to fix it down the road again.
2024-08-20 01:33:52 -05: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
Tony Murray
c572448ca0
Update PHP dependencies (#16263)
* Update PHP dependencies:

php-http/discovery (1.19.2 => 1.19.4)
symfony/finder (v6.4.8 => v6.4.10)
symfony/polyfill-mbstring (v1.29.0 => v1.30.0)
symfony/var-dumper (v6.4.4 => v6.4.10)
maximebf/debugbar (v1.20.2 => v1.22.3)
symfony/polyfill-php80 (v1.29.0 => v1.30.0)
symfony/polyfill-ctype (v1.29.0 => v1.30.0)
phpoption/phpoption (1.9.2 => 1.9.3)
graham-campbell/result-type (v1.1.2 => v1.1.3)
vlucas/phpdotenv (v5.6.0 => v5.6.1)
symfony/css-selector (v6.4.3 => v6.4.8)
symfony/polyfill-uuid (v1.29.0 => v1.30.0)
symfony/uid (v6.4.3 => v6.4.8)
symfony/routing (v6.4.3 => v6.4.10)
symfony/polyfill-php72 (v1.29.0 => v1.30.0)
symfony/polyfill-intl-normalizer (v1.29.0 => v1.30.0)
symfony/polyfill-intl-idn (v1.29.0 => v1.30.0)
symfony/mime (v6.4.3 => v6.4.9)
symfony/event-dispatcher (v6.4.3 => v6.4.8)
symfony/mailer (v6.4.4 => v6.4.9)
symfony/polyfill-php83 (v1.29.0 => v1.30.0)
symfony/http-foundation (v6.4.4 => v6.4.10)
symfony/error-handler (v6.4.4 => v6.4.10)
symfony/http-kernel (v6.4.4 => v6.4.10)
symfony/polyfill-intl-grapheme (v1.29.0 => v1.30.0)
symfony/string (v6.4.8 => v6.4.10)
symfony/console (v6.4.8 => v6.4.10)
brick/math (0.11.0 => 0.12.1)
ramsey/uuid (4.7.5 => 4.7.6)
symfony/translation (v6.4.4 => v6.4.10)
nesbot/carbon (2.72.3 => 2.72.5)
monolog/monolog (3.5.0 => 3.7.0)
league/flysystem (3.24.0 => 3.28.0)
league/flysystem-local (3.23.1 => 3.28.0)
dflydev/dot-access-data (v3.0.2 => v3.0.3)
league/commonmark (2.4.2 => 2.5.1)
laravel/framework (v10.46.0 => v10.48.18)
laravel/prompts (v0.1.16 => v0.1.24)
barryvdh/laravel-debugbar (v3.10.5 => v3.13.5)
phpstan/phpdoc-parser (1.26.0 => 1.29.1)
nikic/php-parser (v5.0.1 => v5.1.0)
doctrine/event-manager (2.0.0 => 2.0.1)
doctrine/dbal (3.8.2 => 3.8.6)
composer/pcre (3.1.4 => 3.2.0)
composer/class-map-generator (1.3.3 => 1.3.4)
symfony/polyfill-php81 (v1.29.0 => v1.30.0)
symfony/polyfill-php73 (v1.29.0 => v1.30.0)
symfony/filesystem (v6.4.8 => v6.4.9)
seld/jsonlint (1.10.2 => 1.11.0)
justinrainbow/json-schema (v5.2.13 => 5.3.0)
composer/semver (3.4.0 => 3.4.2)
composer/ca-bundle (1.5.0 => 1.5.1)
fico7489/laravel-pivot (3.0.11 => 3.0.12)
firebase/php-jwt (v6.10.1)
symfony/stopwatch (v6.4.3 => v6.4.8)
symfony/options-resolver (v6.4.0 => v6.4.8)
sebastian/diff (4.0.5 => 4.0.6)
react/event-loop (v1.5.0)
evenement/evenement (v3.0.2)
react/stream (v1.4.0)
react/cache (v1.2.0)
react/dns (v1.13.0)
react/socket (v1.16.0)
react/child-process (v0.6.5)
fidry/cpu-core-counter (1.1.0)
clue/ndjson-react (v1.3.0)
friendsofphp/php-cs-fixer (v3.51.0 => v3.61.1)
guzzlehttp/promises (2.0.2 => 2.0.3)
psr/http-factory (1.0.2 => 1.1.0)
php-http/message (1.16.0 => 1.16.1)
php-http/promise (1.3.0 => 1.3.1)
influxdata/influxdb-client-php (3.4.0 => 3.6.0)
guzzlehttp/psr7 (2.6.2 => 2.7.0)
guzzlehttp/guzzle (7.8.1 => 7.9.2)
phpstan/phpstan (1.10.59 => 1.11.9)
larastan/larastan (v2.9.2 => v2.9.8)
symfony/http-client (v6.4.4 => v6.4.10)
spomky-labs/pki-framework (1.1.1 => 1.2.1)
paragonie/sodium_compat (v1.20.0 => v2.0.1)
paragonie/constant_time_encoding (v2.6.3 => v3.0.0)
web-token/jwt-library (3.3.1 => 3.4.6)
web-token/jwt-util-ecc (3.3.0 => 3.4.6)
web-token/jwt-signature-algorithm-ecdsa (3.3.0 => 3.4.6)
web-token/jwt-signature (3.3.0 => 3.4.6)
web-token/jwt-key-mgmt (3.3.0 => 3.4.6)
psy/psysh (v0.12.0 => v0.12.4)
laravel/ui (v4.4.0 => v4.5.2)
librenms/laravel-vue-i18n-generator (dev-master c662202 => dev-master 8c8bb89)
mews/purifier (3.4.1 => 3.4.2)
mockery/mockery (1.6.7 => 1.6.12)
nunomaduro/laravel-console-summary (v1.10.0 => v1.11.1)
phpseclib/phpseclib (3.0.36 => 3.0.39)
php-amqplib/php-amqplib (v3.6.1 => v3.7.0)
php-parallel-lint/php-parallel-lint (v1.3.2 => v1.4.0)
phpstan/phpstan-deprecation-rules (1.1.4 => 1.2.0)
sebastian/resource-operations (3.0.3 => 3.0.4)
sebastian/global-state (5.0.6 => 5.0.7)
sebastian/exporter (4.0.5 => 4.0.6)
sebastian/cli-parser (1.0.1 => 1.0.2)
theseer/tokenizer (1.2.2 => 1.2.3)
phpunit/php-code-coverage (9.2.30 => 9.2.31)
phar-io/manifest (2.0.3 => 2.0.4)
myclabs/deep-copy (1.11.1 => 1.12.0)
phpunit/phpunit (9.6.17 => 9.6.20)
laravel/socialite (v5.12.1 => v5.15.1)
socialiteproviders/manager (v4.5.1 => v4.6.0)
spatie/error-solutions (1.1.1)
spatie/backtrace (1.5.3 => 1.6.2)
spatie/flare-client-php (1.4.4 => 1.8.0)
spatie/ignition (1.12.0 => 1.15.0)
spatie/laravel-ignition (2.4.2 => 2.8.0)
symfony/yaml (v6.4.3 => v6.4.8)

* Update dusk version to fix bug

* Update base DuskTestCase to match upstream

* Minor phpstan type changes

* add more types
2024-08-02 22:23:31 -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
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
Jellyfrog
4039d88b3b
Update dependencies (#15869)
* Update dependencies

* fix new phpstan errors

* Update phpstan.neon
2024-03-03 22:45:09 +01:00
Jellyfrog
fed0a7b3d6
Revert "Fix PortsFdb > Ipv4Mac relationship (#15822)" (#15827)
This reverts commit 8d7c1765b2.
2024-02-14 14:06:41 +01:00
Jellyfrog
8d7c1765b2
Fix PortsFdb > Ipv4Mac relationship (#15822) 2024-02-14 06:47:29 -06: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
Jellyfrog
1a6fe2bff7
Update composer dependencies (#15167) 2023-07-26 22:24:37 +02:00
Tony Murray
b3574ee282
Update Ziggy (#15151) 2023-07-17 09:56:24 -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
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
Jellyfrog
0a351b49fd
Laravel 9.x Shift (#14504)
* Move `resources/lang` folder

* Shift registered middleware

* Remove `fruitcake/laravel-cors` dependency

* Streamline `$commands` property

* Upgrade to Flysystem 3.0

* Shift core files

* Convert `optional()` to nullsafe operator

* Remove unnecessary `$model` property

* Convert route options to fluent methods

Laravel 8 adopts the tuple syntax for controller actions. Since the old options array is incompatible with this syntax, Shift converted them to use modern, fluent methods.

* Convert deprecated `$dates` property to `$casts`

* 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

* Use `<env>` tags for configuration

`<env>` tags have a lower precedence than system environment variables making it easier to overwrite PHPUnit configuration values in additional environments, such a CI.

Review this blog post for more details on configuration precedence when testing Laravel: https://jasonmccreary.me/articles/laravel-testing-configuration-precedence/

* Fix error provider

* Match new symfony syntax

* Match upstream syntax

* Fix route syntax

* generate composer.lock

* Sync back configs

* routes

* composer

* Fix more flare

* fix cors

* sync lang

* Apply fixes from StyleCI (#14517)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* bump larastan

* update packages

* wip

* Temporarily lower phpstan level

* Update phpstan.neon

* wip

* wip

* wip

* Apply fixes from StyleCI (#14592)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* test

* Update CiHelper.php

* Update test.yml

* Update CiHelper.php

* Update CiHelper.php

* Apply fixes from StyleCI (#14616)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* test?

* fix phpstan problems

* dont run snmpsim on github ci

* Fix whitespace

* More whitespace

* More whitespace ???

* I think the space broke it

* fix the reset of the whitespace

* hard code auth guard

---------

Co-authored-by: Shift <shift@laravelshift.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-17 06:51:35 -05:00
Tony Murray
15fbd3adb2
Update PHP dependencies (fix dependencies on PHP 8.2) (#14759)
* Update dependencies (fix dependencies on PHP 8.2)
  - Removing fgrosse/phpasn1 (v2.5.0)
  - Removing php-cs-fixer/diff (v2.0.2)
  - Upgrading barryvdh/reflection-docblock (v2.0.6 => v2.1.0)
  - Upgrading brick/math (0.9.3 => 0.10.2)
  - Upgrading composer/ca-bundle (1.3.3 => 1.3.4)
  - Upgrading composer/composer (2.4.1 => 2.5.1)
  - Upgrading composer/pcre (2.0.0 => 3.1.0)
  - Upgrading composer/xdebug-handler (2.0.2 => 3.0.3)
  - Locking dflydev/dot-access-data (v3.0.2)
  - Upgrading doctrine/annotations (1.13.3 => 1.14.2)
  - Upgrading doctrine/event-manager (1.1.2 => 1.2.0)
  - Upgrading doctrine/inflector (2.0.5 => 2.0.6)
  - Upgrading dragonmantank/cron-expression (v3.3.1 => v3.3.2)
  - Upgrading fakerphp/faker (v1.20.0 => v1.21.0)
  - Upgrading filp/whoops (2.14.5 => 2.14.6)
  - Upgrading friendsofphp/php-cs-fixer (v3.4.0 => v3.13.1)
  - Upgrading guzzlehttp/psr7 (2.4.1 => 2.4.3)
  - Upgrading laravel-notification-channels/webpush (5.1.1 => 7.0.0)
  - Upgrading laravel/dusk (v6.25.1 => v6.25.2)
  - Upgrading laravel/framework (v8.83.23 => v8.83.27)
  - Upgrading laravel/serializable-closure (v1.2.1 => v1.2.2)
  - Upgrading laravel/socialite (v5.5.5 => v5.5.6)
  - Upgrading laravel/tinker (v2.7.2 => v2.7.3)
  - Upgrading league/commonmark (1.6.7 => 2.3.8)
  - Locking league/config (v1.2.0)
  - Upgrading league/flysystem (1.1.9 => 1.1.10)
  - Upgrading librenms/laravel-vue-i18n-generator (0.1.47 => 0.1.48)
  - Upgrading minishlink/web-push (v6.0.7 => v7.0.0)
  - Upgrading nesbot/carbon (2.62.1 => 2.64.0)
  - Locking nette/schema (v1.2.3)
  - Locking nette/utils (v3.2.8)
  - Upgrading nikic/php-parser (v4.15.1 => v4.15.2)
  - Upgrading nunomaduro/larastan (1.0.3 => 1.0.4)
  - Upgrading pear/net_dns2 (v1.5.2 => v1.5.3)
  - Upgrading php-amqplib/php-amqplib (v3.2.0 => v3.4.0)
  - Upgrading php-webdriver/webdriver (1.12.1 => 1.13.1)
  - Upgrading phpdocumentor/type-resolver (1.6.1 => 1.6.2)
  - Upgrading phpmailer/phpmailer (v6.6.4 => v6.7.1)
  - Upgrading phpseclib/phpseclib (3.0.16 => 3.0.18)
  - Upgrading phpstan/phpstan (1.8.5 => 1.8.11)
  - Upgrading phpunit/php-code-coverage (9.2.17 => 9.2.22)
  - Upgrading phpunit/phpunit (9.5.24 => 9.5.27)
  - Upgrading psr/cache (1.0.1 => 3.0.0)
  - Upgrading psr/container (1.1.1 => 1.1.2)
  - Upgrading psr/log (1.1.4 => 2.0.0)
  - Upgrading psy/psysh (v0.11.8 => v0.11.10)
  - Upgrading ramsey/collection (1.2.2 => 1.3.0)
  - Upgrading ramsey/uuid (4.2.3 => 4.7.0)
  - Upgrading sebastian/comparator (4.0.6 => 4.0.8)
  - Upgrading sebastian/exporter (4.0.4 => 4.0.5)
  - Upgrading sebastian/type (3.1.0 => 3.2.0)
  - Upgrading socialiteproviders/manager (v4.1.0 => v4.2.0)
  - Locking spomky-labs/pki-framework (1.0.1)
  - Upgrading symfony/console (v5.4.12 => v5.4.16)
  - Upgrading symfony/css-selector (v5.4.11 => v6.2.0)
  - Upgrading symfony/deprecation-contracts (v2.5.2 => v3.2.0)
  - Upgrading symfony/error-handler (v5.4.11 => v5.4.15)
  - Upgrading symfony/event-dispatcher (v5.4.9 => v6.2.2)
  - Upgrading symfony/event-dispatcher-contracts (v2.5.2 => v3.2.0)
  - Upgrading symfony/filesystem (v5.4.12 => v6.2.0)
  - Upgrading symfony/http-foundation (v5.4.12 => v5.4.16)
  - Upgrading symfony/http-kernel (v5.4.12 => v5.4.16)
  - Upgrading symfony/mime (v5.4.12 => v5.4.16)
  - Upgrading symfony/options-resolver (v5.4.11 => v6.2.0)
  - Upgrading symfony/polyfill-ctype (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-iconv (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-grapheme (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-idn (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-intl-normalizer (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-mbstring (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php72 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php73 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php80 (v1.26.0 => v1.27.0)
  - Upgrading symfony/polyfill-php81 (v1.26.0 => v1.27.0)
  - Upgrading symfony/routing (v5.4.11 => v5.4.15)
  - Upgrading symfony/stopwatch (v5.4.5 => v6.2.0)
  - Upgrading symfony/string (v5.4.12 => v6.2.2)
  - Upgrading symfony/translation (v5.4.12 => v5.4.14)
  - Upgrading symfony/var-dumper (v5.4.11 => v5.4.14)
  - Upgrading tecnickcom/tcpdf (6.5.0 => 6.6.2)
  - Upgrading tijsverkoyen/css-to-inline-styles (2.2.4 => 2.2.5)
  - Upgrading vlucas/phpdotenv (v5.4.1 => v5.5.0)
  - Upgrading web-token/jwt-core (v2.2.11 => 3.1.4)
  - Upgrading web-token/jwt-key-mgmt (v2.2.11 => 3.1.4)
  - Upgrading web-token/jwt-signature (v2.2.11 => 3.1.4)
  - Upgrading web-token/jwt-signature-algorithm-ecdsa (v2.2.11 => 3.1.4)
  - Upgrading web-token/jwt-util-ecc (v2.2.11 => 3.1.4)

* Remove Net_DNS2_Resolver workaround
2022-12-28 02:03:59 -06:00
Tony Murray
0155f2fc3f
Composer php minimum version to 8.1 (#14494) 2022-10-22 10:21:17 +02:00
Jellyfrog
b31b992020
Rework socialite integration (#14367)
* Rework socialite integration

Prevents unnecessary work each boot

* Update SocialiteController.php

* Gen 2
2022-10-07 20:52:55 +02:00
Tony Murray
e990dfcb35
Disable plugins that have errors (#14383)
* Disable plugins that have errors
Disable plugin if a hook throws an error and set a notification
Move notification code to class, so we can access it
Clear notification when plugin is attempted to be enabled again

* fix style and lint fixes

* another lint fix and handle if property is missing
2022-09-25 22:47:58 -05: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
Jellyfrog
1dbab5ac7e
Error reporting (#14190)
* Error reporting

* Move code to ErrorReportingProvider
Enable reporting of error (and warning) messages.
report module exceptions

* Restore flare key
Not needed to set late anymore.  We set up filtering before it is initialized.

* Remove unnecessary and maybe double Flare report

* lint

* Cannot use typed properties yet, use phpdoc

* fix handleError return type

* Filter both exceptions and reports (so we don't miss any)
Consolidate the check if reporting should be enabled

* Cache reportingEnabled check for the runtime

* Split out middleware to improve readability
Logging of why reporting is disabled
Fix reportingEnabled cache

* Style

* Return some user data

* Change to class based middleware, it looks nicer

* Fix error page error id report, add url.

* also rewrite intended url

* remove link

* Move ignition to production and update flare-client

Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-08-24 00:33:28 +02:00
Tony Murray
9ce05d7628
Bump php-cs-fixer to 3.4.0 (#14224)
Update ruleset
3.4.0 is the last PHP 7.3 version
2022-08-23 16:45:57 +02: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
3e547de951
Update PHP dependencies (#14028)
* Update PHP dependencies

* Lock phpstan for now

* lock even harder!!!!
2022-06-10 20:50:33 -05:00
ottorei
51a8646825
Bump jpgraph version to 4 (#13875)
* Bump jpgraph version to 4

* Update composer lock-file
2022-03-26 11:48:02 +01:00
Jellyfrog
09929bd686
Implement OAuth and SAML2 support (#13764)
* Implement OAuth and SAML2 support via Socialite

* Add socialite docs

* fixes

* Additional information added

* wip

* 22.3.0 targeted version

* Allow mysql auth as long as there is a password saved

Co-authored-by: laf <gh+n@laf.io>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2022-02-20 22:05:51 +01:00
Jellyfrog
7d0bbb98eb
Replace Requests with HTTP Client (#13689) 2022-01-26 16:04:26 -06:00
Jellyfrog
1debe5e166
Use built in method to render a string with Blade (#13688) 2022-01-26 07:10:06 -06:00
Jellyfrog
29bdfe40a3
Use phpstan-deprecation-rules instead (#13582)
* Replace deprecated functions

* Use phpstan-deprecation-rules instead
2021-11-30 09:33:14 +01:00
Orsiris de Jong
e57ec782f4
Install new python dependencies during daily maintenance (#13186)
* Improve check_requirements script to dynamically read requirements.txt

* Don't dynamically load requirements for python2

* Make sure we check python3 dependencies with python3 binary

* Quote variable to fix SC2086

* Add dynamic_check_requirements.py

* Use dynamic_check_requirements.py for python3

* Revert "Don't dynamically load requirements for python2"

This reverts commit 4485c8fcf9e0075fcf212e4f8bbc59ed75e144b5.

* Revert "Improve check_requirements script to dynamically read requirements.txt"

This reverts commit a9c83350d9de6b1b3b0a313dca23af749a08300a.

* Add LIBRENMS_DIR variable to exec, check for permission errors

* Make sure we check for permission errors on pip install

* Fix shellcheck SC2046 missing quotations

* Make sure we install pip packages as librenms user for Python3

* revert daily.sh, update dependencies in composer

* And in the validation

* should be executable

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-11-10 10:38:50 -06:00
Jellyfrog
307313f7df
Update to Larastan 1.0 (#13466) 2021-11-02 19:43:14 +01:00
Tony Murray
5900edbf16
PHP-Flasher for toast messages (#13401)
* PHP-Flasher for toast messages
Allows customized template
removes dependency on unmaintained package using dev stability
no solution for javascript toasts yet

Use DI in places it makes sense

allow html in flashes

Use "template.librenms" as a default notification style

merge toast containers
toastr needs to be second because it will find the containr made by flasher, but the inverse is not true

upgrade php-flasher to add custom options and persistent notifications

Add dark theme

* update composer.lock
2021-10-29 09:13:56 -05:00
Tony Murray
0b8b97bb68
Push Notifications (Mobile and PC) (#13277)
* Update manifest and add service worker
cleanup icons a bit

* Push notifications WIP

* navigate working

* cleanup

* acknowledge wired up

* Set VAPID keys on composer install

* Component to control notification permissions.

* Allow all user option to validate

* Enable on browser load if transport exists.

* Check for transport before showing user permissions
translations

* Documentation

* style fixes

* access via the attribute model

* fix alerting test

* update schema

* cleanup subscription on disable

* non-configurable db and table for webpush subscriptions (respect system connection)

* revert AlertTransport change
hopefully phpstan can figure it out

* phpstan fixes

* Support custom details display

* Match transport names to brand's preferred display

* less duplicate id errors

* Tests are done in Laravel code now so
remove legacy function usage... could be better, but ok

* Style fixes

* Style fixes 2

* Fix alert test

* Doc updates requires HTTPS and GMP

* unregister subscription when permission is set to denied

* cleanup after user deletion

* delete the right thing

* fix whitespace

* update install docs to include php-gmp

* suggest ext-gmp

* update javascript

* Update functions.php

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2021-10-06 07:29:47 -05:00
Tony Murray
d443d2b4b1
Use built in trusted proxy functionality (#13318)
* Use built in trusted proxy functionality
instead of fideloper/proxy

* my favorite style rule...

* hello braindead ide

* restore space
2021-10-03 14:13:20 -05:00
Tony Murray
d022bd11c6
Restore trusted proxy package (#13317) 2021-10-03 09:56:58 -05:00
Jellyfrog
9ef94323f5
Update dependencies (#13310)
* Bump composer dependencies

  - Upgrading brick/math (0.9.2 => 0.9.3)
  - Upgrading composer/ca-bundle (1.2.10 => 1.2.11)
  - Upgrading composer/composer (2.1.3 => 2.1.8)
  - Upgrading composer/xdebug-handler (2.0.1 => 2.0.2)
  - Upgrading dapphp/radius (2.5.5 => 2.5.6)
  - Upgrading doctrine/annotations (1.13.1 => 1.13.2)
  - Upgrading doctrine/cache (2.0.3 => 2.1.1)
  - Upgrading doctrine/dbal (2.13.2 => 2.13.3)
  - Upgrading facade/flare-client-php (1.8.1 => 1.9.1)
  - Upgrading facade/ignition (2.11.0 => 2.14.0)
  - Upgrading fakerphp/faker (v1.15.0 => v1.16.0)
  - Upgrading filp/whoops (2.13.0 => 2.14.3)
  - Upgrading friendsofphp/php-cs-fixer (v2.19.0 => v2.19.2)
  - Upgrading graham-campbell/result-type (v1.0.1 => v1.0.2)
  - Upgrading laravel/dusk (v6.15.1 => v6.18.1)
  - Upgrading laravel/framework (v8.49.2 => v8.62.0)
  - Locking laravel/serializable-closure (v1.0.2)
  - Upgrading laravel/tinker (v2.6.1 => v2.6.2)
  - Upgrading league/commonmark (1.6.5 => 1.6.6)
  - Upgrading league/flysystem (1.1.4 => 1.1.5)
  - Upgrading league/mime-type-detection (1.7.0 => 1.8.0)
  - Upgrading maximebf/debugbar (v1.16.5 => v1.17.1)
  - Upgrading mockery/mockery (1.4.3 => 1.4.4)
  - Upgrading monolog/monolog (2.3.0 => 2.3.4)
  - Upgrading nesbot/carbon (2.50.0 => 2.53.1)
  - Upgrading nikic/php-parser (v4.11.0 => v4.13.0)
  - Upgrading nunomaduro/collision (v5.5.0 => v5.10.0)
  - Upgrading phar-io/manifest (2.0.1 => 2.0.3)
  - Upgrading php-parallel-lint/php-parallel-lint (v1.3.0 => v1.3.1)
  - Upgrading phpdocumentor/type-resolver (1.4.0 => 1.5.0)
  - Upgrading phpmailer/phpmailer (v6.5.0 => v6.5.1)
  - Upgrading phpoption/phpoption (1.7.5 => 1.8.0)
  - Upgrading phpseclib/phpseclib (3.0.9 => 3.0.10)
  - Upgrading phpspec/prophecy (1.13.0 => 1.14.0)
  - Upgrading phpstan/phpstan (0.12.92 => 0.12.99)
  - Upgrading phpunit/php-code-coverage (9.2.6 => 9.2.7)
  - Upgrading phpunit/phpunit (9.5.6 => 9.5.10)
  - Upgrading predis/predis (v1.1.7 => v1.1.8)
  - Upgrading ramsey/collection (1.1.3 => 1.2.1)
  - Upgrading ramsey/uuid (4.1.1 => 4.2.3)
  - Upgrading seld/phar-utils (1.1.1 => 1.1.2)
  - Upgrading symfony/console (v5.3.2 => v5.3.7)
  - Upgrading symfony/css-selector (v5.3.0 => v5.3.4)
  - Upgrading symfony/debug (v4.4.25 => v4.4.31)
  - Upgrading symfony/error-handler (v5.3.3 => v5.3.7)
  - Upgrading symfony/event-dispatcher (v5.3.0 => v5.3.7)
  - Upgrading symfony/filesystem (v5.3.3 => v5.3.4)
  - Upgrading symfony/finder (v5.3.0 => v5.3.7)
  - Upgrading symfony/http-foundation (v5.3.3 => v5.3.7)
  - Upgrading symfony/http-kernel (v5.3.3 => v5.3.9)
  - Upgrading symfony/mime (v5.3.2 => v5.3.8)
  - Upgrading symfony/options-resolver (v5.3.0 => v5.3.7)
  - Upgrading symfony/polyfill-intl-grapheme (v1.23.0 => v1.23.1)
  - Upgrading symfony/polyfill-mbstring (v1.23.0 => v1.23.1)
  - Upgrading symfony/polyfill-php80 (v1.23.0 => v1.23.1)
  - Locking symfony/polyfill-php81 (v1.23.0)
  - Upgrading symfony/process (v5.3.2 => v5.3.7)
  - Upgrading symfony/routing (v5.3.0 => v5.3.7)
  - Upgrading symfony/stopwatch (v5.3.0 => v5.3.4)
  - Upgrading symfony/string (v5.3.3 => v5.3.7)
  - Upgrading symfony/translation (v5.3.3 => v5.3.9)
  - Upgrading symfony/var-dumper (v5.3.3 => v5.3.8)
  - Upgrading symfony/yaml (v4.4.26 => v4.4.29)
  - Upgrading tecnickcom/tcpdf (6.4.1 => 6.4.2)
  - Upgrading theseer/tokenizer (1.2.0 => 1.2.1)

* Update npm dependecies

* Update phpstan ignores after laravel upgrades

* Merge laravel/laravel repo changes
2021-10-02 18:04:59 -05:00
Jellyfrog
be3d3d171d
Lint: Disallow usage of deprecated functions (#13267) 2021-09-23 21:27:14 +02:00
Tony Murray
e2d1bfff54
lnms config:set ability to set os settings (#13151)
* lnms config:set works for os settings
validate against os schema (gives us path and value validation)
fix unset in config:set
json formatted output in config:get to match input parsing

* inline errors

* Check that OS exists

* Fix lock file

* Set param type

* correct method name, it no longer returns a boolean

* rename --json to --dump
tests and fixes

* fix whitespace

* missed one whitespace

* typehints

* add connection typehint

* try again
2021-08-19 18:34:19 -05:00
Jellyfrog
39eea7bdc7
Remove links to freenode (#13101)
* Remove links to freenode

* Add funding links

* Sort composer
2021-08-05 10:33:23 -05:00
Jellyfrog
e873768845
Bump larastan (#13071)
* Bump larastan

* Use php7.4 for lint test
2021-07-26 09:00:34 -05:00
Jellyfrog
49ec6aabd6
Bump tecnickcom/tcpdf dependency to support php 8 (#12816)
Also fix undefined variable error
2021-04-29 22:43:47 -05:00
Jellyfrog
89d9696fe5
Bump laravel/dusk (#12808) 2021-04-29 06:33:34 -05:00
Tony Murray
dec5485e1e
phpstan should be dev dependency 2021-04-23 10:47:18 +02:00
Jellyfrog
165c4fd53c
Enable PHPStan linter (#12678)
* Enable PHPStan linter

* Add PHPStan baseline

* Switch to Level 5

* Fix StringBlade errors with a stub file
2021-04-21 07:41:34 -05:00
Jellyfrog
14a95f47c9
Bump php-amqplib to support PHP8 (#12698) 2021-04-02 13:00:48 +02:00
SourceDoctor
75a0a5e374
Use DNS Location Record for Location (#12409)
* Use DNS Location Record for Location

* .

* .

* .

* grammar fix

* dns class

* code changes

* composer update

* add missing composer.lock update

* reposition Location record parsing

* composer update

* default yes ; change lookup order

* merge master

* .

* move Location Record Parser to Model Level

* .

* fix location record code

* Location precedence with tests
Setting from UI disables all lookups

* update composer.lock and mix-manifest.json

* Style fixes

Co-authored-by: Tony Murray <murraytony@gmail.com>
2021-02-22 11:17:40 +01:00
Tony Murray
28d69c5230
Update php packages and fix composer warnings (#12526)
composer/ca-bundle (1.2.8 => 1.2.9)
composer/composer (2.0.8 => 2.0.9)
facade/ignition (2.5.8 => 2.5.11)
filp/whoops (2.9.1 => 2.9.2)
friendsofphp/php-cs-fixer (v2.17.3 => v2.18.2)
laravel/dusk (v6.11.0 => v6.11.3)
laravel/framework (v8.24.0 => v8.27.0)
laravel/tinker (v2.5.0 => v2.6.0)
maximebf/debugbar (v1.16.4 => v1.16.5)
nesbot/carbon (2.44.0 => 2.45.1)
nunomaduro/collision (v5.1.0 => v5.3.0)
phpunit/phpunit (9.5.1 => 9.5.2)
psy/psysh (v0.10.5 => v0.10.6)
symfony/console (v5.2.2 => v5.2.3)
symfony/css-selector (v5.2.2 => v5.2.3)
symfony/error-handler (v5.2.2 => v5.2.3)
symfony/event-dispatcher (v5.2.2 => v5.2.3)
symfony/filesystem (v5.2.1 => v5.2.3)
symfony/finder (v5.2.2 => v5.2.3)
symfony/http-foundation (v5.2.2 => v5.2.3)
symfony/http-kernel (v5.2.2 => v5.2.3)
symfony/mime (v5.2.2 => v5.2.3)
symfony/options-resolver (v5.2.1 => v5.2.3)
symfony/process (v5.2.2 => v5.2.3)
symfony/routing (v5.2.2 => v5.2.3)
symfony/stopwatch (v5.2.1 => v5.2.3)
symfony/string (v5.2.2 => v5.2.3)
symfony/translation (v5.2.2 => v5.2.3)
symfony/var-dumper (v5.2.2 => v5.2.3)
symfony/yaml (v4.4.18 => v4.4.19)
2021-02-14 21:50:32 -06:00
Tony Murray
5380f996f0
Remove larapoke until they support PHP 8 (#12522)
* Remove larapoke until they support PHP 8

* Use laravel-caffeine instead
2021-02-11 23:58:50 +01:00
Jellyfrog
20b4215204
Swich links to https (#12511)
* Switch librenms links to https

* Convert librenms links in comments

* Switch gnu.org url to https

* switch php urls to https
2021-02-09 00:29:04 +01:00
Tony Murray
39217d003f
Remove PHP8 blockers in LibreNMS (#12451)
* PHP8 support
looks like one upstream package needs to be updated also.

* Sync dependencies with laravel/laravel

* remove php 8 tests for now

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2021-01-28 11:11:55 -06:00
Jellyfrog
820cf1dcca
Fix disabling of built-in commands when using ./lnms (#12308)
* Fix disabling of built-in commands when using ./lnms in production

It wasn't working correctly after Laravel upstream changes

* Use nunomaduro/laravel-console-summary

* fix command name

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-11-19 22:51:20 +01:00