Dashboard-Programmierschnittstelle

Über die Programmierschnittstelle (API) von Performance Dashboard können Sie bestimmte Zustände eines Dashboard abfragen und anzeigen lassen:

Die Programmierschnittstelle ist über lesende und schreibende Methoden der globalen Javascript-Objektvariable dashboard realisiert, die in der JSP-Seite start.jsp (oder Kopien hiervon) global definiert ist.

Lesende Methoden

Schreibende Methoden

Beispiel

Wenn Sie die folgende JSP-Datei start_api.jsp in das Verzeichnis webapp Ihrer Performance Dashboard-Installation kopieren und im Internet Explorer starten, z. B. http://localhost:8080/APD_umg_de/start_api.jsp, können Sie sich nach erfolgreicher Anmeldung mit der Funktionsweise der Programmierschnittstelle des Dashboard vertraut machen.

Linked Picture File Template_support_manuals_APD

<!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,Zeilenumbruch

modelguid) {

var dashboardURL =Zeilenumbruch

"performancedashboard/PerformanceDashboard.html" +

"?pcdef=" + pcdef +

"&language=" + language +

"&path=" + path +

"&modelguid=" + modelguid;

document.getElementById("dashboardID").src =Zeilenumbruch

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 =Zeilenumbruch

dashboard.dashboard.getCurrentDashboard();

}

function setCurrentDashboard() {

dashboard.dashboard.setCurrentDashboard(Zeilenumbruch

document.getElementById("dbname").value,Zeilenumbruch

document.getElementById("path").value,Zeilenumbruch

document.getElementById("guid").value);

}

function getCurrentLevelPath() {

path.value =Zeilenumbruch

dashboard.dashboard.getCurrentLevelPath();

}

function setCurrentLevelByPath() {

dashboard.dashboard.setCurrentLevelByPath(Zeilenumbruch

document.getElementById("path").value);

}

function getCurrentLevelGUID() {

guid.value =Zeilenumbruch

dashboard.dashboard.getCurrentLevelGUID();

}

function setCurrentLevelByGUID() {

dashboard.dashboard.setCurrentLevelByGUID(Zeilenumbruch

document.getElementById("guid").value);

}

function getGlobalFilters() {Zeilenumbruch

gblfilterOut.value = Zeilenumbruch

dashboard.dashboard.getFilter(Zeilenumbruch

document.getElementById("gblfilterName").value);

}

</script>

</head>

<body onload="invokeDashboard(getURLParameter('pcdef'),Zeilenumbruch

getURLParameter('language'), getURLParameter('path'),Zeilenumbruch

getURLParameter('modelguid'))">

<div style="position:absolute; top:0px; z-index:2;Zeilenumbruch

width:100%;">

<table cellpadding="0" cellspacing="0" rules="none"Zeilenumbruch

frame="void" border="0" bgcolor="#C8CED0"Zeilenumbruch

width="100%" height="100%">

<tbody>

<tr><td width="100">&nbsp;Dashboard:</td>

<td width="430">

<input type="text" size="64" id="dbname"/>

</td>

<td>

<button id="b1"Zeilenumbruch

onclick="getCurrentDashboard()">Get</button>

<button id="b11"Zeilenumbruch

onclick="setCurrentDashboard()">Set</button>

</td>

</tr>

<tr><td width="100">&nbsp;Path:</td>

<td width="430">

<input type="text" size="64" id="path"/>

</td>

<td>

<button id="b2"Zeilenumbruch

onclick="getCurrentLevelPath()">Get</button>

<button id="b21"Zeilenumbruch

onclick="setCurrentLevelByPath()">Set</button>

</td>

</tr>

<tr><td width="100">&nbsp;GUID:</td>

<td width="430">

<input type="text" size="64" id="guid"/>

</td>

<td>

<button id="b3"Zeilenumbruch

onclick="getCurrentLevelGUID()">Get</button>

<button id="b31"Zeilenumbruch

onclick="setCurrentLevelByGUID()">Set</button>

</td>

</tr>

<tr>

<td width="130">

&nbsp;Global Filter:

</td>

<td width="800">

&nbsp;Dimension

<input type="text" size="16"Zeilenumbruch

id="gblfilterName"/>

<input type="text" size="85"Zeilenumbruch

id="gblfilterOut"/>

</td>

<td>

<button id="b4"Zeilenumbruch

onclick="getGlobalFilters()">Get</button>

</td>

</tr>

</tbody>

</table>

</div>

<div style="position:absolute; top:787px; z-index:2;Zeilenumbruch

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>

Sie können dieses kleine Beispiel verwenden, um einfach komplette Dashboard-URLs zu erstellen.