Introduction
There are 4 urls to access the dashboards, two in view mode and two for edit mode, there are two of each since some are view or editfull urls that are invoked from the control panel and viewiframe and editfulliframe that are invoked embedded in iframes or from the dashboard wrapper.
…/controlpanel/dashboards/view/{id}
…/controlpanel/dashboards/editfull/{id}
…/controlpanel/dashboards/viewiframe/{id}
…/controlpanel/dashboards/editfulliframe/{id}
In these 4 urls {id} is the identifier of the dashboard
When to use it?
This url is used to access a dashboard in view mode, not being able to modify gadgets or dashboards.
It is the url that is invoked from the control panel to open the dashboard in view mode.
What security is applied to access?
It is accessed from the browser cookies after having started a session on the platform.
It can also be accessed using the oauthtoken parameter, for example from the browser we would launch this url (In this case we use the onesaitplatform lab as host)
https://lab.onesaitplatform.com/controlpanel/dashboards/view/6dba9148-b807-4104-a118-9d897cf44ee7?oauthtoken={OAuth2 Token}
{OAuth2 Token} is the oauth2 token, without the Bearer prefix for example if our token is:
“Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcmluY2lwYWwiOiJhZG1pbmlzdHJhdG9yIiwiY2xpZW50SWQiOiJvbmVzYWl0cGxhdGZvcm0iLCJ1c2VyX25hbWUiOiJhZG1pbm...”
we would assign the following value to the parameter:https://lab.onesaitplatform.com/controlpanel/dashboards/view/6dba9148-b807-4104-a118-9d897cf44ee7?oauthtoken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwcmluY2lwYWwiOiJhZG1pbmlzdHJhdG9yIiwiY2xpZW50SWQiOiJvbmVzYWl0cGxhdGZvcm0iLCJ1c2VyX25hbWUiOiJhZG1pbm...
…/controlpanel/dashboards/editfull/{id}
When to use it?
This url is used to access a dashboard in edit mode, it allows modifying, adding or removing gadgets, changing styles, creating tabs to have several pages within the dashboard, etc.
It is the url that is invoked from the control panel to open the dashboard in edit mode.
With this url we have access to the complete dashboard editing button, without any limitation, which will be displayed adjusted in the upper right part of the dashboard, it also allows you to edit the gadgets by accessing the forms for editing the gadgets of the control panel, clicking on the edit option of the menu in the head of the gadgets.
It also allows you to create gadgets or use those already created by dragging them from the add item option.
What security is applied to access?
To have full access to all the options that are allowed from the editor, it is necessary to have a platform session started in the browser.
It can also be accessed through the oauthtoken parameter but we will find the problem that part of the editing options will not work, such as creating a new gadget of the types bar, foot, table ..., or editing gadgets of these types, because Since you have not created a session, you do not have access to these control panel screens.
…/controlpanel/dashboards/viewiframe/{id}
When to use it?
This url is used to access a dashboard in view mode, not being able to modify gadgets or dashboards, it is used to show a dashboard embedded in an iframe or an example of iframe from the dashboard wrapper:
<iframe id="sonIframe" src="https://lab.onesaitplatform.com/controlpanel/dashboards/viewiframe/6dba9148-b807-4104-a118-9d897cf44ee7?oauthtoken={OAuth2 Token}" style="height: 500px;width: 100%;background-color: #abcbea"></iframe>
This url works the same as /view/ has been maintained for backward compatibility with previous versions of the platform, since in previous versions it could not be accessed with the oauthtoken from the /view/ url.
What security is applied to access?
It can be accessed using the oauthtoken parameter
It is also accessed from the browser cookies after having started a session on the platform.…/controlpanel/dashboards/editfulliframe/{id}
When to use it?
This url is used to access a dashboard in edit mode embedded in an iframe or from the dashboard wrapper, it allows modifying, adding or removing gadgets, changing styles, etc.
It is the url that is invoked from the control panel to open the dashboard in edit mode.
With this url we can have access to the dashboard edition button limited or not show it, within the limitations it does not allow editing the gadgets by accessing the forms for editing gadgets in the control panel, certain items of the gadgets menu are also limited
This post explains in more detail how to configure what to see and what not to do when accessing in embedded editing mode:
https://onesaitplatform.atlassian.net/l/c/66UWPq21
However, it is prepared to be able to communicate from the parent element of the iframe in case of being embedded in an iframe through messages, being able to create and add gadgets to the dashboard, edit existing ones, save the dashboard, etc ...
As explained in this post:
https://onesaitplatform.atlassian.net/l/c/JBXhLFGg
What security is applied to access?
To have full access to all the options that are allowed from the editor, it is necessary to have a platform session started in the browser.
It can also be accessed through the oauthtoken parameter but we will find the problem that part of the editing options will not work, such as creating a new gadget of the types bar, foot, table ..., or editing gadgets of these types, because Since you have not created a session, you do not have access to these control panel screens.
They apply to all types of urls
Multitenants usage specifications
When the platform installation is configured in multitenat mode, it is necessary to specify the vertical and username parameters in the url to be able to open the dashboards corresponding to the correct tenant and vertical, for example:
https://lab.onesaitplatform.com/controlpanel/dashboards/viewiframe/6dba9148-b807-4104-a118-9d897cf44ee7?oauthtoken=ffqerqwerf…&vertical=vertical001&username=username001
Specifications passing parameters by url
When a dashboard is invoked, it can be configured so that it receives specific parameters and with these filters the data from the gadgets.
We would define these parameters when we are editing the dashboard in the URL Parameters icon
We can indicate if they are mandatory or not, if they are mandatory and are not defined in the url, the dashboard will request them through a popup.
This post explains this point in more detail: