Commit Graph

252 Commits

Author SHA1 Message Date
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
2f2cd3404c installer fixes 2020-06-29 00:58:29 -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
Tony Murray
229a501d4f refactor 2020-06-27 07:47:08 -05:00
Tony Murray
5f0388f0e3 Remove DB credentials from config.php
Better validation when config.php does not exist

Update docs and quote password

only populate legacy vars in config_to_json
drop .travis.yml config copy
remove credentials from config.php.default

Check for existance of .env instead of config.php in python scripts

legacy credential cleanup

tiny cleanups

consistent env for artisan server and artisan dusk
2020-06-27 07:47:08 -05:00
Tony Murray
610475356f ajax step status check standardized 2020-06-27 07:47:08 -05:00
Tony Murray
c750107906 Refactor to a simpler style 2020-06-27 07:47:08 -05:00
Tony Murray
27027428fa config file writing 2020-06-27 07:47:08 -05:00
Tony Murray
3415cb5272 user creation error handling 2020-06-27 07:47:08 -05:00
Tony Murray
adf3afdaca run through and refinement 2020-06-27 07:47:08 -05:00
Tony Murray
94a71f9f41 check for INSTALL environment var 2020-06-27 07:47:08 -05:00
Tony Murray
c408f39e5b check for INSTALL environment var 2020-06-27 07:47:08 -05:00
Tony Murray
f601ad6d93 dynamic steps WIP 2020-06-27 07:47:08 -05:00
Tony Murray
a3a8a6ae67 port to Bootstrap4 for flexbox 2020-06-27 07:47:08 -05:00
Tony Murray
70ebf419b2 WIP migration 2020-06-27 07:47:07 -05:00
Tony Murray
f86f4ba307 style reorgs 2020-06-27 07:47:07 -05:00
Tony Murray
36a621a108 round buttons? 2020-06-27 07:47:07 -05:00
Tony Murray
d943df40db user create + db migrate 2020-06-27 07:47:07 -05:00
Tony Murray
cc7902c084 WIP 2020-06-27 07:47:07 -05:00
Tony Murray
dbbd0e9867 db wip 2020-06-27 07:47:07 -05:00
Tony Murray
21aadc1a48 more style tweaks, will probably dump the table 2020-06-27 07:47:07 -05:00
Tony Murray
2221c0cfc2 slight style improvements
checks partial
2020-06-27 07:47:07 -05:00
Tony Murray
72efd7bbd9 structure and better middleware 2020-06-27 07:47:07 -05:00
Tony Murray
ad2da9fcdb Install to Laravel WIP 2020-06-27 07:47:07 -05:00
Tony Murray
9372074b6d
Merge pull request #11728 from yac01/master
Feature: F5 LTM bandwidth controller
2020-06-19 13:39:36 -05:00
Tony Murray
cd9c349297
Allow device url by hostname (#11831)
* Allow device url by hostname
/device/hostname
/device/hostname/ports

* slightly different code style
without else ;)
2020-06-17 22:13:06 +02:00
louis-oui
80aca5eec9
Fix availability map downtime (#11638)
* fix

* fix widget

* fix widget

* fix widget

* fix

* last_polled fix

* factorize down / up time device

* factorize down / up time device

* factorize down / up time device

* factorize down / up time device

* factorize down / up time device
2020-06-15 23:53:48 +02:00
Tony Murray
435432e540
Merge pull request #11829 from murrant/device-sort-downtime
Devices List: Sort downtime and uptime
2020-06-15 13:03:45 -05:00
Tony Murray
4e95f667df
Merge pull request #11830 from murrant/device-not-found
404 when device does not exist
2020-06-15 13:03:17 -05:00
Tony Murray
f18e7f5a20 work for mysql 2020-06-15 10:50:29 -05:00
Tony Murray
d1f66bfe97
Merge branch 'master' into device-sort-downtime 2020-06-15 10:33:53 -05:00
Tony Murray
1d3664702a 404 when device does not exist 2020-06-15 10:32:07 -05:00
Tony Murray
605e6f5098 Devices List: Sort downtime and uptime 2020-06-15 10:03:16 -05:00
Tony Murray
853fbf632e Fix table sorts not working
Define sortable fields for all table controllers
2020-06-15 09:50:21 -05:00
Tony Murray
67e637e4ca
Maintenance Windows: recurring now works overnight (#11389)
* Alert Rules use Carbon
Use carbon for time queries, need to be careful of timezone quirks.  Timestamps won't have that issue

* Convert existing schedules to UTC

* we only need start end... we already have start/end

* Make AlertSchedule::isActive work

* Table display working (and using Eloquent)

* Schedule creation updated

* WIP

* use Eloquent mutators/accessors

* recurring_day mutator/accessor

* WIP UI

* Fix SQL to handle outside times

* fix up some ui issues

* Convert alert-schedule to new style
Improved sorting customization

* fix whitespace

* support sqlite

* Fix schedule creation missing id

* Fix Device::isUnderMaintenance() add location relation
2020-06-14 16:35:50 -05:00
Tony Murray
4b4f321680
Fix external auth auto-login (#11813)
* Fix external auth auto-login
rename auth middlewares so LegacyExternalAuth is registered on the Auth::routes() login route.

* External auth before authenticate
2020-06-12 16:06:50 -05:00
Tony Murray
13ade9ab6c
Merge branch 'master' into alerts-carbon 2020-06-12 07:48:51 -05:00
SourceDoctor
db38c27986
Widget hide-show search Field (#11729)
* Widget hide-show search Field

* remove uneeded row - cleanup
2020-06-11 13:59:08 +02:00
dupondje
4611b19ae5
Fix Rancid GIT (#11795) 2020-06-09 09:01:44 -05:00
Tony Murray
300645388f
Dispatcher Service settings (#11760)
* Poller settings WIP

* Poller settings WIP2

* working on SettingMultiple

* setting multiple working

* settings sent with all required info

* fix translation

* Fix keys

* fix groups setting

* Apply settings to service
fixes and validations for setting

* don't error when no poller_cluster entry exists

* hid tab when no poller cluster entries

* Authorization

* make prod

* daily maintenance toggle should be advanced

* Update schema def
2020-06-08 08:27:03 -05:00
Tony Murray
147ba0f00d
Fix latency tab bugs (#11787)
when there is no latency data
fix smokeping error
2020-06-07 23:18:18 -05:00
Tony Murray
5c6c8844e8
Auth middleware refinement (#11767)
* auth middleware group

* dummy page for legacy php scripts instead of recursively calling init.php

* Test and fix routing scenarios

* fix api auth

* disable unused auth routes
2020-06-05 11:50:58 -05:00
TheGreatDoc
c232cf0e2b
added colour priority to the label column (#11607) 2020-06-04 22:25:34 -05:00
Yacine BENAMSILI
fa52264de2 Fix: F5 LTM bandwidth controller 2020-05-28 23:15:35 +02:00
SourceDoctor
f92caf8cf7
Fix - Seperate default poller id and distributed poller groups (#11584)
* Seperate Setting for default poller id

* revert change

* Travis restart

* fixes
2020-05-24 17:55:11 -05:00
Jellyfrog
b09bc07f8f
Laravel 6.x (#11397)
* Update Laravel core files

Fix app/Http/Kernel.php

* Use RouteServiceProvider::HOME

* Sync Laravel default config files

* Update composer dependencies to Laravel 6

* fix resources/lang/en/validation.php

* Manually fixing tests

required by travis, fails locally???

* Update wpb/string-blade-compiler

* Add new viewany() authorization policies

* Update minimum PHP version to 7.2

* Re-generate our json test-dumps

Due to:
https://github.com/laravel/framework/pull/16069
https://github.com/laravel/framework/pull/31100

* update truenas data

* fix truenas

Co-authored-by: Laravel Shift <shift@laravelshift.com>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-05-23 12:05:18 -05:00
SourceDoctor
9272cb3b92
Enumerate Alert Level (#11652) 2020-05-22 20:08:05 -05:00
Facundo Caselles
2f86c66afa
WebUI - Improved "dark" theme (#11417)
* -Real dark mode, (themed bootstrap)
-removed inverted colors in navbar

* Test data

* FIX: navbar in mono theme.

* Dark mode rrdtool

* Changed background on gridster to match background of the dark theme

* - Icons and links now are grey
- Modernized tabs style into pills,
- button pagemenu-selected fixed

* Improvements:
- bootgrid-th, are now visible (dark mode to the table headings)
- Changed line color of poller and ping in rrdtool

* Fix some codeclimate errors

* Fix airos.snmprec, reverted to original file
2020-05-21 19:04:54 -05:00
Tony Murray
266e80ef54
Show Laravel version in about (#11641)
* Show Laravel version in about
We haven't used silk icons in a long time...

* a few cleanups and links
2020-05-20 17:33:31 -05:00
Tony Murray
d5a52ca4eb
Fix various issues with loading os definitions (#11640)
* Ping only device doesn't display
if os was set to something, ping os wasn't loaded and we try to get overview graphs from it.

* Fix snmp_disable device page load error
When other os is set.

* Revamp os setting loading
the only safe way to access is Config::getOsSetting()

* Remove getOsSetting fallback behavior
Most instances don't use it and it can have unexpected results Config::getOsSetting('blah', 'group') == 'librenms'

* refactor and remove unneeded load_os/loadOs calls now since getOsSetting automatically loads it.

* restore unix overview graphs, they are different
small cleanups

* fix
2020-05-19 14:35:32 -05:00
SourceDoctor
60b0ffbd63
Only Show in TopInterfaces Devices which are up (#11578)
* Only Show in TopInterfaces Devices which are up

* change to macro
2020-05-09 08:47:32 -05:00
SourceDoctor
e170529692
Python3 Module Dependency Check (#11544)
* Python3 Modul Dependency Check

* code climate

* binary existance check

* move Python Modul Version Check

* .

* adding verbose argument

* args parser nicement

* enhance Validator for detailed approvements

* Update Python.php

* Update check_requirements.py

* python version to Version class
use Process

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-05-06 10:58:17 -05:00
Tony Murray
c48943550b
Fix port permissions (#11560) 2020-05-06 09:12:33 -05:00
Tony Murray
17a8046595
Fix vmhost device page link (#11553) 2020-05-05 09:30:26 -05:00
Tony Murray
65a55dcde2
Sort Top Devices widget descending by default (#11534) 2020-05-02 12:09:41 -05:00
Tony Murray
b8248ac1ee
Fix show config (#11506)
if the exclude checkbox had been checked in anyway, it always hides.
2020-05-01 22:32:55 -05:00
Tony Murray
3e08e6d6d7
Restore hidden ports tab (#11502) 2020-04-29 23:38:31 -05:00
Tony Murray
055abcf443
Device page dropdown hero button, Performance -> Latency (#11328)
* Throw some shit together, rough outline.

* Reorganize tabs, use tab controllers

* Implement performance (into the latency tab)

* Update resources/views/device/header.blade.php

Co-Authored-By: Jellyfrog <Jellyfrog@users.noreply.github.com>

* Add more tabs

* All controllers created

* Implement routes

* Implement smokeping

* routing and auth

* fix smokeping check

* Implement device dropdown menu

* Update deviceUrl to new style

* Use Gates

* Fix style

* use more appropriate gates

* add show-config gate
remove Laravel helper

* Only show vlan tab if VLANs exist for the device :D

* Fix rancid file check will return false

* revert over-zealous file name changes

* don't need to request the location parameter, just cast to string to avoid bugs when not found

* Move latency tab (ping/performance) to the position of performance instead of ping.

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2020-04-29 07:25:13 -05:00
Tony Murray
fc0c357b23
Toggle dashboard editor without refresh (#11455)
also removes needless route
2020-04-24 22:29:44 -05:00
SourceDoctor
cc2894c0df
Widget Eventlog Sensors Link and Mouseover functionality (#11380)
* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* Widget Eventlog - Sensors link and overlib Image

* travis fix

* handling via AppServiceProvider

* collect function

* Travis ...

* static list of Sensor Types

* adding all sensor graph_types

* remove collect

* correct getTypes - remove change to lower case

* class sensor_descr switch

* class sensor_descr switch - revert

* Use standard sensor type names

* move types to attribute list

* going back to changes from 9eee7fad58

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-04-19 12:57:49 -05:00
Tony Murray
1c08c11a77
Remove Laravel helpers (#11428)
* Remove Laravel helpers

* Replace qualifier with import
2020-04-18 00:37:56 +02:00
Tony Murray
b6cc2063d0
fix whitespace 2020-04-14 09:41:07 -05:00
Tony Murray
d4ce98a5d9 Convert alert-schedule to new style
Improved sorting customization
2020-04-11 18:03:19 -05:00
SourceDoctor
f7c85fedfa
Toggle visibilty of Dashboard Editor (#11321)
* Toggle visibilty of Dashboard Editor

* code climate

* reposition Menu point

* add Dashboard Menu

* unclickability ob Dashboard menu

* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* update to Frontend rewrite

* globalize hide_dashboard_editor variable

* .

* .

* remove legacy code

* update link path to laravel routing

* Travis ...

* Travis ...
2020-04-10 14:34:44 +02:00
Tony Murray
7d2a1ae799
Display custom types as in the config file (with ucwords) (#11367)
* Display custom types as in the config file (with ucwords)

* filter same line
2020-04-02 23:38:38 +02:00
Tony Murray
3dae7784de
Protect against plugins that leak output (#11364)
* Protect against plugins that leak output

* comment
2020-04-01 11:03:20 -05:00
Jellyfrog
daf451cef7
Convert overview page to laravel (#10757)
* Convert overview page to laravel

* Convert more pages

* More fixes
2020-03-31 23:03:02 -05:00
Tony Murray
e323074416
Top Interfaces, exclude invalid ports (#11338) 2020-03-24 12:36:19 +01:00
SourceDoctor
40062e0e08
Widget - show selected DeviceGroup in Title (#11299)
* Widget Top - show selected DeviceGroup in Title

* now for all Widgets

* change if statement
2020-03-23 19:23:04 -05:00
SourceDoctor
8c5e03423c
Fix: Widget - Device specific mouseover (#11325) 2020-03-23 08:45:20 -05:00
Tony Murray
425ac28bab
Fix js warning in settings, update js deps (#11324) 2020-03-22 19:30:58 +01:00
Tony Murray
43a8616efd
Some Poller page cleanups (#11287)
* Some Poller page cleanups
Some queries loaded all devices into memory and the counted them, we should have sql count them if we only need a count.
Models should be singular
Use named routes for url generation
Try to keep presentation and data collection separated in blade and controller.

* Update PollerController.php

* Fix style

* Fix new PollerGroup references
2020-03-22 19:29:31 +01:00
SourceDoctor
9092988f7b
Fallback to default Poller Group on delete (#11278)
* Fallback to default Poller Group on delete

* rewrite to eloquent

* replace column remove with page reload (refresh everything)

* change access verification check method

* .

* Update PollerGroups.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-03-20 10:16:49 +01:00
SourceDoctor
4e349efd11
Rewrite Poller Management to Blade/Eloquent (#11277)
* Rewrite Poller Management to Blade/Eloquent

* remove further no more needed file

* Code Climate

* Code Climate

* hardcode tabs

* change URL style

* change prefix from poller-groups to poller

* .

* parameter fix

* Refactor to use more direct routing.
remove switch statement.

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-03-13 20:58:37 +01:00
Tony Murray
82eddfcf27
Sort Settings by translated names (#11280)
If browser language is different from the language set in LibreNMS, it might sort slightly incorrectly.
2020-03-12 11:39:06 -05:00
SourceDoctor
6d9deedcc1
Maintenance Mode for a complete Location (#11089)
* Maintenance mode for a complete location

* updatedatabase query

* updatedatabase query

* add missing select
2020-02-03 11:26:08 -06:00
SourceDoctor
c07678d55f
Mark Devices in Maintenance Mode (#11092)
* Mark Devices in Maintenance Mode

* code climate fix
2020-02-02 08:33:01 -06:00
SourceDoctor
2bd19c655b enhance poller group management (#11073) 2020-01-27 06:17:52 -06:00
louis-oui
6931df8990 Alertlog stats dashboard widget (#10967)
* Dashboard for alertlog stats

* Dashboard for alertlog stats

* Dashboard for alertlog stats

* Dashboard for alertlog stats

* Dashboard for alertlog stats

* Cleanup

* Cleanup

* Cleanup

* date selection

* date selection

* fix js rule details

* cleanup js

* dummy commit to reload CI/CD

* dummy commit to reload CI/CD
2020-01-23 08:16:30 -06:00
louis-oui
4395b002ab Add 'alert history' widget for dashboard (#10901)
* add alert history dashboard

* add sql-schema

* only alert

* add settings

* add settings

* fix display alert details

* fix db-schema

* add filtering by severity

* fix code climate

* Update common.php
2020-01-23 05:27:57 -06:00
louis-oui
e3156cbef6 Support of "disable alerting" in availability map and device summary widget (#11022)
* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* merge for last release

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Hide disabled alerting device from avaibility map

* Widget device summary

* Widget device summary

* Widget device summary

* Widget device summary

* Widget device summary

* Widget device summary

* fix color in widget device summary

* fix color in widget device summary

* Commit to restart travis CI

* Commit to restart travis CI
2020-01-15 11:32:29 -06:00
PipoCanaja
ee8297df19 Extend FS switches support, handle lowerLayerDown ifOperStatus (#10904)
* extend FS switches support

* MIB compilation

* HW and Ver

* sensors and CPU

* tests

* correct version

* try to handle properly "down" as not up, for OperStat like lowerLayerDown

* try to handle properly "down" as not up, for OperStat like lowerLayerDown

* try to handle properly "down" as not up, for OperStat like lowerLayerDown

* try to replace "down" with "not up" :)

* fix other ifOperStatus checks
2020-01-15 08:28:36 -06:00
SourceDoctor
252ee125b5 highlight Device Dependency Path to Dependency Root Device(s) (#11025)
* highlight Device Dependencies down to Dependency Root Device(s)

* rename function

* better var name

* codeclimate fixes
2020-01-15 08:10:58 -06:00