Categories
Automatically embedding javascript code in each dashboard

Hi,
We have a javascript code that we'd like to include in every dashboard page of our OBIEE environment. Currently we are doing this by manually embedding it in every dashboard of the server, but it's going to become messy when external developers also have to incorporate their own dashboards.
- Is there a way to include a piece of javascript code in every dashboard page (or even in every OBIEE page)?
We use OBIEE 12.2.1.0, soon to be 12.2.1.3.
Thanks a lot.
Answers
-
Don't believe you can do that without hacking the core product, which you don't want to do as that would invalidate your license agreement with Oracle.
Your only option is manual / procedural.
Though manual could be facilitated by having a standard text area which you tell all developers must be included in every dashboard page, with the text area having your javascript.
What are you trying to achieve?
0 -
Our approach is having a standalone analysis which only includes a narrative view with the embedded script. Then, each dashboard includes the analysis at the top of each page.
The script uses jQuery to replace the single dashboard name header with the complete list of dashboards present in the current _portal folder, along with <a> links to each one. Thus, users can navigate to related dashboards in a similar fashion to the dashboard page navigation bar.
0 -
I guess Robert's implicit question is:
Just what are you trying to achieve that you need to have this in the first place?
0 -
Yes, that is what I was trying for.... and failing obviously!
0 -
The scope is described in the previous comment: essentially, we have a heavily customized style and the dashboard header is as follows:
The user can access all the dashboards present in the current "_portal" folder as well as the pages under the dashboard.
The script is already working, it's just that we were wondering if there was a way of simplifying the process of enabling it on every dashboard.
0 -
And your customisation does not cause any issues with the standard security model?
i.e. What happens when I as a user do not have rights to access 'This is DB2'?
0 -
The script imitates the behavior of the dashboard menu and requests + parses the "getDashboardList" json from the server, so the permissions set in the catalog are adopted in this custom header. Basically, it plays by OBIEE's own rules.
Developers can then restrict access to certain dashboards by adjusting the permissions in the catalog.
0 -
Sounds good, but other than just using the off the shelf dashboard functionality, which you quite obviously do not want to do, then I fear my original answer stands, there is no magic bullet for this.
0