45 Commits
Author SHA1 Message Date
Tony Murray ef41c9fd7d Refactor FDB Tables to Laravel (#9669)
* Refactor FDB Tables to Laravel
Hopefully much better performance with large tables.
Better dns resolution (limit to 4 IPs tried per MAC)

* update style

* de-duplicate IPs

* fixed column width for mac and vlan

* Make DNS column visibility control whether or not we send the dns query.
Hide that column by default.
2019-01-20 08:43:36 -06: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
Patux 97e401888a Change _POST to vars to get params by URL on FDB search. (#8838)
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-06-21 22:31:23 +01:00
Adam Winberg 32e86eb4dd webui: Added 'dns name' and 'description' (ifAlias) in fdb search (#8554) 2018-05-24 21:31:56 +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
Adam Winberg 2ece84495d webui: Improved fdb search (#8251)
* sort fdb search by number of mac addresses/port to show most likely endpoint switchport first in list. Also add IP search to fdb search

* fix style check error
2018-04-07 20:14:28 +01:00
Tony Murray e8dd72e8db feature: Support fdb table on generic devices (#6902)
* feature: support fdb table on generic devices
refactored code to use snmpwalk_group
refactored ajax table code to use joins and reduce extra queries
add indexes for device_id and port_id, drop primary index
Make all columns sortable
Fix a few other small issues

* Add index for vlan_id since that field can be searched by the user

* fix whitespace

* Rename 197.sql to 198.sql

* set row count for table
2017-06-29 21:03:56 +01:00
Tony Murray bf0df7266a feature: Added fdb discovery module (#6887)
revert the context_name changes to snmp.inc.php and use the same method as other parts of the code
2017-06-26 13:58:17 +01:00
Neil Lathwood 54365985a6 Revert "feature: fdb tables (#6616)" (#6886)
This reverts commit 81ddab86af.
2017-06-25 07:04:04 +01:00
Lorenzo Zafra 81ddab86af feature: fdb tables (#6616)
* feature: FDB TABLES for ios and timos

* Fixed coding style issues

* renamed fdb.sql to 191.sql

* fixed travisCI issue

* FDB table discovery working on IOS

* Fixed bug: failing to insert fdb entries into database

* Fix phpcbf issue

* moved sql schema

* rename sql schema

* Add (tentative) FDB support for HP Comware switches

* build schema

* schema changes

* run build schema.......

* FBD Table discovery working on HP ComWare

* FBD Table discovery working on HP ComWare

* Add FDB support for HP Comware

* Discovery regex fix, tested and works for cisco 3750, 2960, 6509

* Use vlan_id instead of raw vlan. Remove Nokia implementation as vlans are not being discovered for it at the moment.

* Use vlan_id instead of vlan.

* Add debug messages, comware support

* Sorry.. phpunit isnt working for me

* Use a file structure instead of if statement per OS

* Make inserts to vlan table if entry does not exist.

* Rename sql schema file

* Use existing context name

Improve output and database synchronization

Remove chromephp and if ios

rename sqlfile

add comware back

update schema

* Delete TIMETRA-CHASSIS-MIB

* Delete TIMETRA-FILTER-MIB

* change index to bigint to be safe
2017-06-24 22:07:31 -05:00
Neil Lathwood 4f4719b66a webui: Updated all tables to have the same set number of items showing (#6798) 2017-06-08 22:10:30 -05: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 a402b1f450 fix: Remove duplicate hostnames in arp search box #5631 (#5641) 2017-01-28 00:37:12 +00: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
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
Daniel Preussker 731e43bc66 Revert "[WIP] Sanity!" 2016-02-17 13:59:58 +00:00
f0o c767a26732 more bulk sanity 2016-02-10 16:02:13 +00:00
Tony Murray 6f84a287b6 Fix ARP search on all ARP pages. Adapt ARP search page to use a common search variable. 2015-12-24 12:10:05 -06: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 a044782420 Final updates to fix user perms for ipv4/ipv6 and mac search 2015-07-07 23:59:13 +01:00
laf 9a43454700 Fixed mac user perm queries 2015-07-07 23:34:56 +01:00
laf b1a052f357 Some permission updates for non-admin users 2015-07-07 23:18:57 +01:00
laf 17108e6dc9 Updated search pages to fix broken elements 2015-04-21 22:39:28 +01:00
laf ad024d9055 Updated search tables for ipv4,ipv6,mac and arp 2015-04-04 11:42:30 +01:00
f0o 75d37fe478 Replace Packages-link in menubar with Packages-Search.
Rewrote inclusion code in `html/pages/search.inc.php`.
Added replacement for `:` character in versions to level out debian-version oddities.
2015-01-07 09:22:39 +00:00
f0o a5b643d251 Scrut fixes 2015-01-04 20:42:59 +00:00
f0o eadbb50695 Added Package Search 2015-01-04 19:58:37 +00:00
laf fd3ecdf42f Updated arp search page to use new MySQL pagination 2014-10-29 18:34:26 +00:00
laf 3f526b0b9e Updated IPv(4/6), mac and arp pages in overview section 2014-03-02 16:34:09 +00: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 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 613e8b1e29 syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@3117 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-02 22:02:30 +00:00
Adam Amstrong a10cb17a9a add arp search (#30)
git-svn-id: http://www.observium.org/svn/observer/trunk@3075 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-21 19:50:39 +00:00
Adam Amstrong 53a7a04fbf improve mac search
git-svn-id: http://www.observium.org/svn/observer/trunk@3074 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-21 19:50:21 +00:00
Tom Laermans 1ab62e74b8 fix MAC search
git-svn-id: http://www.observium.org/svn/observer/trunk@3022 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-10 17:24:15 +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 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 6c0d7a9c9a more db*
git-svn-id: http://www.observium.org/svn/observer/trunk@2329 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-16 09:38:44 +00:00
Tom Laermans f334e90fa7 make mac search work, fix sql injection while we're at it
git-svn-id: http://www.observium.org/svn/observer/trunk@2242 61d68cd4-352d-0410-923a-c4978735b2b8
2011-05-04 14:00:02 +00:00
Adam Amstrong a6a09b31b9 cosmetic changes to search. add starter to optionbar for health/search/services and fix routing link on menubar
git-svn-id: http://www.observium.org/svn/observer/trunk@2207 61d68cd4-352d-0410-923a-c4978735b2b8
2011-04-29 23:09:35 +00:00
Adam Amstrong c6964aec37 new mac address search
git-svn-id: http://www.observium.org/svn/observer/trunk@2151 61d68cd4-352d-0410-923a-c4978735b2b8
2011-04-24 00:28:09 +00:00