Commit Graph

182 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
8a6de3ef23 Bump version to 1.65 2020-07-03 00:50:46 -05:00
Tony Murray
014928accd
Release wording change (#11892) 2020-07-03 00:15:05 -05:00
Tony Murray
3ab0a92de9 catch config() error in a more deliberate way to prevent issues with future code changes. 2020-06-27 07:47:08 -05:00
Tony Murray
de7d0aae97 handle config() call outside of Laravel 2020-06-27 07:47:08 -05:00
Tony Murray
0175872d87 run artisan key:generate externally 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
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
27027428fa config file writing 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
cab235c3e9
Merge pull request #11841 from murrant/loadbalancers-tests
Loadbalancers tests
2020-06-26 13:51:50 -05:00
SourceDoctor
4e6a7291a2
Device Availability Calculation (#11784)
* Device Availability Calculation

* Travis fix

* .

* schema corrections

* flexible duration

* travis

* .

* .

* .

* .

* remove not needed code

* line Text to RRD

* update humantime

* .

* only set up again if device was marked as down

* set RRD area transparency

* save uptime also, to keep last availability as good as possible

* file description correction

* look for outages even if uptime > duration
2020-06-22 22:57:30 +02:00
Tony Murray
d44ff69b99 Load Balancers test 2020-06-19 13:40:02 -05:00
Tony Murray
7334f629ba Restore SQL debug output
apparently something changed with hasListeners()
2020-06-15 22:25:10 -05:00
Tony Murray
8ca0309ebf
Fix smokeping slave not found causing error (#11799) 2020-06-09 11:10:07 -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
Tony Murray
ec50217173
More release categories (#11750) 2020-05-31 16:23:14 -05:00
Tony Murray
e8dff37eef Bump version to 1.64 2020-05-31 10:48:00 -05:00
Tony Murray
4caa73089d
Set primary device in module test helper (#11749)
* Set primary device in module test helper

* unneeded one
2020-05-31 10:18:54 -05:00
Tony Murray
0bf160eddf
Fix dev:check os only tests (#11747) 2020-05-30 21:42:30 -05:00
Tony Murray
fa12c4ca2f
Fix poller enabling graphs for display (#11743) 2020-05-30 17:42:50 -05:00
Tony Murray
a184035841
left accidental change (#11710) 2020-05-26 13:21:14 -05:00
Tony Murray
e292cc98cc
Wrong snmpsim endpoint for TravisCI pre-start (#11706)
* Wrong snmpsim endpoint for TravisCI pre-start

* Fix full check parsing
2020-05-26 13:18:27 -05:00
Tony Murray
f689fcbef9
CI Helper fixes 3 (#11696) 2020-05-25 14:10:07 -05:00
Tony Murray
e7d954d7df
Fix dev:check fail-fast not returning error (#11672)
Fix dantherm definition
2020-05-23 14:43:41 -05:00
PipoCanaja
3c4751e3c7
Fix error breaking poller/discovery on my test machine (#11671) 2020-05-23 13:27:45 -05:00
Tony Murray
fb162f16b8
dev:check Fallback to full if can't get changed file list (#11667)
* ci should fail fast

* fallback to full if can't get changed file list
mostly happens if the git clone is too shallow on travis-ci

* missed
2020-05-23 10:17:26 -05:00
Tony Murray
ce21011aff
Rewrite development helper to lnms dev:check (#11650)
* Refactor pre-commit to class

* docs build

* dusk check

* ci mode for checks

* full checks

* other mysql

* make other lint checks actually work
fix pylint finding

* ci is a long opt

* fix undefined index

* dusk fully working

* ask for forgiveness, not permission

* fix whitespace

* skip dusk sometimes

* Handle 3com and other os with digits

* flags instead of if else spaghetti

* convert to command

* cleanup

* missed check

* fixes

* case

* self-check :D

* argument now

* fix bugs from refactors

* another fix

* adjust file change parsing

* refactor execut a bit

* fallback to global quiet when unknown type.

* allow quiet override for specific commands

* output cleanup

* check flow

* start of tests

* file categorizer tests and fixes

* fixes and cleanup

* skipable not implemented...

* more tests, fix bugs

* more tests and cleanup

* wrong command

* fix canCheck and set env properly

* full env fix

* don't allow dusk on user's run as it will erase their db.

* fix os option

* fix whitespace

* don't need to start server

* ci doesn't like that
2020-05-22 20:27:48 -05:00
Adam Bishop
3838549748
Fix test behaviour with PHP 7.4 on Fedora 32 (#11648)
* Handle cases where the data type is hex encoded, but the data is
not actually hex encoded.

* Test data claims 4x, but is not hex encoded

* Encode the private string

* Replace 4x|<private> with 3C707269766174653E

* Re-run save test data.

Seems some of these files might have been hand edited at some point
as fields seem out of order

* Have a trap test use a mock instead of a db query
2020-05-21 08:22:55 -05:00
Tony Murray
f1320b6510
Speed up tests by skipping pings (#11642)
* Mock fping for module tests, there is no need.
Removes some wait time.

* fixup some rrd disabling code

* oops
2020-05-19 22:08:41 -05:00
SourceDoctor
b41d262537
Application State Icons (#11630) 2020-05-19 19:21:02 -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
17698a36f0
Natural Sort Applications by Display Name (#11577)
* Natural Sort Applications by Display Name

* some optimizations

* .
2020-05-15 18:32:09 +02:00
Jellyfrog
ec57d3b669
Run artisan optimize after composer install (#11465)
* Remove unused routes

Prevents route:cache from working also

* Run artisan optimize after composer install

Helps cleaning up issues with upgrades, and also makes laravel a bit
faster

* Update composer.json

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-05-14 21:10:03 -05:00
Tony Murray
b573c9ef73
Implement OS specific information discovery (#11446)
* Implement OS specific information discovery
That way it doesn't have to be fetched during polling
Also improve discovery process, os is only detected once, in the core module.
EXA is the test os, a couple improvements there.

* Use local variable, then unset it so we don't pollute.

* fix style issues

* test and other fixes

* attribute update fixes

* Update exa data, need new source data

* null missing "os" values

* fix ftos odd character

* fix ftos odd character

* only null for new style or we will reset to null every discovery

* Move device observer to own class

* Handle location, relocate event logging

* update exa e7-2 data

* update ird test data, apparently unicode is now working.

* update Linux ntc, now uses correct icon

* Only load all os on the web, also, we can't load existing the the database isn't connected.

* only for devices that have a location

* revert ftos test data apparently

* revert ird
2020-05-14 11:27:59 -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
598c8c0848
Fix Smokeping without integration (#11548) 2020-05-06 09:13:21 -05:00
Tony Murray
c48943550b
Fix port permissions (#11560) 2020-05-06 09:12:33 -05:00
SourceDoctor
ca1c35ade0
String Nicement for RRDCached - also alphabetic sort (#11517) 2020-05-01 22:08:21 -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
84c1f1a0b6 Bump version to 1.63 2020-04-27 22:52:42 -05:00
Tony Murray
47b125b247
Fix sensor link (#11454)
used bitwise operator instead of a logical one.
2020-04-21 10:19:41 -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
PipoCanaja
ad1c7d0e19
IPv6 support for BGP peers in VRP devices (#11243)
* ipv6 support for BGP routes in VRP devices

* reverse bgpPeers array to allow VRF aware BGP

* codeclimate

* codeclimate

* codeclimate, finally

* Split VRP out of bgp-peers for readabilty

* Split VRP out of bgp-peers for readabilty

* tests

* CodeClimate

* improve function description

* improve function description

* v6data

* rebase

* space

* ipv6 support for BGP routes in VRP devices

* reverse bgpPeers array to allow VRF aware BGP

* codeclimate

* codeclimate

* codeclimate, finally

* Split VRP out of bgp-peers for readabilty

* Split VRP out of bgp-peers for readabilty

* tests

* CodeClimate

* improve function description

* improve function description

* v6data

* rebase

* space

* fixed corner case
2020-04-10 13:22:26 +02:00
Jellyfrog
19ab723167
Also count reviewer help in changelog (#11376) 2020-04-03 11:50:34 -05:00
Tony Murray
46c0587caf Bump version to 1.62 2020-03-31 20:51:06 -05:00