Commit Graph

34 Commits

Author SHA1 Message Date
Tony Murray
020c5fd7e1 Remove legacy code and fix missing device graphs (#11950)
* removing $graphs global

* remove unused things

* fix some additional graphs

* Fix graphs persisting too soon

* correct name for poller module performance graph

* only one type of graph is used here
2020-07-23 09:57:22 -05:00
Jellyfrog
3c78e0ccc7 Add permission support to Oxidized config search (#11928) 2020-07-21 20:34:42 -05:00
SourceDoctor
62f850aef9 Cleanup functions.inc.php (#11835) 2020-06-17 14:00:18 +02:00
Tony Murray
867aa132c1 Merge pull request #11661 from SourceDoctor/app_dhcp_enhancement
Application DHCP Upgrade
2020-06-16 17:03:45 -05:00
SourceDoctor
e911eef0c8 remove unecessary function 2020-06-16 21:13:56 +02:00
arrmo
ba1302805f Change Units on Noise Floor (#11790)
* Change Units on Noise Floor

I may be wrong, but I think this should just be dBm (i.e. integrated over the carrier bandwidth). The numbers look much too high to me to be on a per Hz basis.

If I am correct here, this should also be updated in the web interface.

Thanks!

* Update php, correct units for Wireless noise-floor

* Wireless Frequency, don't format_si, to avoid kMHz units

* Update Wireless noise-floor units, in RRD plots
2020-06-10 10:41:36 +02:00
SourceDoctor
cbe572f959 Application DHCP Upgrade 2020-05-22 23:02:19 +02:00
Tony Murray
d5a52ca4eb Fix various issues with loading os definitions (#11640)
* Ping only device doesn't display
if os was set to something, ping os wasn't loaded and we try to get overview graphs from it.

* Fix snmp_disable device page load error
When other os is set.

* Revamp os setting loading
the only safe way to access is Config::getOsSetting()

* Remove getOsSetting fallback behavior
Most instances don't use it and it can have unexpected results Config::getOsSetting('blah', 'group') == 'librenms'

* refactor and remove unneeded load_os/loadOs calls now since getOsSetting automatically loads it.

* restore unix overview graphs, they are different
small cleanups

* fix
2020-05-19 14:35:32 -05:00
Tony Murray
055abcf443 Device page dropdown hero button, Performance -> Latency (#11328)
* Throw some shit together, rough outline.

* Reorganize tabs, use tab controllers

* Implement performance (into the latency tab)

* Update resources/views/device/header.blade.php

Co-Authored-By: Jellyfrog <Jellyfrog@users.noreply.github.com>

* Add more tabs

* All controllers created

* Implement routes

* Implement smokeping

* routing and auth

* fix smokeping check

* Implement device dropdown menu

* Update deviceUrl to new style

* Use Gates

* Fix style

* use more appropriate gates

* add show-config gate
remove Laravel helper

* Only show vlan tab if VLANs exist for the device :D

* Fix rancid file check will return false

* revert over-zealous file name changes

* don't need to request the location parameter, just cast to string to avoid bugs when not found

* Move latency tab (ping/performance) to the position of performance instead of ping.

Co-authored-by: Jellyfrog <Jellyfrog@users.noreply.github.com>
2020-04-29 07:25:13 -05:00
SourceDoctor
d2247ebda3 Running Alerts colorized depending on to their severity (#11210)
* Running Alerts colorized depending on to their severity

* extra alert styling to generic function

* .

* link from table alerts to alert_layout function

* info icon for information alert severity
2020-03-01 15:50:45 +01:00
SourceDoctor
441262e739 More verbose Alert Detail Fallback (#11153)
* more verbose fallback output detail

* update if statemen

* Switched

Sorry, I typed them backwards :D

Co-authored-by: Tony Murray <murraytony@gmail.com>
2020-02-19 10:34:37 -06:00
PipoCanaja
fc280ffb08 Revert "Alert Detail Ping Latency (#11140)" (#11149)
This reverts commit 082a1ee079.
2020-02-14 11:46:56 +01:00
SourceDoctor
082a1ee079 Alert Detail Ping Latency (#11140)
* Alert Detail Ping Latency

* link to ping graph
2020-02-13 10:18:00 +01:00
Mathieu Poussin
19a82e1500 Fix inventory page hostname/sysname and default generate_device_link behaviour (#11114)
* Fix inventory page hostname and default behaviour on generate_device_link
* force test re-run
* space
* simplify

Co-authored-by: PipoCanaja <38363551+PipoCanaja@users.noreply.github.com>
2020-02-10 12:07:27 +01:00
SourceDoctor
36388e25ea Show Alert Detail for Applications (#11088)
* alert detail for applications

* add link on alert application
2020-01-31 17:59:56 -06:00
SourceDoctor
d893acccda remove redundant information from alert fallback detail (#11081) 2020-01-31 05:42:46 -06:00
cjwbath
198e29c831 Oxidized GUI tweaks (#11066)
* Don't overwrite real port ids with zeros in the FDB

* Remove space to make codeclimate happy

* Provide links to device config view for oxidized config search results

* Use a bootgrid for Oxidized nodes so we can sort, search etc.

* Add a space for codeclimate
2020-01-27 05:31:43 -06:00
louis-oui
0e3c472018 "Disable alerting" on device disables alert rules check (not just alert transport) (#11015)
* Fix disable notify

* Fix disable notify

* Disable all alerting

* fix db migration

* fix db migration

* fix db migration

* Add autoclearing active alerts if disable alerting set

* Add autoclearing active alerts if disable alerting set

* fix check

* Device in gray if disable_notify is set - not ignore tag
2020-01-09 18:46:52 -06:00
SourceDoctor
4d50feffb3 Added certificate file validity check for services (#10354)
* snmp extend for monitoring certificate file validity

* Update Applications.md

* Update Applications.md
2019-11-05 21:56:31 +00:00
SourceDoctor
8f1c77545d Added Seafile Server Monitoring (#10465)
* Seafile Monitoring

* generalized function for application with multiple similar entries

* adding snmprec file

* Create linux_seafile-v1.json

* Update linux_seafile-v1.snmprec

Updated linux_seafile-v1.snmprec to use 4x for encoding json data response

* Update Applications.md
2019-10-21 23:28:21 +01:00
Jellyfrog
e5849ca055 Remove function report_this_text() (#10728) 2019-10-21 11:39:30 +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
Tony Murray
be04388137 Store config data serialized (#10651)
* Store config data serialized
This way we can store null, booleans, and more reliably.

* Use model to get the mutated output.

* fix whitespace and unused function

* use json_encode/decode and casts
migration to transfer

* json_encode JSON_UNESCAPED_SLASHES

* Use JSON_UNESCAPED_SLASHES.  That is only relevant if you are printing into an HTML page.

* pre-encode the seed...

* filter other fields besides config_value
2019-10-06 21:51:22 +00:00
Vitali Kari
ccfd32457a Fixed wrong formatting of runtime sensor value (#10606)
* fix wrong formatting of runtime sensor value
* avoid else statements
2019-09-16 20:43:24 +02:00
Tony Murray
8d669a8a39 Simple linear port graph prediction (#10520)
* Simple linear port graph prediction
Simple linear prediction line for in and out if graph "to" value is in the future
Improve graph date handling

* thinner line

* Make test specify timezone
2019-08-19 22:53:48 -05:00
Tony Murray
f1c67ac5f4 Ports API: Workaround for ifNames with slashes (#10502)
* Workaround for ifNames with slashes

Basically,

/api/v0/devices/3/ports/0%2f4 -> /api/v0/devices/3/ports/ifName?ifName=0/4
/api/v0/devices/3/ports/0%2f4/port_bits -> /api/v0/devices/3/ports/ifName/port_bits?ifName=0/4

Or you can just use port_id.

* Fix API ports using ifName with slashes
hand parse the path for the ports graph endpoints
this way we can respect the original way of handling slashes (%2F)
2019-08-12 09:46:36 -05:00
Zane C. Bowers-Hadley
0a6ded9ba3 nfdump support for with NFSen (#10376)
* rework the nfsen stuff

* add the new netflow stats page

* update the docs for nfsen

* add the functions back in

* readd the defaults

* rework lowest_five_minutes into lowest_time

* nfsen_channel_rrds removed and will rework it in later post rewriting

* rework something that accidentally got nuked in merging

* rework formatting a bit

* remove a accidentaly added chunk of text =^.^=

* rework some tag capitalization

* remove a accidentally added [

* '='=>' = '
2019-08-06 19:16:34 -05:00
PipoCanaja
f2163edcd8 unauth graphs null exception (#10483) 2019-08-03 23:32:46 -05:00
Tony Murray
89fae9be1d Move API routing to Laravel (#10457)
* Add more api helper functions
to centralize code more

* Enable cors

* Initial Legacy route in Laravel

* Force api v0 responses to json
Add a couple more routes

* more paths, pretty print the json response
pass parameters to the api function

* devices basic functions

* Port generic graph function
check permissions function accepts callback to avoid lots of if statements

* move vlans

* links

* graphs

* fdb

* health

* wireless

* port graphs

* ip functions
split em up

* port_stack

* components

* compoment add/edit/delete

* get_device_groups

* port stats

* port graphs

* get_devices_by_group

* port_groups

* api_get_graph

* show_endpoints

* get_bill

* get_bill_graph

* get_bill_graphdata

* get_bill_history

* get_bill_history_graph

* remaining bill functions

* list_alerts

* ack/unmute alert

* Some cleanups

* Some cleanups

* list_alert_rules

* alert rule add/edit/delete

* inventory

* list_cbgp

* vrf

* list_ipsec

* list_fdb

* list_links (fix both usages)

* list_locations

* list_locations

* list_vlans

* list_ip_addresses

* list_arp

* list_ip_networks

* cleanup

* services

* list_logs and fix authlog.......

* cleanup

* cleanup 2

* remove slim

* don't load schema more than once

* basic test

* fix style

* downgrade laravel-cors to a version that supports PHP 7.1
2019-07-29 16:32:37 -05:00
Tony Murray
f83ce13a7a Fixed tabs and units on the wireless page (#10401) 2019-07-02 13:11:58 +01:00
Martijn Schmidt
9d68f27296 Use sensor labels for overview/inventory pages, refactor some html-page related code (#10287)
* Refactor: use get_state_label() for the overview

* Move state translation to get_state_label()

Several html pages used similar database calls and sometimes very
different methodology to determine the state label and state text
before calling get_state_label(), so moved that part of the task
into the function itself instead of replicating the same code
multiple times on different pages.

* Move label creation to get_sensor_label_color()

Also removed a duplicate sensor class to unit function.

* Refactor some if/else statements for simplicity.

* Enable state translations for the inventory page.

* Remove blank line found at end of control structure

* Enable unit translation, fix typos.

* Change to dbFetchRow(), return string directly.

* Update functions.inc.php

* Stop displaying the raw value on state labels.

* Apply 1c7c3ca change for default case too.
2019-06-27 00:30:10 -05:00
Tony Murray
f3ba8947f7 Use Config helper (#10339)
remove usage of global variable
2019-06-23 00:29:12 -05:00
SourceDoctor
96f7f142ba add mdadm support (#10159)
* add mdadm support

* Update mdadm.inc.php
2019-05-12 23:42:03 -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