Commit Graph

77 Commits

Author SHA1 Message Date
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
7250376104 refactor: Don't access $_SESSION directly for Auth (#8513)
* Don't access $_SESSION directly for Auth

* fix style

* add property annotations
2018-04-07 21:55:28 +01:00
Tony Murray
561846a44b fix: Fiedx issues with new config init (#8242)
* Fix non-config defaults

* update processConfig and remove file
2018-02-12 09:15:44 +00:00
Tony Murray
1d777693e1 feature: New IP parsing classes. Removes usage of Pear Net_IPv4 and Net_IPv6. (#7106)
* Refactor remove use of pear Net_IPv4 and Net_IPv6

Caution, I added tests to test the functionality of the new functions, but I'm not 100% certain the replaced usages match 100%.  Please test.

Left usage in generate-iplist.php because I'm not sure the use of that script, so I didn't want to implement additional functionality to support it.

Add support for ipv6 fo ipInNetwork() function

Add phpdocs to functions
Remove accidental inclusion

Use binary operations instead of string for networKFromIp()
Tidy up binary operations in ipInNetwork()

tidy parsing cidr network

Change to a class based implementation.

Update phpdocs.
Fully catch exceptions for hex parsing.

Fix mistake.

support older phpunit versions

Fix php shifting to negative with php 5

* Fix graph authorization. Uncaught exception and checking an ipv4 against an ipv6 network == fail.

* Also remove colons from hex strings.

* Fix typo in bgp polling
Two passes of removing invalid characters from hex strings. (That way we don't mangle valid IPs)
2017-08-08 14:14:58 -05:00
Neil Lathwood
1bbbaff58b refactor: Moved ifLabel -> cleanPort and updated the usage (#6288)
* refactor: Moved ifLabel -> cleanPort and updated the usage

* added list of tags allowed

* few updates as per comments from @murrant

* Added simple unit tests

* double display for javascript popover

* Remove ifNameDescr() function
Fix realtime port page

* remove accidental temp code

* Remove double display calls in ajax tables
2017-04-04 08:08:23 +01:00
Neil Lathwood
bc72ab916e webui: Remove ifIndex from ports list and add debug button for data access (#5679) 2017-02-03 15:20:25 -06:00
Richard Mayhew
6a1fd3ec05 webui: Additional Font Awesome icons (#5572) 2017-01-25 17:42:26 +00:00
Richard Mayhew
47397d0083 webui: Updated icons to use Font Awesome (#5468) 2017-01-21 11:24:05 +00:00
Neil Lathwood
9b9c10e204 fix: Cleanup printing ifAlias (#4874) 2016-12-12 14:25:48 +00:00
Tony Murray
ead6b5b8ac webui: Display vlans for all devices. #4349, #3059 2016-10-11 08:05:34 +01:00
Bennett Blodinger
07574b27d8 Move to Font Awesome
Keeps the look more in line with the navigation bar icons.
In the future with Bootstrap 4, Glyphicons will not be included, so this
starts the transistions away.
2016-09-22 10:44:17 -04:00
Tony Murray
8c639aa5a4 PSR2 Cleanup: /html edition
Travis tests for code conformance. Ignore warnings for now.
Fixed all errors, left most warnings.
2016-08-18 21:29:30 -05:00
Maximilian Wilhelm
4d78a0261e Update graph and port pages to use new RRD naming schema.
Signed-off-by: Maximilian Wilhelm <max@rfc2324.org>
2016-01-26 13:49:54 +01:00
laf
802d0993d9 Removed onClick from ports list 2016-01-10 17:19:58 +00:00
vizay
59b4ef7712 Added discovery and polling support for brocade VDX devices. Removed an obsolete value and check for ifAlias (in definitions and ports) since VDX nowdays report correct from ifAlias. Removed printing of interface numbers for vdx devices in the interface list since VDX devices do not report the expected ifIndex value like other switches do 2015-12-04 15:35:02 +01:00
Louis Bailleul
b48dbc9940 Only display plus sign if there is more than three neighbor interfaces
Take into account the number of ipv6 interfaces
2015-11-19 12:34:21 +00:00
Louis Bailleul
d66c18dff5 Only display plus icon if there is something to display 2015-11-19 12:09:58 +00:00
Louis Bailleul
db37acbe83 Replace left and bottom arrow icons by plus and minus icons 2015-11-19 12:01:10 +00:00
Louis Bailleul
cc9fde610d Remove unneeded changes 2015-11-19 10:02:31 +00:00
Louis Bailleul
32f97ab424 Add hide/show feature for neighbors interfaces in the device ports page 2015-11-19 09:54:26 +00:00
Richard Kojedzinszky
5669c1c3a5 Fix netcmd.php URI for installations not under root 2015-11-14 18:44:58 +01:00
laf
d825903c4e Checks if port is permitted for user before doing neighbour lookup 2015-08-23 20:01:09 +00:00
Michael Newton
f77c712bfc changes needed to run under web server subdirectory 2015-08-11 14:54:05 -07:00
Neil Lathwood
945ca7f2ea Revert "changes needed to run under web server subdirectory" 2015-08-11 21:25:23 +01:00
Michael Newton
cc0f449fc9 changes needed to run under web server subdirectory 2015-08-07 11:10:43 -07:00
Job Snijders
d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
Mike Rostermund
01cef298a7 Removed another redundant '/' 2015-05-21 15:05:49 +02:00
laf
4a9b01caf0 Added flag to disable port relationship in ports list for a device 2015-05-13 23:01:26 +01:00
Adam Amstrong
b273e04241 /// -> //
git-svn-id: http://www.observium.org/svn/observer/trunk@3240 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-25 12:24:34 +00:00
Adam Amstrong
cacf913a55 # -> / for phpdoc
git-svn-id: http://www.observium.org/svn/observer/trunk@3239 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-25 11:29:53 +00:00
Adam Amstrong
4db1454e92 move from port_id to interface_id. make ports discovery only discover. add some cleaner functions. add a tiny bit of alerting infrastructure.
git-svn-id: http://www.observium.org/svn/observer/trunk@3195 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-16 13:25:50 +00:00
Tom Laermans
866c352c5f syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@2969 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-05 16:48:06 +00:00
Adam Amstrong
1511ca3479 ports page popup on "dot1Q" showing vlans and vlan status. (i rock, right? fuck yeah i do!)
git-svn-id: http://www.observium.org/svn/observer/trunk@2789 61d68cd4-352d-0410-923a-c4978735b2b8
2011-12-15 23:32:06 +00:00
Adam Amstrong
98630a84c4 overview improvements and smoe other fixes
git-svn-id: http://www.observium.org/svn/observer/trunk@2736 61d68cd4-352d-0410-923a-c4978735b2b8
2011-11-24 15:45:49 +00:00
Adam Amstrong
cb7a0d39c7 i don't remember what i changed.
git-svn-id: http://www.observium.org/svn/observer/trunk@2654 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-05 16:22:37 +00:00
Tom Laermans
a369c442eb syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@2643 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-04 14:38:54 +00:00
Tom Laermans
2dc8b807e9 syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@2642 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-04 09:10:21 +00:00
Adam Amstrong
a8e6e7b0e9 fixes. speed improvements.
git-svn-id: http://www.observium.org/svn/observer/trunk@2602 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-28 16:47:12 +00:00
Tom Laermans
5872ccac1b more url fixies, yay for generate_port_url
git-svn-id: http://www.observium.org/svn/observer/trunk@2547 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-22 17:11:00 +00:00
Tom Laermans
9a1bee1458 more code cleanup (last commit for now)
git-svn-id: http://www.observium.org/svn/observer/trunk@2520 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-20 14:37:54 +00:00
Tom Laermans
d864ce234f kill a whole bunch of trailing spaces
git-svn-id: http://www.observium.org/svn/observer/trunk@2516 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-20 09:55:11 +00:00
Adam Amstrong
7584bba741 more migration to new URL system
git-svn-id: http://www.observium.org/svn/observer/trunk@2492 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-18 13:11:04 +00:00
Adam Amstrong
bf1d43ae65 improve efficiency of devices/ports/, add some caching, fix db profiling.
git-svn-id: http://www.observium.org/svn/observer/trunk@2349 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-19 10:02:55 +00:00
Adam Amstrong
1b956853ad cleanups
git-svn-id: http://www.observium.org/svn/observer/trunk@2340 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-17 19:21:20 +00:00
Adam Amstrong
870abb6afe fix some dbFetchCell -> dbFetchRow
git-svn-id: http://www.observium.org/svn/observer/trunk@2291 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-12 22:20:05 +00:00
Adam Amstrong
6bcc4f4e48 fix some stuff, break some stuff (ports disaply is missing some stuff atm)
git-svn-id: http://www.observium.org/svn/observer/trunk@2290 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-12 22:14:56 +00:00
Adam Amstrong
dddcf485dc fixes and visual representation of CEF switching.
git-svn-id: http://www.observium.org/svn/observer/trunk@2211 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-01 12:37:43 +00:00
Adam Amstrong
1d01f291f3 remove mysql_error()
git-svn-id: http://www.observium.org/svn/observer/trunk@2186 61d68cd4-352d-0410-923a-c4978735b2b8
2011-04-27 17:42:11 +00:00
Adam Amstrong
a0ca6706fb add tracking for port-stack
git-svn-id: http://www.observium.org/svn/observer/trunk@2185 61d68cd4-352d-0410-923a-c4978735b2b8
2011-04-27 17:41:35 +00:00
Adam Amstrong
6a2b9bc711 format mac for ports list
git-svn-id: http://www.observium.org/svn/observer/trunk@2154 61d68cd4-352d-0410-923a-c4978735b2b8
2011-04-24 01:54:30 +00:00