123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
- <!
- IBM Confidential
- OCO Source Materials
- BI and PM: pmpsvc
- (C) Copyright IBM Corp.2008, 2009, 2010, 2011
- The source code for this program is not published or otherwise
- divested of its trade secrets, irrespective of what has been
- deposited with the U.S. Copyright Office.
- >
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <meta http-equiv="expires" content="0">
- </head>
- <body>
- <form name="planningForm" method="post" action="" style="display:none;">
- <input name="c_pp" type="hidden" value="">
- <input name="c_crn" type="hidden" value="">
- <input name="c_gw" type="hidden" value="">
- <input name="validateServers" type="hidden" value="">
- <input name="aid" type="hidden" value="">
- <input name="cp" type="hidden" value="0">
- <input name="nodeID" type="hidden" value="">
- <input name="portal" type="hidden" value="">
- <input name="applicationId" type="hidden" value="">
- <input name="host" type="hidden" value="">
- <input name="server" type="hidden" value="">
- <input name="c_ss" type="hidden" value="">
- </form>
- <script language="JavaScript">
- debugger;
- // Update the following to point to the location of the TM1Web service(s)
- var tm1webServices = ["http://localhost:8080","http://localhost:9510"];
- var sHref = location.href;
- var gPos = sHref.indexOf("tm1web.html");
- var sGateway = sHref.substring(0, gPos-1);
- var sCP = "0";
- // If URL contains a TM1Web service address parameter 'ps' then it must be included
- // in the list of valid server locations, otherwise you will be redirected under the current location
- var sPS = decodeURIComponent(getQueryVariable("ps")).toLowerCase();
- if (sPS == "") {
- // If the current location is beneath the dispatcher service, assume the TM1Web service is a sibling
- // of the dispatcher service on the same domain
- var len = sGateway.length;
- if (len > 5 && sGateway.substring(len-5, len).toLowerCase() == "/p2pd") {
- sPS = sGateway.substring(0, len-5);
- } else {
- sPS = sGateway;
- }
- } else {
- for (var i = 0; i < tm1webServices.length; ++i) {
- if (tm1webServices[i].toLowerCase() == sPS) break;
- }
- if (i == tm1webServices.length) {
- sPS = "";
- }
- }
- if (sPS != "") {
- var sUrl = sPS + "/tm1web/";
- // Check for the page requested - default to applications if no page was specificied
- var sPage = decodeURIComponent(getQueryVariable("pg"));
- if (sPage == "") {
- sUrl += "applications.jsp";
- } else {
- var cSep = '?';
- iPos = sPage.indexOf("CogrcpServlet");
- if (iPos == -1) {
- sUrl += sPage;
- if (sPage == "TM1WebCubeViewer.jsp") {
- sUrl += "?HostName=";
- sUrl += decodeURIComponent(getQueryVariable("HostName"));
- sUrl += "&ServerName=";
- sUrl += decodeURIComponent(getQueryVariable("ServerName"));
- sUrl += "&CubeName=";
- sUrl += decodeURIComponent(getQueryVariable("CubeName"));
- sUrl += "&CubeViewName=";
- sUrl += decodeURIComponent(getQueryVariable("CubeViewName"));
- sUrl += "&Password=";
- sUrl += decodeURIComponent(getQueryVariable("cam_passport"));
- var accessType = decodeURIComponent(getQueryVariable("AccessType"));
- sUrl += "&AccessType=" + (accessType ? accessType : "PUBLIC");
- } else if (sPage == "TM1WebWebSheeter.jsp") {
- sUrl += "?HostName=";
- sUrl += decodeURIComponent(getQueryVariable("HostName"));
- sUrl += "&ServerName=";
- sUrl += decodeURIComponent(getQueryVariable("ServerName"));
- sUrl += "&WebSheet=";
- sUrl += decodeURIComponent(getQueryVariable("CubeName"));
- sUrl += "&Password=";
- sUrl += decodeURIComponent(getQueryVariable("cam_passport"));
- sUrl +="&AccessType=PUBLIC";
- } else if (sPage == "TM1WebAPISample.html") {
- sUrl += "?HostName=";
- sUrl += decodeURIComponent(getQueryVariable("HostName"));
- sUrl += "&ServerName=";
- sUrl += decodeURIComponent(getQueryVariable("ServerName"));
- sUrl += "&WebSheet=";
- sUrl += decodeURIComponent(getQueryVariable("CubeName"));
- sUrl += "&Password=";
- sUrl += decodeURIComponent(getQueryVariable("cam_passport"));
- sUrl +="&AccessType=PUBLIC";
- }
- } else {
- sUrl += "applications.jsp";
- sCP = "1";
- }
- }
- var planningForm = document.planningForm;
- planningForm.c_gw.value = sGateway;
- planningForm.c_pp.value = getQueryVariable("cam_passport");
- planningForm.c_crn.value = getQueryVariable("CRN");
- planningForm.validateServers.value = getQueryVariable("validateServers");
- planningForm.aid.value = decodeURIComponent(getQueryVariable("aid"));
- planningForm.cp.value = sCP;
- planningForm.nodeID.value = decodeURIComponent(getQueryVariable("nodeID"));
- planningForm.portal.value = getQueryVariable("portal");
- planningForm.applicationId.value = getQueryVariable("applicationId");
- planningForm.host.value = getQueryVariable("host");
- planningForm.server.value = getQueryVariable("server");
- planningForm.c_ss.value = getCookie("cc_session");
- // support workflow urls in cognos connection
- if (planningForm.c_pp.value == null || planningForm.c_pp.value == "") {
- var aCookie = document.cookie.split("; ");
- for (var i = 0; i < aCookie.length; ++i) {
- var sCrumb = aCookie[i].split("=");
- if (sCrumb[0] == "cam_passport") {
- planningForm.c_pp.value = sCrumb[1];
- } else if (sCrumb[0] == "CRN") {
- planningForm.c_crn.value = sCrumb[1];
- }
- }
- }
- planningForm.action = sUrl;
- planningForm.submit();
- }
- function getQueryVariable(variable) {
- var query = window.location.search.substring(1);
- var vars = query.split("&");
- for (var i = 0; i < vars.length; i++) {
- var pair = vars[i].split("=");
- if (pair[0] == variable) {
- return pair[1];
- }
- }
- return "";
- }
- function getCookie(name)
- {
- var arg = name + "=";
- var alen = arg.length;
- var clen = document.cookie.length;
- var i = 0;
- while (i < clen)
- {
- var j = i + alen;
- if (document.cookie.substring(i, j) == arg)
- return getCookieVal (j);
- i = document.cookie.indexOf(" ", i) + 1;
- if (i == 0)
- break;
- }
- return null;
- }
- function getCookieVal(offset)
- {
- var endstr = document.cookie.indexOf (";", offset);
- if (endstr == -1)
- endstr = document.cookie.length;
- return document.cookie.substring(offset, endstr);
- }
- </script>
- <center><b>The TM1Web service parameter was not specified or is not one of the configured locations</b></center>
- </body>
- </html>
|