/**************************************************************** ** Licensed Materials - Property of IBM ** ** BI and PM: qs ** ** (C) Copyright IBM Corp. 2001, 2015 ** ** US Government Users Restricted Rights - Use, duplication or ** disclosure restricted by GSA ADP Schedule Contract with IBM Corp. *****************************************************************/ // Copyright (C) 2008 Cognos ULC, an IBM Company. All Rights Reserved. // Cognos and the Cognos logo are trademarks of Cognos ULC (formerly Cognos Incorporated) in the United States and/or other countries. IBM and the IBM logo are trademarks of International Business Machines Corporation in the United States, or other countries, or both. Other company, product, or service names may be trademarks or service marks of others. var traceDumpWin = null; var gRecordDumpWin = null; var gPushCmdWin = null; var gQSDebug = true; function trace(msg, useTraceDumpWin) { var winToDumpTo; if (typeof useTraceDumpWin != "undefined" && useTraceDumpWin === true) { if (!traceDumpWin || (traceDumpWin && traceDumpWin.closed)) { traceDumpWin = window.open(goApplicationManager.getReportFrame().oCVQS.getWebContentRoot() + "/common/blank.html", "_trace_window_"); } winToDumpTo = traceDumpWin; } else { winToDumpTo = window.open("", "_trace_window_"); } winToDumpTo.document.writeln("
"); var d = new Date(); winToDumpTo.document.writeln(d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds() + ":" + d.getMilliseconds()); winToDumpTo.document.writeln("
" + msg + "
"); }; function traceObject(obj) { if (!traceDumpWin || (traceDumpWin && traceDumpWin.closed)) { traceDumpWin = window.open(goApplicationManager.getReportFrame().oCVQS.getWebContentRoot() + "/common/blank.html", "_trace_window_"); } traceDumpWin.document.open(); traceDumpWin.document.writeln("

Output of an object. ["+(new Date())+"]

"); traceDumpWin.document.writeln(traceObjectHtml(obj)); traceDumpWin.document.close(); }; function traceObjectHtml(obj) { var str = ""; var p = new Array(); var i; for (i in obj) { p.push(i); } p.sort(); for (i = 0; i < p.length; i++) { var pre = ""; if (typeof mid == "object") { mid = traceObjectHtml(mid); } str += pre + mid + post; } return str + "
namevalue(s)
" + p[i] + ""; var mid = obj[p[i]]; var post = "
"; }; function showConfigValues(showCalcFuns) { if (!traceDumpWin || (traceDumpWin && traceDumpWin.closed)) { traceDumpWin = window.open(goApplicationManager.getReportFrame().oCVQS.getWebContentRoot() + "/common/blank.html", "_trace_window_"); } var i; var HTMLout = "Config values"; HTMLout += "

As of ["+(new Date())+"]


"; HTMLout += retrieveConfigKeys(goApplicationManager, "Application Manager"); HTMLout += retrieveConfigKeys(goApplicationManager.getReportManager(), "Report Manager"); HTMLout += retrieveConfigKeys(goApplicationManager.getReportManager().getParameterManager(), "Parameter Manager"); var aRegdFeatureList = goApplicationManager.getFeatureRegistry().getAllRegisteredFeatures(); var aUnregdFeatureList = goApplicationManager.getFeatureRegistry().getAllUnregisteredFeatures(); HTMLout += "

Feature Object Status

"; HTMLout += ""; var iRegdFeatureCount = 0; var iUnregdFeatureCount = 0; var p = new Array(); for (i in aRegdFeatureList) { iRegdFeatureCount++; p.push(i); } p.sort(); for (i = 0; i < p.length; i++) { HTMLout += ""; } p = new Array(); for (i in aUnregdFeatureList) { iUnregdFeatureCount++; p.push(i); } p.sort(); if (p.length > 0) { HTMLout += ""; } for (i = 0; i < p.length; i++) { if (aUnregdFeatureList instanceof Object) { HTMLout += ""; } } HTMLout += "
Feature NameState
" + aRegdFeatureList[p[i]].m_sFeatureName + "" + aRegdFeatureList[p[i]].m_sFeatureState + "

" + aUnregdFeatureList[p[i]].m_sFeatureName + "" + aUnregdFeatureList[p[i]].m_sFeatureState + "
"; HTMLout += " Total Registered Features: " + iRegdFeatureCount + "
"; HTMLout += " Total Unregistered Features: " + iUnregdFeatureCount + "
"; HTMLout += " Total Features: " + (iRegdFeatureCount + iUnregdFeatureCount) + "


"; HTMLout += "

Config values

"; HTMLout += ""; p = new Array(); for (i in cfgValues) { p.push(i); } p.sort(); for (i = 0; i < p.length; i++) { if (!(p[i] == "CalcFns" || p[i] == "CalcFnsRestricted") || showCalcFuns) { HTMLout += ""+printValue(cfgValues[p[i]])+""; } } HTMLout += "
namevalue(s)
"+p[i]+"
"; traceDumpWin.document.open(); traceDumpWin.document.write(HTMLout); traceDumpWin.document.close(); }; function retrieveConfigKeys(oManager, sLabel) { var HTMLout = "

" + sLabel + " Variables

"; HTMLout += ""; var oManagerKeys = oManager.keys(); for (i = 0; i < oManagerKeys.length; i++) { HTMLout += "" + printValue(oManager.get(oManagerKeys[i])) + ""; } HTMLout += "
TypeNameValue(s)
" + typeof oManager.get(oManagerKeys[i]) + "" + oManagerKeys[i] + "


"; return HTMLout; }; function showDialogValues() { var now = new Date(); if (!traceDumpWin || (traceDumpWin && traceDumpWin.closed)) { traceDumpWin = window.open(goApplicationManager.getReportFrame().oCVQS.getWebContentRoot() + "/common/blank.html", "_trace_window_"); } var HTMLout = "Dialog values

Dialog local values [" + now + "]

"; HTMLout += ""; var i = "none"; var p = new Array(); for (i in dialogFormValues) { p.push(i); } p.sort(); if (p.length > 0) { for (i = 0; i < p.length; i++) { HTMLout += ""+printValue(dialogFormValues[p[i]])+""; } } if (i == "none") { HTMLout += ""; } HTMLout += "
namevalue(s)
"+p[i]+"
None
"; HTMLout += "

Dialog global values [" + now + "]

"; HTMLout += ""; i = "none"; for (i in dialogGlobalValues) { HTMLout += ""+printValue(dialogGlobalValues[i])+""; } if (i == "none") { HTMLout += ""; } HTMLout += "
namevalue(s)
"+i+"
None
"; var aFeatureStack = goApplicationManager.getFeatureManager().getFeatureLaunchStack(); HTMLout += "

Feature Object " + aFeatureStack[aFeatureStack.length - 1] + " [" + now + "]

"; HTMLout += ""; i = "none"; var oFeature = goApplicationManager.getFeatureManager().getAllFeatureDetailsInStack(); if (oFeature.length > 0) { for (i = 0; i < oFeature.length; i++) { HTMLout += "" + printValue(oFeature[i][2]) + ""; } } if (i == "none") { HTMLout += ""; } HTMLout += "
TypeNameValue(s)
" + oFeature[i][0] + "" + oFeature[i][1] + "
None
"; traceDumpWin.document.open(); traceDumpWin.document.write(HTMLout); traceDumpWin.document.close(); }; function printValue(n) { if (n === null) { return "null"; } if (typeof n == "string" && n === "") { return "[Empty String]"; } var i; var t; if (typeof n == "object") { if (n.length > 0) { t = ""; for (i in n) { if (typeof n[i] == "object") { if (t == "") { t += "
"; } else { t += ""; } else { if (t == ""; } else { t = ""; } return t; } t = ""; return t; }; function displayForm(f) { var t = "Parameters for form [" + f.id + "] for window \"" + f.target + "\" using " + f.action; var parms = f.document.getElementsByTagName("INPUT"); for (var i = parms.length-1; i >= 0; i--) { t += "\n\t" + parms[i].name + " = " + parms[i].value; } trace(t); }; function recordCommandsToggle() { if (!gRecordDumpWin || (gRecordDumpWin && gRecordDumpWin.closed)) { gRecordDumpWin = window.open(goApplicationManager.getReportFrame().oCVQS.getWebContentRoot() + "/common/blank.html", "_record_window_"); } gRecordDumpWin.document.open(); gRecordDumpWin.document.writeln("Command Recording"); gRecordDumpWin.document.close(); }; function recordCommand(cmd) { if (!(!gRecordDumpWin || (gRecordDumpWin && gRecordDumpWin.closed))) { var recordText = gRecordDumpWin.document.getElementById("recordText"); recordText.value += (cmd + "\n"); } }; function pushCommandsToggle() { if (!gPushCmdWin || (gPushCmdWin && gPushCmdWin.closed)) { gPushCmdWin = window.open(goApplicationManager.getReportFrame().oCVQS.getWebContentRoot() + "/common/blank.html", "_push_cmd_window_"); } gPushCmdWin.document.open(); var HTMLOut = "Push Commands"; HTMLOut += ""; HTMLOut += ""; HTMLOut += ""; HTMLOut += ""; gPushCmdWin.document.write(HTMLOut); gPushCmdWin.document.close(); }; function setMiniQuery(miniQuery) { cfgSet("conversation_qs_spec", miniQuery); goApplicationManager.getMiniQueryManager().setMiniQuery(miniQuery); goApplicationManager.getFeatureManager().launchFeature('Run', new Array('full')); };
"; } t += i + ".[object]\n") { t += ""; } else { t += "
" + i + ".
"; } if (typeof n[i] == "string" && n[i] === "") { t += ""; } else { t += ""; } } t += "
" + i + ". [Empty String]\n\n
"; } t += "
[object]
\n\n
\n