Commit Graph

18 Commits

Author SHA1 Message Date
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
790c4b3402 Configurable device display name (#13528)
* Configurable device display name
You can just set the display name in device settings.

It also accepts simple template format with  the variables: hostname, sysName, sysName_fallback, ip

Default controlled by device_display_default, (set from old force_hostname_to_sysname and force_ip_to_sysname settings

* remove second argument to format_hostname()

* Style fixes

* Update schema

* update phpstan baseline

* Improved settings strings (and add for translation)
2021-11-18 15:46:22 -06:00
Tony Murray
d34cd0a1b8 Fix ports table when unpolled ports exist (#12722)
* Fix ports table when unpolled ports exist

* fix another divide by 0
2021-04-08 11:17:53 +02:00
Tony Murray
1c379dcd05 Remove legacy function calls (#12651)
* massive inlines

* fix style and wtf

* remove rrdtool.inc.php include

* fix CommonFunctions namespace issues

* looking for missing class space, fix undefined class issues

* style fixes
2021-03-29 00:25:30 +02:00
SourceDoctor
590b3ad123 Show Device Group on Map (#12379)
* Show Device Group on Map

* style fix

* .

* .
2021-01-02 22:06:52 +01:00
SourceDoctor
be3853f885 Fix Network Map Device Group Highlighting (#12290)
* Fix Network Map Device Group Highlighting

* style fix

* change parameter fallback

* change if clause
2020-11-09 07:48:03 -06:00
Jellyfrog
29f45ca352 Apply fixes from StyleCI (#12124) 2020-09-21 15:59:34 +02:00
Jellyfrog
82f43cb98d Apply fixes from StyleCI (#12120) 2020-09-21 15:40:17 +02:00
Tony Murray
217969e140 Update php-codesniffer (#11368)
* PHPCS 3.5+

* Fix newly detected style issues
2020-04-03 08:41:24 -05:00
SourceDoctor
ab99520c65 Highlight Nodes on Network map (#10943)
* mark nodes on map

* better variable naming

* change variable getter

* change form header

* replace key mark with highlight

* GET Parameter to highlight node
2019-12-30 16:53:19 +01:00
Jellyfrog
b361710148 Device group based access (#10568)
* Device group based access

* Use Permissions class to resolve permissions

Also give port access based on device access

* Convert more pages to use Permissions class

* shorten config setting name
use Eloquent relationships in several places
alphabetize config_definitions.json

* Change Models and Permissions

* Clean up ajax_search LIMIT sql

* Convert more pages to use Permissions class

Co-authored-by: Tony Murray <murraytony@gmail.com>
2019-12-30 12:11:26 +01:00
louis-oui
d1c73b14f3 Fixed maps display when multiple links are present between devices. (#10818)
* Fix maps display only one link if multiple links are present between devices.
* Simplify test mac in network_map_items
2019-11-14 20:36:01 +01:00
Tony Murray
6b3d64e4c2 Revert "https://github.com/librenms/librenms/issues/10686 (#10687)" (#10755)
This reverts commit d3d34a7f4d.
2019-10-28 15:59:00 -07:00
louis-oui
d3d34a7f4d https://github.com/librenms/librenms/issues/10686 (#10687) 2019-10-17 00:33:53 +00:00
Tony Murray
e99f421511 Remove legacy auth usage of $_SESSION (#10491)
* Remove auth use of $_SESSION

Will break plugins that depend on $_SESSION, Weathermap was already fixed.
Port them to use Auth::check()/Auth::user()/Auth:id()

* revert accidental replacement
2019-08-05 14:16:05 -05:00
Shao Yu-Lung (Allen)
bd1204006a Fixed Nan value broken maps network graph. (#10408)
Error message:
Uncaught TypeError: Cannot read property 'indexOf' of null
at Object.e.overrideOpacity (vis.js:1085)
2019-07-05 08:50:56 +02:00
Tony Murray
f3ba8947f7 Use Config helper (#10339)
remove usage of global variable
2019-06-23 00:29:12 -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