Commit Graph

207 Commits

Author SHA1 Message Date
Tony Murray
ad8580d694
Cleanup and optimize the availability widget (#14329)
* Cleanup and optimize the availability widget
Default sort is display name
Sort applies to services too (services always last)
May need to refresh the page to get new css

* style

* We don't need request (lint fix)

* Wrong service field name
2022-09-09 18:22:58 +02:00
Peca Nesovanovic
a551a95404
[gui] enable permanent vertical scroll (#14102)
* [gui] permanent vertical scroll

* switch to styles.css
2022-07-27 11:18:25 -05:00
Tony Murray
5900edbf16
PHP-Flasher for toast messages (#13401)
* PHP-Flasher for toast messages
Allows customized template
removes dependency on unmaintained package using dev stability
no solution for javascript toasts yet

Use DI in places it makes sense

allow html in flashes

Use "template.librenms" as a default notification style

merge toast containers
toastr needs to be second because it will find the containr made by flasher, but the inverse is not true

upgrade php-flasher to add custom options and persistent notifications

Add dark theme

* update composer.lock
2021-10-29 09:13:56 -05:00
Tony Murray
2d752925b0
Oxidized improvements (#12773)
* Oxidized API cleanup
Import more settings to the UI
use lnms config:set

* validate os and type exist

* map settings WIP

* oops

* editing working.  Needed to add new property to pass update state to child

* implement deleting and handle text overflow a little better.

* Update app/Models/Device.php

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>

* Update app/Models/Device.php

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>

* revert change

* fix style

* add return

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2021-05-11 08:08:59 -05:00
Lucas Dousse
afa43a1b7f
add css text center (#12608) 2021-03-11 18:26:06 +01:00
Martin
41570c46b1
Support new lines in login_message again (#12469)
Introducing own css class for customization

Fix problem introduced with #12460
2021-01-27 08:06:20 -06:00
Martin
cdd93b695c
Remove unnecessary horizontal scroll bars in allert widgets (#12464)
* Remove unneeded horizontal scroll bars for alert widgets

Fixes #12454

* Always hide horizontal scroll bars

Width of the widget_body class is set to 100% which hides them anyway, with correct css margins
2021-01-25 23:07:11 -06:00
Negatifff
bd45ae0b65
fix last th min-width (#11860) 2020-06-25 21:20:43 +02:00
SourceDoctor
cc2894c0df
Widget Eventlog Sensors Link and Mouseover functionality (#11380)
* Global Settings - Alert Default Settings

* Revert "Global Settings - Alert Default Settings"

This reverts commit a1af62b146.

* Widget Eventlog - Sensors link and overlib Image

* travis fix

* handling via AppServiceProvider

* collect function

* Travis ...

* static list of Sensor Types

* adding all sensor graph_types

* remove collect

* correct getTypes - remove change to lower case

* class sensor_descr switch

* class sensor_descr switch - revert

* Use standard sensor type names

* move types to attribute list

* going back to changes from 9eee7fad58

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-04-19 12:57:49 -05:00
PipoCanaja
404b3b71ba Graphical alerts update (text/icon alignment) (#10856)
* Update menu.blade.php

* Swap username and notification icon

* Hide count-notifications when zero

* slight tidy

* Accidental key press

* Decrease space to tie them together better

* Update styles.css version
2019-11-25 04:09:40 +00:00
Tony Murray
699aa8a042
Consolidate configuration settings and implement dynamic webui settings (#9809)
* initial db/defaults dump

* numeric values

* Remove $config['time']

* Use config_definitions.json

* try setting definition as a complete array

* a little more

* fix format

* WIP converting dynamic setting pages

* rewriting the webui

* remove legacy and add translations

* finish email section

* improve navigation
update js a bit

* Import the remaining existing settings

* Update backend still some wip
migration

* fix config loading (db not overriding defaults)

* some cleanup

* more array collapsing

* update settings

* Settings search

* add purge settings to ui, order groups and sections

* collapse more arrays

* Auth definitions WIP

* remove needless slash escapes

* add warning to json

* moving settings from defaults.inc

* remove slow_statistics

* Move rrdtool settings to the poller section

* Use translations more consistently

* removing more settings from defaults.inc.php

* show setting name in tooltip

* allow help text to be shown on mobile

* disable settings that are set in config.php

* Implement undo and reset to default.

* Vue.js functional

* Vue.js WIP

* Implement tabs component

* accordion WIP

* lodash ver update

* two items

* Accordion somewhat working

* hash navigation

* Refine Accordion

* Fix up tab styling a bit

* Cleaner tab selected property
Hide html while loading

* spinner?

* Icon support
property for accordion to active

* WIP

* Tabs/Sections from ajax

* Setting Component skeletons

* Dynamic Component resolution

* Basic functionality

* toggle class

* Refactor components

* translate tabs and accordions

* simple array attempt

* improve readonly tooltip

* array styling

* array value editing

* organize snmp info

* Handle initial tab/section in url

* Use Laravel to parse tab/section, dump old

* Draggable array entries

* v-tooltip, for clickable (and touch) help tooltips
disable draggable

* Navigation WIP

* Navigation WIP

* groups computed

* filter settings

* fix event reference

* vue.js i18n initial

* missing description = just setting name

* en fallback

* tidy up the language support and js generation

* persist value to db

* fix issue with 0

* Delete settings from DB instead of setting them to default

* ldap-groups
fixup style

* Default dashboard selection

* fix array of options instead of object

* allow custom validation for settings

* translate options in SettingSelect

* SNMP v3 WIP

* fix setting arrays

* Split persist out of set

* Hook up events for SNMP v3 Auth
correct Config::persist behaviour with arrays

* dependent settings (primitive for now)
actually update the settings values in the LibrenmsSettings component

* more complex "when" behaviour

* remove un-needed seeder

* add poller_modules.cisco-qfp

* remove en.json (disable warning)

* don't set default for log_dir or log_file, otherwise it won't be processed correctly

* Fix module order
add some missing settings

* more config corrections

* correct graphs
correct loading values set to null (although it should have no difference)
remove project_name_version

* Add nfsen settings.  Docs are very confusing, so might have flubbed something
remove option for array definition of select option as numeric indexes messes it up

* Correct more upstream config differences

* Config cleanup after a bunch of merges.

* Fixes

* add version tags to js/css files
remove old js

* Print out full settings list read-only

* Add http_proxy setting
fix indents in config_definitions.json

* repeaters default is 0 (aka 20)

* cleanups

* rewrite the dynamic config docs

* add language docs

* Don't show snmp v3 auth add/remove if disabled by config.php
2019-10-16 21:22:05 +00:00
ckforum
342acf50f1 Add 2 css class graph - minigraph for bg color and other (#10318)
* Add 2 class for graph / mini graph (styles.css)

Add 2 class for graph / mini graph (styles.css) 
for changing bg color and more (mini graph port / device) (graph port / general)

* Update styles.css

Add 2 class for graph / mini graph (styles.css) 
for changing bg color and more (mini graph port / device) (graph port / general)

* Add class CSS for mini graph 

Add class CSS for mini graph

* Update graph.inc.php

Change graph.inc.php, add css class / overlib

* restore original bg #f5f5f5 .graph-all-common

restore original bg #f5f5f5 .graph-all-common

* Update ports.inc.php

correct extra \

* Update graph.inc.php

* Update ports.inc.php

* Update ports.inc.php

* Update graph.inc.php

* Comment line 88 URL.php, because description of location enlarge too much overlib devices's title

* Update Url.php

* Update Url.php

Line 88 -> re ident to pass travis...
2019-06-21 22:44:47 -05:00
ckforum
cafe057001 Add overlib link css class for changing background color - Update Url.php (#10300)
* Update Url.php

Ad css class to onmouserover event and overlib, easyer to change color of background ex.: for a dark theme vs bg color hardcoded

* Update styles.css

* Update Url.php

* Update librenmsv1.blade.php
2019-06-03 19:40:56 -05:00
Tony Murray
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
Tony Murray
5d20686d34
More Widget fixes (#9559)
* limit worldmap to active devices, use scope in availability map

* Linkable totals and better option description for disabled/ignored.

* fix disabled / ignore enabled display

* better? links

* style improvements.  Not important enough to bump version

* fix top interfaces query
2018-12-17 16:45:17 -06:00
Tony Murray
74882e3950 Dashboard widget update (#9515)
Implemented in Laravel
Doesn't use legacy PHP session
Several widgets have new features and settings, for example:

- Multiple ports in one graph
- Maps settings are configurable and override system settings but default to system settings
- Graylog stream and/or device selection
- Much improved graph widget selection
- Many more

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-16 21:18:17 +00:00
Tony Murray
957ecc2441
Locations UI and editing (#9480)
* Better handling of errors
Mapquest seems to return the center of the US on error.......

* Editable locations WIP

* Change to bootgrid ajax table WIP

* Graphs working, using handlebars
update js libs
add current location button

* remove sql query, change icon

* Add the map to the device view, only when gps is expanded.
Allow edit on device page, share js code

* fix chevron rotation, improve click area

* extra warning

* fix overview layout (remove containers)

* fix style

* fix html divs, change collapse ui a bit
move css, update css/js versions

* start zoomed out on new locations

* don't double load scripts, zoom to 17

* fix php-md errors, remove unused use statement

* improve non-admin experience

* Move locations page to Laravel
More functions in Url and Html util classes
reduce code duplication

* translation buttons too

* fix whitespace

* move formatters to the frontend

* small changes

* disable traffic for locations with no devices

* change down 0 to green from gray

* missing "

* Fix paginate all

* working fix for paginate all

* allow sort by counts

* fix down sort

* a little safety

* Don't call the function twice

* btn-xs
2018-11-29 19:23:40 -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
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
Chip Gwyn
bc405194db webui: Modified styles.css to make the device group menu a bit larger (#8200)
* modified styles.css to make the device group menu a bit larger.  Was 200px, set to 800px.  Makes a huge difference in reaability.

* Changed .scrollable-menu to have a max-height of 600px

Changed .scrollable-menu to have a max-height of 600px after discussion, 600 seems a good compromise for size until something better can be found.

* force css update
2018-02-27 19:52:43 +00:00
Rémy Jacquin
8d4fca33b1 webui: Devices in maintenance show as blue on worldmap widget (#8207)
* Added new worldmap widget setting:
The user can chose how down devices under maintenance are shown
Signed-off-by: Rémy Jacquin <remy@remyj.fr>

* Added documentation related to this feature

Signed-off-by: Rémy Jacquin <remy@remyj.fr>

* Change icon to light blue and remove option
Reverted "Added new worldmap widget setting"
Signed-off-by: Rémy Jacquin <remy@remyj.fr>
2018-02-18 20:43:24 +00:00
crcro
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
crcro
d85a228d5b webui: Small eventlog cleanup (#8056)
* include status badge in first datetime col

* code formatting
2018-01-09 20:36:28 +00:00
Zmegolaz
d7b4a30acf webui: Added validation for Oxidized API URL config (#7978)
* Add http:// to oxidized URLs missing them.

* Fixed typo.

* Form validation instead of backend fix.

* Don't update setting on invalid pattern.
2018-01-05 08:58:42 +00:00
crcro
b63c2ac3bf webui: device page refresh (#7963)
* various device page style fixes and alignments with new look

* blank line fix
2017-12-28 23:36:49 -06:00
crcro
f75079ab47 fix alignment, removed redunant css classes, align layout with the rest (#7954) 2017-12-24 22:46:12 +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
Søren Rosiak
d11808aad4 webui: Improve Services Page Look (#7628) 2017-12-24 19:41:14 +00:00
Bennett Blodinger
25bb27c39e webui: Makes the .availability-label border-radius fit in with the border a bit better
Makes the .availability-label border-radius fit in with the border a bit better
2017-09-15 20:59:18 +01:00
Seti
750b183361 webui: Fix nav bar Linebreaks (#6770)
On width between 1199px and 1280px there is a navibar linebreak, and on
some lists there are controlles hidden.
2017-06-02 19:57:27 +01:00
Tony Murray
4c0412b14d feature: Wireless Sensors Overhaul (#6471)
* feature: Wireless Sensors
Includes client counts for ios and unifi
Graphing could use some improvement.
Alerting and threshold ui not implemented

WIP: starting OO based wireless sensors.

Class based functionality working
remove old functional files
add schema file

discovery needs to be enabled, not polling

fix up schema

fix Unifi discovery not returning an array

Add some debug when discovering a sensor.
Fix style.

Add missing semicolin

Add a null object (Generic) for OS.
Fill out some phpdocs

Re-organized code
Each sensor type now has it's own discovery and polling interface
Custom polling tested with Unifi CCQ

Left to do:
Implement UI (Graphs and Custom thresholds)
Alerting
Testing

Fix event message text

Remove runDiscovery and runPolling from OS, they are unused and don't belong there.

Cleanups/docs

Missed this file.

Remove the requirement to fetch the current value to check validity.
Do that automatically if current is not specified
A few cleanups here and there

First pass at graphing.
device_ and wireless_ graphs added.

Add RouterOS support

Singleton OS instance isn't required right now.
Remove that to allow some memory to be freed.

Add wireless to the device list metrics.
Make all metrics clickable

Tweak graphs a bit

Implement limit configuration page.
Use sensors page as common code instead of duplicating.
Clean up some javascript interactions:  Allow enter on values to save. Cancel if update is not needed. Enable the clear custom button after setting a custom value.
Add some wireless alert rules to the library.

Add documentation.

Add unifi client counts by ssid in addition to radio.
Optimize Sensor polling a bit.

Add HP MSM clients support (for full controller)
Fix function accessibility

Formalize the discovery and poller interfaces.

Add Xirrus clients and noise floor
move module interfaces to a more appropriate place.
push caching code up to os, unsure about this do to the limitations

No point in selectively enabling wireless discovery.  We only discover if the device supports something.

Add RSSI, Power, and Rate.
Add these sensors for Ubnt Airos.
Clean up some copyrights.

Reduce the amount of files need to add new types.
Leave graph files for consistency and to allow customization.

Remove the old wifi clients graph completely.
ciscowlc should have improved counts (total and per-ssid)

Schema didn't get added.

Impelement the rest of the AirOS sensors
Reformat and re-organize the Airos.php class.

Add several UBNT AirFiber sensors

A few fixes add links to the section headers

Add HP MSM mibs.

* Schema file got dropped in rebase.

* Add wireless menu to view sensors across all devices.
Icons in the menu need help :/

* Add HeliOS, Mimosa, and Siklu support
Sensors added SNR + Noise

* Add power and utilization to Unifi

* Update polling to prefetch all sensor data in a few snmp requests as possible

* Add Extendair: tx+rx power, aggregate rate, frequency

* Add a check for duplicate sensors in discovery.  Just print an error for now.

* Add Bit Error Ratio (named error-ratio to allow for bit error rate to be added if needed)
Fix an incorrect link in the wireless sensors table

* Add error rate and change all bps and Hz to use si units

* Fixes to limits and frequency display

* Fix overview graph frequency display
A few decimal place tweaks

* Don't allow switching sensor and wireless-sensor graphs, it doesn't work.
Change individual distance graphs to use si units

* Go through the OS and make sure I got all the sensors I can (probably missed some still)
Because pollWirelessChannelAsFrequency() is generic and a little complex, so pull it up to OS.
Message to help developers adding supports that don't return an array from discover functions.

* Fix some issues

* Remove noise and signal for now at least
A couple more fixes
Add a notification

* Oopsie

* Bonus AirFiber sensors
2017-05-01 23:49:11 -05:00
Simon Mott
18784fdb89 webui: Updated rrdtool command output to use <pre>(#6345)
* fix whitespace display on RRDTool Command

* use a class instead
2017-04-05 07:54:55 +01:00
Jan-Philipp Litza
323df86d40 fix: Fixed height of widget boxes (#6282)
* Fix height of widget boxes

This pracitcally reverts #5644 and instead applies the correct fix by
calculating the dimensions of the widget box correctly.

* I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md.
2017-03-28 16:02:10 +01:00
Tony Murray
4a705ea7e3 Fix vertical alingment of the main navbar. (#6256) 2017-03-23 16:22:50 +00:00
Tony Murray
ebabd35d00 accidentally made nav tabs wider (#6236) 2017-03-22 15:41:44 +00:00
Tony Murray
fdc730e638 webui: improve the text alignment for tab bars (#6229)
* webui: improve the text alignment for tab bars
Margin tweaks no longer needed since we use font awesome icons everywhere
Add role presentation for improved accessibility
Clean up some of the permissions logic on the device page (tested)

* fix style
2017-03-22 08:06:46 +00:00
Robbie Penziol
afb838bc10 webgui: Added ability to set warning percentage for CPU, mempools from device edit page (#5895) 2017-03-03 15:07:12 +00:00
Tony Murray
20ae9e2ecd webui: Improve device header layout (#5990)
* webui: Improve device header layout

* Update css style version to break caches
Remove unused css.
2017-02-24 09:59:30 +00:00
Florian Beer
ad58af6e6c webui: Update services pages
* Update services page

- Bring services overview page in line with the rest of the interface
using bootstrap classes, panels, colors etc.
- Getting rid of most of the tables using bootstrap's grid classes.

Device services page might need a bit more work but I'm not ready yet.

* Fix style check issues

* Bigger status labels
2017-02-22 23:53:17 +00:00
Richard Mayhew
3843346109 webui: Set the device logo and cell to have a max width (#5700)
* Set the device logo to have a max width and set the td cell to also have a set width

* Changed the width of the td cell to rather use CSS

* tried something else which allows for a more dynamic approach
2017-02-14 08:52:17 +00:00
Richard Mayhew
5bfd23e7eb webui: New eventlog severity classification (#5830)
* New event log severity model

* Revert "New event log severity model"

This reverts commit 0783527af8.

* New event log severity model

* Fixed spaces vs tabs

* Learning the format requirements

* Learning the format requirements

* Moved the colours in to the stylesheet

* change SQL file to stop conflicting

* refactor log_event so severity isn't last, but reference is.

* keep having to move the file due to new PR conflicts

* Revert "keep having to move the file due to new PR conflicts"

This reverts commit f3030e7218.

* extended support to dashboard and eventlog page

* formatting
2017-02-12 22:41:05 +00:00
Tony Murray
5d1d4cd2ed fix: logo scalling to support squarish logos (#5647)
Also improve text alignment
2017-01-28 10:13:04 +00:00
Neil Lathwood
7b2a818a8f webui: Remove padding at the bottom of widgets to make more room #3687 (#5644) 2017-01-28 01:11:31 +00:00
Tony Murray
456f01f68e webui: center device icons. Keep device actions at two rows (#5627)
netonix logo -> svg
2017-01-26 22:20:43 +00:00
Tony Murray
ca8b72dd1e fix: availability map icons (#5373) 2017-01-10 10:07:10 +00:00
Julian K
5ad8fd3c0c feature: Add support for SVG images (#5275)
* I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md.

* feature: Add support for SVG images

* docs: Add instructions for adding OS images

* Replace PNG os images by SVG
2017-01-08 13:32:17 -06:00
crcro
5569884f7f webui: Updated devices view (#4700) 2016-10-16 15:58:48 +01:00
jonathon-k
87ff439d8f webui: Option to display devices as a uniform size w/o labels in availability map widget 2016-10-15 17:58:27 +01:00
Neil Lathwood
20d7b289e2 fix: Adjusted padding based on screen width to fit all icons (#4711) 2016-10-05 08:05:26 +00:00
crcro
73bb45e465 multiple fixes 2016-09-24 03:28:01 +03:00