267 Commits

Author SHA1 Message Date
e3e3de1442 Printer paper tray status and error states (#9859)
* adding paper tray status and error states

* adding paper tray test data

* Create jetdirect_papertray.json

* Store printer supply type

* Update json data

* fix style
2019-03-06 18:58:14 -06:00
590c488d74 Rewrite devices page backend (and a little frontend) (#9726)
* Implement devices table data output

* initial filter

* Add select2 filters
improve table header layout
improve init_select2

* bump versions to be safe

* add group filtering
fix location sorting

* allow filter value morphing

* add missing state filter

* remove the old devices endpoint
2019-01-25 15:31:33 -06:00
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
daffa7e274 Eventlog updates (#9633)
* Eventlog updates
remove host from eventlog table, retain in api
allow most fields nullable

* updated schema

* revert auth for legacy log_event function
safer check in the model

* add function modifiers
2019-01-10 00:52:00 -06:00
2d84606abf BUG - correcting size and non significant zeroes (#9575) 2018-12-20 19:50:36 -06:00
29fb646c3a webui: translate state in health/state display (#9550)
* webui: translate state in health/state display

* webui: translate state in health/state display

* webui: translate state in health/state display

* webui: translate state in health/state display

* webui: translate state in health/state display and label for values and limits

* State label in global health tab and cleaning

* State label in global health tab and cleaning

* Sensor labels in global health tab and cleaning

* Sensor labels in global health tab and cleaning

* Sensor labels in global health tab, cleaning unused 0 decimals
2018-12-20 15:56:54 -06:00
757e984e5d Merge pull request #9524 from murrant/detect-https-management
Device management link fallback to http if https isn't available.
2018-12-08 08:10:10 +01:00
93f44d67f8 Fixed customers page (#9521)
move customers table backend to Laravel

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-12-07 22:24:53 +00:00
00cd32f725 Device management fall back to http if https isn't available.
Adds a slight delay on management clicking, may be blocked by popup blocker...
2018-12-05 13:52:07 -06:00
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
40a84b5131 Show port description and dns name in FDB table (#9370)
- Added Port Description field to FDB Table
- Added DNS Name field to FDB Table
- Fixed sorting by port in FDB Table

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-08 22:08:39 +00:00
4e8acdd894 Added ability to sort alert schedules by status (#9257)
Signed-off-by: Rémy Jacquin <remy@remyj.fr>
2018-11-05 08:10:27 +00:00
a31f477290 Show device "features" in correct column (#9366) 2018-10-25 05:58:04 -05:00
0cf11b02d3 Removed redundant grouping from SQL query in FDB Search (#9338) 2018-10-21 20:03:35 +01:00
71e5aac527 Fixed devices state filter when state = 0 (#9277)
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-10-03 21:45:42 +01:00
21ca8bf0b0 Update syslog display and backend (#9228)
* Update syslog display backend
select boxes now dynamically load instead of loading all on pageload
select and table ajax backends completely redone with Laravel (just syslog for now)
duplicate url creation to Url utility class for now (uses Device model instead of array)
build short hostname functionality into Device->displayName() helper

* Fix whitespace

* Some tidying up. Split out displayName() and shortDisplayName()

* Enable auto-sizing.
Fix small error in Url

* Eager load device
Use bootstrap theme for select2
2018-09-20 21:33:03 +01:00
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
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
d475665601 Added BGP Peer Descriptions (#9165)
* Added BGP Peer Descriptions

* Fixed formatting

* Added to device routing tab too

* Some text formatting

* Test files

* Added default null to bgpPeerDescr

* Added db_schema.yaml

* Fix default value for bgpPeerDescr

* Fixed Order and Search box

* Added glyphicon for success/error

* Switch to toastr notification

* Removed unused bootstrap code
2018-09-10 22:54:46 -05:00
9f0afa2927 Fixed edit processors/storage/memory search query (#9172)
* Fixed edit processors search query

* Fixed 2 more search queries
2018-09-08 09:43:56 -05:00
4bb9ac7797 Fixed PeeringDB module (#9158)
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`

Fixed "Show connected IXes" that I broke in my past PR (Sorry for that)
Changed remote_as in pdb_ix_peers from varchar to unsigned int for correct ordering.
Also I've corrected a typo in the "Show connected IXes" button
2018-09-05 19:26:18 +01:00
24993e7bd3 Fixed PeeringDB AS Selection table (#9096)
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`

One note: As bgpLocalAs field in database is a varchar, ordering could be inconsistent with 4-byte asn as it will order using the first char.
If you have 2 ASN (203524 and 32137) and your order by ASC (default) you will get:
203524
32137
2018-08-28 10:54:11 +01:00
d83b675090 Check for incorrect heartbeats in rrdtstep.php script (#9041)
Also, fix some incorrect config names (rrd_step -> rrd.step)

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-08-21 22:21:55 +01:00
73b8dae345 Fix customers display (#9048)
Was trying to inject sql
2018-08-21 15:45:37 -05:00
1ea2ed273e Update alerts.inc.php (#8977)
Also sort by timestamp, after sorting/grouping by severity.
2018-08-11 16:41:40 -05:00
a883264df9 Fixed Eventlog search (missing OR in SQL query) (#8981)
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-08-04 21:45:14 +01:00
064ab1c297 Added missing Config dependency (#8919) 2018-07-18 07:12:33 -05:00
eeb3d58f5b Improved Logging and Debugging (#8870)
Use Log facility when Laravel is booted.
Update init.php so we can easily boot Laravel for CLI scripts. (and just Eloquent, but that may go away)
Move all debug setup into set_debug() function and use that across all scripts.
Log Laravel database queries.
Send debug output to librenms log file when enabling debug in the webui.
Allow for colorized Log CLI output. (currently will leave % tags in log file output)

** Needs testing and perhaps tweaking still.

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-13 23:08:00 +01:00
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
f1c0f5235f Fix processor usage on edit page (#8887)
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-10 19:57:18 +01:00
461e7067f3 Only list polling as overdue when it is 20% over the rrd_step value. (#8848)
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-30 08:53:24 +01:00
7fab99cfc1 Fixed missing var declaration for description/ifAlias search in FDB tables (#8802) 2018-06-07 02:24:24 -05:00
32e86eb4dd webui: Added 'dns name' and 'description' (ifAlias) in fdb search (#8554) 2018-05-24 21:31:56 +01:00
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
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
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
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
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
8ae48d9543 webui: Allow sorting by toner and searching (#8247)
* Allow sorting by toner

* Add support for searching toner

* Fix up off-by-one error with background colour

* Allow sorting by the bar column too
2018-02-18 20:51:46 +00:00
561846a44b fix: Fiedx issues with new config init (#8242)
* Fix non-config defaults

* update processConfig and remove file
2018-02-12 09:15:44 +00:00
2f6f99a330 feature: Added gateone link SSH support (#8189)
* adding gateone link

* Added gateone support, now checks config.php for settings

* adding gateone link

* Added gateone support, now checks config.php for settings

* fixed an incorrect url

* fixed syntax errors

* added new option to config.php, $config[gateone][use_librenms_user] is a boolean that inserts the logged in Librenms user to the SSH link if set to true

* removed code duplication

* removed hostbox-menu.inc.php
2018-02-10 20:51:26 +00:00
5880f06780 webui: Added sysNames to pulldowns and the main page (#8137)
* Add dependency info for api

* webui: made dev dependency list more like devices page. Also added sysNames to pulldowns and the manin page

* Create common function for sysname display

* A better function name
2018-02-10 13:18:53 +00:00
e81413ac61 webui: Added back devices sort by status (#8103)
* added back sort by status

* removed useless html style tags
2018-01-17 16:22:59 +00:00
7e03905e63 webui: Small graylog cleanup (#8057) 2018-01-09 20:47:33 +00:00
d85a228d5b webui: Small eventlog cleanup (#8056)
* include status badge in first datetime col

* code formatting
2018-01-09 20:36:28 +00:00
c14acfd410 webui: ports pages cleanup (#8040)
* ports pages cleanup

* removed useless html span tag
2018-01-08 13:54:21 -06:00
e219af707d Updated ack/status for alerts to be better suited (#7955) 2017-12-26 23:29:28 -06:00
599572562a webui: Health / Sensors pages refresh (#7834)
* inital release

* added missing copyrights

* removed old commented lines

* do not center progresss bar

* integrated in page navbar, removed useless div

* changes to match latest style, fix for pagetitle
2017-12-24 20:18:48 +00:00
520fc4a268 webui: Graylog table refresh (#7832)
* initial release

* style fixes
2017-12-24 19:59:16 +00:00
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