activities_current.xts 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: cogadmin
  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/" resolverBase="cogadmin" messageBase="messages/cogadminuimsgs.xml, messages/portal.xml, messages/portalRL.xml" requiredCapability="canUseScheduling canUseMonitorActivityTool or">
  13. <xts:block id="frag_init" nodelist="env, credential" type="exec" mode="interpret" processor="XSLT" path="cogadmin/logicsheets/fragment_init.xslt" condition=".[not(/root/env/param[@name='frag-directive']='meta-only') and not(/root/env/param[@name='release_conversation'] = 'true')]" mandatory="true"/>
  14. <!--
  15. Get some information about the runnables from uiExtensions
  16. -->
  17. <xts:block id="getRunnableInfo" dependency="frag_init" nodelist="" type="exec" mode="input" processor="XML" path="/portal/uiExtensions.xml">
  18. <xts:logicsheet path="/cogadmin/logicsheets/uiobjects/uiobjects_runnables.xslt"/>
  19. </xts:block>
  20. <xts:block id="getCurrentUser" dependency="frag_init" nodelist="header, env, http, cookies" type="exec" mode="interpret" processor="XSLT" condition="/root/env/param[@name='personalOnly'] ='true'" mandatory="false">
  21. <xts:logicsheet path="/cogadmin/logicsheets/buslogic.xslt"/>
  22. <xsl:stylesheet version="1.0"
  23. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  24. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  25. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  26. exclude-result-prefixes="xsl xts send">
  27. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  28. <xsl:template match="/">
  29. <xts:sequence>
  30. <xts:append>
  31. <currentUser>
  32. <send:request provider="cm">
  33. <cm:query xmlns:cm="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  34. <search xsi:type="xsd:string">~</search>
  35. <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:propEnum[]">
  36. <item xsi:type="cm:propEnum">storeID</item>
  37. </properties>
  38. </cm:query>
  39. </send:request>
  40. </currentUser>
  41. </xts:append>
  42. </xts:sequence>
  43. </xsl:template>
  44. </xsl:stylesheet>
  45. </xts:block>
  46. <!--
  47. Get the current activities interactive activities
  48. -->
  49. <xts:block id="getInteractiveActivities" dependency="frag_init" nodelist="env, header, session" type="exec" mode="interpret" processor="XSLT" condition=".[/root/env/param[@name='current_filter'] = 'interactive']" mandatory="false">
  50. <xts:logicsheet path="cogadmin/logicsheets/admin.xslt"/>
  51. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:admui="http://developer.cognos.com/schemas/xts/admui" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xsl xts SOAP-ENV bus xtsext">
  52. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  53. <!-- common variables -->
  54. <admui:variables/>
  55. <!-- common pager variables -->
  56. <admui:pagerVariables pagerName="current_interactive"/>
  57. <!-- Status filter -->
  58. <xsl:variable name="statusFilter">
  59. <xsl:choose>
  60. <xsl:when test="key('env-param','current_filter_status') and key('env-param','current_filter_status') != ''">
  61. <xsl:value-of select="key('env-param','current_filter_status')"/>
  62. </xsl:when>
  63. <xsl:otherwise>any</xsl:otherwise>
  64. </xsl:choose>
  65. </xsl:variable>
  66. <!-- dispatcher filter -->
  67. <xsl:variable name="dispatcherFilter">
  68. <xsl:choose>
  69. <xsl:when test="key('env-param','current_filter_dispatcher') and key('env-param','current_filter_dispatcher') != ''">
  70. <xsl:value-of select="key('env-param','current_filter_dispatcher')"/>
  71. </xsl:when>
  72. <xsl:otherwise>any</xsl:otherwise>
  73. </xsl:choose>
  74. </xsl:variable>
  75. <xsl:template match="/">
  76. <xts:sequence>
  77. <xts:append select="/root">
  78. <response>
  79. <xts:request protocol="GetInteractiveActivities" responseEnvelope="false">
  80. <SOAP-ENV:Envelope xmlns:nemo="http://developer.cognos.com/nemo" xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  81. <SOAP-ENV:Header>
  82. <xsl:copy-of select="/root/header/bus:biBusHeader"/>
  83. <nemo:cogadminHeader>
  84. <nemo:ResourceIdentifier>cm:system</nemo:ResourceIdentifier>
  85. </nemo:cogadminHeader>
  86. </SOAP-ENV:Header>
  87. <SOAP-ENV:Body>
  88. <resource-prop:GetInteractiveActivities xmlns:resource-prop="http://developer.cognos.com/admin/properties">
  89. <resource-prop:Filters>
  90. <xsl:if test="$statusFilter != 'any'">
  91. <resource-prop:Filter name="Status">
  92. <xsl:choose>
  93. <xsl:when test="$statusFilter = 'executing'">running</xsl:when>
  94. <xsl:otherwise>
  95. <xsl:value-of select="$statusFilter"/>
  96. </xsl:otherwise>
  97. </xsl:choose>
  98. </resource-prop:Filter>
  99. </xsl:if>
  100. <xsl:if test="$dispatcherFilter != 'any'">
  101. <resource-prop:Filter name="DispatcherName"><xsl:value-of select="$dispatcherFilter"/></resource-prop:Filter>
  102. </xsl:if>
  103. <resource-prop:Filter name="TenantID"><xsl:value-of select="'landlord'"/></resource-prop:Filter>
  104. </resource-prop:Filters>
  105. <resource-prop:Sort>
  106. <xsl:attribute name="order">
  107. <xsl:value-of select="key('env-param','sort_order')"/>
  108. </xsl:attribute>
  109. <xsl:value-of select="key('env-param','sort_column')"/></resource-prop:Sort>
  110. <resource-prop:PageInfo>
  111. <resource-prop:PageProperty name="skipObjects"><xsl:value-of select="$skipObjects"/></resource-prop:PageProperty>
  112. <resource-prop:PageProperty name="maxObjects"><xsl:value-of select="$maxObjects"/></resource-prop:PageProperty>
  113. <resource-prop:PageProperty name="linesPerPage"><xsl:value-of select="$linesPerPage"/></resource-prop:PageProperty>
  114. </resource-prop:PageInfo>
  115. </resource-prop:GetInteractiveActivities>
  116. </SOAP-ENV:Body>
  117. </SOAP-ENV:Envelope>
  118. </xts:request>
  119. </response>
  120. </xts:append>
  121. </xts:sequence>
  122. </xsl:template>
  123. </xsl:stylesheet>
  124. </xts:block>
  125. <!-- the following two blocks are meant to release the JSM conversation (if any) when user is leaving the current window -->
  126. <xts:block id="initConversation" nodelist="env, credential" type="exec" mode="interpret" processor="XSLT" path="cogadmin/logicsheets/fragment_init.xslt" condition=".[(/root/env/param[@name='release_conversation'] = 'true')]" mandatory="true"/>
  127. <xts:block id="releaseConversation" dependency="initConversation" nodelist="session, env, header, http" type="exec" mode="interpret" processor="XSLT">
  128. <xts:logicsheet path="/cogadmin/logicsheets/buslogic.xslt"/>
  129. <xsl:stylesheet version="1.0"
  130. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  131. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  132. xmlns:async="http://developer.cognos.com/schemas/xts/cogadmin/iAsyncRequest/1/"
  133. exclude-result-prefixes="xsl async xts send">
  134. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  135. <xsl:template match="/">
  136. <xts:sequence>
  137. <xts:append select="/root">
  138. <send:request provider="xts" option="xml-multipart">
  139. <async:asyncRequest>
  140. <provider>monitorService</provider>
  141. <releaseConversation>true</releaseConversation>
  142. <conversation><xsl:value-of select="/root/env/param[@name='web64conversation']"/></conversation>
  143. <tracking><xsl:value-of select="/root/env/param[@name='tracking']"/></tracking>
  144. </async:asyncRequest>
  145. </send:request>
  146. </xts:append>
  147. </xts:sequence>
  148. </xsl:template>
  149. </xsl:stylesheet>
  150. </xts:block>
  151. <!--
  152. Get the current background activities
  153. -->
  154. <xts:block id="getBackgroundActivities" dependency="frag_init getCurrentUser" nodelist="session, env, header, http, configProps, currentUser" type="exec" mode="interpret" condition=".[(not(/root/env/param[@name='current_filter']) or /root/env/param[@name='current_filter'] = 'background') or (/root/env/param[@name='current_filter'] = 'interactive' and /root/env/param[@name='web64conversation'] != '')]" mandatory="false" processor="XSLT">
  155. <xts:logicsheet path="cogadmin/logicsheets/admin.xslt"/>
  156. <xts:logicsheet path="/cogadmin/logicsheets/buslogic.xslt"/>
  157. <xsl:stylesheet version="1.0"
  158. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  159. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  160. xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
  161. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  162. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  163. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  164. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  165. xmlns:admui="http://developer.cognos.com/schemas/xts/admui"
  166. xmlns:async="http://developer.cognos.com/schemas/xts/cogadmin/iAsyncRequest/1/"
  167. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  168. xmlns:val="http://developer.cognos.com/schemas/validator/1/"
  169. xmlns:fragment="urn:cognos:fragments:validator"
  170. xmlns:fragment-cogadmin="urn:cognos:fragments:validator:cogadmin"
  171. exclude-result-prefixes="xsl xsi xts SOAP-ENV bus xtsext admui send SOAP-ENV SOAP-ENC xsd">
  172. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  173. <!-- common variables -->
  174. <admui:variables/>
  175. <!-- common pager variables -->
  176. <admui:pagerVariables pagerName="current_activities_background"/>
  177. <xsl:variable name="personalOnly" select="key('env-param', 'personalOnly') ='true' or not(key('session-param','capabilities')/canUseAdministrationPortal)"/>
  178. <xsl:template match="/">
  179. <xts:sequence>
  180. <xts:append select="/root">
  181. <send:request provider="xts" option="xml-multipart">
  182. <async:asyncRequest>
  183. <provider>monitorService</provider>
  184. <xsl:if test="(/root/env/param[@name='current_filter'] = 'interactive') and key('env-param','web64conversation') != ''">
  185. <releaseConversation>true</releaseConversation>
  186. </xsl:if>
  187. <conversation><xsl:value-of select="key('env-param','web64conversation')"/></conversation>
  188. <tracking><xsl:value-of select="key('env-param','tracking')"/></tracking>
  189. <request>
  190. <xsl:choose>
  191. <xsl:when test="key('env-param','secondaryRequest') != ''">
  192. <xsl:value-of select="key('env-param','secondaryRequest')"/>
  193. </xsl:when>
  194. <xsl:otherwise>runSpecification</xsl:otherwise>
  195. </xsl:choose>
  196. </request>
  197. <specification>
  198. <bus:specification xsi:type="bus:monitorServiceSpecification">
  199. <bus:value xsi:type="bus:specification">
  200. <xts:transform name="XMLEncode">
  201. <monitorServiceSpecification>
  202. <sort>
  203. <order>
  204. <xsl:choose>
  205. <xsl:when test="key('env-param', 'sort_order')='ascending'">ascending</xsl:when>
  206. <xsl:otherwise>descending</xsl:otherwise>
  207. </xsl:choose>
  208. </order>
  209. <sortItem>
  210. <xsl:choose>
  211. <xsl:when test="key('env-param', 'sort_column') != ''">
  212. <xsl:value-of select="key('env-param', 'sort_column')"/>
  213. </xsl:when>
  214. <xsl:otherwise>startTime</xsl:otherwise>
  215. </xsl:choose>
  216. </sortItem>
  217. </sort>
  218. <xsl:if test="key('env-param','current_filter_scope') != ''">
  219. <scope>
  220. <searchPaths>
  221. <searchPath><xsl:value-of select="key('env-param','current_filter_scope')"/></searchPath>
  222. </searchPaths>
  223. </scope>
  224. </xsl:if>
  225. <!-- user just did a from/to action -->
  226. <xsl:if test="$startPosition != '' and $endPosition != ''">
  227. <display>
  228. <start><xsl:value-of select="$startPosition"/></start>
  229. <end><xsl:value-of select="$endPosition"/></end>
  230. </display>
  231. </xsl:if>
  232. <filters>
  233. <xsl:if test="key('env-param','current_filter_type') != ''">
  234. <objectClass><xsl:value-of select="key('env-param','current_filter_type')"/></objectClass>
  235. </xsl:if>
  236. <status>
  237. <xsl:choose>
  238. <xsl:when test="not(key('env-param','current_filter_status')) or key('env-param','current_filter_status')=''">all</xsl:when>
  239. <xsl:otherwise><xsl:value-of select="key('env-param','current_filter_status')"/></xsl:otherwise>
  240. </xsl:choose>
  241. </status>
  242. <!-- add the priority filter -->
  243. <xsl:if test="key('env-param','current_filter_priority') and key('env-param','current_filter_priority')!=''">
  244. <priority>
  245. <xsl:value-of select="key('env-param','current_filter_priority')"/>
  246. </priority>
  247. </xsl:if>
  248. <xsl:if test="key('env-param','current_filter_tenantid') and key('env-param','current_filter_tenantid')!=''">
  249. <tenantID>
  250. <xsl:value-of select="key('env-param','current_filter_tenantid')"/>
  251. </tenantID>
  252. </xsl:if>
  253. <xsl:if test="key('env-param','current_filter_dispatcher') != ''">
  254. <dispatcherID><xsl:value-of select="key('env-param','current_filter_dispatcher')"/></dispatcherID>
  255. </xsl:if>
  256. <xsl:choose>
  257. <xsl:when test="key('env-param','current_filter_ran_by') != ''" >
  258. <user><xsl:value-of select="key('env-param','current_filter_ran_by')"/></user>
  259. </xsl:when>
  260. <xsl:when test="$personalOnly">
  261. <user>
  262. <xsl:value-of select="/root/currentUser/*[local-name()='queryResponse']/queryResult/item/storeID/value"/>
  263. </user>
  264. </xsl:when>
  265. </xsl:choose>
  266. <xsl:if test="key('env-param','current_filter_owned_by') != ''" >
  267. <owner><xsl:value-of select="key('env-param','current_filter_owned_by')"/></owner>
  268. </xsl:if>
  269. </filters>
  270. </monitorServiceSpecification>
  271. </xts:transform>
  272. </bus:value>
  273. </bus:specification>
  274. </specification>
  275. <parameters>
  276. <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]"/>
  277. </parameters>
  278. <options>
  279. <bus:options SOAP-ENC:arrayType="bus:option[]" xsi:type="SOAP-ENC:Array">
  280. <item xsi:type="bus:asynchOptionInt">
  281. <bus:name xsi:type="bus:asynchOptionEnum">primaryWaitThreshold</bus:name>
  282. <bus:value xsi:type="xsd:int">0</bus:value>
  283. </item>
  284. <item xsi:type="bus:pagingOptionInt">
  285. <bus:name xsi:type="bus:pagingOptionEnum">maximumObjects</bus:name>
  286. <bus:value xsi:type="xsd:int"><xsl:value-of select="$linesPerPage"/></bus:value>
  287. </item>
  288. </bus:options>
  289. </options>
  290. </async:asyncRequest>
  291. </send:request>
  292. </xts:append>
  293. </xts:sequence>
  294. </xsl:template>
  295. </xsl:stylesheet>
  296. </xts:block>
  297. <xts:block id="getDispatchers" dependency="getBackgroundActivities" nodelist="header, session, env, asyncRequestResponse" type="exec" mode="interpret" processor="XSLT" condition="not(/root/env/param[@name='personalOnly']) or /root/env/param[@name='personalOnly']!='true'">
  298. <xts:logicsheet path="cogadmin/logicsheets/cmrequests.xslt"/>
  299. <xts:logicsheet path="cogadmin/logicsheets/buslogic.xslt"/>
  300. <xsl:stylesheet version="1.0"
  301. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  302. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  303. xmlns:exslt="http://exslt.org/sets"
  304. xmlns:ns1="http://www.ibm.com/xmlns/prod/cognos/monitorService/201101/"
  305. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  306. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  307. xmlns:cmr="http://developer.cognos.com/schemas/xts/cmrequests"
  308. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  309. exclude-result-prefixes="xsl xts exslt cm xsi">
  310. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  311. <xsl:template match="/">
  312. <xsl:variable name="dispatcherIds" select="/root/asyncRequestResponse/response/ns1:runSpecificationResponse/result/details/*[contains(@xsi:type, ':asynchDetailEventRecord')]/history/*[contains(@xsi:type, ':history')]/dispatcherID"/>
  313. <xsl:if test="count($dispatcherIds) > 0">
  314. <xts:sequence>
  315. <cmr:getAllDispatchers/>
  316. </xts:sequence>
  317. </xsl:if>
  318. </xsl:template>
  319. </xsl:stylesheet>
  320. </xts:block>
  321. <xts:block id="getActivityHistories" dependency="getBackgroundActivities" nodelist="asyncRequestResponse, header, session" type="exec" mode="interpret" processor="XSLT">
  322. <xts:logicsheet path="cogadmin/logicsheets/schedule.xslt"/>
  323. <xts:logicsheet path="cogadmin/logicsheets/buslogic.xslt"/>
  324. <xsl:stylesheet version="1.0"
  325. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  326. xmlns:exslt="http://exslt.org/sets"
  327. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  328. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  329. xmlns:sch="http://developer.cognos.com/schemas/xts/schedule"
  330. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  331. exclude-result-prefixes="xsl xts exslt cm xsi">
  332. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  333. <xsl:template match="/">
  334. <!-- Variables for by sch:queryHistoriesFromScheduledActvities -->
  335. <xsl:variable name="searchPath" select="exslt:distinct(/root/asyncRequestResponse/response/*[local-name()='runSpecificationResponse']/result/details/*[contains(@xsi:type, ':asynchDetailEventRecord')]/runnable/*/searchPath/value)"/>
  336. <xsl:variable name="noHistoryMsgForLastExcutionTime"><xsl:text><xts:string id="IDS_ADM_SCHEDULE_LAST_EXECUTION_NO_HISTORY"/></xsl:text></xsl:variable>
  337. <xsl:variable name="maxHistoryObjects">1</xsl:variable>
  338. <xts:sequence>
  339. <sch:queryHistoriesFromScheduledActvities/>
  340. </xts:sequence>
  341. </xsl:template>
  342. </xsl:stylesheet>
  343. </xts:block>
  344. <!-- Merge the tenantNames into the response -->
  345. <xts:block processor="XSLT" type="exec" mandatory="false"
  346. path="/portal/tenancy/mergeTenantNames.xslt"
  347. id="mergeTenantNames"
  348. dependency="getBackgroundActivities getInteractiveActivities"
  349. condition=".[/root/session/param[@name='e_showTenantInfo']='true']">
  350. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  351. </xts:block>
  352. <xts:block id="getMeta" type="exec" mode="interpret" nodelist="env" processor="XSLT">
  353. <xsl:stylesheet version="1.0"
  354. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  355. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  356. xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
  357. exclude-result-prefixes="xsl xts xos xtsext">
  358. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  359. <xsl:template match="/">
  360. <xts:sequence>
  361. <xts:append select="/root/output">
  362. <xos:part>
  363. <xos:entityHeader>
  364. <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
  365. </xos:entityHeader>
  366. <xos:entityBody>
  367. <fragment>
  368. <library type="text/javascript" href="$WEB$/ps/cogadmin/js/barchart.js"/>
  369. <info>
  370. <title>
  371. <xts:string id="IDS_CUR_BACKGROUND_TITLE"/>
  372. </title>
  373. </info>
  374. <preferredTitle>
  375. <xsl:choose>
  376. <xsl:when test="/root/env/param[@name='current_filter'] = 'interactive'"><xts:string id="IDS_CUR_INTERACTIVE_TITLE"/></xsl:when>
  377. <xsl:otherwise><xts:string id="IDS_CUR_BACKGROUND_TITLE"/></xsl:otherwise>
  378. </xsl:choose>
  379. </preferredTitle>
  380. <meta>
  381. <customProperties name="personalOnly">
  382. <datatype>xs:boolean</datatype>
  383. <default>
  384. <value>false</value>
  385. </default>
  386. <control appearance="hidden" />
  387. <validate>
  388. <name>fixed</name>
  389. <rule>
  390. <type>
  391. <boolean/>
  392. </type>
  393. </rule>
  394. </validate>
  395. </customProperties>
  396. <transientProperties name="timestamp">
  397. <validate>
  398. <name>timestamp</name>
  399. <ruleRef id="fragment-cogadmin:timestamp"/>
  400. </validate>
  401. </transientProperties>
  402. <transientProperties name="current_filter">
  403. <default>
  404. <value>background</value>
  405. </default>
  406. <validate>
  407. <name>current_filter</name>
  408. <ruleRef id="fragment-cogadmin:filter_type"/>
  409. </validate>
  410. </transientProperties>
  411. <transientProperties name="current_filter_status">
  412. <validate>
  413. <name>current_filter_status</name>
  414. <ruleRef id="fragment-cogadmin:filter_status"/>
  415. </validate>
  416. </transientProperties>
  417. <transientProperties name="current_filter_type">
  418. <validate>
  419. <name>current_filter_type</name>
  420. <ruleRef id="fragment-cogadmin:filter_type"/>
  421. </validate>
  422. </transientProperties>
  423. <transientProperties name="current_filter_scope">
  424. <validate>
  425. <name>current_filter_scope</name>
  426. <ruleRef id="fragment-cogadmin:filter_scope"/>
  427. </validate>
  428. </transientProperties>
  429. <transientProperties name="current_filter_dispatcher">
  430. <validate>
  431. <name>current_filter_dispatcher</name>
  432. <ruleRef id="fragment-cogadmin:filter_dispatcher"/>
  433. </validate>
  434. </transientProperties>
  435. <transientProperties name="current_filter_ran_by">
  436. <validate>
  437. <name>current_filter_ran_by</name>
  438. <ruleRef id="fragment-cogadmin:user"/>
  439. </validate>
  440. </transientProperties>
  441. <transientProperties name="current_filter_owned_by">
  442. <validate>
  443. <name>current_filter_owned_by</name>
  444. <ruleRef id="fragment-cogadmin:user"/>
  445. </validate>
  446. </transientProperties>
  447. <transientProperties name="current_filter_priority">
  448. <validate>
  449. <name>current_filter_priority</name>
  450. <ruleRef id="fragment-cogadmin:filter_priority"/>
  451. </validate>
  452. </transientProperties>
  453. <transientProperties name="current_filter_tenantid">
  454. <validate>
  455. <name>current_filter_tenantid</name>
  456. <ruleRef id="fragment-cogadmin:filter_tenantid"/>
  457. </validate>
  458. </transientProperties>
  459. <globalValidator>
  460. <parameter>
  461. <name>sort_order</name>
  462. <ruleRef id="fragment-cogadmin:sort_order"/>
  463. </parameter>
  464. </globalValidator>
  465. <requiredCapabilities>canUseScheduling canUseMonitorActivityTool or</requiredCapabilities>
  466. </meta>
  467. </fragment>
  468. </xos:entityBody>
  469. </xos:part>
  470. </xts:append>
  471. </xts:sequence>
  472. </xsl:template>
  473. </xsl:stylesheet>
  474. </xts:block>
  475. <xts:block id="getChart" dependency="frag_init getInteractiveActivities getBackgroundActivities getRunnableInfo" nodelist="response, asyncRequestResponse, http, user, env" type="exec" mode="interpret" processor="XSLT" mandatory="true">
  476. <xsl:stylesheet version="1.0"
  477. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  478. xmlns:admui="http://developer.cognos.com/schemas/xts/admui"
  479. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  480. exclude-result-prefixes="xsl xsi admui">
  481. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  482. <xsl:template match="/">
  483. <xts:sequence>
  484. <xts:append select="/root">
  485. <barChart>
  486. <type><xsl:value-of select="'Bars'"/></type>
  487. <yTitle><xts:string id="IDS_BARCHART_TITLE_NUMBER_OF_ACTIVITIES"/></yTitle>
  488. <xTitle><xts:string id="IDS_BARCHART_TITLE_MONITORING_ACTIVITIES"/></xTitle>
  489. <xsl:choose>
  490. <xsl:when test="/root/env/param[@name='current_filter'] = 'interactive'">
  491. <row>
  492. <label><xts:string id="IDS_BARCHART_PENDING"/></label>
  493. <value><xsl:value-of select="/root/response/*[local-name() = 'GetInteractiveActivitiesResponse']/*[local-name() = 'Summary']/*[local-name() = 'StatusSummary' and @status='pending']"/></value>
  494. </row>
  495. <row>
  496. <label><xts:string id="IDS_BARCHART_EXECUTING"/></label>
  497. <value><xsl:value-of select="/root/response/*[local-name() = 'GetInteractiveActivitiesResponse']/*[local-name() = 'Summary']/*[local-name() = 'StatusSummary' and @status='running']"/></value>
  498. </row>
  499. </xsl:when>
  500. <xsl:otherwise>
  501. <xsl:variable name="asynchDetailParameterValues" select="/root/asyncRequestResponse/response/*/result/details/*[contains(@xsi:type, ':asynchDetailParameterValues')]/parameters/*[contains(@xsi:type,':parameterValue')]"/>
  502. <row>
  503. <label><xts:string id="IDS_BARCHART_PENDING"/></label>
  504. <value><xsl:value-of select="$asynchDetailParameterValues[name = 'pending']/value/*[contains(@xsi:type,':simpleParmValueItem')]/use"/></value>
  505. </row>
  506. <row>
  507. <label><xts:string id="IDS_BARCHART_EXECUTING"/></label>
  508. <value><xsl:value-of select="$asynchDetailParameterValues[name = 'executing']/value/*[contains(@xsi:type,':simpleParmValueItem')]/use"/></value>
  509. </row>
  510. <row>
  511. <label><xts:string id="IDS_BARCHART_INACTIVE"/></label>
  512. <value><xsl:value-of select="$asynchDetailParameterValues[name = 'inactive']/value/*[contains(@xsi:type,':simpleParmValueItem')]/use"/></value>
  513. </row>
  514. <row>
  515. <label><xts:string id="IDS_BARCHART_SUSPENDED"/></label>
  516. <value><xsl:value-of select="$asynchDetailParameterValues[name = 'suspended']/value/*[contains(@xsi:type,':simpleParmValueItem')]/use"/></value>
  517. </row>
  518. </xsl:otherwise>
  519. </xsl:choose>
  520. </barChart>
  521. </xts:append>
  522. <xts:append select="/root">
  523. <xts:transform src="/cogadmin/transforms/getChartUrl.xslt" processor="XSLT">
  524. <xts:param name="logicsheet">/cogadmin/logicsheets/presentation/common.xslt</xts:param>
  525. <root>
  526. <xts:queryNode select="/root/barChart"/>
  527. </root>
  528. </xts:transform>
  529. </xts:append>
  530. </xts:sequence>
  531. </xsl:template>
  532. </xsl:stylesheet>
  533. </xts:block>
  534. <xts:block id="renderMarkup" dependency="frag_init getChart getInteractiveActivities getBackgroundActivities getActivityHistories getDispatchers getRunnableInfo getMeta" nodelist="cogadminChartUrl, asyncRequestResponse, dispatchers, env, runnables" type="exec" mode="interpret" processor="XSLT">
  535. <xsl:stylesheet version="1.0"
  536. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  537. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  538. xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
  539. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  540. exclude-result-prefixes="xsl xts SOAP-ENV xos xtsext">
  541. <xsl:template match="/">
  542. <xts:sequence>
  543. <xts:append select="/root/output/*[local-name()='part']/*[local-name()='entityBody']/fragment">
  544. <state>
  545. <xsl:variable name="state">
  546. <xsl:if test="/root/asyncRequestResponse">
  547. <xsl:text>&lt;param name="web64conversation"&gt;</xsl:text>
  548. <xsl:value-of select="xtsext:xmlencode(string(/root/asyncRequestResponse/conversation))"/>
  549. <xsl:text>&lt;/param&gt;</xsl:text>
  550. <xsl:text>&lt;param name="tracking"&gt;</xsl:text>
  551. <xsl:value-of select="xtsext:xmlencode(string(/root/asyncRequestResponse/tracking))"/>
  552. <xsl:text>&lt;/param&gt;</xsl:text>
  553. </xsl:if>
  554. <xsl:text>&lt;param name="personalOnly"&gt;</xsl:text>
  555. <xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='personalOnly']))"/>
  556. <xsl:text>&lt;/param&gt;</xsl:text>
  557. </xsl:variable>
  558. <xsl:value-of select="xtsext:base64encode($state,true())"/>
  559. </state>
  560. <markup>
  561. <mimeType>text/html</mimeType>
  562. <markupXml>
  563. <xsl:variable name="transform">
  564. <xsl:choose>
  565. <xsl:when test="/root/env/param[@name='current_filter'] = 'interactive'">/cogadmin/transforms/gen-ui-markup/activities_current_interactive.xslt</xsl:when>
  566. <xsl:otherwise>/cogadmin/transforms/gen-ui-markup/activities_current_background.xslt</xsl:otherwise>
  567. </xsl:choose>
  568. </xsl:variable>
  569. <xts:transform src="/cogadmin/transforms/presentation/renderFragment.xslt" processor="XSLT">
  570. <xts:param name="messageBase">/messages/cogadminuimsgs.xml</xts:param>
  571. <xts:param name="logicsheet">/cogadmin/logicsheets/admin.xslt</xts:param>
  572. <root>
  573. <!-- Generate UI markup using the response and metadata -->
  574. <xts:transform src="{$transform}" processor="XSLT">
  575. <xts:param name="messageBase">/messages/cogadminuimsgs.xml</xts:param>
  576. <xts:param name="logicsheet">/cogadmin/logicsheets/presentation/common.xslt</xts:param>
  577. <xts:param name="logicsheet">/cogadmin/logicsheets/presentation/pager.xslt</xts:param>
  578. <xts:param name="logicsheet">/cogadmin/logicsheets/admin.xslt</xts:param>
  579. <root>
  580. <xts:queryNode select="/root/asyncRequestResponse | /root/user | /root/runnables | /root/response | /root/system | /root/session | /root/env | /root/activityHistory | /root/ dispatchers"/>
  581. </root>
  582. </xts:transform>
  583. <xts:queryNode select="/root/system | /root/session | /root/env | /root/user"/>
  584. </root>
  585. </xts:transform>
  586. </markupXml>
  587. </markup>
  588. <subfragment id="cogadminChart">
  589. <xsl:attribute name="href">
  590. <xsl:value-of select="/root/cogadminChartUrl"/>
  591. </xsl:attribute>
  592. </subfragment>
  593. </xts:append>
  594. </xts:sequence>
  595. </xsl:template>
  596. </xsl:stylesheet>
  597. </xts:block>
  598. </xts:morphlet>