LuCI.ui. menu

Handles menus.

Constructor

Handle menu.

Methods

flushCache()

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

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

Parameters:
NameTypeAttributesDescription
nodeLuCI.ui.menu.MenuNode<optional>

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

Returns:

Returns an array of child menu nodes.

Type: 
Array.<LuCI.ui.menu.MenuNode>

load() → {Promise.<LuCI.ui.menu.MenuNode>}

Load and cache current menu tree.

Returns:

Returns a promise resolving to the root element of the menu tree.

Type: 
Promise.<LuCI.ui.menu.MenuNode>

Type Definitions

MenuNode

Type:
  • Object
Properties
NameTypeAttributesDescription
namestring

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

ordernumber

The sort index of the menu node

titlestring<optional>

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

satisfiedboolean

Boolean indicating whether the menu entries dependencies are satisfied.

readonlyboolean<optional>

Boolean indicating whether the menu entries underlying ACLs are readonly.

childrenArray.<LuCI.ui.menu.MenuNode><optional>

Array of child menu nodes.