58 Commits

Author SHA1 Message Date
Tony Murray 7c4fac489a Fix issues cause by new location and other misc (#9490)
* Fix issues cause by new location and other misc
fix some queries so we return devices with null locations
remove unnecessary query of all ports on ports page lists
make locations menu available to non-admins for the legacy menu
fix a few issues with the old network-map

* fix graphs

* fix oxidized query
2018-11-29 13:04:11 -06:00
Tony Murray 3e35ee0e7d Refactored and update Location Geocoding (#9359)
- Fix location so it is a regular database relation (this allows multiple devices to be accurately linked to one location and saves api calls)
- Parse coordinates from the location more consistently
- Add settings to webui
- ~~Used [PHP Geocoder](http://geocoder-php.org/), which has lots of backends and is well tested. (also includes reverse and geoip)~~
- Google Maps, Bing, Mapquest, and OpenStreetMap supported initially.
- Default to OpenStreetMap, which doesn't require a key.  They will liberally hand out bans if you exceed 1 query per second though.
- All other Geocoding APIs require an API key. (Google requires a credit card on file, but seems to be the most accurate)
- Update all (I think) sql queries to handle the new structure
- Remove final vestiges of override_sysLocation as a device attribute
- Update existing device groups and rules in DB
- Tested all APIs with good/bad location, no/bad/good key, and no connection.
- Cannot fix advanced queries that use location

This blocks #8868

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.
2018-11-28 22:49:18 +00:00
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
Neil Lathwood 8038b6fe7a webui: Fix the all ports search for fSpeed -> ifSpeed (#8759) 2018-05-23 19:13:13 -05: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 214472ba89 refactor: rename array_sort() to avoid function collision (#8494) 2018-04-01 21:27:41 +01:00
Neil Lathwood 61c9035074 fix: Handle escaping output within bootgrid form (#8108) 2018-01-20 22:26:31 -06:00
crcro c14acfd410 webui: ports pages cleanup (#8040)
* ports pages cleanup

* removed useless html span tag
2018-01-08 13:54:21 -06:00
crcro 3f0ad0360e webui: Ports table refresh (#7827)
* initial release

* removed duplicate div tag

* deleted ports reworks

* more header optimizations, added status entries

* more header optimizations, added status entries

* added purge all, testing needed, try once again to fix overflowing filtering bar

* fix purge all, another try to break option bar in two for longer inputs

* fix indentation
2017-12-24 19:58:59 +00: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 08c21b5734 remove some extra html tags (#6925) 2017-06-30 07:45:18 +01:00
Neil Lathwood 34c35f3627 webui: Updated remaining display options where we do not show sysName if hostname is IP (#6585)
* webui: Updated remaining display options where we do not show sysName if hostname is IP

* renamed function + simplified
2017-05-05 06:25:58 -05:00
Neil Lathwood da5783d917 feature: Add mysql failed query logging + fixed queries that break ONLY_FULL_GROUP_BY (#5327)
* feature: Add mysql failed query logging + fixed queries that break ONLY_FULL_GROUP_BY

* fix all schema errors and update system
2017-01-07 11:32:38 -06:00
Søren Rosiak cdef7885aa webui: Small Best Practice Fixes 2017-01-02 00:03:23 +00:00
Tony Murray d1ae83a378 webui: Paginate the all ports pages (#4401)
* feature: Paginate the all ports pages
fixes: #2705

* Stopped ports not belonging to any devices from showing up

* phpcs fix
2016-09-11 16:23:16 +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
laf fe7b88d17f Removed ignored,deleted and disabled ports from query 2015-10-26 20:07:31 +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
laf 7a872ac839 Ignored and disabled ports will not be showing in the main port list until selected 2015-06-18 23:16:53 +01:00
laf 2a11da5582 No longer show disabled ports 2015-06-09 23:21:15 +01:00
laf 5b3b6d7e60 Fixed user perms on ports page 2015-04-22 21:35:16 +01:00
f0o 6ca392a462 CSV Exports 2015-04-16 10:39:49 +00:00
laf 2c00d26a96 Fixed if statement to bring back port search bar 2015-03-01 18:42:52 +00:00
laf c1ef9b6808 Resolved a large number index issues and update Console_Color to V2 2015-03-01 18:04:57 +00:00
f0o bc4c121fb6 Removed bogus and buggy Memcached reference from html/pages/ports.inc.php to avoid duplicates. 2015-01-07 15:34:14 +00:00
laf 22dfd5f64d Updated to fix scrutinizer issues 2014-06-26 00:21:22 +01:00
laf bb7708cd03 Updated queries for non-admin users to filter devices 2014-06-25 14:51:50 +01:00
laf c26ec396cb Updated port search box and port table list 2014-06-15 19:16:06 +01:00
laf fc7404a3c4 Updates bringing forms / tables inline with Bootstrap v3, also adds Global search box 2014-01-13 10:08:59 +00:00
Adam Amstrong 1d4b392876 push more state to memcached fix sensors poller to not retry all temperature sensors where return >9000 5 times (lmsensors returns milliC, so 30000 for 30C)
git-svn-id: http://www.observium.org/svn/observer/trunk@3244 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-25 18:35:17 +00: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 ba28732c3b ports sort done in php
git-svn-id: http://www.observium.org/svn/observer/trunk@3238 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-25 10:34:01 +00:00
Tom Laermans ebc03a87b2 change more tables to css colouring, some more to do but not for now...
git-svn-id: http://www.observium.org/svn/observer/trunk@3020 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-10 17:21:49 +00:00
Tom Laermans 2667649d3c syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@2970 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-06 13:56:23 +00:00
Adam Amstrong 3fcf837511 turn ifSpeed into bigint(20). add more sort options to /ports/
git-svn-id: http://www.observium.org/svn/observer/trunk@2702 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-27 09:23:12 +00:00
Tom Laermans a0a1939995 more title sets
git-svn-id: http://www.observium.org/svn/observer/trunk@2691 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-18 14:41:19 +00:00
Adam Amstrong 7ca62bbe04 changes (though i remember not what)
git-svn-id: http://www.observium.org/svn/observer/trunk@2687 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-17 10:33:06 +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 327060cec3 fix ports page sort (oops!)
git-svn-id: http://www.observium.org/svn/observer/trunk@2598 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-27 13:28:06 +00:00
Adam Amstrong 6529d41ce6 sort ascending when sorting on host/port names
git-svn-id: http://www.observium.org/svn/observer/trunk@2592 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-27 09:12:25 +00:00
Tom Laermans 93e2714438 le sigh
git-svn-id: http://www.observium.org/svn/observer/trunk@2586 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-26 16:36:51 +00:00
Adam Amstrong 9ca0bb970d sort on ports
git-svn-id: http://www.observium.org/svn/observer/trunk@2584 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-26 16:31:13 +00:00
Adam Amstrong e394048ee4 css changes. fixes to graph browser.
git-svn-id: http://www.observium.org/svn/observer/trunk@2573 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-26 12:16:05 +00:00
Tom Laermans 13f95c65ec code cleanup ports page
git-svn-id: http://www.observium.org/svn/observer/trunk@2526 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-20 16:03: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
Tom Laermans 441c86304d fix td width issue on ports page, at least on my firefox6/lnx
git-svn-id: http://www.observium.org/svn/observer/trunk@2514 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-19 14:05:17 +00:00