mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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>
This commit is contained in:
@@ -23,12 +23,17 @@ if (isset($base_url['path']) && strlen($base_url['path']) > 1) {
|
||||
|
||||
foreach ($segments as $pos => $segment) {
|
||||
$segment = urldecode($segment);
|
||||
if ($pos == '0') {
|
||||
if ($pos === 0) {
|
||||
$vars['page'] = $segment;
|
||||
} else {
|
||||
list($name, $value) = explode('=', $segment);
|
||||
if ($value == '' || !isset($value)) {
|
||||
$vars[$name] = 'yes';
|
||||
if ($vars['page'] == 'device' && $pos < 3) {
|
||||
// translate laravel device routes properly
|
||||
$vars[$pos === 1 ? 'device' : 'tab'] = $name;
|
||||
} else {
|
||||
$vars[$name] = 'yes';
|
||||
}
|
||||
} else {
|
||||
$vars[$name] = $value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user