Commit Graph

19 Commits

Author SHA1 Message Date
61c89794e4 Remove debug globals (#12811)
* Remove $debug global
and $vdebug global
makes these variables more accessible and protects from collisions.

* the on boot set sends application as the first parameter, just handle that

* Relocate other debug related functions

* Log debug to stdout

* Wrong output

* remove stupid constants

* Fix lint and style issues
2021-04-29 22:42:18 -05:00
3e3aa9077e Revert "Fix StringBlade errors with a stub file" (#12776)
This reverts parts of commit 165c4fd53c.
2021-04-21 23:22:15 +02:00
165c4fd53c Enable PHPStan linter (#12678)
* Enable PHPStan linter

* Add PHPStan baseline

* Switch to Level 5

* Fix StringBlade errors with a stub file
2021-04-21 07:41:34 -05:00
a8c8a9a4a2 Misc cleanup (#12758)
* Fix Docblock

* Misc

* Parameter #2 $callback of function array_filter expects (callable(mixed, mixed): bool)|null, 'strlen' given

* Parameter #2 $data of function hash_hmac expects string, int given

* Unreachable statement - code above always terminates.

* Update Device.php
2021-04-20 12:47:22 +02:00
24c8513029 Replace Auth > Illuminate\Support\Facades\Auth (#12664)
Helps phpstan
2021-03-31 21:30:04 +02:00
cfd9dce620 Convert Virtual Machine pages to Laravel (#12287)
* Convert Virtual Machine pages to Laravel

* wip

* wip

* wip

* wip

* wip

* wip

* delete

* wip

* wip

* move powerStateLabel
2020-11-11 01:15:20 +01:00
0b6231be1b Move device exist check to prevent error (#12232) 2020-10-20 13:28:03 +02:00
0d56bbd946 Apply fixes from StyleCI (#12123) 2020-09-21 15:51:53 +02:00
77c531527c Apply fixes from StyleCI (#12117)
* Apply fixes from StyleCI

* Disable style check
2020-09-21 14:54:51 +02:00
6448682b21 Fix missing Munin controller tab definition (#11943) 2020-07-18 18:15:19 -05:00
5cf5627ff5 Simpler fix for 659325d5d0 (#11883) 2020-06-30 18:36:13 -05:00
659325d5d0 Prevent unauthorized access to device graphs
Users could access info for the wrong device by piggyback on port permissions
2020-06-30 13:35:45 +02:00
cd9c349297 Allow device url by hostname (#11831)
* Allow device url by hostname
/device/hostname
/device/hostname/ports

* slightly different code style
without else ;)
2020-06-17 22:13:06 +02:00
1d3664702a 404 when device does not exist 2020-06-15 10:32:07 -05:00
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
c48943550b Fix port permissions (#11560) 2020-05-06 09:12:33 -05:00
17a8046595 Fix vmhost device page link (#11553) 2020-05-05 09:30:26 -05:00
3e08e6d6d7 Restore hidden ports tab (#11502) 2020-04-29 23:38:31 -05:00
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