Addons
- Reference
Control the lifecycle of Dynatrace apps opened in addon mode.
npm install @dynatrace-sdk/addons
Functions
getMode
getMode(): "overlay" | undefined
Retrieves the current mode of the app when opened in the addon context.
Returns undefined when app is not opened as an addon.
Returns
| Return type | Description |
|---|---|
| "overlay" | undefined | Specified mode of an addon. |
rejectAddon
rejectAddon(reason?): void
Closes the addon app and rejects the request awaited by the source app.
Parameters
| Name | Type |
|---|---|
| reason | unknown |
resolveAddon
resolveAddon(): void
Closes the addon app and returns control to the source app that has sent the intent.
resolveAddonWithNavigation
resolveAddonWithNavigation(appRoute): void
Interrupts a response request, closes the addon app and navigates from the source app to the addon app as the main app at the given route.
Parameters
| Name | Type |
|---|---|
| appRoute*required | string |
resolveAddonWithResponse
resolveAddonWithResponse(responseProperties): void
Closes the addon app and resolves the request awaited by the source app by passing response properties as a result.
Parameters
| Name | Type | Description |
|---|---|---|
| responseProperties*required | ResponseProperties | set of data to be sent as a response to origin app. Must comply with format specified in the app manifest. |