54 Commits
Author SHA1 Message Date
Tony Murray 32a7c50189 Use Laravel authentication (#8702)
* Use Laravel for authentication
Support legacy auth methods
Always create DB entry for users (segregate by auth method)

Port api auth to Laravel

restrict poller errors to devices the user has access to

Run checks on every page load.  But set a 5 minute (configurable) timer.
Only run some checks if the user is an admin

Move toastr down a few pixels so it isn't as annoying.

Fix menu not loaded on laravel pages when twofactor is enabled for the system, but disabled for the user.
Add two missing menu entries in the laravel menu

Rewrite 2FA code
Simplify some and verify code before applying

Get http-auth working
Handle legacy $_SESSION differently.  Allows Auth::once(), etc to work.

* Fix tests and mysqli extension check

* remove duplicate Toastr messages

* Fix new items

* Rename 266.sql to 267.sql
2018-09-11 07:51:35 -05:00
PipoCanaja 56aed0ffbe WebGUI Oxidized - Add author+message + refresh button (#9163)
* WebGUI Oxidized - Add author+message + refresh button

* WebGUI Oxidized - Add author+message + refresh button

* WebGUI oxidized - move refresh_oxidized_node to js/librenms.js

* WebGUI oxidized - Style upgrade for refresh button

* WebGUI oxidized - move refresh_oxidized_node to js/librenms.js

* Update showconfig.inc.php
2018-09-10 09:04:39 -05:00
dupondje fbb6d35061 Added support for Rancid git (#9036)
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`


This pull req adds support for Rancid GIT backend (instead of the current supported SVN).
Not only git is preferred these days, also php-svn is non-existing on php 7+, so the only Rancid option is broken on PHP 7+, so might be nice to have this included :)
2018-09-04 22:41:51 +01:00
Richard Mayhew 357139b595 Sanitize device config returned from Oxidized (#8847)
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`

When the output of a configuration file is parsed by Geshi it replaces quotes with html codes instead of leaving them as is. I have sanitized this back in to normal output.
2018-06-27 16:10:39 +01:00
Jarkko Oranen adbd3307a4 webui: Fixed oxidized configuration fetch for empty group (#8754)
Sending an empty group to Oxidized results in it not finding a node's
configuration even though it will find it just fine when the group is
not specified.

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-05-23 20:49:09 +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 e20a242785 refactor: use Composer to manage php dependencies (#5216) 2017-01-01 09:37:15 +00: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 bf2c522c89 Move third party software to html/lib form html/includes 2016-08-15 13:16:10 -05:00
Adam Winberg 6641bb17f5 Adhering to librenms style guidelines 2016-06-09 12:35:04 +02:00
Adam Winberg 0ed7a51de3 adjust if statement syntax, as per suggestion from @murrant 2016-06-09 08:50:19 +02:00
Adam Winberg 88f5423aaf Test different hostname formats in Oxidized integration 2016-06-07 15:02:11 +02:00
Tony Murray f824fd123e Always define $config_total. Default is 1. 2016-02-12 14:44:32 -06:00
Tony Murray 564146dc8c Fix inverted diff. 2016-02-12 14:40:04 -06:00
Tony Murray 31897758e5 Restore $config['oxidized']['features']['versioning']. 2016-02-12 14:27:55 -06:00
Tony Murray cc344bf3c3 Use Oxidized's built in diffing capability. Drops the need for xdiff and one http call. 2016-02-12 14:21:55 -06:00
Tony Murray 28216f67b0 Merge branch 'master' into config_diff 2016-02-12 10:36:18 -06:00
Tony Murray aa9d4798dc Remove $config['oxidized']['features']['versioning']. I did not update the schema to remove the entry from the config table.
Update the documentation a bit.

Issue #2812
2016-02-12 10:23:49 -06:00
laf 6b7030c082 Added show/hide line numbers button to show config page 2016-02-11 23:19:56 +00:00
Tony Murray 9a2d22df0a Remove array_column() use, it requires php 5.5 2016-02-10 19:24:13 -06:00
Tony Murray 0e8ea8b6b2 Mark displayed diffs. 2016-02-10 17:16:59 -06:00
Tony Murray b5106f4e17 Generate and display diffs between versions. Clicking show diff generates a diff between the shown version and the selected version. 2016-02-10 14:51:40 -06:00
Tony Murray 89f596fdbb Fix oxidized versioning + groups
Consilidate config fetching rather than having two fetches with the first always failing when the device has a group.
2016-02-05 15:23:05 -06:00
wiad dda947449a fix if statement style 2016-01-19 10:11:11 +01:00
wiad 582c3984e5 Try to find rancid file based on both fqdn and short host name 2016-01-19 10:00:14 +01:00
Tony Murray dcd0955ab5 Oxidized: used the actual group as collected from node_info instead of assuming group == $device['os']
Left $device['os'] as a fallback.
2015-11-24 23:27:38 -06:00
laf 0a478e7ef9 Added support for Oxidized versioning 2015-09-04 01:06:16 +00:00
Job Snijders d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
laf f5d443e969 Added second check for potential path to config file 2015-06-20 19:23:43 +01:00
laf ee4aaf1749 Tidied up web interface to use standard dateformats 2015-05-22 14:05:09 +01:00
laf dc0d12936c Added support for Oxidized 2015-05-06 22:52:54 +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 f2733cf2e6 improved apc masterswitch per-port.
git-svn-id: http://www.observium.org/svn/observer/trunk@2771 61d68cd4-352d-0410-923a-c4978735b2b8
2011-12-09 11:13:20 +00:00
Tom Laermans ab2668981c Add page title changing infrastructure, do it for device tabs already
git-svn-id: http://www.observium.org/svn/observer/trunk@2690 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-18 14:27:21 +00:00
Adam Amstrong 14fca0ad07 fix links for rancid svn support
git-svn-id: http://www.observium.org/svn/observer/trunk@2679 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-11 10:58:43 +00:00
Tom Laermans fd46d7bff9 fix more broken links on device overview
git-svn-id: http://www.observium.org/svn/observer/trunk@2529 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-20 16:22:56 +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 99c6fc3e65 vastly simplified .htaccess and cleaned up how we use variables a little
git-svn-id: http://www.observium.org/svn/observer/trunk@2446 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-12 04:57:56 +00:00
Geert Hauwaerts bb98173d4d - Include dates in titlebar for svn diff's (by popular request)
git-svn-id: http://www.observium.org/svn/observer/trunk@2397 61d68cd4-352d-0410-923a-c4978735b2b8
2011-08-03 11:13:57 +00:00
Geert Hauwaerts 75ee70124d - Added SVN support for rancid. You now see a diff between previous revisions.
git-svn-id: http://www.observium.org/svn/observer/trunk@2396 61d68cd4-352d-0410-923a-c4978735b2b8
2011-07-30 12:56:48 +00:00
Tom Laermans 4bc15529d4 eradicate split() in favour of explode()
git-svn-id: http://www.observium.org/svn/observer/trunk@2054 61d68cd4-352d-0410-923a-c4978735b2b8
2011-04-11 09:22:12 +00:00
Tom Laermans 834989df95 restructure/reindent/htmlfix html pages, remove dead code
git-svn-id: http://www.observium.org/svn/observer/trunk@1897 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-17 00:09:20 +00:00
Tom Laermans 1a477eebbe device subpages cleanup, remove dead code
git-svn-id: http://www.observium.org/svn/observer/trunk@1896 61d68cd4-352d-0410-923a-c4978735b2b8
2011-03-16 23:10:10 +00:00
Tom Laermans 30bdd952ee Minor fixes, some cleanups, and standardising on echo("x") instead of echo "x"
git-svn-id: http://www.observium.org/svn/observer/trunk@1728 61d68cd4-352d-0410-923a-c4978735b2b8
2010-11-20 14:04:07 +00:00
Adam Amstrong a2e4453084 showconfig level 7 or above only
git-svn-id: http://www.observium.org/svn/observer/trunk@1033 61d68cd4-352d-0410-923a-c4978735b2b8
2010-03-17 15:26:54 +00:00
Tom Laermans 82674df959 allow lack of trailing slash in rancid config directories
git-svn-id: http://www.observium.org/svn/observer/trunk@999 61d68cd4-352d-0410-923a-c4978735b2b8
2010-03-06 01:46:36 +00:00
Adam Amstrong 949fd9777b multiple directories for rancid configs (use array instead of text variable)
git-svn-id: http://www.observium.org/svn/observer/trunk@874 61d68cd4-352d-0410-923a-c4978735b2b8
2010-02-16 20:45:40 +00:00
Tom Laermans 7bea8d4941 code cleanups
git-svn-id: http://www.observium.org/svn/observer/trunk@753 61d68cd4-352d-0410-923a-c4978735b2b8
2010-01-31 17:30:16 +00:00
Tom Laermans 20ddcab9c1 allow ignoring comments in rancid showconfig
git-svn-id: http://www.observium.org/svn/observer/trunk@752 61d68cd4-352d-0410-923a-c4978735b2b8
2010-01-31 17:03:22 +00:00