How to integrate Dashboard in your web?
EN | ES
The dashboard engine does not have to be used only within the platform. There are several ways to integrate its functionality into other applications or websites, both to view a dashboard designed on the platform publicly or privately, as well as in editing mode, being able to delegate this functionality even to a personalized UI that is more appropriate for the end user.
iFrame integration
In this integration, you must include an HTML iFrame tag in your application where the dashboard engine will open in which you will have to include a URL that the platform will provide. You can get the URLs in the list of dashboards itself:
Either of these two URLs will need the OAuth2 bearer user access token, which can be obtained by logging in to the platform with the user. You will have to include via the URL parameter, "oauthtoken" without the initial "bearer" part, obtaining a URL of the style:
https://{platformhost}/controlpanel/dashboards/viewiframe/{dashboard ID}?oauthtoken={bearer token}
https://{platformhost}/controlpanel/dashboards/editfulliframe/{dashboard ID}?oauthtoken={bearer token}
For example:
As its name indicates, the first URL will allow you to view a platform dashboard, with the user given by the token passed, and the edit URL will allow you to view the dashboard in edit mode.
In edit mode, you will not have all the Control Panel menus, since some of them would cause access errors and inconsistencies with this type of display. The functionalities of including elements, editing them, saving the dashboard, etc., are included in the JS API developed to work with it:
Dashboard Engine JavaScript API
Wrapper for use in Vue Apps (Wrapper Vue)
Available from version 2.1.3-gradius
This integration manages to include the dashboard without iFramesin your VueJS application. You must have several considerations since, when working without iFrames, you will have to solve certain parts in the application, but you will get a much more native, powerful and agile integration than by iFrames. The documentation is in the following tutorial:
How to include Dashboards in your Vue App? (Vue Wrapper Integration)