372 Commits

Author SHA1 Message Date
Tony Murray 4746c3f9d0 Fix permissions bug in IRC (#12266)
* Fix permissions bug in IRC
Rename Permissions class to remove confusion with the Facade

* Fix style
2020-10-28 16:07:03 -05:00
Jellyfrog 780e74b0e1 Remove legacy password algoritms and move to Laravel standard. (#12252) 2020-10-23 09:56:17 -05:00
Hayden 397a10e73f new sensors for siteboss OS + new sensor type: percentage (%) (#11958)
* split siteboss 530 and 550 into multiple OS

* add more sensors to siteboss550 and new Percent sensor

* fix contact closure event state values

* split os polling for siteboss to siteboss530 and siteboss550

* add test unit for siteboss550, rename test unit for siteboss to siteboss530

* refactor siteboss os polling to \Librenms\OS

* implement OSPolling to Sitebos550

* force save in pollOS() to keep custom sysName during polling

* updated unit test

* update device graphs

* remove pollOS and extra save()

* siteboss550 no longer extends OSPolling

* update siteboss550 test data

* update discoverOS() to match recent os discovery changes

* styleCI changes

* fix siteboss hardware discovery; add check to OS polling if os_group .inc file exists

* collapse siteboss to single OS, implement siteboss sensors in advanced discovery

* add siteboss unit tests

* removed unneeded OS disco defs

* styleCI changes

* more styleCI changes

* split siteboss os to siteboss530 and siteboss550

* split siteboss os to siteboss530 and siteboss550

* move php polling back into yaml

* keep original siteboss OS name

* resave snmp data for siteboss OS

* resave snmp data for siteboss550 OS
2020-10-20 19:11:12 -05:00
Jellyfrog 0b6231be1b Move device exist check to prevent error (#12232) 2020-10-20 13:28:03 +02:00
SourceDoctor b32aa03d57 Fix return value on deleting a Device Group (#12225)
* Fix return value on deleting a Device Group

* style fix
2020-10-19 12:27:17 +02:00
Tony Murray 0de03ad582 validate dashboard id (#12219) 2020-10-15 12:43:24 -05:00
Jellyfrog 3bfafc857f Convert Device>vlan view to Laravel (#12163)
* Convert Device>vlan view to Laravel
2020-10-14 19:40:44 -05:00
Negatifff 173ca83018 Refresh in widget settings (#12127)
* add timeout for widget in widget settings

* forgot get saved timeout and added default value for all widgets

* code correction

* move refresh to json

* forgot remove old code

* added refresh validate rule

* fix empty refresh for exist widgets

* fix empty settings for new widgets

* Set refresh in base
Update refresh at runtime (doesn't interrupt previous timeout)

* Update WidgetSettingsController.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-10-02 08:52:04 -05:00
Tony Murray 863fb96205 Scheduled maintenance test (#12171)
* alert schedule test

* Fix style

* Skip broken tests for now
2020-10-01 03:00:42 -05:00
Jellyfrog 0e99b472c2 Add Blade Submenu component (#12159) 2020-09-29 23:11:05 -05:00
Tony Murray 93e43d09bc Update dev:check style to use php-cs-fixer (#12132)
* Update dev:check style to use php-cs-fixer

* dont override default paths

* Update .php_cs

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2020-09-23 20:54:00 -05:00
Orsiris de Jong 9b9b26a007 Make sure 1st admin user creation does not fail with error 500 (#12119)
* Make sure 1st admin user creation does not fail with error 500

* Update MakeUserController.php

just init it to the default fail message

* Update MakeUserController.php

* just struggling with the github editor :P

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-09-22 07:41:52 -05:00
Jellyfrog 29f45ca352 Apply fixes from StyleCI (#12124) 2020-09-21 15:59:34 +02:00
Jellyfrog 0d56bbd946 Apply fixes from StyleCI (#12123) 2020-09-21 15:51:53 +02:00
Jellyfrog 77c531527c Apply fixes from StyleCI (#12117)
* Apply fixes from StyleCI

* Disable style check
2020-09-21 14:54:51 +02:00
SourceDoctor 65b294c7cb Fix to show Routing Count in Pagemenu Selector (#12111) 2020-09-20 01:24:53 +02:00
Tony Murray 941037e44e Convert OS discovery to new style (#12099)
* terra

* airos

* port cisco os polling
old wwan polling was broken and deprecated anyway

* enterasys

* Brother, a few changes

* AW Plus

* Fabos

* set expected test data

* 3com

* Adva FSP150

* advantech

* airos-af

* aix

* akcp

* allied

* allworx and missed mibs

* anyos

* fixup some zyxel shared stuffs
zywall graph polling

* aos

* apc

* apex

* apsoluteos

* fix copyrights

* arris

* arris

* aruba-instant

* ArubaOS

* Ascom

* asuswrt-merlin, ats

* audiocodes

* avocent

* avtech

* barracuda

* binox

* boss

* canonprinter

* cdata

* ceraos

* ciena-waveserver

* fix 3com

* fix airos

* fix brother yaml?

* fix aos more

* fix and improve apc

* fix arista test data

* yaml discovery (basic)

* cimc

* mib not used

* remove old discovery file

* ciscosat

* ciscosb fixes + improvements

* comware

* ctm

* cumulus

* cxr-ts

* cyberoam-utm

* cyberpower

* dahua-nvr

* dasan-nos

* datadomain

* dcn-software and fallback oids

* dd-wrt

* dell-laser

* d*

* e* and location

* forti, post processing, oid coalescing

* Freebsd array of sysDescr regex

* finish f*

* g*

* h*

* i* WIP

* i*

* Junos

* j*

* k*

* unix refactor previous to yaml more
inject $device

* fixes

* fixes

* l*

* m*

* n* ability to set other fields in regex
tnmsne polling to eloquent

* o*

* p*

* q* + bonus calix

* r*

* s* WIP

* s*

* t*

* u*

* v*
rework vrp to yaml (hybrid)

* w*

* x*

* z*

* a* easy no-data

* fixes

* style fixes

* missed ApexPlus

* fix signature

* Add missing location data

* rename getDevice functions

* add new cisco ftd data

* update docs

* revert sill snmp format

* fix snmp options

* update for new smartax test data

* rebase dsm

* fix voss
2020-09-18 15:12:07 +02:00
Adam Bishop bbdb1a2a5d Rewrite smokeping script to be an lnms command (#11585)
* Rewrite smokeping script to be an lnms command

* Add a default number of probes for smokeping

* Formatting fixes

* Refactor to simplify a couple of methods

* Fix a name collision when using more than 60 threads

* Simplify

* First pass at documentation

A few climate fixes too.

I'm a little dubious about the + LibreNMS fix - it could be included
in /etc/smokeping/config if it is really needed, but it sounds like
(looking at git blame) it's needed for if the script generates a broken
configuration file.

I'm thinking we should just not generate broken config.

* Improve testability and add some tests

* Load laravel to make translations available

* Second pass at documentation

* Fix brace

* Extend the device factory to include the type

Also adds a device group fake I created before I realised I didn't need it

* Mimic gen_smokeping.php a little more closely

* Update tests to properly verify old and new behaviour against each other

* Replace gen_smokeping with a wrapper

* Don't double whitespace

Render does this automatically.
Explicitly order by hostname too.

* Make faker less likely to generate duplicates

I tried adding a unique constraint here, but it didn't have the
intended effect.

Extending the hostname like this seems to work fine - I tried
generating 10 million hosts and got no duplicates, compared to
duplicates appearing with as few as 100 hosts without this
 change.

A true fix would be to add an 'fqdn' fake upstream.

* Make the tests more robust

* Assorted bug fixes

* Style corrections

* Handle 'generic' devices

* Fix an issue that came up during rebase

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-09-18 00:04:54 -05:00
Nathan Lam 10378f0dad Use overwrite_ip when set on devices for ping checks (#12022)
* Use overwrite_ip when set on devices for ping checks

* style changes

* fix issue with overwriting tier 1 devices by moving the overwrite_ip check further upstream

* style fixes

* use poller target instead of custom function

* style fixes
2020-08-26 21:55:01 +02:00
SourceDoctor a4d1f5e1c8 Show Device Outages as Log List (#12011) 2020-08-18 20:02:56 +02:00
Jellyfrog abc0ca85f6 Add default values to cast (#11977)
Makes the SQL query correctly select id columns as int instead of string
2020-08-04 14:41:10 +02:00
Jellyfrog cb0034d6a1 Restore device inventory logic after 055abcf (#11993) 2020-08-03 20:42:10 -05:00
Tony Murray a413187564 Fix encoded html entities in page title (#11979)
* Fix encoded html entities in page title
Seems short sections escape the content

* extra comment for clarification
2020-07-30 00:27:10 -05:00
Jellyfrog 6dba2555a7 Convert blade to panel component (#11957) 2020-07-23 23:13:00 -05:00
Jellyfrog 2fc037ab23 Convert device notes to blade (#11952) 2020-07-22 09:18:56 -05:00
Cirno the Strongest 6448682b21 Fix missing Munin controller tab definition (#11943) 2020-07-18 18:15:19 -05:00
Jellyfrog 3759a03b0f Only flush if there is something to flush (#11927) 2020-07-13 16:24:31 +02:00
Tony Murray 0c334f130d Fix users that set a non-array for cors (#11921)
* Fix users that set a non-array for cors
combine two Env util classes

* Used the wrong thing.
2020-07-09 15:03:12 -05:00
Jellyfrog f526ba326b Laravel 7.x Shift (#11676)
* Shift bindings

PHP 5.5.9+ adds the new static `class` property which provides the fully qualified class name. This is preferred over using class name strings as these references are checked by the parser.

* Shift core files

* Shift to Throwable

* Shift Laravel dependencies
Add laravel/ui dependency
Use our fork of string-blade-compiler

* Shift config files

Default config files

In an effort to make upgrading the constantly changing config files
easier, Shift defaulted them so you can review the commit diff for
changes. Moving forward, you should use ENV variables or create a
separate config file to allow the core config files to remain
automatically upgradeable.

Restore config header comment

* Remove duplicate named routes

* add basic trust host middleware

* Trusted proxies should be default null

* Fix missed rename

* wip

* Rename routes

* Update trustedproxy.php

* Update Kernel.php

* revert trustedproxy.php

It only accepted '*' and not ['*']

* Fix tests

fake request was causing the error

Co-authored-by: Laravel Shift <shift@laravelshift.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-07-09 08:22:50 -05:00
Tony Murray 560fd71ef6 CORS settings in webui (#11912)
* Change CORS implementation
allows for upstream integration of Laravel 7

* migrate config

* skip implementing patterns for now

* Expose settings to the webui

* Make db settings apply
2020-07-08 07:36:51 -05:00
Tony Murray 44549ae63e Show poller settings even if distributed polling is disabled (#11893) 2020-07-03 00:37:37 -05:00
Tony Murray eb74af5756 Fix device up/down sort (#11891) 2020-07-03 00:36:01 -05:00
Tony Murray a312436bca Edit maintenance schedule, handle timezone properly (#11889)
Was not properly formatting to user's timezone
Also handle the case where the browser and server timezone don't match
don't show incorrect values in dialog then pop to the correct ones.
Update title on modal to be appropriate
2020-07-02 17:46:16 -05:00
Jellyfrog 5cf5627ff5 Simpler fix for 659325d5d0 (#11883) 2020-06-30 18:36:13 -05:00
Jellyfrog 659325d5d0 Prevent unauthorized access to device graphs
Users could access info for the wrong device by piggyback on port permissions
2020-06-30 13:35:45 +02:00
Tony Murray 38d0398728 fix some str_i_contains usages 2020-06-29 17:58:55 -05:00
Tony Murray 2f2cd3404c installer fixes 2020-06-29 00:58:29 -05:00
Tony Murray 3cd240daf4 Merge pull request #11870 from murrant/remove-session-validate
PHP session is no longer required
2020-06-28 20:56:24 -05:00
Tony Murray dad79ae69b PHP session is no longer required 2020-06-28 20:07:20 -05:00
Tony Murray d63b78b1af small clean ups 2020-06-27 07:47:08 -05:00
Tony Murray 46f0ad2110 style fixes 2020-06-27 07:47:08 -05:00
Tony Murray 685d1972f1 remove hard debug 2020-06-27 07:47:08 -05:00
Tony Murray 2c82e919f6 refined finish 2020-06-27 07:47:08 -05:00
Tony Murray 691a73caa6 consistency run through 2020-06-27 07:47:08 -05:00
Tony Murray e267ec1cab step status refactor 2020-06-27 07:47:08 -05:00
Tony Murray d1ceb14b9a create .env if non-existing 2020-06-27 07:47:08 -05:00
Tony Murray b1f526be48 finish conversion 2020-06-27 07:47:08 -05:00
Tony Murray 15cd2311cc User controller 2020-06-27 07:47:08 -05:00
Tony Murray 057f4c49fc db in one refactor WIP3 2020-06-27 07:47:08 -05:00
Tony Murray 246e6741a3 db in one refactor WIP2 2020-06-27 07:47:08 -05:00