6.2. Dashboard URLs

In addition to the menu and the API, EspressDashboard also allows you to deploy dashboards using URLs. Dashboard URLs allow dashboards to be called via an http call to the server. Dashboard URLs are whole URLs that are run by pointing the web browser to the URL address, or by specifying a hyperlink to the dashboard URL in another Web page.

6.2.1. Generating URLs in Organizer

The easiest way to generate dashboard URLs is to have the Organizer do it for you. To generate a dashboard URL in the Organizer, first select the dashboard file (.dsb) that you would like to use. Then you can select Generate Dashboard URL from the Publish menu, click the Generate Dashboard URL button on the toolbar, or right-click and select Generate Dashboard URL from the pop-up menu. A dialog will then appear allowing you to specify user options for the generated dashboard URL.

Generate Dashboard URL Dialog

User Options

Dashboard URLs can have an username and password passed in as arguments in the URL. If the administrator is generating the URL then an option will appear in the URL options dialog as pictured above that allows you to select the user for which the URL is being generated. Clicking the Select button will bring up a list of defined users.

The URL can also be configured to read the username and password from the session of the URL is going to be run in a JSP or servlet environment. If this option is enabled the URL will try to read the username and password from session parameters USERNAME and PASS.

If an user other than the administrator generates the URL, then an option named For Current User will appear. Checking this option will embed the current user in the URL.

In either case if an user is selected for the URL the encoded username and password are added as arguments to the URL. If no username or password is supplied in the URL then when it is run, the user will be re-directed to a login page before viewing the report.

Click to view larger image

User Login Page

6.2.1.1. Running Dashboard URLs

Once you have finished specifying options for the dashboard URL a new browser window will open containing the generated URL string. The window allows you to copy and paste the dashboard URL.

Click to view larger image

Generated Dashboard URL

In order to view a dashboard, just copy and paste the URL into the browser window.

Click to view larger image

View Dashboard URL

6.2.2. Writing Dashboard URLs

Rather than having the Organizer generate the dashboard URL, you can write your own by using the URL syntax below.

6.2.2.1. URL Syntax

The syntax for dashboard URLs is fairly simple. Every URL begins with a call to the Server: http://<MACHINE_NAME>:<PORT>/<CONTEXT_ROOT>/Dashboard/Dashboard.jsp?. The MACHINE_NAME is either the URL, machine name, or ip address of the server machine. The PORT is the port number for the application server, the default Tomcat for instance uses port 8080. The CONTEXT_ROOT is the context root for the EDAB. By default, the context root is EDAB, but this can be changed by the administrator. Following the question mark users need to specify either the USERNAME and PASS parameters or the USESESSION parameter instead, as well as the dashboard file location.

The following URL will open the Population.dsb dashboard file for the specified user.

http://<MACHINE_NAME>:<port>/<CONTEXT_ROOT>//Dashboard/Dashboard.jsp?
USERNAME=qMFq-5dab27h&PASS=qMFq-5dab27h&OpenFile=http://<MACHINE_NAME>:<port>/<CONTEXT_ROOT>/help/examples/Dashboard/Population.dsb
            

For example, if the server was set up on www.quadbase.com with port 8080 and the context root is EDAB, then the dashboard URL should look like this.

http://www.quadbase.com:8080/EDAB/Dashboard/Dashboard.jsp?
USERNAME=qMFq-5dab27h&PASS=qMFq-5dab27h&OpenFile=http://www.quadbase.com:8080/EDAB/help/examples/Dashboard/Population.dsb
            

6.2.2.2. URL Parameters

URL parameters allow you to specify the dashboard file you would like to run as well as specify whether to use the username and password that are stored in the browser session or not.

OpenFile:

This allows you to specify the dashboard file you would like to run.

&OpenFile=http://machinename:port/EDAB/DashboardFiles/TestDashboard.dsb
                    
[Note]Note

You can use both absolute and relative paths for the dashboard file location.

USERNAME:

This allows you to specify an username. If you generate an URL in Organizer and elect to use an user, the username will be encoded in the generated URL. You can also specify the username as plain text.

&USERNAME=user
                    
PASS:

This allows you to specify the user password. If you generate an URL in Organizer and elect to use an user, the password will be encoded in the generated URL. The password can also be specified using plain text.

&PASS=password
                    
USESESSION:

This allows you to have the server read the username and password from the session. If this option is enabled the information will be retrieved from session parameters USERNAME and PASS. This option is only available if you will be deploying the URL within a servlet or JSP application.

&USESESSION=true