test_connection_results.xts 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2014
  6. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. -->
  8. <!--
  9. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  10. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  11. -->
  12. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml" requiredCapability="canUseDataSourcesTool">
  13. <!-- form logic stuff ============================================================== -->
  14. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  15. <!--
  16. ================================================================================
  17. encrypt the password
  18. ================================================================================
  19. -->
  20. <xts:block id="encrypt_password" path="/portal/encryptConnectionPasswords.xslt" dependency="formlogic_init" type="exec" mode="interpret" processor="XSLT" mandatory="false" condition=".[/root/env/param[@name='m_cube_password' or @name='test_cube_password' or @name='m_connection_password' or @name='test_password' or @name='m_connection_proxy_password'] != '']"/>
  21. <!--
  22. ===============================================================================================
  23. getContent
  24. Get the dispatcher information
  25. If the user wants to test the connection with a signon, then we need to query for it
  26. ===============================================================================================
  27. -->
  28. <xts:block id="getContent" processor="XSLT" type="exec" dependency="formlogic_init">
  29. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  30. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  31. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  32. <xsl:stylesheet version="1.0"
  33. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  34. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  35. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  36. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  37. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  38. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  39. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  40. <xsl:template match="/">
  41. <xts:sequence>
  42. <xts:append>
  43. <content>
  44. <xsl:if test="/root/env/param[@name='pageitem']">
  45. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  46. <send:request provider="cm">
  47. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  48. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  49. <cm:requests>
  50. <!-- get the signon information -->
  51. <cm:query>
  52. <cm:search><xsl:value-of select="/root/env/param[@name='pageitem']"/>[permission('read')][permission('execute')]</cm:search>
  53. <cm:properties>
  54. <cm:property name="searchPath"/>
  55. <cm:property name="defaultName"/>
  56. <cm:property name="credentials"/>
  57. <cm:property name="iconURI"/>
  58. </cm:properties>
  59. </cm:query>
  60. </cm:requests>
  61. </cm:query>
  62. </xts:transform>
  63. </send:request>
  64. </xts:transform>
  65. </xsl:if>
  66. </content>
  67. <installedComponents>
  68. <xts:function name="getConfiguration">
  69. <xts:param name="installedComponents"/>
  70. </xts:function>
  71. </installedComponents>
  72. </xts:append>
  73. </xts:sequence>
  74. </xsl:template>
  75. </xsl:stylesheet>
  76. </xts:block>
  77. <!--
  78. ================================================================================
  79. decrypt_credentials
  80. ================================================================================
  81. -->
  82. <xts:block id="decrypt_credentials" dependency="getContent" type="exec" mode="interpret" processor="XSLT" mandatory="false" condition=".[/root/env/param[@name='pageitem'] and /root/content/*[local-name() = 'queryResponse']/*[local-name() = 'queryReply']/*]">
  83. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  84. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  85. <xsl:variable name="xtscm" select="'http://developer.cognos.com/schemas/xts-cm/1/'"/>
  86. <xsl:template match="/">
  87. <xts:sequence>
  88. <xsl:variable name="selected_content" select="/root/env/param[@name='pageitem']"/>
  89. <xts:append>
  90. <decryptedCredential>
  91. <xts:decrypt>
  92. <xts:param name="provider">cognos.cam</xts:param>
  93. <xts:param name="source"><xsl:value-of select="substring-before(substring-after(xtsext:xmldecode( string(/root/content/cm:queryResponse/cm:queryReply/cm:dataSourceSignon/cm:credentials)), '&lt;encryptedValue&gt;'), '&lt;/encryptedValue&gt;')"/></xts:param>
  94. </xts:decrypt>
  95. </decryptedCredential>
  96. </xts:append>
  97. </xts:sequence>
  98. </xsl:template>
  99. </xsl:stylesheet>
  100. </xts:block>
  101. <!--
  102. ================================================================================
  103. test_connection
  104. ================================================================================
  105. -->
  106. <xts:block id="test_connection" type="exec" mode="interpret" dependency="encrypt_password decrypt_credentials formlogic_init" processor="XSLT">
  107. <xts:logicsheet path="logicsheets/presentation/dialog/connections.xslt"/>
  108. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  109. <xsl:stylesheet version="1.0"
  110. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  111. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  112. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  113. xmlns:dcx="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/connections/1/"
  114. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  115. exclude-result-prefixes="cm xsl dcx send xsi">
  116. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  117. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  118. <dcx:testDataSourceVars/>
  119. <xsl:template match="/">
  120. <xts:sequence>
  121. <xts:append>
  122. <testResults>
  123. <send:request provider="xts">
  124. <test:testDataSourceConnection xmlns:test="http://developer.cognos.com/schemas/xts/portal/iTestDataSource/1/">
  125. <connectionString>
  126. <xsl:value-of select="key('env-param','m_p_connectionString')"/>
  127. </connectionString>
  128. <credentials>
  129. <!-- create the encrypted credential -->
  130. <xsl:text/>&lt;credential&gt;&lt;encryptedValue&gt;<xsl:text/>
  131. <xsl:call-template name="dcx:genCredentials">
  132. <xsl:with-param name="username" select="$username"/>
  133. <xsl:with-param name="password" select="$password"/>
  134. <xsl:with-param name="passwordEncrypted" select="$passwordEncrypted"/>
  135. <xsl:with-param name="cubePassword" select="$cubePassword"/>
  136. <xsl:with-param name="cubePasswordEncrypted" select="$cubePasswordEncrypted"/>
  137. <xsl:with-param name="namespace" select="$usedNamespace"/>
  138. </xsl:call-template>
  139. <xsl:text/>&lt;/encryptedValue&gt;&lt;/credential&gt;<xsl:text/>
  140. </credentials>
  141. <xsl:for-each select="key('env-param','dispatcher')">
  142. <dispatcher id="{.}"/>
  143. </xsl:for-each>
  144. </test:testDataSourceConnection>
  145. </send:request>
  146. </testResults>
  147. </xts:append>
  148. </xts:sequence>
  149. </xsl:template>
  150. <dcx:genCredentialTemplate/>
  151. </xsl:stylesheet>
  152. </xts:block>
  153. <!--
  154. ================================================================================
  155. delete_credentials - if we decrypted the credentials then delete them from the DOM once the test is done
  156. ================================================================================
  157. -->
  158. <xts:block id="delete_credentials" dependency="test_connection" type="exec" mode="interpret" processor="XSLT" mandatory="false" condition=".[/root/env/param[@name='pageitem']]">
  159. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  160. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  161. <xsl:variable name="xtscm" select="'http://developer.cognos.com/schemas/xts-cm/1/'"/>
  162. <xsl:template match="/">
  163. <xts:sequence>
  164. <xts:delete select="/root/decryptedCredential"/>
  165. </xts:sequence>
  166. </xsl:template>
  167. </xsl:stylesheet>
  168. </xts:block>
  169. <!--======================================================================
  170. Name: resultPage
  171. Comments: Render the action result page. It's a dialog page with Close button.
  172. ======================================================================-->
  173. <xts:block id="resultPage" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="delete_credentials formlogic_init">
  174. <!-- get the new theme stuff -->
  175. <xts:logicsheet path="logicsheets/portal.xsl"/>
  176. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  177. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  178. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  179. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  180. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  181. <!-- apply the form logic -->
  182. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  183. <xts:logicsheet path="logicsheets/validation.xslt"/>
  184. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  185. <xsl:stylesheet version="1.0"
  186. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  187. xmlns:test="http://developer.cognos.com/schemas/xts/portal/iTestDataSource/1/"
  188. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  189. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  190. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  191. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  192. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  193. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  194. xmlns:tool="http://developer.cognos.com/schemas/xts/logicsheets/xslt/toollogic/"
  195. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  196. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  197. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  198. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  199. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  200. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  201. xmlns:smt="http://developer.cognos.com/schemas/xts/admin/iServerManagement/1/"
  202. xmlns:set="http://exslt.org/sets"
  203. exclude-result-prefixes="xsl test cm cml bus utml send xtsext smt tool set">
  204. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  205. <!-- current file name -->
  206. <xsl:variable name="mname" select="'test_connection_results.xts'"/>
  207. <!-- add any theme variables -->
  208. <pf:variables/>
  209. <!-- back-url must be defined, but not used -->
  210. <xsl:variable name="back-url" select="''"/>
  211. <xsl:variable name="browserTitle"><xts:string id="IDS_VIEW_ACTION_RESULTS_TEST_CONNECTION"/></xsl:variable>
  212. <xsl:variable name="queryServiceIsInstalled" select="/root/installedComponents/configuration/property/component[string(.)='queryService']"/>
  213. <xsl:template match="/root">
  214. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  215. <dp:meta>
  216. <pf:meta/> <!-- Standard meta tags -->
  217. </dp:meta>
  218. <dp:script>
  219. <pf:help context="HID_DATA_SOURCES"/> <!-- Help system -->
  220. </dp:script>
  221. <script language="javascript">
  222. function doCancel()
  223. {
  224. <xsl:choose>
  225. <xsl:when test="key('env-param','from_bmt')!=''">
  226. <!-- Called only when canceling back to BMT environment. -->
  227. window.external.OnClose(1);
  228. </xsl:when>
  229. <xsl:otherwise>
  230. <xsl:choose>
  231. <xsl:when test="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '') ">
  232. document.pform.ps_nav_op.value = 'pop';
  233. <xsl:variable name="nav-stack-delimiter" select="'*'"/>
  234. <xsl:variable name="target">
  235. <xsl:choose>
  236. <xsl:when test="contains(/root/env/param[@name='ps_nav_stack'], $nav-stack-delimiter)">
  237. <xsl:value-of select="substring-before( /root/env/param[@name='ps_nav_stack'], $nav-stack-delimiter )"/>
  238. </xsl:when>
  239. <xsl:otherwise>
  240. <xsl:value-of select="/root/env/param[@name='ps_nav_stack']"/>
  241. </xsl:otherwise>
  242. </xsl:choose>
  243. </xsl:variable>
  244. document.pform.m.value = '<xsl:value-of select="xtsext:javascriptencode(string($target))"/>';
  245. document.pform.submit();
  246. </xsl:when>
  247. <xsl:otherwise>
  248. location.href = '<xsl:value-of select="xtsext:javascriptencode(string(/root/env/param[@name='backURL']))"/>';
  249. </xsl:otherwise>
  250. </xsl:choose>
  251. </xsl:otherwise>
  252. </xsl:choose>
  253. }
  254. </script>
  255. <utml:form name="pform" method="post" action="{$gateway}">
  256. <!-- dialog header -->
  257. <dp:header>
  258. <!-- header titles-->
  259. <dp:title showName="false"><xsl:value-of select="$browserTitle"/></dp:title>
  260. <dp:close>
  261. <a href="javascript:doCancel()">
  262. <dp:closeMarker/>
  263. </a>
  264. </dp:close>
  265. </dp:header>
  266. <!-- layout-->
  267. <lyt:layout style="1" border="no">
  268. <lyt:section>
  269. <xsl:choose>
  270. <xsl:when test="/root/testResults/test:testDataSourceConnectionResponse/dispatcher[displayName != '']">
  271. <cp:table iterate="/root/testResults/test:testDataSourceConnectionResponse/dispatcher" width="100%" align="left" id="maincontent">
  272. <cp:tableHeader>
  273. <cp:columnHeader/>
  274. <!-- Path-Name Column -->
  275. <cp:columnHeader>
  276. <!-- All of this is to align the header (...> Name) with the contents of the table-->
  277. <img height="5" width="1" border="0"><xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute></img>
  278. <xsl:text/><xts:string id="IDS_PATH_INDICATOR"/><xsl:text>&#160;</xsl:text>
  279. <img height="5" width="1" border="0"><xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute></img>
  280. <xsl:text/><xts:string id="IDS_NAME"/><xsl:text/>
  281. </cp:columnHeader>
  282. <cp:columnHeader>
  283. <xts:string id="IDS_TEST_HEADING_TYPE"/>
  284. <xsl:if test="$queryServiceIsInstalled">
  285. <xsl:text> / </xsl:text>
  286. <xts:string id="IDS_TEST_HEADING_STACK"/>
  287. </xsl:if>
  288. </cp:columnHeader>
  289. <cp:columnHeader>
  290. <xts:string id="IDS_HEADING_STATUS"/>
  291. </cp:columnHeader>
  292. <cp:columnHeader width="100%">
  293. <xts:string id="IDS_HEADING_ERROR_MESSAGE"/>
  294. </cp:columnHeader>
  295. </cp:tableHeader>
  296. <!-- Column contents -->
  297. <cp:tableContent>
  298. <cp:columnContent>
  299. <xsl:if test="displayIcon != ''">
  300. <img>
  301. <xsl:attribute name="alt"><xsl:value-of select="displayScreenTip"/></xsl:attribute>
  302. <xsl:attribute name="src"><xsl:value-of select="displayIcon"/></xsl:attribute>
  303. </img>
  304. </xsl:if>
  305. </cp:columnContent>
  306. <!-- Path-Name Column -->
  307. <cp:columnContent>
  308. <xsl:if test="displayName != ''">
  309. <img height="16" width="20" align="absmiddle">
  310. <xsl:attribute name="alt">
  311. <xsl:value-of select="displayPath"/>
  312. </xsl:attribute>
  313. <xsl:attribute name="src"><xsl:value-of select="$skin_images"/>path.gif</xsl:attribute>
  314. </img>
  315. <xsl:text> </xsl:text><xsl:value-of select="displayName"/>
  316. </xsl:if>
  317. </cp:columnContent>
  318. <cp:columnContent>
  319. <span title="{connectionString}">
  320. <xsl:value-of select="connectionType"/>
  321. </span>
  322. <xsl:if test="$queryServiceIsInstalled">
  323. <xsl:text> / </xsl:text>
  324. <xsl:value-of select="connectionStack"/>
  325. </xsl:if>
  326. </cp:columnContent>
  327. <cp:columnContent>
  328. <xsl:choose>
  329. <xsl:when test="not(errors)">
  330. <xsl:choose>
  331. <xsl:when test="count(connectionInfo/message[.!='']) > 1">
  332. <xsl:variable name="msg">
  333. <xsl:apply-templates select="connectionInfo/message"/>
  334. </xsl:variable>
  335. <a href="#" onclick="javascript:alert('{$msg}');"><xts:string id="IDS_JOB_STATUS_SUCCEEDED"/></a>
  336. </xsl:when>
  337. <xsl:otherwise>
  338. <xts:string id="IDS_JOB_STATUS_SUCCEEDED"/>
  339. </xsl:otherwise>
  340. </xsl:choose>
  341. </xsl:when>
  342. <xsl:otherwise>
  343. <xsl:choose>
  344. <xsl:when test="count(errors/message[.!='']) > 1">
  345. <xsl:variable name="msg">
  346. <xsl:apply-templates select="errors/message"/>
  347. </xsl:variable>
  348. <a href="#" onclick="javascript:alert('{$msg}');"><xts:string id="IDS_JOB_STATUS_FAILED"/></a>
  349. </xsl:when>
  350. <xsl:otherwise>
  351. <xts:string id="IDS_JOB_STATUS_FAILED"/>
  352. </xsl:otherwise>
  353. </xsl:choose>
  354. </xsl:otherwise>
  355. </xsl:choose>
  356. </cp:columnContent>
  357. <cp:columnContent wrap="true">
  358. <xsl:choose>
  359. <xsl:when test="not(errors)">
  360. <xsl:value-of select="connectionInfo/message[.!=''][1]"/>
  361. </xsl:when>
  362. <xsl:otherwise>
  363. <xsl:value-of select="errors/message[.!=''][1]"/>
  364. </xsl:otherwise>
  365. </xsl:choose>
  366. </cp:columnContent>
  367. </cp:tableContent>
  368. </cp:table>
  369. </xsl:when>
  370. <xsl:otherwise>
  371. <cp:table iterate="/root/testResults/test:testDataSourceConnectionResponse/dispatcher" width="100%" align="left">
  372. <cp:tableHeader>
  373. <cp:columnHeader>
  374. <xts:string id="IDS_TEST_HEADING_TYPE"/>
  375. <xsl:if test="$queryServiceIsInstalled">
  376. <xsl:text> / </xsl:text>
  377. <xts:string id="IDS_TEST_HEADING_STACK"/>
  378. </xsl:if>
  379. </cp:columnHeader>
  380. <cp:columnHeader>
  381. <xts:string id="IDS_HEADING_STATUS"/>
  382. </cp:columnHeader>
  383. <cp:columnHeader width="100%">
  384. <xts:string id="IDS_HEADING_ERROR_MESSAGE"/>
  385. </cp:columnHeader>
  386. </cp:tableHeader>
  387. <!-- Column contents -->
  388. <cp:tableContent>
  389. <cp:columnContent>
  390. <span title="{connectionString}">
  391. <xsl:value-of select="connectionType"/>
  392. </span>
  393. <xsl:if test="$queryServiceIsInstalled">
  394. <xsl:text> / </xsl:text>
  395. <xsl:value-of select="connectionStack"/>
  396. </xsl:if>
  397. </cp:columnContent>
  398. <cp:columnContent>
  399. <xsl:choose>
  400. <xsl:when test="not(errors)">
  401. <xsl:choose>
  402. <xsl:when test="count(connectionInfo/message[.!='']) > 1">
  403. <xsl:variable name="msg">
  404. <xsl:apply-templates select="connectionInfo/message"/>
  405. </xsl:variable>
  406. <a href="#" onclick="javascript:alert('{$msg}');"><xts:string id="IDS_JOB_STATUS_SUCCEEDED"/></a>
  407. </xsl:when>
  408. <xsl:otherwise>
  409. <xts:string id="IDS_JOB_STATUS_SUCCEEDED"/>
  410. </xsl:otherwise>
  411. </xsl:choose>
  412. </xsl:when>
  413. <xsl:otherwise>
  414. <xsl:choose>
  415. <xsl:when test="count(errors/message[.!='']) > 1">
  416. <xsl:variable name="msg">
  417. <xsl:apply-templates select="errors/message"/>
  418. </xsl:variable>
  419. <a href="#" onclick="javascript:alert('{$msg}');"><xts:string id="IDS_JOB_STATUS_FAILED"/></a>
  420. </xsl:when>
  421. <xsl:otherwise>
  422. <xts:string id="IDS_JOB_STATUS_FAILED"/>
  423. </xsl:otherwise>
  424. </xsl:choose>
  425. </xsl:otherwise>
  426. </xsl:choose>
  427. </cp:columnContent>
  428. <cp:columnContent wrap="true">
  429. <xsl:choose>
  430. <xsl:when test="not(errors)">
  431. <xsl:value-of select="connectionInfo/message[.!=''][1]"/>
  432. </xsl:when>
  433. <xsl:otherwise>
  434. <xsl:value-of select="errors/message[.!=''][1]"/>
  435. </xsl:otherwise>
  436. </xsl:choose>
  437. </cp:columnContent>
  438. </cp:tableContent>
  439. </cp:table>
  440. </xsl:otherwise>
  441. </xsl:choose>
  442. </lyt:section>
  443. </lyt:layout>
  444. <dp:footer>
  445. <df:button df:id="IDS_CLOSE" df:style="stack-down"/>
  446. </dp:footer>
  447. </utml:form>
  448. </dp:page>
  449. </xsl:template>
  450. <xsl:template match="message">
  451. <xsl:value-of select="xtsext:javascriptencode(string(.))"/><xsl:if test="string-length(normalize-space(.)) > 0">\n</xsl:if>
  452. </xsl:template>
  453. <!-- Insert common templates -->
  454. <pf:gen-icon/>
  455. </xsl:stylesheet>
  456. </xts:block>
  457. <!--======================================================================
  458. Name: debug
  459. Comments: display the debug info.
  460. ======================================================================-->
  461. <xts:block id="debug" dependency="resultPage" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  462. <!-- get the debug logic sheet -->
  463. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  464. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/" exclude-result-prefixes="dbg">
  465. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  466. <xsl:template match="/">
  467. <dbg:dumpxml select="/root"/>
  468. </xsl:template>
  469. </xsl:stylesheet>
  470. </xts:block>
  471. </xts:morphlet>