Commit Graph

742 Commits

Author SHA1 Message Date
Tony Murray
3315b5d0f8
Remove old unused adduser page and script (#15035)
Use /users/create and lnms user:add instead
2023-05-11 02:32:20 +02:00
Neil Lathwood
2f6904fb59
webui: Fix availability graphs to 100% (#15013)
* Fix availability graphs to 100%

* Update availability.inc.php
2023-05-10 22:03:51 +01:00
eskyuu
ce0734ff5d
Added support for user timezones and user browser timezone by default (incomplete) (#13626)
* Added support for user timezones and user browser timezone byt default

* Formatting fixes

* Use the timezone for alert log display

also added validation for the timezone because it's being used in SQL.

* Formatting fixes

* Added return type

* Formatting"

* Update the latency graphs to use the user timezone

* Simplify the web routes config

* Update phpstan to ignore type error

* Fixed up the phpstan config

* Reverse phpstan change

* Re-apply phpstan override

* Remove the option to unset the session timezone

* Formatting fix

* Update outge and event logs to use session timezone

* Fix route for the timezone control

* Made the timezone more dynamic

* Fix a logic error that was stopping the timezone from being set automatically on login

* Prevent getPref from being called twice

* again prevent getPref double call

* getPref double call

* Fixed typo made during merge

* Fixed merge error in phpstan-baseline.neon

* Change spaces to tabs in phpstan-baseline.neon

* Update error count

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-05-09 10:24:48 -05:00
bnerickson
56e9fa3742
Adding linux_config_files application support (#14776) 2023-05-09 10:23:49 -05:00
jlo-lirmm
41ae162223
php implode arg mismatch (#15014)
php implode arg mismatch
2023-04-28 15:44:22 +02:00
Tony Murray
5c25cece48
Convert the inventory page to Laravel (#15004)
* Convert the inventory page to Laravel
Fix several XSS issues (hopefully no new ones snuck in)
Small improvement to the SelectController to allow filtering by filterFields()

* style fixes

* Fix lint issues

* Fix part device filter
2023-04-28 07:51:41 -05:00
Justin Lentz
8c96a391c9
Clarify Alert Notify Settings (#14974)
* Update print-alert-rules.php

* Update print-alert-rules.php

Was hoping to avoid word wrap with notify, but can't be avoided, so changing to notification
2023-04-24 18:57:13 -05:00
Tony Murray
e1b6fd0165
Fix more refactor errors (#14998) 2023-04-23 20:33:50 -05:00
Tony Murray
2271e29e03
Fix billing error introduced by #14979 (#14996)
Fixes #14994
2023-04-23 13:23:54 -05:00
Tony Murray
265906b44c
Fix some undefined constants (#14993)
* Fix undefined constants
These have been broken for a long time.  Likely they are unused.

* Fix undefined constants
These have been broken for a long time.  Likely they are unused.
2023-04-22 10:37:20 -05:00
Tony Murray
3fe3db747c
Refactor billing (#14979)
* Refactor common billing code into a namespace
Prevents issues of usages where the code hasn't been loaded.

* remove redundant Billing in method names

* remove accidental duplication

* more use statements

* Style fixes
2023-04-21 19:52:47 -05:00
Tony Murray
2ddfba51dd
Set ping_perf scale_min to 0 (#14989)
And allow scale_min, scale_max, and scale_rigid to be set via url parameter
2023-04-20 22:30:32 -05:00
Jellyfrog
0a351b49fd
Laravel 9.x Shift (#14504)
* Move `resources/lang` folder

* Shift registered middleware

* Remove `fruitcake/laravel-cors` dependency

* Streamline `$commands` property

* Upgrade to Flysystem 3.0

* Shift core files

* Convert `optional()` to nullsafe operator

* Remove unnecessary `$model` property

* Convert route options to fluent methods

Laravel 8 adopts the tuple syntax for controller actions. Since the old options array is incompatible with this syntax, Shift converted them to use modern, fluent methods.

* Convert deprecated `$dates` property to `$casts`

* Shift config files

* Default config files

In an effort to make upgrading the constantly changing config files
easier, Shift defaulted them and merged your true customizations -
where ENV variables may not be used.

* Bump Laravel dependencies

* Use `<env>` tags for configuration

`<env>` tags have a lower precedence than system environment variables making it easier to overwrite PHPUnit configuration values in additional environments, such a CI.

Review this blog post for more details on configuration precedence when testing Laravel: https://jasonmccreary.me/articles/laravel-testing-configuration-precedence/

* Fix error provider

* Match new symfony syntax

* Match upstream syntax

* Fix route syntax

* generate composer.lock

* Sync back configs

* routes

* composer

* Fix more flare

* fix cors

* sync lang

* Apply fixes from StyleCI (#14517)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* bump larastan

* update packages

* wip

* Temporarily lower phpstan level

* Update phpstan.neon

* wip

* wip

* wip

* Apply fixes from StyleCI (#14592)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* test

* Update CiHelper.php

* Update test.yml

* Update CiHelper.php

* Update CiHelper.php

* Apply fixes from StyleCI (#14616)

Co-authored-by: StyleCI Bot <bot@styleci.io>

* test?

* fix phpstan problems

* dont run snmpsim on github ci

* Fix whitespace

* More whitespace

* More whitespace ???

* I think the space broke it

* fix the reset of the whitespace

* hard code auth guard

---------

Co-authored-by: Shift <shift@laravelshift.com>
Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-17 06:51:35 -05:00
Stef
0430f6acb1
Cisco QFP polling fixes (#14961)
* fix cisco-qfp Division by zero

* fix percentage calc

* linting

* another zero in RRD. the (int) might be consequential errors and should hurt...

* no float for average_package

* Update includes/polling/cisco-qfp.inc.php

Co-authored-by: Tony Murray <murraytony@gmail.com>

* Add floor

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-04-14 22:11:36 -05:00
Kevin Zink
5d7b0e8dc8
Correct PowerConsumed SI Units in Overview (#14425)
* Correct PowerConsumed SI Units in Overview

Workaround to convert PowerConsumed SI Display Units from kkWh to MWh. Better way would be to directly save the data in Wh instead of kWh. But we don't know the impact jet.

* Fix style
2023-04-14 17:34:03 -05:00
Justin Lentz
b9cc630dbc
Stacked graphs on zoom to speed (#14928)
* Update generic_data.inc.php

* Update functions.inc.php

* Update generic_data.inc.php

* Update functions.inc.php

* Update functions.inc.php

* Update generic_data.inc.php

* Update graphs.inc.php

* Make Murrant Happy ;)

* Update generic_data.inc.php

* Update generic_data.inc.php

* Update graphs.inc.php

* Update graphs.inc.php
2023-04-14 16:48:30 -05:00
Tony Murray
e9c08e21a5
Fix more divide by zero issues (#14954)
* Fix more divide by zero issues
fixes: 14932

* Round to the nearest integer, then cast

* Fix up dhcpatriot
2023-04-11 13:44:45 -05:00
Tony Murray
3380122733
Poller perf: add per device average (#14940)
* Poller perf: add per device
Fix min, avg, and current values

* Fix up previous

* Fix style

* Rename to device average, we don't calculate min and max, but rather the min/max of the average.
2023-04-07 13:27:12 -05:00
Dan Baker
a340672e86
Added graphing of DDoS-protection related OIDs for PAN-OS (#14847) 2023-04-06 19:11:16 -05:00
electrocret
8e5f26652e
Indicator on Port Notes tab when Port has notes (#14923)
* Update port.inc.php

* Use Port Object
2023-04-05 15:52:13 -05:00
Stef
82bd437e47
Syslog sink over http for logstash (or any json source) (#14424)
* inital commit of a new syslog sink over http

* cosmetics

* cosmetics fix...

* cosmetic fix again

* cosmetics fix again

* its nice now...

* add non blocking option

* Syslog Sink integrated as API PUT method

* lint fix

* Update includes/html/api_functions.inc.php

Co-authored-by: Tony Murray <murraytony@gmail.com>

* Update includes/html/api_functions.inc.php

Co-authored-by: Tony Murray <murraytony@gmail.com>

* Update includes/html/api_functions.inc.php

Co-authored-by: Tony Murray <murraytony@gmail.com>

* change to POST, fix decoding issue and json exception

* logstash/json documentation added. syslog documentation a bit re-structured

* lint fix

---------

Co-authored-by: Tony Murray <murraytony@gmail.com>
2023-03-15 08:14:38 -05:00
Jellyfrog
68e0b3df28
Apply fixes from StyleCI (#14899)
Co-authored-by: StyleCI Bot <bot@styleci.io>
2023-03-13 22:32:22 +01:00
Stef
0e322ae5d5
Pseudowires refresh (#14882)
* refresh the pseudowires

* linting
2023-03-13 10:19:23 -05:00
Zane C. Bowers-Hadley
cd82c72190
add graph_stat_percentile_disable config item to disable percentile lines/value printing (#14887)
* add the initial config items for graph_stat_percentile_disable

* update generic stats to use graph_stat_percentile_disable

* style fix
2023-03-09 17:24:32 +01:00
Zane C. Bowers-Hadley
6b56e781b1
actually use the stats graph for ntp-server_freq now (#14884) 2023-03-09 13:32:19 +01:00
Zane C. Bowers-Hadley
2a53c49a5c
convert NTP freq to use generic_stats (#14834) 2023-03-09 00:23:31 +02:00
Zane C. Bowers-Hadley
a0f1dab07b
add type checking to generic_stats.inc.php for $vars['to'] and $vars['from'] (#14871)
* make sure the $vars['from'] and $vars['to'] are actually numeric

* style fix
2023-03-02 22:59:31 +01:00
Zane C. Bowers-Hadley
19278bf19f
update fail2ban to have better stat graphs and and fix generic_stats graph.php (#14818)
* update fail2ban better stat graphs

* style fix

* add rainbow color pallete

* cleanup colors and make it more easily understandable via using the new rainbow colour pallete

* a bit more color tweaking

* green is easier on the eyes

* style fix

* fix hgandling for smaller graphs for some things

* for <= height graphs, use area

* rework the area bit and add a alpha

* style cleanup

* more style cleanup

* mm... colourA does work a lot nicer if the same as colour

* add two more palletes and make the purple the default

* only include 1d once as that as some versions of rrd break if it is twice

* move time_diff to the proper location
2023-03-02 18:51:16 +01:00
Henne Van Och
2140ff21c5
add more docker stats (#14767) 2023-03-01 01:02:01 +01:00
Zane C. Bowers-Hadley
f023d37cfc
update various device graphs to to have better stats (#14815)
* update graphs -> systems page

* update availability graph to use the stats graph for 1 day averages

* a bit of cleanup for various graphs

* a few style fixes I missed

* another style fix

* update the pingperf graph as well

* update the poller perf graph as well

* style fix

* move graphs to using generic_stats default for readability
2023-03-01 01:00:13 +01:00
Mark Westerterp
d4556bdda5
Fix graphs for a search query (#14864) 2023-02-28 22:39:38 +01:00
electrocret
a21c6ec91c
Use Device displayname on VRF page (#14851)
* Use displayname

* Style

* Style
2023-02-21 00:40:18 +01:00
Andy Norwood
3023aa7e0f
API: add display query to list_devices function (#14747)
* add display query type

* add display to query examples

* fix typo
2023-02-08 18:36:20 +02:00
electrocret
1e5e26492e
Use Oxidized API client and add support for groups on config get (#14750)
* Use API client and add support for groups.

* Being Stylish.

* Update incorrect doc
2023-02-01 11:49:29 -06:00
Zane C. Bowers-Hadley
653da5a3f0
update HV::Monitor support to use generic_stats.inc.php (#14814) 2023-01-29 20:54:00 +00:00
Zane C. Bowers-Hadley
ae6ba985e4
Add a few more graphs for CAPEv2 (#14813) 2023-01-29 20:51:58 +00:00
electrocret
d01538dd8f
Show display name in Oxidized config search (#14800) 2023-01-26 15:18:55 +00:00
electrocret
08b025c1b8
Only show Eth errors when Etherlike is enabled (#14784) 2023-01-24 11:31:34 -06:00
Zane C. Bowers-Hadley
98c033e84f
CAPEv2 support (#14801)
* re-add it

* add cape app page

* add initial cape graphs

* now work for the general page

* more udpates

* add cape pending

* add pending and cleanup for if there are no packages(likely cuckoo, so don't add extra items)

* rework the lack of packages a bit more

* more cuckoo related cleanupgiot

* fix cape error logging

* minor cleanups

* add a new graph and use it with cape... also lots of cape cleanups

* misc cape updates

* add percentile values for stats

* add fix for weekly

* don't display 1 day average if under 17 hours

* zero timeslots of packages not used for this time slot

* add avg stat graphs for cape

* now use the average graphs and update the app page

* add a new graph

* add CAPEv2 docs

* add tests data

* lots of style cleanup

* another tweak for the test data

* fix misc style issues

* add cape to apps page

* add nicecase for cape

* case fix

* json fix for test data

* add a missing stat

* some more test data tweaking

* more misc test updates

* more test tweaking

* more test work...

* more test data work

* add what is hopefully the final test tweak
2023-01-24 11:20:18 -06:00
PipoCanaja
c2b0a6ed80
Extend filtering of graphs device_bits on cisco ASA (#14796)
* Extend filtering for device_bits for cisco ASA

* Style
2023-01-24 11:15:59 -06:00
electrocret
309a9be3b6
Use displayname instead of hostname for Device Maintenance Modal Title (#14681)
* Use displayname instead of hostname

* Update device_maintenance.inc.php

* Update device_maintenance.inc.php

* Update device_maintenance.inc.php

* Update device_maintenance.inc.php

* Update device_maintenance.inc.php

* Update device_maintenance.inc.php

* Update device_maintenance.inc.php

* Update device_maintenance.inc.php

* Update device_maintenance.inc.php

* Update device_maintenance.inc.php
2023-01-20 16:37:50 +01:00
Skylark
02e78aab1d
Fix for RIPE NCC API Tools (#14757) 2022-12-24 22:36:26 +00:00
Tony Murray
1ab238a4d1
Fix port speed setting feedback (#14743) 2022-12-19 18:41:59 -06:00
Tony Murray
8ea3f5cd06
Offer opt in to usage and error reporting during install (#13906)
and on the about page
2022-12-15 19:52:22 -06:00
Tony Murray
88c86f2a19
Fix graph output base64 (#14701)
Mostly for people using unauth graphs instead of the api.
2022-12-15 15:58:56 -06:00
Tony Murray
1d3440b943
Unify time interval formatting (#14733)
* Unify time interval formatting
Use carbon for formatting, it supports locales.

* fix style

* remove baseline exceptions

* fixes found by lint
2022-12-15 15:52:53 -06:00
Andy Norwood
d091788f28
API list_devices update with sysName, location_id and type (#14731)
* Add sysName, location_id, type to list_devices

* Add new list_devices type
2022-12-15 08:25:11 -06:00
electrocret
f085a5da06
Fix Cimc on Overview (#14727) 2022-12-15 01:49:33 +01:00
Gilles Depeyrot
ceb8a02a99
Search devices using display field as well (#14714) 2022-12-09 17:25:42 +01:00
Garcia MICHEL
49abee3722
Fix check rrd file exists with remote rrdcached (#14690) 2022-12-01 08:20:49 -06:00