view.xts 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  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">
  13. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  14. <!--
  15. ===============================================================================================
  16. Deal with the shortcuts
  17. ===============================================================================================
  18. -->
  19. <xts:block id="processShortcut" processor="XSLT" type="exec" dependency="formlogic_init" condition=".[/root/env/param[@name='m_class'] = 'shortcut'] " mandatory="false">
  20. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  21. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
  22. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  23. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
  24. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  25. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  26. <xsl:template match="/">
  27. <xts:sequence>
  28. <xts:replace select="/root/env/param[@name='m_class']">
  29. <param name="m_class">
  30. <xsl:value-of select="key('env-param','sc_target_class')"/>
  31. </param>
  32. </xts:replace>
  33. <xts:replace select="/root/env/param[@name='m_obj']">
  34. <param name="m_obj">
  35. <xsl:value-of select="key('env-param','sc_target_obj')"/>
  36. </param>
  37. </xts:replace>
  38. <xts:replace select="/root/env/param[@name='m_name']">
  39. <param name="m_name">
  40. <xsl:value-of select="key('env-param','sc_target_name')"/>
  41. </param>
  42. </xts:replace>
  43. </xts:sequence>
  44. </xsl:template>
  45. </xsl:stylesheet>
  46. </xts:block>
  47. <!--
  48. ===============================================================================================
  49. ckFilterChange:
  50. When the filter changes, the 'm_page' history variables must be deleted before recalculating maxObjects and skipObjects.
  51. ===============================================================================================
  52. -->
  53. <xts:block id="ckFilterChange" processor="XSLT" type="exec" dependency="formlogic_init processShortcut" mandatory="false" condition=".[/root/env/param[@name = 'm_historyFilterChange'] and .[/root/env/param[@name = 'm_historyFilterChange'] ='true']]">
  54. <xsl:stylesheet xmlns:adm="http://developer.cognos.com/schemas/xts/logicsheets/contentadmin/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  55. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  56. <xsl:template match="/">
  57. <xts:sequence>
  58. <xts:delete select="/root/env/param[@name='m_pagerfromhistory' or @name='m_pagertohistory' or @name='m_pagerfrom_dhistory' or @name='m_pagerto_dhistory' or @name='m_historysection' or @name='m_pg_ehistory' or @name='m_historyFilterChange']"/>
  59. </xts:sequence>
  60. </xsl:template>
  61. </xsl:stylesheet>
  62. </xts:block>
  63. <!--
  64. ===============================================================================================
  65. getContent
  66. ===============================================================================================
  67. -->
  68. <xts:block id="getContent" processor="XSLT" type="exec" dependency="formlogic_init processShortcut ckFilterChange">
  69. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  70. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
  71. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  72. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
  73. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  74. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  75. <xsl:template match="/">
  76. <xsl:variable name="statusFilter">
  77. <xsl:choose>
  78. <xsl:when test="not(key('env-param', 'vrh_status')) or (key('env-param', 'vrh_status')='all')">
  79. <xsl:text/>
  80. </xsl:when>
  81. <xsl:otherwise>
  82. <xsl:choose>
  83. <xsl:when test="key('env-param', 'vrh_status') = 'cancelled'">
  84. <xsl:text>[@status='cancelled' or @status='terminated' or @status='purged']</xsl:text>
  85. </xsl:when>
  86. <xsl:otherwise>
  87. <xsl:text>[@status='</xsl:text>
  88. <xsl:value-of select="key('env-param', 'vrh_status')"/>
  89. <xsl:text>']</xsl:text>
  90. </xsl:otherwise>
  91. </xsl:choose>
  92. </xsl:otherwise>
  93. </xsl:choose>
  94. </xsl:variable>
  95. <xsl:variable name="m_sort" select="'dd'"/>
  96. <xsl:variable name="object" select="key('env-param', 'm_obj')"/>
  97. <xsl:variable name="history-path" select="concat($object, '/history[permission(&quot;read&quot;)]', $statusFilter)"/>
  98. <xts:sequence>
  99. <xts:append>
  100. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  101. <send:request provider="cm">
  102. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  103. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  104. <cm:requests>
  105. <cm:query>
  106. <cm:search><xsl:value-of select="$history-path"/></cm:search>
  107. <cm:properties>
  108. <cm:property name="defaultName"/>
  109. <cm:property name="searchPath"/>
  110. <cm:property name="storeID"/>
  111. <cm:property name="modificationTime"/>
  112. <cm:property name="permissions"/>
  113. <cm:property name="usage"/>
  114. <cm:property name="disabled"/>
  115. <cm:property name="parent"/>
  116. <cm:property name="status"/>
  117. <cm:property name="actualExecutionTime"/>
  118. <cm:property name="requestedExecutionTime"/>
  119. <cm:property name="actualCompletionTime"/>
  120. <cm:property name="maximumDetailSeverity"/>
  121. </cm:properties>
  122. <cm:options>
  123. <cm:refProps>
  124. <cm:refProp refPropName="parent">
  125. <cm:properties>
  126. <cm:property name="defaultName"/>
  127. <cm:property name="searchPath"/>
  128. </cm:properties>
  129. </cm:refProp>
  130. </cm:refProps>
  131. </cm:options>
  132. <cm:sortBy>
  133. <xsl:choose>
  134. <xsl:when test="$m_sort = 'da'">
  135. <cm:sort name="modificationTime" order="ascending"/>
  136. </xsl:when>
  137. <xsl:when test="$m_sort = 'na'">
  138. <cm:sort name="defaultName" order="ascending"/>
  139. </xsl:when>
  140. <xsl:when test="$m_sort = 'nd'">
  141. <cm:sort name="defaultName" order="descending"/>
  142. </xsl:when>
  143. <xsl:otherwise>
  144. <cm:sort name="requestedExecutionTime" order="descending"/>
  145. </xsl:otherwise>
  146. </xsl:choose>
  147. </cm:sortBy>
  148. </cm:query>
  149. </cm:requests>
  150. </cm:query>
  151. </xts:transform>
  152. </send:request>
  153. </xts:transform>
  154. </xts:append>
  155. <xts:delete select="/root/env/param[@name='pagerfromhistory']"/>
  156. <xts:delete select="/root/env/param[@name='pagertohistory']"/>
  157. <xts:delete select="/root/env/param[@name='pagerfrom_dhistory']"/>
  158. <xts:delete select="/root/env/param[@name='pagerto_dhistory']"/>
  159. </xts:sequence>
  160. </xsl:template>
  161. </xsl:stylesheet>
  162. </xts:block>
  163. <!--
  164. ===============================================================================================
  165. getHistoryDetails
  166. ===============================================================================================
  167. -->
  168. <xts:block id="getHistoryDetails" processor="XSLT" type="exec" dependency="getContent" condition="/root/*[local-name()='queryResponse']/*[local-name()='queryReply']/*[local-name()='history']" mandatory="false">
  169. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  170. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/">
  171. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  172. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  173. <xsl:template match="/">
  174. <xts:sequence>
  175. <xts:append>
  176. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  177. <send:request provider="cm">
  178. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  179. <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  180. <cm:requests>
  181. <xsl:for-each select="/root/cm:queryResponse/cm:queryReply/cm:history">
  182. <cm:query>
  183. <cm:search><xsl:value-of select="concat(cm:searchPath, '/*[@objectClass=&quot;historyDetailReportService&quot; or @objectClass=&quot;historyDetailAgentService&quot;]')"/></cm:search>
  184. <cm:properties>
  185. <cm:property name="parent"/>
  186. <cm:property name="output"/>
  187. </cm:properties>
  188. <cm:options>
  189. <cm:refProps>
  190. <cm:refProp refPropName="parent">
  191. <cm:properties>
  192. <cm:property name="storeID"/>
  193. </cm:properties>
  194. </cm:refProp>
  195. <cm:refProp refPropName="output">
  196. <cm:properties>
  197. <cm:property name="hasChildren"/>
  198. <cm:property name="storeID"/>
  199. </cm:properties>
  200. </cm:refProp>
  201. </cm:refProps>
  202. </cm:options>
  203. </cm:query>
  204. </xsl:for-each>
  205. </cm:requests>
  206. </cm:query>
  207. </xts:transform>
  208. </send:request>
  209. </xts:transform>
  210. </xts:append>
  211. </xts:sequence>
  212. </xsl:template>
  213. </xsl:stylesheet>
  214. </xts:block>
  215. <!--
  216. ===============================================================================================
  217. main
  218. ===============================================================================================
  219. -->
  220. <xts:block id="main" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="getHistoryDetails">
  221. <!-- get the ContentManager logic sheet -->
  222. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  223. <!-- get the debug logic sheet -->
  224. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  225. <xts:logicsheet path="logicsheets/portal.xsl"/>
  226. <!-- get the new theme stuff -->
  227. <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
  228. <xts:logicsheet path="logicsheets/presentation/main/framework.xsl"/>
  229. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  230. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  231. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  232. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  233. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  234. <!-- apply the form logic -->
  235. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  236. <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  237. <xsl:stylesheet version="1.0"
  238. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  239. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  240. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  241. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  242. xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt"
  243. xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf"
  244. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  245. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  246. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  247. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  248. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  249. xmlns:dbg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/debug/"
  250. xmlns:ctrl="http://developer.cognos.com/schemas/xts/logicsheets/xslt/controls/"
  251. xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
  252. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  253. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  254. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  255. exclude-result-prefixes="xsl mt mf cm cf cp pf df dp lyt ctrl cml bus dbg utml xts xtsext">
  256. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  257. <!-- current file name -->
  258. <xsl:variable name="mname" select="'history/view.xts'"/>
  259. <xsl:variable name="cmd-form" select="'pform'"/> <!-- Required -->
  260. <xsl:variable name="edit-form" select="'pform'"/>
  261. <xsl:variable name="objectName">
  262. <xsl:choose>
  263. <xsl:when test="/root/cm:queryResponse[1]/cm:queryReply[1]/*"><xsl:value-of select="/root/cm:queryResponse[1]/cm:queryReply[1]/*[1]/cm:parent/*/cm:defaultName"/></xsl:when>
  264. <xsl:otherwise>
  265. <xsl:value-of select="/root/env/param[@name='m_name']"/>
  266. </xsl:otherwise>
  267. </xsl:choose>
  268. </xsl:variable>
  269. <!-- add any theme variables -->
  270. <df:variables/>
  271. <pf:variables/>
  272. <mf:variables>
  273. <mf:stateParams>
  274. <xsl:value-of select="' m_path backURL m_class m_obj m_name '"/>
  275. </mf:stateParams>
  276. </mf:variables>
  277. <!-- start the output -->
  278. <xsl:variable name="query-values" select="/root/env/param"/>
  279. <xsl:variable name="filterStatus" select="$query-values[@name='vrh_status']"/>
  280. <xsl:variable name="runHistoryDetail">
  281. <xsl:choose>
  282. <xsl:when test="key('env-param','m_class') = 'exportDeployment' or key('env-param','m_class') = 'importDeployment'">
  283. <xsl:value-of select="'/history/deployment_details.xts'"/>
  284. </xsl:when>
  285. <xsl:otherwise>
  286. <xsl:value-of select="concat('/history/',key('env-param','m_class'),'_details.xts')"/>
  287. </xsl:otherwise>
  288. </xsl:choose>
  289. </xsl:variable>
  290. <xsl:key name="output-location" match="/root/cm:queryResponse[2]/cm:queryReply/cm:historyDetailReportService/cm:output/*[local-name()!='nil']/cm:storeID" use="../../../cm:parent/*/cm:storeID"/>
  291. <xsl:key name="eventlist-location" match="/root/cm:queryResponse[2]/cm:queryReply/cm:historyDetailAgentService/cm:output/*[local-name()!='nil']/cm:storeID" use="../../../cm:parent/*/cm:storeID"/>
  292. <xsl:template match="/root">
  293. <xsl:variable name="browserTitle">
  294. <xts:string id="IDS_VRH_TITLE">
  295. <xts:param name="objectName">
  296. <span lang="{$contentLocale}"><xsl:value-of select="xtsext:enforceBTD($objectName, $baseTextDirection, $productLocale, boolean($isBidiEnabled='true'))"/></span>
  297. </xts:param>
  298. </xts:string>
  299. </xsl:variable>
  300. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">
  301. <mf:head/>
  302. <dp:meta>
  303. <pf:meta/> <!-- Standard meta tags -->
  304. </dp:meta>
  305. <dp:script>
  306. <pf:help context="HID_VIEW_RUN_HISTORY"/> <!-- Help system -->
  307. <pf:launch/> <!-- adds functions to launch Studios.... -->
  308. <script language="javascript">
  309. function doApplyFilter()
  310. {
  311. var form = document.pform;
  312. form.m_historysection.value = '1';
  313. if (form.m_historyFilterChange)
  314. form.m_historyFilterChange.value = 'true';
  315. form.m.value = "<xsl:value-of select="$app"/>/<xsl:value-of select="$mname"/>";
  316. form.backURL.value = "<xsl:value-of select="xtsext:javascriptencode(string($query-values[@name='backURL']))"/>";
  317. form.submit();
  318. }
  319. function refreshPage()
  320. {
  321. form = document.pform;
  322. if (form.m.value != '<xsl:value-of select="$app"/>/<xsl:value-of select="$mname"/>')
  323. {
  324. form.m.value = "<xsl:value-of select="$app"/>/<xsl:value-of select="$mname"/>";
  325. form.m_obj.value = "<xsl:value-of select="xtsext:javascriptencode(string(/root/cm:queryResponse[1]/cm:queryReply[1]/*[1]/cm:parent/*/cm:searchPath))"/>";
  326. form.backURL.value = "<xsl:value-of select="xtsext:javascriptencode(string(key('env-param','backURL')))"/>";
  327. }
  328. document.pform.submit();
  329. }
  330. </script>
  331. </dp:script>
  332. <utml:form name="pform" method="post" action="{$gateway}">
  333. <!-- To track filter change so we can delete 'm_pager' values -->
  334. <utml:input type="hidden" name="m_historyFilterChange" utml:update="false">
  335. <utml:value>
  336. <xsl:value-of select="'false'"/>
  337. </utml:value>
  338. </utml:input>
  339. <utml:input type="hidden" name="m_class"/>
  340. <dp:header>
  341. <dp:title showName="false">
  342. <xsl:copy-of select="$browserTitle"/>
  343. </dp:title>
  344. <dp:description>
  345. <xts:string id="IDS_VRH_DESCRIPTION"/>
  346. </dp:description>
  347. <dp:headerLinks>
  348. <dp:headerLink>
  349. <dp:hl_attribute name="href">javascript:refreshPage();</dp:hl_attribute>
  350. <dp:hl_attribute name="class">class="dialogHeaderLink"</dp:hl_attribute>
  351. <dp:hl_attribute name="label"><xts:string id="IDS_REFRESH"/></dp:hl_attribute>
  352. </dp:headerLink>
  353. </dp:headerLinks>
  354. </dp:header>
  355. <utml:input type="hidden" name="reportVersionPath" value=""/>
  356. <utml:input type="hidden" name="runHistoryRequestedTime" value=""/>
  357. <lyt:layout style="1" border="no">
  358. <lyt:section>
  359. <dp:input>
  360. <dp:section1>
  361. <dp:text>
  362. <label for="lbl_status"><xts:string id="IDS_VRH_FILTER_STATUS"/></label>
  363. </dp:text>
  364. </dp:section1>
  365. <dp:section2>
  366. <dp:field>
  367. <utml:select name="vrh_status" id="lbl_status" size="1" onChange="javascript:doApplyFilter();">
  368. <utml:option value="all">
  369. <xsl:if test="not($filterStatus) or ($filterStatus = 'all')">
  370. <xsl:attribute name="selected">selected</xsl:attribute>
  371. </xsl:if>
  372. <xts:string id="IDS_SCHED_STATUS_ALL"/>
  373. </utml:option>
  374. <utml:option value="cancelled">
  375. <xsl:if test="$filterStatus = 'cancelled'">
  376. <xsl:attribute name="selected">selected</xsl:attribute>
  377. </xsl:if>
  378. <xts:string id="IDS_STATUS_CANCELLED"/>
  379. </utml:option>
  380. <utml:option value="failed">
  381. <xsl:if test="$filterStatus = 'failed'">
  382. <xsl:attribute name="selected">selected</xsl:attribute>
  383. </xsl:if>
  384. <xts:string id="IDS_STATUS_FAILED"/>
  385. </utml:option>
  386. <utml:option value="succeeded">
  387. <xsl:if test="$filterStatus = 'succeeded'">
  388. <xsl:attribute name="selected">selected</xsl:attribute>
  389. </xsl:if>
  390. <xts:string id="IDS_STATUS_SUCCEEDED"/>
  391. </utml:option>
  392. <utml:option value="suspended">
  393. <xsl:if test="$filterStatus = 'suspended'">
  394. <xsl:attribute name="selected">selected</xsl:attribute>
  395. </xsl:if>
  396. <xts:string id="IDS_STATUS_SUSPENDED"/>
  397. </utml:option>
  398. </utml:select>
  399. </dp:field>
  400. </dp:section2>
  401. </dp:input>
  402. </lyt:section>
  403. <lyt:section>
  404. <cf:main-pager-section name="history" form="pform" width="350">
  405. <cf:param name="item-path">cm:queryResponse[1]/cm:queryReply/cm:history</cf:param>
  406. <cf:param name="target">concat(concat($app,'/'),$mname)</cf:param>
  407. <cf:param name="lines-per-page"><xsl:value-of select="key('session-param', 'linesPerPage')"/></cf:param>
  408. <cf:param name="rows">
  409. <cp:tableHeader>
  410. <cp:columnHeader width="200">
  411. <xts:string id="IDS_HEADING_REQEXECTIME"/>
  412. </cp:columnHeader>
  413. <cp:columnHeader width="150">
  414. <xts:string id="IDS_HEADING_ACTUALEXECTIME"/>
  415. </cp:columnHeader>
  416. <cp:columnHeader width="150">
  417. <xts:string id="IDS_HEADING_ACTUALCOMPTIME"/>
  418. </cp:columnHeader>
  419. <cp:columnHeader width="150">
  420. <xts:string id="IDS_HEADING_STATUS"/>
  421. </cp:columnHeader>
  422. <cp:columnHeader width="100%">
  423. <xts:string id="IDS_HEADING_ACTIONS"/>
  424. </cp:columnHeader>
  425. </cp:tableHeader>
  426. <cp:tableContent>
  427. <cp:columnContent>
  428. <xsl:value-of select="xtsext:enforceBTD(xtsext:formatDateFromUTC( string( cm:requestedExecutionTime ), number( '2' ), number( '3' ), string( $timeZone ), string( $contentLocale ) ), 'auto', $productLocale)"/>
  429. </cp:columnContent>
  430. <cp:columnContent>
  431. <xsl:value-of select="xtsext:enforceBTD(xtsext:formatDateFromUTC( string( cm:actualExecutionTime ), number( '2' ), number( '3' ), string( $timeZone ), string( $contentLocale ) ), 'auto', $productLocale)"/>
  432. </cp:columnContent>
  433. <cp:columnContent>
  434. <xsl:value-of select="xtsext:enforceBTD(xtsext:formatDateFromUTC( string( cm:actualCompletionTime ), number( '2' ), number( '3' ), string( $timeZone ), string( $contentLocale ) ), 'auto', $productLocale)"/>
  435. </cp:columnContent>
  436. <cp:columnContent>
  437. <xsl:variable name="runStatus">
  438. <xsl:value-of select="string( cm:status )"/>
  439. </xsl:variable>
  440. <xsl:variable name="runStatusIconError">
  441. <xsl:choose>
  442. <xsl:when test="cm:maximumDetailSeverity='fatal'">true</xsl:when>
  443. <xsl:when test="cm:maximumDetailSeverity='error'">true</xsl:when>
  444. <xsl:otherwise>false</xsl:otherwise>
  445. </xsl:choose>
  446. </xsl:variable>
  447. <xsl:variable name="runStatusIconWarn">
  448. <xsl:choose>
  449. <xsl:when test="cm:maximumDetailSeverity='warn'">true</xsl:when>
  450. <xsl:otherwise>false</xsl:otherwise>
  451. </xsl:choose>
  452. </xsl:variable>
  453. <xsl:choose>
  454. <xsl:when test="$runStatus='succeeded' and $runStatusIconError='true'">
  455. <xts:string id="IDS_STATUS_SUCCEEDED"/>
  456. <img height="8" width="8" border="0">
  457. <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/<xsl:value-of select="$app"/>/images/msg_error_8.gif</xsl:attribute>
  458. <xsl:attribute name="aria-label"><xts:string id="IDS_JOB_STATUS_WITH_ERRORS"/></xsl:attribute>
  459. </img>
  460. </xsl:when>
  461. <xsl:when test="$runStatus='succeeded' and $runStatusIconWarn='true'">
  462. <xts:string id="IDS_STATUS_SUCCEEDED"/>
  463. <img height="8" width="8" border="0">
  464. <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/<xsl:value-of select="$app"/>/images/msg_warning_8.gif</xsl:attribute>
  465. <xsl:attribute name="aria-label"><xts:string id="IDS_JOB_STATUS_WITH_WARNINGS"/></xsl:attribute>
  466. </img>
  467. </xsl:when>
  468. <xsl:when test="$runStatus='succeeded' and $runStatusIconError='false' and $runStatusIconWarn='false'">
  469. <xts:string id="IDS_STATUS_SUCCEEDED"/>
  470. </xsl:when>
  471. <xsl:when test="$runStatus='problems' or $runStatus='failed'">
  472. <xts:string id="IDS_STATUS_FAILED"/>
  473. </xsl:when>
  474. <xsl:when test="$runStatus='executing'">
  475. <xts:string id="IDS_STATUS_EXECUTING"/>
  476. </xsl:when>
  477. <xsl:when test="$runStatus='cancelled' or $runStatus='terminated' or $runStatus='purged'">
  478. <xts:string id="IDS_STATUS_CANCELLED"/>
  479. </xsl:when>
  480. <xsl:when test="$runStatus='pending'">
  481. <xts:string id="IDS_STATUS_PENDING"/>
  482. </xsl:when>
  483. <xsl:when test="$runStatus='suspended'">
  484. <xts:string id="IDS_STATUS_SUSPENDED"/>
  485. </xsl:when>
  486. <xsl:otherwise>
  487. <xts:string id="IDS_STATUS_UNKNOWN"/>
  488. </xsl:otherwise>
  489. </xsl:choose>
  490. </cp:columnContent>
  491. <cp:columnContent>
  492. <xsl:variable name="supportViewOutputsAction">
  493. <xsl:choose>
  494. <!-- need to check for key('output-location', cm:storeID) and also ensure that the reportVersion has children which will indicate the presence of outputs. -->
  495. <xsl:when test="key('output-location', cm:storeID) and /root/cm:queryResponse[2]/cm:queryReply/cm:historyDetailReportService/cm:output/cm:reportVersion/cm:hasChildren='true'">true</xsl:when>
  496. <xsl:otherwise>false</xsl:otherwise>
  497. </xsl:choose>
  498. </xsl:variable>
  499. <xsl:variable name="supportViewEventListAction">
  500. <xsl:choose>
  501. <xsl:when test="key('eventlist-location', cm:storeID)">true</xsl:when>
  502. <xsl:otherwise>false</xsl:otherwise>
  503. </xsl:choose>
  504. </xsl:variable>
  505. <xsl:variable name="reportVerPath">storeID("<xsl:value-of select="key('output-location', cm:storeID)"/>")</xsl:variable>
  506. <xsl:variable name="envtListPath">storeID("<xsl:value-of select="key('eventlist-location', cm:storeID)"/>")</xsl:variable>
  507. <xsl:call-template name="action-properties">
  508. <xsl:with-param name="obj-name">
  509. <xsl:value-of select="$objectName"/>
  510. </xsl:with-param>
  511. <xsl:with-param name="obj-path">
  512. <xsl:value-of select="key('env-param','m_obj')"/>
  513. </xsl:with-param>
  514. <xsl:with-param name="history-path" select="cm:searchPath"/>
  515. <xsl:with-param name="class" select="key('env-param','m_class')"/>
  516. <xsl:with-param name="reportVersion-path" select="$reportVerPath"/>
  517. <xsl:with-param name="agsEventList-path" select="concat($envtListPath, '/output[@format=&quot;HTML&quot;]')"/>
  518. <xsl:with-param name="runHistoryRequestedTime" select="cm:requestedExecutionTime"/>
  519. <xsl:with-param name="supportViewRunHistoryDetails" select="true()"/>
  520. <xsl:with-param name="supportViewOutputsAction" select="$supportViewOutputsAction"/>
  521. <xsl:with-param name="supportViewHotListAction" select="$supportViewEventListAction"/>
  522. </xsl:call-template>
  523. </cp:columnContent>
  524. </cp:tableContent>
  525. </cf:param>
  526. </cf:main-pager-section>
  527. </lyt:section>
  528. </lyt:layout>
  529. <dp:footer>
  530. <dp:button>
  531. <a href="{/root/env/param[@name = 'backURL']}" role="button">
  532. <dp:buttonText><xts:string id="IDS_CLOSE"/></dp:buttonText>
  533. </a>
  534. </dp:button>
  535. </dp:footer>
  536. </utml:form>
  537. </dp:page>
  538. </xsl:template>
  539. <mt:actions mode="tools" viewOutputForm="pform"/>
  540. </xsl:stylesheet>
  541. </xts:block>
  542. <!--
  543. ===============================================================================================
  544. debug
  545. ===============================================================================================
  546. -->
  547. <xts:block id="debug" dependency="main" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  548. <!-- get the debug logic sheet -->
  549. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  550. <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">
  551. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  552. <xsl:template match="/">
  553. <dbg:dumpxml select="/root"/>
  554. </xsl:template>
  555. </xsl:stylesheet>
  556. </xts:block>
  557. </xts:morphlet>