countlyManagementView

countlyManagementView

Source:

View class to expand by plugins which need configuration under Management->Applications.

Methods

(static) afterCollapse()

Source:

Callback function called after tab is collapsed. Override if needed.

(static) beforeExpand()

Source:

Callback function called before tab is expanded. Override if needed.

(static) config() → {Object}

Source:

Handy function which returns currently saved configuration of this plugin or empty object.

Returns:

app object

Type
Object

(static) doOnChange(name, value)

Source:

Called whenever element value with name in parameter have been changed.

Parameters:
Name Type Description
name string

key

value string

value to set

(static) isSaveAvailable() → {Boolean}

Source:

Function used to determine whether save button should be visible. Used whenever UI is redrawn or some value changed. Override if needed.

Returns:

true if enabled

Type
Boolean

(static) onChange()

Source:

Called whenever element value with name in parameter have been changed. Override if needed.

(static) prepare() → {Promise}

Source:

Function which prepares data to the format required by the server, must return a Promise.

Returns:

which resolves to object of {plugin-name: {config: true, options: true}} format or rejects with error string otherwise

Type
Promise

(static) resetTemplateData()

Source:

Reset template data when changing app

(static) save(ev) → {object}

Source:

Save logic: validate, disable save button, submit to the server, show loading dialog if it takes long enough, hide it when done, show error if any, enable save button.

Parameters:
Name Type Description
ev event

event

Returns:

error

Type
object

(static) savingString() → {String}

Source:

Saving string displayed when request takes more than 0.3 seconds, override if needed.

Returns:

saving string

Type
String

(static) setAppId(appId)

Source:

Set current app id

Parameters:
Name Type Description
appId string

app Id to set

(static) showError(error)

Source:

Show error message returned by server or by validate function. Override if needed.

Parameters:
Name Type Description
error string

error message to show

(static) titleString() → {String}

Source:

Title of plugin configuration tab, override with your own title.

Returns:

tab title

Type
String

(static) validate() → {String}

Source:

Callback function called to apply changes. Override if validation is needed.

Returns:

error to display to user if validation didn't pass

Type
String