Skip to main content

Dashboard SDK

The Dashboard SDK is a JavaScript library which provides communication between the app hosted within the Dashboard's iframe with the hosting Dashboard. It allows to manage assets, themes, fetch various configurations and present standardized User Interface components.

Development tips

The app using Dashboard SDK has to be run inside of the Dashboard's iframe to function properly as the SDK serves as a transport channel of the messages only. All commands are actually executed by the hosting Dashboard. This means that running your app outside of the Dashboard will not work. To run your app inside of the Dashboard, you need to add it to the system. See Creating an App.

Installing the Dashboard SDK#

Include the Dashboard SDK script in your app, by adding the following code to the <head> section of your app's HTML file:

Loading Dashboard SDK into the project
<script type="text/javascript" src="https://apps.enplug.com/sdk/v1/dashboard.js"></script>

This will create a global enplug/window.enplug object which gives you the access to the methods provided by the Dashboard.

Type support#

If you use TypeScript and would like to have the typings checked in your IDE you can load the following NPM package:

npm install @enplug/sdk-dashboard --save-dev

Then, add "@enplug/sdk-dashboard" to the types array in your TypeScript config file. Make sure that typeRoots array has the "node_modules" entry, so that the whole path is available to the compiler.

Usage#

After the Dashboard SDK script gets loaded into your app, it will instantly create a global enplug/window.enplug object which gives you the access to the methods provided by the Dashboard.

See more: enplug

Useful APIs#

Account API#

Use enplug.account to manipulate assets, access account and configuration related commands.

Assets#

Others#

See more: enplug.account

Dashboard API#

Use enplug.dashboard to use standardized User Interface components and actions.

Header section#

Progress indicator#

Dialogs#

See more: enplug.dashboard