Members

(static, constant) notFoundTpl :string

Template path for the "not found" page.

Type:
  • string
Default Value
  • 'waibuDb.template:/crud/not-found.html'

Methods

(async, static) addOnsHandler(opts) → {Promise.<Array>}

Add-ons handler for generating chart options based on the schema's aggregate settings.

This function retrieves the aggregate settings from the schema and generates chart options for each setting. The generated chart options are encoded in base64 and returned as an array of add-ons.

Parameters:
NameTypeDescription
optsobject

Options object

Properties
NameTypeDescription
reqobject

Request object

replyobject

Reply object

schemaobject

Schema object

Returns:

Array of add-ons with chart options

Type: 
Promise.<Array>

(async, static) attachmentHandler(opts) → {Promise.<Array>}

Handles attachments for a given schema and ID.

Parameters:
NameTypeDescription
optsobject

Options object

Properties
NameTypeDescription
schemaobject

Schema object

idstring | number

ID of the record

Returns:

Array of attachments

Type: 
Promise.<Array>

(static) buildParams(opts) → {object}

Builds parameters for a given model and request.

Parameters:
NameTypeDescription
optsobject

Options object

Properties
NameTypeDescription
modelstring

Model name

reqobject

Request object

Returns:

Parameters including page information

Type: 
object