By default, embedding the dashboard in an iframe will no longer work without configuration, this is by design to provide the most secure out of the box configuration.
We have implemented click-jacking protection in the form of the recommended 'frame-ancestors'. By default, this is configured to disallow any embedding from any site. This can be changed via the Panintelligence installer or Configuration tool (accessible from the Windows start menu or by running Port Selector directly).
To open PortSelector, you will need to locate where the dashboard is installed, this is usually C:\Program Files\Dashboard.
Open the PortSelector folder.
Right click ‘admin.exe’ and choose ‘Run as administrator’.
Click ‘Stop Services and Enter Admin’
Click the Advanced tab and configure according to your security preferences.
None: No embedding allowed
Self: Embedding allowed from the same host
Hosts: Embedding allowed from the hosts specified in the space separated list
This can also be configured automatically with the unattended install config file.
Step 2 - Edit your html page
Change the value of url to your server's destination.
Change the login details to the user you want to login as.
//Change this to the user you want to login as
var username = "admin";
//Change this to user's password
var password = "dashboard";
Change the chart ID in chartFragment (ex.: for chart 200, it would be #chart-filter/200__1)
//Change 157__1 to the chart ID you want to see
var chartFragment = "#chart-filter/157__1";
Step 3 - See your newly embedded chart
Access your page through your webserver, and you should see an embedded chart.
Embedding A Panintelligence Category
We have embedded a chart but what if we want to embed a category? This is detailed in option 2 on the embedding example web page. As the image shows below, we can embed a category in four different modes
Below are the different category modes that we can show when embedding the categories:
The first embed option is normal mode, this will show the category exactly how it appears on the dashboard.
The second embed option is Headless Single Category mode, this will hide the category header and the category list.
The third embed option is Single Category mode, this will show the category header options but will still hide the category list.
The final embed option is Headless normal mode, which will remove the header but keep the category list.
The left drawer tag will open the category list as long as the embed mode allows for the category list to be active (Options 0 and 3)
The right drawer tag will open the filter panel for every embed mode available.