Commit Graph

38 Commits

Author SHA1 Message Date
Ryan Medlyn
b237e42615 Add location to alert hostname tooltip (#9991) 2019-03-19 11:07:05 +01: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
Neil Lathwood
86d862fb25 Added support for allowing alerts to un-ack (#9136)
* Add support for allowing alerts to un-ack

* Updated db_schema.yaml

* Update and rename 263.sql to 265.sql

* Fix up ui a bit.

* Renamed sql file
2018-09-19 23:38:01 +01: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
dsgagi
1ea2ed273e Update alerts.inc.php (#8977)
Also sort by timestamp, after sorting/grouping by severity.
2018-08-11 16:41:40 -05:00
dsgagi
d9bbc60041 Added support for sorting alerts by severity on the Alerts widget (#8895)
Added feature to sort alerts by severity on the Alerts widget.


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-07-12 21:48:18 +01:00
Roger
e22642c73f feature: Added feature to filter delayed alerts on widget (#8704)
* Added feature to filter delayed alerts on widget

* fix build job error

* change filter name to fired
2018-05-15 20:54:02 +01:00
Neil Lathwood
1eee6e8195 alert: Added ability to make notes for acking alerts + record who did so (#8433)
* alert: Added ability to make notes for acking alerts + record who did so

* Updated schema

* moved sql file

* Updated from comments in PR

* warning changed to blue

* reset notes + keep notes on ack
2018-04-26 00:00:56 -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
Maurice den Braber
9f5b42b028 webui: Allow full search on devices page (#8364)
* Update devices.inc.php

* Update devices.inc.php

* Replace $_POST with $vars

Better protection for SQL injection attempts; Need to verify other files for same issue.

* Fixed whitespace.

*sigh*

* More search options & sql injection fixes.

+Allow full search on devices page;
+Allow sysName search on alertlog page;
+Allow sysName search on alerts page;
+Allow sysName search on eventlog page;
+Allow sysName search on poll-log page;
+Allow sysName search on ports page;

*Replaced all occurrences of $_POST with $vars in librenms/html/includes/table. ($vars are sanity-checked).

* Whitespace fix

* Fixed $where & $param

* Add files via upload

* Whitespaces....

Sometimes you want'em, sometimes you hate'em.
2018-03-25 21:50:09 +01:00
Neil Lathwood
e219af707d Updated ack/status for alerts to be better suited (#7955) 2017-12-26 23:29:28 -06:00
crcro
34e07a1d66 webui: Alerts table refresh (#7765)
* initial release

* changed layout, matching pr 7628

* style changes
usage of short hostname

* alerts page cleanup

* reduced css class, added js function

* initial release

* added min-height, also apply min-height via js if parrent is smaller

* remove status column
2017-12-24 19:55:24 +00:00
Ryan Medlyn
62867a6661 webui: Allow user to display ok/warning/critical alerts only (#7484)
* Allow user to display ok/warning/critical alerts only

* Update alerts.inc.php

* Update alerts.inc.php
2017-10-15 19:50:55 +01:00
Neil Lathwood
04beee6e22 webui: Do not show disabled devices in alerts list as they stale #6213 (#6263) 2017-03-24 17:06:09 -05:00
Bennett Blodinger
07574b27d8 Move to Font Awesome
Keeps the look more in line with the navigation bar icons.
In the future with Bootstrap 4, Glyphicons will not be included, so this
starts the transistions away.
2016-09-22 10:44:17 -04:00
Tony Murray
c48b71d0af Remove external uses of GenGroupSQL() 2016-09-18 19:08:33 -05: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
Eldon Koyle
809d281adf Add devicee hw/location on hover in alerts table
* Add devices.hardware and devices.location
* Remove some un-needed column aliases (col AS col is the default)
2016-06-08 10:10:34 -06:00
laf
4cbeb18af5 Updated alerts query to retrieve sysName for function use 2016-03-16 00:56:58 +00:00
Eldon Koyle
996c2fa4ca Add group filtering to alerts widget
* Add filtering by device_group to alerts widget
* Allow searching by state == recovered
2016-01-21 12:51:49 -07:00
Eldon Koyle
0c124270d5 Add some basic alert filtering
Add some alert filtering.

Args:
 * acknowleged - 0: show not acknowleged, 1: show acknowleged
 * state - integer or string for desired state
 * min_severity - integer or string for lowest desired severity
2016-01-19 16:38:41 -07:00
laf
92dfc7ff42 Linked alert rule name to alert rules page 2015-07-18 17:30:55 +01:00
Job Snijders
d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
laf
b1a052f357 Some permission updates for non-admin users 2015-07-07 23:18:57 +01:00
f0o
7aab831feb Show details of alert in the alert-logs
Move alert-detail generation to own function
2015-05-17 11:45:13 +00:00
f0o
ef74acb6cb Adds:
`bills` to `html/ajax_rulesuggest.php`
	`generate_bill_url` to `html/includes/functions.inc.php`
	Link to bills in `html/includes/table/alerts.inc.php`
2015-05-07 20:43:02 +00:00
laf
113636cce9 Updated alerts status box 2015-04-29 01:31:52 +01:00
f0o
da624fa136 Added Macros in Alert-Rule syntax 2015-04-24 19:14:10 +00:00
f0o
ab6de0180b Removed generate_entity_link 2015-04-23 15:29:42 +00:00
f0o
4c77c76dfa Added more eye-candy 2015-04-23 15:08:25 +00:00
laf
0fcf3b07a9 Updated variable setting + truncated additional text 2015-04-21 09:43:34 +01:00
laf
096fe204fb Removed debug statement 2015-04-19 23:27:12 +01:00
laf
8ebec5c955 Added ability to expand alerts to see triggers 2015-04-19 23:19:13 +01:00
laf
b7e4f1bb34 Trying new way to show alerts 2015-04-19 22:46:31 +01:00
laf
71f5f22387 Fixed loading.... issue when no data returned 2015-04-12 11:47:21 +01:00
laf
7aa87224aa Couple of small issues fixed on alerts page 2015-04-08 03:01:15 +01:00
laf
85e83f5775 Updated alerts table to show status messages 2015-03-31 18:47:10 +01:00
laf
49da368895 Added alerts file for table 2015-03-30 12:16:56 +01:00