Commit Graph

47 Commits

Author SHA1 Message Date
Jellyfrog
29f45ca352 Apply fixes from StyleCI (#12124) 2020-09-21 15:59:34 +02:00
Jellyfrog
77c531527c Apply fixes from StyleCI (#12117)
* Apply fixes from StyleCI

* Disable style check
2020-09-21 14:54:51 +02:00
SourceDoctor
3474b4493d Global search MAC Address (#11434)
* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* global search - mac address

* remove unnecessary command
2020-04-19 00:33:17 -05:00
Tony Murray
204a79418c Fix global search by IP (#11395) 2020-04-08 22:46:15 -05:00
SourceDoctor
7dd688927a Global Search - IPv4, IPv6 (#11257)
* Global Search - IPv4, IPv6

* reduce DB load

* travis fix
2020-03-11 14:54:11 +01:00
Kevin Krumm
c136e1ad6c Revert "Global search by IP address (#11165)" (#11166)
This reverts commit c273ab28af.
2020-02-19 19:35:55 +01:00
Joseph Tingiris
c273ab28af Global search by IP address (#11165)
* device search by (valid) ip address

* add device_ip & not empty conditions to search results

* updated comments

* spaces after commas

* search ip and overwrite_ip for name based searches, too
2020-02-19 05:51:39 -06:00
Joseph Tingiris
13c6309e81 ajax_search.php: Fix & amend broken $num_ports query on line 83 (#11013)
* When searching from the web interface, librenms produces
production.ERROR SQLSTATE: Column not found: 1054 Unknown column
'$perms_sql' in 'where clause'

* Above feeds resources/views/layouts/menu.blade.php which, because
of the failed query, has no device_ports as a value. Thus the search
results do not produce the expected 'name ... device with X port(s)'

* As well, the previous query did not exclude deleted and ignored
ports. Therefore, the value for X port(s) was incorrect and did not
correspond to the device's ports screen.
2020-01-08 17:54:23 -06:00
Jellyfrog
b361710148 Device group based access (#10568)
* Device group based access

* Use Permissions class to resolve permissions

Also give port access based on device access

* Convert more pages to use Permissions class

* shorten config setting name
use Eloquent relationships in several places
alphabetize config_definitions.json

* Change Models and Permissions

* Clean up ajax_search LIMIT sql

* Convert more pages to use Permissions class

Co-authored-by: Tony Murray <murraytony@gmail.com>
2019-12-30 12:11:26 +01:00
Mathieu Poussin
15e29a49b1 Use sysName instead of hostname on AJAX search and new billing form (#10951)
* Fix hostname vs sysName on AJAX search and new billing form
* Replace sysName by format_hostname()
2019-12-20 21:21:31 +01:00
PipoCanaja
b2d90dc8fa Fixed icon for bgp search (#10931) 2019-12-11 17:58:58 +01:00
Tony Murray
e99f421511 Remove legacy auth usage of $_SESSION (#10491)
* Remove auth use of $_SESSION

Will break plugins that depend on $_SESSION, Weathermap was already fixed.
Port them to use Auth::check()/Auth::user()/Auth:id()

* revert accidental replacement
2019-08-05 14:16:05 -05:00
Tony Murray
f3ba8947f7 Use Config helper (#10339)
remove usage of global variable
2019-06-23 00:29:12 -05:00
Tony Murray
36431dd296 Security fix: unauthorized access (#10091)
* Security fix: unauthorized access
Affects nginx users:
Moved php files outside of public html directory (Apache was protected by .htaccess)

Affects all users:
Some files did not check for authentication and could disclose some info.
Better checks before including files from user input

* git mv html/includes/ includes/html
git mv html/pages/ includes/html/
2019-04-11 23:26:42 -05:00
Tony Murray
4718cd594c Fix unescaped variables in ajax_search.php (#10088) 2019-04-11 09:39:25 -05:00
Peter Hansen
8509c94ebf Fix for #9485 (#9486)
* Fix for #9485

* Update ajax_search.php
2018-11-29 08:58:01 +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
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
Richard Mayhew
5be1ea9132 webui: Final Font Awesome conversion (#5652) 2017-01-28 23:44:36 +00:00
Tony Murray
da2c6c5d3c feature: support large vendor logos (#5573)
These are often wider than icons, with a fallback to icons if the logo is not present
Logos are stored in /html/images/logos
SVG is preferred for HiDPI
2017-01-24 22:16:01 +00:00
Neil Lathwood
9b9c10e204 fix: Cleanup printing ifAlias (#4874) 2016-12-12 14:25:48 +00:00
Neil Lathwood
58582c82c1 fix: Fixed loaded modules for ajax search (#5043)
* fix: Fixed loaded modules for ajax search

* fixed eventlog widget
2016-11-22 09:46:41 +00:00
Tony Murray
9a33464c52 refactor: Centralize includes and initialization (#4991) 2016-11-21 20:12:59 +00:00
vitalisator
3bc427ea45 add device Notes and Description to ajax_search 2016-11-02 21:01:30 +01:00
laf
ddf47180c9 fix: Fixed trying to map devices to alert rules 2016-10-07 10:28:12 +00:00
David Bell
f00c383d60 fix: Stop irc bot crashing on .reload #4353
* Removed duplicate include

* Move set_debug into functions.php, and restore the (re)loading of includes/defaults

* Move debug call until after function has been included
2016-09-07 18:42:49 +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
0960027bd9 Added sysName to results if != hostname 2016-07-09 22:24:30 +01:00
Rosiak
086ded6ceb Add sysName to ajax_search
#3756
2016-06-30 21:36:43 +02:00
Rosiak
1c630b0b8d Move function to WebUI
Based on Neil’s suggestion.
2016-02-13 21:09:45 +01:00
Rosiak
f4d5e21dab Make Global Search Limit Configurable
#2557
2016-02-08 22:15:24 +01:00
pblasquez
d62ad2eb02 Update ajax_search.php 2016-02-04 18:16:36 -08:00
Eldon Koyle
f94a704c83 Fix minor bug in ajax_search.php which was returning null instead of [] when searching bgp 2016-01-05 10:21:08 -07:00
f0o
c8c9f489ce SQL Typo 2015-10-01 11:02:15 +00:00
f0o
dc7ecc0133 Added bills to graph-widget 2015-09-30 20:11:18 +00:00
f0o
14f1bd36b8 Added ability to filter top interfaces by type 2015-09-20 10:13:56 +01:00
Daniel Preussker
130d1c452a Added application and munin search operations 2015-09-07 19:29:30 +01:00
laf
1cbd142ad7 Fixed some scrut issues 2015-07-23 17:48:22 +01:00
Job Snijders
d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
Alexander Sosna
5a7988e2e4 chmod 0644 to php files not directly executed 2015-04-28 22:58:03 +02:00
laf
e34bb7235c Added function for read only admin and update ajax_search to honour perms 2015-04-22 20:39:09 +01:00
laf
42acccd3fb started on schedule maintenance section 2015-04-13 10:18:15 +01:00
f0o
ba99eb25a2 Device-Groups Draft 2015-04-03 18:22:29 +00:00
laf
05a0bea5c5 Fixed SQL queries that broke in MySQL 5.5 2015-02-26 16:08:54 +00:00
laf
336a24753d Updated global search both design wise and added bgp support 2014-03-18 22:36:22 +00:00
laf
0b65829cc2 Removed some unnecessary includes that redeclare functions 2014-02-26 14:24:20 +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