Members
adminMenu
Build menu for WaibuAdmin
config :TConfig
Configuration object.
methodMap :object
Method map for CRUD operations.
- object
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
create | string | <optional> | 'POST' | HTTP method for create operation |
find | string | <optional> | 'GET' | HTTP method for find operation |
get | string | <optional> | 'GET' | HTTP method for get operation |
update | string | <optional> | 'PUT' | HTTP method for update operation |
remove | string | <optional> | 'DELETE' | HTTP method for remove operation |
Methods
(async) exportData(params) → {string}
Export data and save it as a file you can download later. This method is intended to be called by a worker process.
If sumba is loaded, file download is handled by sumba download management which provides you a slick UI to monitor the download progress and status.
If not, file is saved in standard bajo download directory.
| Name | Type | Description |
|---|---|---|
params | object |
Path to the exported file
- Type:
- string
getAutoModels() → {Array}
Get all models that will be automatically included in the WaibuAdmin menu.
List of models
- Type:
- Array
(async) getLookupData(opts) → {Promise.<Array.<object>>}
Get lookup data for a specific model and field based on provided options.
| Name | Type | Description | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts | object | Options for the lookup Properties
|
Lookup results
- Type:
- Promise.<Array.<object>>
getParams(req, …items) → {object}
Collect all available parameters from the request object.
| Name | Type | Attributes | Description |
|---|---|---|---|
req | object | Request object | |
items | string | <repeatable> | List of parameter names |
Collected parameters
- Type:
- object