239 Commits

Author SHA1 Message Date
Tony Murray
de8bcf3a6c fix: update notification for users with updates disabled (#7253)
Don't show the toast when the notification is marked as read
2017-08-29 09:32:24 -05:00
Tony Murray
0def643e09 feature: Notify about failed updates, block detectable bad updates (#7188)
* Feature: Notify about failed updates, block detectable bad updates
Ability to post notifications when the update fails.
Detect and roll back updates that will cause broken installs. (Needs testing)
Add severity to notifications, critical (2) notifications will display a toast.

This will be used for removing in-tree dependencies and raising the minimum php version.

* Improve naming a bit add phpdoc to new_notification
In case multiple notifications are created, remove them all.

* Remove notifications when update is disabled.

* update travis to use db testing

* added missing index
2017-08-26 21:35:39 +01:00
Tony Murray
b2c8f34039 refactor: Use anonymous functions for debug error_handler and shutdown_function in index.php (#7219) 2017-08-26 20:07:34 +01:00
Tony Murray
f43ad4629c remove eval() (#6648) 2017-05-17 22:38:00 +01:00
Tony Murray
683a10e723 fix: Improve authentication load time and security (#6615)
* fix: minimize session open time
page/graphs speedup part 2

Write close the session as soon as we no longer need to write to it. Prevents the session from blocking other requests.
Do not run through full authentication functions if the session is already authenticated.
Removes password from the session as well as some items to prevent session fixation from #4608.

WARNING: This will cause issues for ad/ldap users who do not have a bind user configured!

* Do no erase username when using cookie auth.
Properly close the session in ajax_setresolution.php

* write close the session as soon as possible in ajax_setresolution.php

* Remove session regeneration. It is not compatible with the current code and would require more changes.

* Totally refactor authentication.  Extract code to functions for re-use and improved readability

* Use exceptions for authentication and error logging
Tested: mysql, ad_auth with and without bind user

* fix a couple scrutinizer issues

* fix reauthenticate in radius
2017-05-15 22:18:23 -05:00
Neil Lathwood
41e7689c77 refactor: DB Updates will now file level lock to stop duplicate updates (#6469)
* refactor: DB Updates will now file level lock to stop duplicate updates

* scrut fixes

* renamed function from clear_lock() to release_lock()
2017-05-03 14:48:23 +01:00
Simon Mott
18784fdb89 webui: Updated rrdtool command output to use <pre>(#6345)
* fix whitespace display on RRDTool Command

* use a class instead
2017-04-05 07:54:55 +01:00
Tony Murray
4a705ea7e3 Fix vertical alingment of the main navbar. (#6256) 2017-03-23 16:22:50 +00:00
Tony Murray
20ae9e2ecd webui: Improve device header layout (#5990)
* webui: Improve device header layout

* Update css style version to break caches
Remove unused css.
2017-02-24 09:59:30 +00:00
Paul Heinrichs
097a827759 webui: display QR codes for API access (#5988)
* Generate qr code for api hash

Added qrcodejs ( https://github.com/davidshimjs/qrcodejs )

* Add head to modal window

* updated to use fontawesome
2017-02-23 22:19:22 -06: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
Neil Lathwood
5ae4f73ea8 webui: Added ?ver=X to LibreNMS style sheets so we can force refreshes in future (#5651) 2017-01-28 21:59:42 +00:00
Tony Murray
afe887d85e webui: New LibreNMS logo assets (#5629) 2017-01-27 18:02:49 +00:00
Richard Mayhew
47397d0083 webui: Updated icons to use Font Awesome (#5468) 2017-01-21 11:24:05 +00:00
Søren Rosiak
cdef7885aa webui: Small Best Practice Fixes 2017-01-02 00:03:23 +00:00
Tony Murray
db240cb4eb refactor: Collection and output of db and snmp stats (#5049) 2016-11-23 06:57:19 +00:00
Tony Murray
9a33464c52 refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
Neil Lathwood
b5be6e9271 feature: Added custom css and include directories which are ignored by git (#4871) 2016-10-28 05:55:40 +00:00
Tony Murray
e0cc8dfb48 Disable refreshing on window resize when $no_refresh is set. 2016-09-20 10:16:22 -05:00
Tony Murray
0351b54fb8 webui: make d_echo work in webui (#4432)
* webui: make d_echo work in webui
Remove d_print_r(), it is redundant to d_echo()
Remove d_echo calls in services.inc.php

* Switched debug check to work with nginx
2016-09-14 10:05:49 +01:00
Neil Lathwood
7dec670494 refactor: Updated a lot of references to LibreNMS - copyright still left intact (#4339) 2016-09-08 08:12:23 -05: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
laf
5f8705bd37 Changed package names 2016-08-20 12:21:13 +01: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
Tony Murray
f5f31e88ac Use namespaces for classes, take 2
CollectdColor, move into it's own file, change functions to camelCase
Plugins use LibreNMS\Plugins
2016-08-17 20:26:51 -05:00
Neil Lathwood
809969efc9 Revert "Use namespaces for classes" 2016-08-17 21:27:56 +01:00
Tony Murray
709de9a166 Use namespaces for classes
CollectdColor, move into it's own file, change functions to camelCase
Plugins use LibreNMS\Plugins
2016-08-15 14:04:39 -05:00
laf
06998420cf Updated unpolled notification to only show unpolled devices 2016-06-21 20:12:32 +01:00
Tony Murray
c7d551f6d1 Check that variables are set before using them.
This will hide ugly output for users not using a subdirectory, but may make it harder to diagnose issues for those that are.
2016-05-31 22:28:34 -05:00
Daniel Preussker
731e43bc66 Revert "[WIP] Sanity!" 2016-02-17 13:59:58 +00:00
f0o
21e94b3e3a Sanity! 2016-02-10 15:21:31 +00:00
Daniel Preussker
2b55c06d9e Revert "Variable/Environment sanity" 2016-02-10 14:31:16 +00:00
f0o
37dccb3932 First effort in bringing some sanity 2016-02-10 13:42:55 +00:00
Mike Rostermund
e2d1a8e7d9 Replaced custom utime() function with microtime(true) 2016-01-08 13:33:32 +01:00
laf
a56ccd7a74 Added option to disable lazy loading of images 2015-12-09 15:50:10 +00:00
Tony Murray
e8d5756467 Fix missing path info on nginx.
Update nginx documentation to set the PATH_INFO variable.
Avoid hacks in index.php if it PATH_INFO is already set for both nginx and apache.
2015-12-03 13:23:37 -06:00
Louis Bailleul
b1fd1b3137 Only update resolution if session variables don't exist
Tune print-graphrow.inc.php to avoid last graph going to a new line in certain cases
2015-11-26 17:13:29 +00:00
laf
e9deae1315 Centralised the date selector for graphs for re-use 2015-10-20 21:35:08 +00:00
Daniel Preussker
335a68bb98 Update index.php
Hotfix for #2007
2015-10-02 00:49:18 +00:00
Neil Lathwood
e2dfab4ca0 Merge pull request #2007 from QuxLabs/qux-issue-8
Added working memcached support
2015-10-01 17:08:03 +01:00
Daniel Preussker
afdbb2406d Added $nocache parameter
Fixed typo in caching
Excluded caching for MySQL-Authentication & /poll-log/
2015-09-30 15:20:06 +00:00
Alan Gregory
a86988605d Added Full screen Mobile support 2015-09-29 09:50:34 -03: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
laf
f091ba3877 Tidying up from rebase 2015-07-26 11:31:04 +00:00
root
c893061f51 Rebased 2015-07-26 11:09:46 +00:00
laf
8f282c5174 Tidy up + new tiles 2015-07-22 22:04:33 +01:00
laf
2f9dcc8fbd Initial dashboard, code formatting is bad + lots needs tidying up 2015-07-21 23:01:57 +01:00
laf
b3e14c9ed6 Initial setup of new map system 2015-07-20 15:10:56 +01:00