mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Replace legacy menu with new Blade generated one (#10173)
* Remove legacy index php file * fix routing page missing data * WIP * fix $navbar global usage * remove global use of $locations * ObjectCache again... * move vars.inc.php to init.php for legacy ajax * navbar is more local than I thought before. Fix it. * Fix some sensors tables escaping * restore custom menu functionality, but with blade and docs * cleanup * tidy menu @if checks * Fix up the rest of the global variables and remove print-menubar.php * consolidate some counting in the menu * filter out empty custom port descr types * Fix up custom port groups * Fix up apps menu * Fix services menu when all are ok * Limit cached data to the user it is for * Fix style * A few clean ups * fix pseudowire bug
This commit is contained in:
@@ -287,22 +287,24 @@ $link_array = array(
|
||||
'device' => $device['device_id'],
|
||||
'tab' => 'apps',
|
||||
);
|
||||
foreach ($app_list as $app) {
|
||||
$apps = \LibreNMS\Util\ObjectCache::applications()->flatten()->sortBy('app_type');
|
||||
foreach ($apps as $app) {
|
||||
echo $sep;
|
||||
if ($vars['app'] == $app['app_type']) {
|
||||
if ($vars['app'] == $app->app_type) {
|
||||
echo "<span class='pagemenu-selected'>";
|
||||
}
|
||||
echo generate_link(nicecase($app['app_type']), array('page' => 'apps', 'app' => $app['app_type']));
|
||||
if ($vars['app'] == $app['app_type']) {
|
||||
echo generate_link($app->displayName(), array('page' => 'apps', 'app' => $app->app_type));
|
||||
if ($vars['app'] == $app->app_type) {
|
||||
echo '</span>';
|
||||
}
|
||||
$sep = ' | ';
|
||||
}
|
||||
echo '</div>';
|
||||
echo '<div class="panel-body">';
|
||||
if ($vars['app']) {
|
||||
if (is_file('includes/html/pages/apps/'.mres($vars['app']).'.inc.php')) {
|
||||
include 'includes/html/pages/apps/'.mres($vars['app']).'.inc.php';
|
||||
if (isset($vars['app'])) {
|
||||
$app = basename($vars['app']);
|
||||
if (is_file("includes/html/pages/apps/$app.inc.php")) {
|
||||
include "includes/html/pages/apps/$app.inc.php";
|
||||
} else {
|
||||
include 'includes/html/pages/apps/default.inc.php';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user