Multi level menu

Michael Bushey's Avatar

Michael Bushey

01 Jun, 2015 10:04 PM

It would be awesome if PML supported multi level menus:

Using a menu structure such as
Nginx Access -> [ www, stg, demo, dev, sandbox, dev1, dev2 ] -> [ 2015-06, 2015-05, 2015-04 ]

I have about 25 different access logs, and I break them up monthly, so just going back 2 months would take up 50 lines in the menu.

Bootstrap supports this: http://bootsnipp.com/snippets/featured/multi-level-dropdown-menu-bs3

Currently I'm scanning my log directly and generating the config for any existing log files:

$date=date('Y-m');
$tmp = '';
$loop=array();
if ($handle = opendir('/var/log/' . $date . '/nginx')) {
  while (false !== ($entry = readdir($handle))) {
   if (strpos($entry, 'access.log')) {
      $loop[] = substr($entry, 0, -11);
     }
  }
}

sort($loop);
foreach ($loop as $key) {

$tmp .= ' "nginxa' . $key . '": {
"display" : "NGINX ' . $key . ' ' . $date . '",
...
}

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac