192 Commits

Author SHA1 Message Date
82f43cb98d Apply fixes from StyleCI (#12120) 2020-09-21 15:40:17 +02:00
77c531527c Apply fixes from StyleCI (#12117)
* Apply fixes from StyleCI

* Disable style check
2020-09-21 14:54:51 +02:00
e0a076455e Fix CiHelper function checkPythonExec to use 'pip3 install --user' and improve error message (#12097)
* Fix pip3 install function to use --user

* Update error message to reflect somethign closer to reality.
2020-09-16 00:30:50 +02:00
dd23dea019 Bump version to 1.67 2020-09-03 13:17:55 +02:00
f992b7dc9f Remove duplicate changelog entries 2020-08-04 14:40:10 +02:00
eaed9e8195 Don't count self-merges in changelog stats 2020-08-04 14:40:10 +02:00
baaabadd69 Fix for deleted github users 2020-08-04 14:40:10 +02:00
9fdea8c3b5 Bump version to 1.66 2020-07-30 00:27:39 -05:00
86220eed9e Add more types to settings page (#11918)
* Add a executable type to settings page

This allow us to validate the value is a valid executable

* Add a directory type to settings page

This allow us to validate the value is a valid directory

* fixes
2020-07-21 20:51:23 -05:00
c1418c12af Correct link for Rule, Location (Alerts, and several other pages) (#11937)
- wherever generate_url is used
- does not address hostname (device), separate PR for that
2020-07-17 15:32:30 +02:00
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
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
8a6de3ef23 Bump version to 1.65 2020-07-03 00:50:46 -05:00
014928accd Release wording change (#11892) 2020-07-03 00:15:05 -05:00
3ab0a92de9 catch config() error in a more deliberate way to prevent issues with future code changes. 2020-06-27 07:47:08 -05:00
de7d0aae97 handle config() call outside of Laravel 2020-06-27 07:47:08 -05:00
0175872d87 run artisan key:generate externally 2020-06-27 07:47:08 -05:00
d1ceb14b9a create .env if non-existing 2020-06-27 07:47:08 -05:00
b1f526be48 finish conversion 2020-06-27 07:47:08 -05:00
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
27027428fa config file writing 2020-06-27 07:47:08 -05:00
94a71f9f41 check for INSTALL environment var 2020-06-27 07:47:08 -05:00
cab235c3e9 Merge pull request #11841 from murrant/loadbalancers-tests
Loadbalancers tests
2020-06-26 13:51:50 -05:00
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
d44ff69b99 Load Balancers test 2020-06-19 13:40:02 -05:00
7334f629ba Restore SQL debug output
apparently something changed with hasListeners()
2020-06-15 22:25:10 -05:00
8ca0309ebf Fix smokeping slave not found causing error (#11799) 2020-06-09 11:10:07 -05:00
147ba0f00d Fix latency tab bugs (#11787)
when there is no latency data
fix smokeping error
2020-06-07 23:18:18 -05:00
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
ec50217173 More release categories (#11750) 2020-05-31 16:23:14 -05:00
e8dff37eef Bump version to 1.64 2020-05-31 10:48:00 -05:00
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
0bf160eddf Fix dev:check os only tests (#11747) 2020-05-30 21:42:30 -05:00
fa12c4ca2f Fix poller enabling graphs for display (#11743) 2020-05-30 17:42:50 -05:00
a184035841 left accidental change (#11710) 2020-05-26 13:21:14 -05:00
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
f689fcbef9 CI Helper fixes 3 (#11696) 2020-05-25 14:10:07 -05:00
e7d954d7df Fix dev:check fail-fast not returning error (#11672)
Fix dantherm definition
2020-05-23 14:43:41 -05:00
3c4751e3c7 Fix error breaking poller/discovery on my test machine (#11671) 2020-05-23 13:27:45 -05:00
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
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
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
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
b41d262537 Application State Icons (#11630) 2020-05-19 19:21:02 -05:00
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
17698a36f0 Natural Sort Applications by Display Name (#11577)
* Natural Sort Applications by Display Name

* some optimizations

* .
2020-05-15 18:32:09 +02:00
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
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
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
598c8c0848 Fix Smokeping without integration (#11548) 2020-05-06 09:13:21 -05:00