countlyManagementView
- Description:
View class to expand by plugins which need configuration under Management->Applications.
- Source:
Methods
(static) afterCollapse()
- Description:
Callback function called after tab is collapsed. Override if needed.
- Source:
(static) beforeExpand()
- Description:
Callback function called before tab is expanded. Override if needed.
- Source:
(static) config() → {Object}
- Description:
Handy function which returns currently saved configuration of this plugin or empty object.
- Source:
Returns:
app object
- Type
- Object
(static) doOnChange(name, value)
- Description:
Called whenever element value with name in parameter have been changed.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
name |
string | key |
value |
string | value to set |
(static) isSaveAvailable() → {Boolean}
- Description:
Function used to determine whether save button should be visible. Used whenever UI is redrawn or some value changed. Override if needed.
- Source:
Returns:
true if enabled
- Type
- Boolean
(static) onChange()
- Description:
Called whenever element value with name in parameter have been changed. Override if needed.
- Source:
(static) prepare() → {Promise}
- Description:
Function which prepares data to the format required by the server, must return a Promise.
- Source:
Returns:
which resolves to object of {plugin-name: {config: true, options: true}} format or rejects with error string otherwise
- Type
- Promise
(static) resetTemplateData()
- Description:
Reset template data when changing app
- Source:
(static) save(ev) → {object}
- Description:
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.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
ev |
event | event |
Returns:
error
- Type
- object
(static) savingString() → {String}
- Description:
Saving string displayed when request takes more than 0.3 seconds, override if needed.
- Source:
Returns:
saving string
- Type
- String
(static) setAppId(appId)
- Description:
Set current app id
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
appId |
string | app Id to set |
(static) showError(error)
- Description:
Show error message returned by server or by validate function. Override if needed.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
error |
string | error message to show |
(static) titleString() → {String}
- Description:
Title of plugin configuration tab, override with your own title.
- Source:
Returns:
tab title
- Type
- String
(static) validate() → {String}
- Description:
Callback function called to apply changes. Override if validation is needed.
- Source:
Returns:
error to display to user if validation didn't pass
- Type
- String