Commit Graph

321 Commits

Author SHA1 Message Date
Tony Murray
2a6342f2ca
Deploy docs direct in Travis CI (#11727)
* deploy_docs direct in travis

* forgot chmod
2020-05-28 21:52:54 -05:00
Tony Murray
46fa4eac03
Add missing bash lint script (#11700) 2020-05-26 08:28:00 -05:00
dupondje
00d00b0fce
Add Edgemax support (#11687) 2020-05-25 17:41:52 +02: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
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
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
Cliff Albert
576d155613
gen_rancid.php: support for allied telesis and cisco wlc (#11617)
* allied, radlan, ciscowlc rancid router.db configuration support
allied and radlan represent allied telesis

* tab/spaces
2020-05-15 23:47:36 -05:00
TheGreatDoc
1366bdebaf
Added ignored devices to be pinged by smokeping (#11557)
Co-authored-by: Daniel Baeza <d.baeza@tvt-datos.es>
2020-05-14 22:06:18 -05:00
Tony Murray
257d596c3b
Add python validation fix suggestions (#11563)
* add python fixes

* re-order python requirements so most important deps show first.

* Only check dependencies if we are running as the poller user
2020-05-08 09:54:30 -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
b827250e5d
Install python requirements during daily (#11486)
* install python requirements during daily

* Only check python 3

* ignore failures
2020-05-02 00:30:55 -05:00
Tony Murray
d4225806a8
Run docs tests when only docs are modified. (#11483) 2020-04-25 21:43:03 -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
e4b49f59f6
Delete ports via eloquent event (#11354)
* Delete ports via eloquent event
Chunk delete during purge all operations so we don't use too much memory.

* protect against missing device

* fix whitespace

* fetch less from the database when deleting a device's ports
fix output
2020-04-16 09:19:58 -05:00
Jellyfrog
e111fe690e
Disable xdebug on travis-ci (#11409)
* Disable xdebug on travis-ci

* Update pre-commit.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-04-12 09:11:00 -05:00
Tony Murray
217969e140
Update php-codesniffer (#11368)
* PHPCS 3.5+

* Fix newly detected style issues
2020-04-03 08:41:24 -05:00
Tony Murray
df16de9d2f
Refactor Datastores to allow future improvements. OpenTSDB Tags. (#11283)
* Datastores to object oriented code, using the Laravel IoC container

Change instantiation
better DI
move OpenTSDB

Small re-orgs

remove unused stuff

Fix graphs and other scripts

Use DI for all except rrd

fix up connection error handling

Add tests, fix up a "few" things
Add Config::forget()

Style fixes

Don't reference legacy code

remove accidental code paste

Add datastores phpunit groups

some tests

* rebase fixes

* some test fixes

* shorter tests

* shorter tests

* Don't except when rrdtool can't be started.

* restore tests

* fix rrd tests

* fix iterable change upstream

* fix isValidDataset

* fix invalid data bug

* fix mysql incorrect ds

* fix issue with data that is too long

* use regular data_update()

* Use log facade

* OpenTSDB mis-ordered arguments fix

* Making a singleton with different options makes different singletons.  Just use the global config settings to disable datastores.

* only filter tags for datastores that won't it don't modify the tags permanently

* Update copyrights to include original authors.

* Stats for all datastores

* Fix mysql sends different rrd / other ds names

* fix snmp last stats not initialized
remove unused function

* remove unused function and move single use function closer to its use

* InfluxDB does not need to update null or U values.
Skip write if all fields are empty

* Fix smart value checks

* fix style issues

* Make sure port data is stored the same way as before for Graphite and OpenTSDB
Add ifIndex tag to all to be compatible

* Missed rrdtool_tune() call

* Test update WIP

* OpenTSDB now includes tags

* fix style
2020-03-16 09:17:58 -05:00
Tony Murray
7fe895bd08
Revert "Refactor datastores to classes (#9179)" (#11273)
This reverts commit e5dad7a64e.
2020-03-11 07:52:52 -05:00
Tony Murray
e5dad7a64e
Refactor datastores to classes (#9179)
* Datastores to object oriented code, using the Laravel IoC container

Change instantiation
better DI
move OpenTSDB

Small re-orgs

remove unused stuff

Fix graphs and other scripts

Use DI for all except rrd

fix up connection error handling

Add tests, fix up a "few" things
Add Config::forget()

Style fixes

Don't reference legacy code

remove accidental code paste

Add datastores phpunit groups

some tests

* rebase fixes

* some test fixes

* shorter tests

* shorter tests

* Don't except when rrdtool can't be started.

* restore tests

* fix rrd tests

* fix iterable change upstream

* fix isValidDataset

* fix invalid data bug

* fix mysql incorrect ds

* fix issue with data that is too long

* use regular data_update()

* Use log facade

* OpenTSDB mis-ordered arguments fix

* Making a singleton with different options makes different singletons.  Just use the global config settings to disable datastores.

* only filter tags for datastores that won't it don't modify the tags permanently

* Update copyrights to include original authors.

* Stats for all datastores

* Fix mysql sends different rrd / other ds names

* fix snmp last stats not initialized
remove unused function

* remove unused function and move single use function closer to its use

* InfluxDB does not need to update null or U values.
Skip write if all fields are empty

* Fix smart value checks

* fix style issues
2020-03-10 19:08:00 -05:00
joretapoo
277333c752
space on type like "OOB Management" cause issue on smokeping, edit ge… (#11160)
* space on type like "OOB Management" cause issue on smokeping, edit gen_smokeping script to replace dot and space

* create fonction for replace dot and space

* correct indentation

* moving function to functions.php

* correct function name

* Remove function

this should not be a function...

* Remove function

* Update gen_smokeping.php

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-02-26 11:43:21 -06:00
Jellyfrog
7f7c2d3db8
Pin all pip dependencies (#11201)
Also some bash cleanup
2020-02-25 07:42:16 -06:00
PipoCanaja
63b812356d
GitHub - Add the ScreenShot hint in the PR Template (#11119)
* GitHub - Add the ScreenShot hint in the PR Template

* revert the version

checking if the tests are now running correctly without this version constraints
2020-02-09 19:29:15 +01:00
PipoCanaja
81454ee585
Fix documentation build (#11116)
* Add "markdown<3.2" to deploy-docs.sh

* pymdown-extensions<6.3
2020-02-09 15:54:06 +01:00
Jellyfrog
24546f0afe
Remove forcing of database (#10948) 2019-12-16 23:37:18 +01:00
louis-oui
35a50fa535 fix auth_test.php permissions (#10870) 2019-11-22 11:37:34 +01:00
louis-oui
ee8119d890 Fixed auth_test script does not do ldap bind (#10865) 2019-11-21 19:42:22 +01:00
Tony Murray
dec9a498ee Updated device cache support (#10795)
* Device Cache
also some additional device related models

* attribs from cache

* replace common attribute functions

* remove legacy cache usage
tidy up some collection manipulation
remove some unused or single use functions

* cleanup some items

* always return a device, to prevent bugs

* clear device cache when testing after each test

* fix double assignment

* Clean up function to take advantage of null object
2019-11-14 21:56:06 +00:00
Tony Murray
699aa8a042
Consolidate configuration settings and implement dynamic webui settings (#9809)
* initial db/defaults dump

* numeric values

* Remove $config['time']

* Use config_definitions.json

* try setting definition as a complete array

* a little more

* fix format

* WIP converting dynamic setting pages

* rewriting the webui

* remove legacy and add translations

* finish email section

* improve navigation
update js a bit

* Import the remaining existing settings

* Update backend still some wip
migration

* fix config loading (db not overriding defaults)

* some cleanup

* more array collapsing

* update settings

* Settings search

* add purge settings to ui, order groups and sections

* collapse more arrays

* Auth definitions WIP

* remove needless slash escapes

* add warning to json

* moving settings from defaults.inc

* remove slow_statistics

* Move rrdtool settings to the poller section

* Use translations more consistently

* removing more settings from defaults.inc.php

* show setting name in tooltip

* allow help text to be shown on mobile

* disable settings that are set in config.php

* Implement undo and reset to default.

* Vue.js functional

* Vue.js WIP

* Implement tabs component

* accordion WIP

* lodash ver update

* two items

* Accordion somewhat working

* hash navigation

* Refine Accordion

* Fix up tab styling a bit

* Cleaner tab selected property
Hide html while loading

* spinner?

* Icon support
property for accordion to active

* WIP

* Tabs/Sections from ajax

* Setting Component skeletons

* Dynamic Component resolution

* Basic functionality

* toggle class

* Refactor components

* translate tabs and accordions

* simple array attempt

* improve readonly tooltip

* array styling

* array value editing

* organize snmp info

* Handle initial tab/section in url

* Use Laravel to parse tab/section, dump old

* Draggable array entries

* v-tooltip, for clickable (and touch) help tooltips
disable draggable

* Navigation WIP

* Navigation WIP

* groups computed

* filter settings

* fix event reference

* vue.js i18n initial

* missing description = just setting name

* en fallback

* tidy up the language support and js generation

* persist value to db

* fix issue with 0

* Delete settings from DB instead of setting them to default

* ldap-groups
fixup style

* Default dashboard selection

* fix array of options instead of object

* allow custom validation for settings

* translate options in SettingSelect

* SNMP v3 WIP

* fix setting arrays

* Split persist out of set

* Hook up events for SNMP v3 Auth
correct Config::persist behaviour with arrays

* dependent settings (primitive for now)
actually update the settings values in the LibrenmsSettings component

* more complex "when" behaviour

* remove un-needed seeder

* add poller_modules.cisco-qfp

* remove en.json (disable warning)

* don't set default for log_dir or log_file, otherwise it won't be processed correctly

* Fix module order
add some missing settings

* more config corrections

* correct graphs
correct loading values set to null (although it should have no difference)
remove project_name_version

* Add nfsen settings.  Docs are very confusing, so might have flubbed something
remove option for array definition of select option as numeric indexes messes it up

* Correct more upstream config differences

* Config cleanup after a bunch of merges.

* Fixes

* add version tags to js/css files
remove old js

* Print out full settings list read-only

* Add http_proxy setting
fix indents in config_definitions.json

* repeaters default is 0 (aka 20)

* cleanups

* rewrite the dynamic config docs

* add language docs

* Don't show snmp v3 auth add/remove if disabled by config.php
2019-10-16 21:22:05 +00:00
Tony Murray
4a36c18e69
use testing database for capturing test data (#10635)
if available
2019-09-30 13:21:37 +00:00
Tony Murray
9c8782a7da
Fix alert and template test scripts (#10464) 2019-07-26 20:31:47 -05:00
Tony Murray
b09963782a
Fix docs build (#10461)
* Upgrade PIP to fix docs build

* Install python3 setuptools
2019-07-25 08:10:47 -05:00
Sajan Parikh
3142748a65 Updated $rancid_map For Mikrotik (#10426)
Mikrotik's in LibreNMS have an OS of 'routeros'.  Added it to the rancid mapping so the generated router.db file includes Mikrotiks as expected.
2019-07-09 20:11:10 +02:00
Tony Murray
f3ba8947f7
Use Config helper (#10339)
remove usage of global variable
2019-06-23 00:29:12 -05:00
Tony Murray
36ac5d6480
Remove console-ui (#10190) 2019-05-09 21:45:45 -05:00
Tony Murray
c36f913cfb
Don't skip style tests for os that have PHP files (#10053) 2019-04-01 15:49:55 -05:00
Tony Murray
8f48f6a7cc
github-remove updates (#9990)
additional .gitignore file to restore
maybe make work on python < 2.7
2019-03-18 21:25:16 -05:00
Cliff Albert
0ae24b22fd Added support for ciscosb to gen_rancid.php (cisco-sb) (#9940)
* fix: add support for Cisco SB switches (Cisco SG-xxx/Linksys SRW)

* changed from tab to space
2019-03-12 19:20:02 +01:00
Tony Murray
920a3a7745
Fixes to composer_wrapper proxy handling (#9819)
* Fixes to composer_wrapper proxy handling

* Use curl

* Use curl for both fetch

* Use curl for both fetch

* Update composer_wrapper.php
2019-03-05 01:07:12 -06:00
Tony Murray
f4a33c1a34
Prevent credentials from being leaked in backtrace in some instances (#9817)
* Prevent credentials from being leak in backtrace in some instances
Particularly before the user is authenticated

* fix test
2019-03-05 00:24:14 -06:00
Tony Murray
964235a82b
Restore gitignore file contents (#9784)
* Restore gitignore file contents
Set permissions to 664
Add tests to check existence, mode, and size of .gitignore files

* add trailing line return

* git only cares about executable bit, just check that.

* define gitignores separately
2019-02-06 06:57:44 -06:00
Tony Murray
9da12ee8af
Fix github-remove database dir cleanup (#9678) 2019-01-17 08:58:46 -06:00
Tony Murray
daffa7e274
Eventlog updates (#9633)
* Eventlog updates
remove host from eventlog table, retain in api
allow most fields nullable

* updated schema

* revert auth for legacy log_event function
safer check in the model

* add function modifiers
2019-01-10 00:52:00 -06:00
Tony Murray
830429ee03 Fixed .gitingore "changed" files with github-remove script (#9616)
DO NOT DELETE THIS TEXT

#### Please note

> Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting.

- [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/)

#### Testers

If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
After you are done testing, you can remove the changes with `./scripts/github-remove`.  If there are schema changes, you can ask on discord how to revert.
2019-01-06 15:36:04 +00:00
VVelox
fd573bc879 json-app-tool fix (#9593)
* add insert the metrics stuff into the right place now

* properly exit now when -l is given or -k, -m or -s is not given

* Update json-app-tool.php
2018-12-28 20:11:04 -06:00
Tony Murray
1def6897a6
allow pre-commit.php to work without changes (#9597)
* allow pre-commit.php to work without changes

* make it actually work :D
2018-12-28 20:05:52 -06:00
Neil Lathwood
a5eddc0393 Updated dlink support with additional health,mempools and processors (#9464)
* Updated dlink support with additional health,mempools and processors

* Update dlink.inc.php

* Update dlink.inc.php

* Added test data

* add tests/data/dlink_dgs-1510-28.json

* actual data for the new items
2018-12-19 11:29:00 -06:00
Tony Murray
ad41a18f5c
GitHub test script updates (#9507)
* GitHub test script updates
add --reject to apply so it will skip binary files since GitHub does not create diffs for them correctly
Add new directories to the removal cleanup. Remove non-existant ones.

* Cleaner way to apply skip png files explicitly.
That way patches are still atomic.
2018-12-05 10:48:56 -06:00
tarik
f91fca8072 fixing option to let user pick saved test data filename, exit if ther… (#9242)
* fixing option to let user pick saved test data filename, exit if there are many os/variant combination for a single output filename

* fixing style issues

* Update save-test-data.php

* Update save-test-data.php
2018-11-21 13:27:53 -06:00
VVelox
e4ac31890e add a tool for working with JSON apps (#9084)
* add initial work on script for working with json apps

* finish the code portion

* -h now done

* rename it to be slightly more accurate

* make hash key strings

* exit if -a is not present

* now exit after checking the file if -s or -t is given

* now properly add the applications key
2018-11-21 08:18:12 -06:00
Luuk Paulussen
a143452e5d Add new sysDescr string for AlliedWare Plus products. (#9430)
* Add new sysDescr string for AlliedWare Plus products.

Release 5.4.8-2.1 of AlliedWare Plus will change the format of the
sysDescr string. This patch updates Allied Telesis yaml files to work with
this change.

Signed-off-by: Luuk Paulussen <luuk.paulussen@alliedtelesis.co.nz>

* save-test-data.php: Use correct variable for 'os' argument.

Signed-off-by: Luuk Paulussen <luuk.paulussen@alliedtelesis.co.nz>

* Create awplus_5.4.8-2.json

* Update awplus_5.4.8-2.json
2018-11-20 16:57:23 -06:00