Class: menu

LuCI.ui. menu

Handles menus.

Handle menu.

Methods

flushCache()

Flush the internal menu cache to force loading a new structure on the next page load.

getChildren(node){Array.<LuCI.ui.menu.MenuNode>}

Name Type Description
node LuCI.ui.menu.MenuNode optional

The menu node to retrieve the children for. Defaults to the menu's internal root node if omitted.

Returns:
Type Description
Array.<LuCI.ui.menu.MenuNode> Returns an array of child menu nodes.

Load and cache current menu tree.

Returns:
Type Description
Promise.<LuCI.ui.menu.MenuNode> Returns a promise resolving to the root element of the menu tree.

Type Definitions

LuCI.ui.menu.MenuNodeObject

Properties:
Name Type Argument Description
name string

The internal name of the node, as used in the URL

order number

The sort index of the menu node

title string <optional>

The title of the menu node, null if the node should be hidden

boolean satisfied

Boolean indicating whether the menu entries dependencies are satisfied

boolean readonly <optional>

Boolean indicating whether the menu entries underlying ACLs are readonly

children Array.<LuCI.ui.menu.MenuNode> <optional>

Array of child menu nodes.