22 Commits

Author SHA1 Message Date
TheGreatDoc 6f74628b14 Fixed alert log showing only green instead of all by default (#9529)
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.

By default, when you access Alert History it was showing only OK (Green) ones instead of all. You had to hit filter to show them.
2018-12-07 22:07:36 +00:00
Neil Lathwood 03076c4025 feature: Added new alert rule builder UI and rule mapping UI (#8293)
* feature: Added new alert rule builder UI

* Updated to export sql queries

* More updates

* more changes

* removed debug

* fix scrut

* Updated to include import options + various other fixes

* fix rule

* Populate name from collection rules.

* Fix default rule import
Allow new and old style rules in the collection.
Don't add new yet as I'm not sure GenSQL() is working.

* Fix GenSQL call

* Extract filter building to class so it is nicely contained in one place

* moved schema

* some fixes and tweaks

* travis fixes

* Some more features / updates

* Fix up my mistakes when adding default rules

* Use a modal for new alert (Incomplete)
Larger dialog!!
Remove page loading stuff.

Working:
Loading rules, resetting dialog, importing from collection.

Not working yet:
select width
device limited rule access? don't know what this is...

Lots of unused stuff to delete...

* reload "table" after save

* fixed editing rule

* Auto select2 width

* Reload window on save

* Restore per-device alert. Remove debug.

* Small cleanups. Rule Name first.

* Restore button to button type. Rename schema.

* Fixes: wrong command to reload window, remove extra attributes, rule is never passed

* Fixed old rule editing

* some small updates for old imports

* travis update to use trusty

* maybe travis fix

* Ability to set alert rule mappings on the rule edit screen

* pip installs one line, no quiet for deploy

* update schema def

* Fix style and some copyright headers

* fix docs missing file

* Allow new versions of snmpsim and libraries

* Parser WIP

* Fix default rules insert

* reorganize

* Legacy import first draft done

* Implement saving
Skip translation to sql for now

* Working on glues

* small rule collection fix

* Working on glues

* Working on glues

* Docs updates + small UI changes

* Parser WIP

* reorganize

* Legacy import first draft done

* Implement saving
Skip translation to sql for now

* Working on glues

* Working on glues

* Working on glues

* Add table mapping, should move to it's own class

* WIP

* Glue working!!

* Extract Schema class

* Some final touches.
revert alerts_rules.json for now.

* Finish up initial implementation
Needs more tests

* Fix a few places

* small doc updates

* Fix finding tables in grouped rules.

* remove unused code

* code format fixes

* Some quick tests for Schema
Simplified output for findRelationshipPath. Always includes start and target in the result.
This simplifies a lot of code in QueryBuilderParser.php
This also always loads the target table data now (which we want)

* Make bill_id the PRIMARY index for the bills table

* Load macros from a json file in misc instead of the database.

* Fix whitespace and wrong key for collection.

* Handle IN properly when generating SQL

* Fix glue (devices.device_id = ports.port_id) is incorrect :D
Show ALL tables we can resolve relationships for in the query builder filter.

* Remove all macros from the database
Remove insert statements, leave updates to update user's existing rules.
2018-03-14 20:25:19 +00: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
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
Tony Murray 2b3ca49bea feature: Added support for populating selects from ajax (#6557)
fixes: #5264

The issue was all the string concatenation...

But I decided to try loading the select via ajax. Seems ok.  We could just use something like select2.  Opinions? Use this approach or load at page load.
I was able to reduce the loading of the 4000 select items from 1.6s to 0.6s on my laptop by optimizing the sql.

I added 4000 devices to my database to check this :)
2017-05-03 22:51:01 +01:00
Richard Mayhew 47397d0083 webui: Updated icons to use Font Awesome (#5468) 2017-01-21 11:24:05 +00: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
laf aefbde3df0 Added abililty to filter by alert state Ok or Alert 2016-05-02 19:40:12 +00: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
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
Rosiak 903649dbce Minor name changes
- Capitalise alert
- Change health page menu to match the category
2015-06-02 19:42:08 +02: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
laf 2891346a52 Fixed user perms for alert log dropdown 2015-04-22 20:51:14 +01:00
laf cf0ab45351 Updated alert-log table to use new header, also fixed sorting on time logged column 2015-04-04 00:54:50 +01:00
laf 272b8fc4ba Updated alertlog to use bootgrid 2015-04-01 00:21:56 +01:00
laf 17019bd56b Added support for exporting pages via pdf: image is LGPL from: https://www.iconfinder.com/icons/3745/document_pdf_icon#size=16 and pdf library is GPLV3 http://www.tcpdf.org/license.php 2015-03-24 16:27:28 +00:00
Rosiak d0997d09d4 Print alert state and a matching glyphic
- Print alert state on default front page and on alert-log page.
Prints the state and a matching glyphicon.
2015-03-03 18:48:40 +01:00
Søren Rosiak 97c244433a Alert Log Creation
- Creation of a alert log page
- Code from html/pages/eventlog.inc.php
2015-02-22 10:49:26 +01:00