Use the programming interface (API) of Performance Dashboard to query and display certain dashboard states:
The programming interface is realized through reading and writing methods of the global dashboard JavaScript object variable, which is globally defined in the start.jsp JSP page (or copies of which).
Reading methods
Returns the base name of the currently active dashboard, e.g., umg_dashboard
Returns the path of the currently active dashboard, e.g., \DemoDashboard\Core\Sales
Returns the default GUID of the superordinate process group.
Calculates the selected filter value for the specified global filter and returns it as a string in the form filtername=value (see chapter Transfer of filter values. filtername corresponds to the name attribute of a filter XML element in the dashboard configuration file (extension _conf.xml). If you transfer an empty string for filtername, a list of all preselected filters is returned, separated by the & character, e.g., PLANT(DESC(VAL))=Valetta (2000)&TIME=Jan 08 - Jul 08.
Writing methods
Displays dashboard specified in the pcdef argument. If you do not specify the modelpath and modelguid arguments or with an empty string, the root level of the dashboard is displayed. If the modelpath and modelguid arguments reference different levels of a dashboard, the path specified in the modelpath argument takes priority over the model GUID.
Displays the level of the indicated path in the currently active dashboard. If the specified path does not exist, the root level of the dashboard is displayed.
Displays in the currently active dashboard the level (process group) assigned to the specified model GUID. If the specified model GUID does not exist, the root level of the dashboard is displayed.
Example
If you copy the JSP file start_api.jsp to the webapp directory of your Performance Dashboard installation and run it in Internet Explorer, e.g., http://localhost:8080/APD_umg_en/start_api.jsp, you can familiarize yourself with the dashboard's programming interface after successful login.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%
response.addHeader("Pragma", "no-cache");
response.addHeader("Cache-Control", "no-cache");
response.addHeader("Cache-Control","no-store" );
response.addDateHeader("Expires", 0);
%>
<html>
<head>
<title>ARIS Performance Dashboard</title>
<style type="text/css">
body {
margin-left: 0px; margin-right: 0px;
margin-top: 0px; margin-bottom: 0px;
background-color: #6D838E;
width:100%; height:100%;
}
</style>
<script type="text/javascript">
function invokeDashboard(pcdef, language, path,
modelguid) {
var dashboardURL =
"performancedashboard/PerformanceDashboard.html" +
"?pcdef=" + pcdef +
"&language=" + language +
"&path=" + path +
"&modelguid=" + modelguid;
document.getElementById("dashboardID").src =
dashboardURL;
}
function getURLParameter(urlParam) {
var exp = "[\\?&]"+urlParam+"=([^&#]*)";
var regex = new RegExp(exp);
var myURL = window.location.href;
var values = regex.exec(myURL);
if(values == null) {
return "";
} else {
return values[1];
}
}
function getCurrentDashboard() {
dbname.value =
dashboard.dashboard.getCurrentDashboard();
}
function setCurrentDashboard() {
dashboard.dashboard.setCurrentDashboard(
document.getElementById("dbname").value,
document.getElementById("path").value,
document.getElementById("guid").value);
}
function getCurrentLevelPath() {
path.value =
dashboard.dashboard.getCurrentLevelPath();
}
function setCurrentLevelByPath() {
dashboard.dashboard.setCurrentLevelByPath(
document.getElementById("path").value);
}
function getCurrentLevelGUID() {
guid.value =
dashboard.dashboard.getCurrentLevelGUID();
}
function setCurrentLevelByGUID() {
dashboard.dashboard.setCurrentLevelByGUID(
document.getElementById("guid").value);
}
function getGlobalFilters() {
gblfilterOut.value =
dashboard.dashboard.getFilter(
document.getElementById("gblfilterName").value);
}
</script>
</head>
<body onload="invokeDashboard(getURLParameter('pcdef'),
getURLParameter('language'), getURLParameter('path'),
getURLParameter('modelguid'))">
<div style="position:absolute; top:0px; z-index:2;
width:100%;">
<table cellpadding="0" cellspacing="0" rules="none"
frame="void" border="0" bgcolor="#C8CED0"
width="100%" height="100%">
<tbody>
<tr><td width="100"> Dashboard:</td>
<td width="430">
<input type="text" size="64" id="dbname"/>
</td>
<td>
<button id="b1"
onclick="getCurrentDashboard()">Get</button>
<button id="b11"
onclick="setCurrentDashboard()">Set</button>
</td>
</tr>
<tr><td width="100"> Path:</td>
<td width="430">
<input type="text" size="64" id="path"/>
</td>
<td>
<button id="b2"
onclick="getCurrentLevelPath()">Get</button>
<button id="b21"
onclick="setCurrentLevelByPath()">Set</button>
</td>
</tr>
<tr><td width="100"> GUID:</td>
<td width="430">
<input type="text" size="64" id="guid"/>
</td>
<td>
<button id="b3"
onclick="getCurrentLevelGUID()">Get</button>
<button id="b31"
onclick="setCurrentLevelByGUID()">Set</button>
</td>
</tr>
<tr>
<td width="130">
Global Filter:
</td>
<td width="800">
Dimension
<input type="text" size="16"
id="gblfilterName"/>
<input type="text" size="85"
id="gblfilterOut"/>
</td>
<td>
<button id="b4"
onclick="getGlobalFilters()">Get</button>
</td>
</tr>
</tbody>
</table>
</div>
<div style="position:absolute; top:787px; z-index:2;
width:100%;">
<iframe
name="dashboard" id="dashboardID" src=""
scrolling="no" marginheight="0" marginwidth="0"
frameborder="0"
style="
position: absolute;
bottom: 0px;
width: 100%
height: 690px;
background-color: #6D838E;
">
<p>Performance Dashboard</p>
</iframe>
</div>
</body>
</html>
You can use this little example to easily create complete dashboard URLS.