Commit Graph

30 Commits

Author SHA1 Message Date
Tony Murray
d1b7004fef
Severity Enum (#14620)
* Severity Enum
Replace old Alert constants

* Fix whitespace

* Additional uses

* style fixes

* Fix test too

* More missed locations

* More
2023-08-05 12:12:36 -05:00
Jellyfrog
71d740770b
Remove Log::event (#14526)
* Remove Log::event

Use the Eventlog class directly instead

* wip

* wip

* wip

* Apply fixes from StyleCI

* Update Eventlog.php
2022-11-09 09:47:19 +01:00
Tony Murray
5076deccf3
Improve the efficiency of some queries (#13974)
* Improve the efficiency of some queries
Mostly by switching from whereIn to whereIntegerInRaw.
This inserts integers directly into the query instead of using placeholders (also escapes them)

also remove extra json_encode/json_decode in PingCheck

* Fix return types

Probably will result in some missing baseline exceptions.

* Update PingCheck.php

* whitespace
2022-05-16 09:57:58 +02:00
Jellyfrog
258505ed44
Apply fixes from StyleCI (#13224) 2021-09-10 20:09:53 +02:00
Jellyfrog
26b95c0ccc
Apply fixes from StyleCI (#13208) 2021-09-08 23:35:56 +02:00
Jellyfrog
edb36fd69d
More cleanups (#12715)
* PHPDoc

* Replace Auth > Illuminate\Support\Facades\Auth

* Return inside when()

* use str_replace correct

* Misc

* dead code

* use int $port

* styleci
2021-04-08 08:14:49 -05:00
Jellyfrog
58a154d894
Fix a bunch of bugs (#12643) 2021-03-23 23:08:42 +01:00
Jellyfrog
20b4215204
Swich links to https (#12511)
* Switch librenms links to https

* Convert librenms links in comments

* Switch gnu.org url to https

* switch php urls to https
2021-02-09 00:29:04 +01: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
tamirhad
e26498ad91
Fix performance issue in loadbalancers module (#11771)
* Update Component.php

* wrong quotes

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-06-04 20:36:43 -05:00
Tony Murray
73ac93d729
Fix errors for some devices loading components (#11527)
* Test WIP

* WIP

* port getComponents to Eloquent

* port more

* simpler creation

* change to explicit arrays

* add missed file

* restore commented code

* fix inserting null value for component prefs

* Fix some bugs in setCompenentPrefs
Can't create tests without fixing bugs first :D

* another test

* another test

* Modernize setComponentPrefs

* Test for event log entries

* Fix delete event

* fix invalid values for component toggles

* status log too

* Use Setters to work around bad data, $casts doesn't do what we want.
2020-05-08 00:30:56 -05:00
nistor
8d28e40c53 Fixed issue with SNMP contexts using vlan 1002-1005 on IOS devices (#11031)
* Fixed issue with SNMP contexts using vlan 1002-1005 on IOS devices

* FIX: Component modified from NULL value
2020-01-15 12:10:02 +01:00
dGs-
80e138fa40 removed the ksort block as it was not working (#10674) 2019-10-11 01:32:25 +00:00
pobradovic08
91ac7aff7f Removed ambiguity in Component filter query (#10638)
In case we try to filter the component by it's `id`, we ran into ambiguity issue because both `component` and `component_prefs` tables have column `id`. Fixed by filtering explicitly on `component` table.
2019-09-29 19:23:53 +02:00
Tony Murray
7c4a0c7244
Try to fix some of the Component code (#9888)
https://community.librenms.org/t/devices-list-stuck-at-loading/7396
2019-03-01 08:13:32 -06:00
Tony Murray
9189928b76 use is_array() to guard against more garbage. 2018-09-13 08:19:33 -05:00
Tony Murray
867586c416 Work around for annoying Components errors. 2018-09-13 08:18:04 -05:00
Tony Murray
eeb3d58f5b Improved Logging and Debugging (#8870)
Use Log facility when Laravel is booted.
Update init.php so we can easily boot Laravel for CLI scripts. (and just Eloquent, but that may go away)
Move all debug setup into set_debug() function and use that across all scripts.
Log Laravel database queries.
Send debug output to librenms log file when enabling debug in the webui.
Allow for colorized Log CLI output. (currently will leave % tags in log file output)

** Needs testing and perhaps tweaking still.

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`
2018-07-13 23:08:00 +01:00
Tony Murray
d6db01abb5 refactor: Refactor fix php codesniffer 3.x issues (#7816)
We cannot use 3.x because it  requires php 5.4, so update to 2.9.1 or newer 2.x release.
2017-11-29 08:23:19 +00:00
Tony Murray
c36c80f486 fix: Fixed Component status log (#7723)
I have failed SQL in my log for creating entries.
Which amount to "Component Created"

It doesn't seem as though the status log is displayed/used anywhere.  Especially considering, it didn't work.  So, I would be fine with deleting it too.
2017-11-13 20:43:28 +00:00
VVelox
acd11955d2 use components for fail2ban jails list (#6221)
* add get_fail2ban_jails functions

* now do component stuff for fail2ban for tracking jails

* now use get_fail2ban_jails for getting a list of jails

* readd the accidentally deleted update app bit

* white space cleanup

* Update fail2ban component code

* remove unneeded variable
2017-03-29 22:54:02 -05:00
Neil Lathwood
1e2ab73239 tidy up some more eventlog things (#5885)
* tidy up some more eventlog things

* update sql file
2017-02-14 12:06:01 +00:00
Richard Mayhew
5bfd23e7eb webui: New eventlog severity classification (#5830)
* New event log severity model

* Revert "New event log severity model"

This reverts commit 0783527af8.

* New event log severity model

* Fixed spaces vs tabs

* Learning the format requirements

* Learning the format requirements

* Moved the colours in to the stylesheet

* change SQL file to stop conflicting

* refactor log_event so severity isn't last, but reference is.

* keep having to move the file due to new PR conflicts

* Revert "keep having to move the file due to new PR conflicts"

This reverts commit f3030e7218.

* extended support to dashboard and eventlog page

* formatting
2017-02-12 22:41:05 +00:00
Aaron Daniels
de45d8d6b4 newdevice: Added loadbalancer information from F5 LTM (#5205) 2017-01-19 08:19:11 +00:00
Søren Rosiak
17f5cfef90 Revert "F5 LTM" (#5199) 2016-12-20 09:30:49 +00:00
Aaron Daniels
efa0747564 newdevice: Added additional support for F5 BigIP LTM objects 2016-12-19 19:50:44 +00:00
Tony Murray
abc6a5b799 PSR-2 Final cleanup (#4247)
refactor: Final PSR2 cleanup
2016-08-28 23:32:55 +01:00
Tony Murray
b8e9b2d917 Implement an autoloader (#4140)
* Implement an autoloader

When cleaning up classes for psr2, things got a bit unwieldy, so I implemented a class autoloader.
I created a PSR-0 compliant LibreNMS directory and moved all classes there that made sense.
Implemented LibreNMS\ClassLoader which supports adding manual class mappings

This reduces the file includes needed and only loads classes when needed.

* Add teh autoloader to graph.php

* Add a small bit of docs
Fix incomplete class in includes/discovery/functions.inc.php
2016-08-21 14:07:14 +01:00