AdminController

src/AdminController.js

A base class for admin model controllers. Overrides the EditController options defaults to provide admin prefixes for routes ("/admin/model-identity") and templates ("model-identity-admin"), and by default wraps templates in 'admin-page' rather than 'page'.

Parameters (in addition to EditController parameters)

  • icon - icon class for nav - defaults to fa-files-o
  • order - optional ordering for nav
  • uploadType - dataManager import type (e.g. csv, json), if set an Import action is available.
  • uploadOptions - options to pass to dataManager parser
new AdminController(opts: any)

Extends EditController

Parameters
opts (any)
Instance Members
addNav(label, route, opts)
addAction(page, label, route, opts)
addInstanceAction(label, route, opts)
_formatDownloadRecord(record, attrs)

The Base Admin class provides a web interface for managing Nxus applications and data.

new Admin()

Extends NxusModule

Instance Members
getAdminUrl()
page(opts, responder)
addNav(label, route, opts)
manage(opts)