schedule.xts 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  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" 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')]" mandatory="true"/>
  14. <!--
  15. Get the schedules
  16. -->
  17. <xts:block id="getContent" dependency="frag_init" nodelist="env, header, session, system, http, configProps" type="exec" mode="interpret" processor="XSLT">
  18. <xts:logicsheet path="logicsheets/tenantlogic.xsl"/>
  19. <xts:logicsheet path="cogadmin/logicsheets/admin.xslt"/>
  20. <xts:logicsheet path="cogadmin/logicsheets/presentation/filters.xslt"/>
  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:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  25. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  26. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  27. xmlns:flt="http://developer.cognos.com/schemas/uic/presentation/filters/"
  28. xmlns:admui="http://developer.cognos.com/schemas/xts/admui"
  29. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  30. exclude-result-prefixes="xsl xts SOAP-ENV bus admui xtsext flt send">
  31. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  32. <!-- common variables -->
  33. <admui:variables/>
  34. <!-- common pager variables -->
  35. <admui:pagerVariables pagerName="schedules"/>
  36. <xsl:variable name="personalOnly" select="key('env-param', 'personalOnly') ='true' or not(key('session-param','capabilities')/canUseAdministrationPortal)"/>
  37. <!--
  38. build a searchPath to the runnable
  39. -->
  40. <flt:buildRunnableSearchPath prefix="schedule"/>
  41. <xsl:variable name="schedulePath">
  42. <xsl:value-of select="$runnablePath"/>
  43. <xsl:text>schedule[permission('read')]</xsl:text>
  44. <!-- add the priority filter -->
  45. <xsl:if test="key('env-param', 'schedule_filter_priority') != ''">
  46. <xsl:text>[@priority='</xsl:text>
  47. <xsl:value-of select="key('env-param', 'schedule_filter_priority')"/>
  48. <xsl:text>']</xsl:text>
  49. </xsl:if>
  50. <!-- add the scheduled by filter -->
  51. <xsl:choose>
  52. <xsl:when test="key('env-param', 'schedule_filter_scheduled_by') != ''">
  53. <xsl:text>[containsReferences(@credential, </xsl:text>
  54. <xsl:value-of select="key('env-param', 'schedule_filter_scheduled_by')"/>
  55. <xsl:text>/credential)]</xsl:text>
  56. </xsl:when>
  57. <xsl:when test="$personalOnly">
  58. <xsl:text>[containsReferences(@credential, ~/credential)]</xsl:text>
  59. </xsl:when>
  60. </xsl:choose>
  61. <!-- add the tenantid filter -->
  62. <xsl:if test="key('env-param', 'schedule_filter_tenantid') != ''">
  63. <xsl:text>[@tenantID='</xsl:text>
  64. <xsl:value-of select="key('env-param', 'schedule_filter_tenantid')"/>
  65. <xsl:text>']</xsl:text>
  66. </xsl:if>
  67. </xsl:variable>
  68. <xsl:template match="/">
  69. <xts:sequence>
  70. <xts:append select="/root">
  71. <response>
  72. <xts:request href="bus://dispatcher" protocol="NAV" responseEnvelope="false" outputHeader="false">
  73. <SOAP-ENV:Envelope xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  74. <SOAP-ENV:Header>
  75. <xsl:copy-of select="/root/header/bus:biBusHeader"/>
  76. </SOAP-ENV:Header>
  77. <SOAP-ENV:Body>
  78. <nav:search>
  79. <!-- nav options -->
  80. <nav:validateTag fault="true"/>
  81. <nav:scope>
  82. <xsl:value-of select="$schedulePath"/>
  83. <!-- add the schedule status filter -->
  84. <xsl:choose>
  85. <xsl:when test="key('env-param', 'schedule_filter_status')='enabled'">
  86. <xsl:text>[@active='true']</xsl:text>
  87. </xsl:when>
  88. <xsl:when test="key('env-param', 'schedule_filter_status')='disabled'">
  89. <xsl:text>[@active='false']</xsl:text>
  90. </xsl:when>
  91. </xsl:choose>
  92. </nav:scope>
  93. <nav:property name="fullPath"/>
  94. <nav:property name="icons"/>
  95. <nav:property name="searchPath"/>
  96. <nav:property name="times"/>
  97. <nav:property name="position"/>
  98. <nav:property name="eventID"/>
  99. <nav:property name="active"/>
  100. <nav:property name="defaultName"/>
  101. <nav:property name="lastModifiedDate"/>
  102. <nav:property name="credential"/>
  103. <nav:property name="internalId"/>
  104. <nav:property name="searchPathForURL"/>
  105. <nav:property name="priority"/>
  106. <nav:property name="output"/>
  107. <nav:property name="permissions"/>
  108. <nav:property name="screenTip"/>
  109. <nav:property name="tenantID"/>
  110. <nav:property name="hidden"/>
  111. <nav:property name="shown"/>
  112. <nav:property name="tenantID"/>
  113. <!-- nav properties -->
  114. <nav:recursive>false</nav:recursive>
  115. <nav:param name="backUrl">false</nav:param>
  116. <nav:param name="urlFlags">h1cu</nav:param>
  117. <nav:param name="mode">admin</nav:param>
  118. <nav:maxObjects><xsl:value-of select="$maxObjects"/></nav:maxObjects>
  119. <nav:skipObjects><xsl:value-of select="$skipObjects"/></nav:skipObjects>
  120. <nav:sort>
  121. <xsl:attribute name="order">
  122. <xsl:choose>
  123. <xsl:when test="key('env-param', 'sort_order')='ascending'">ascending</xsl:when>
  124. <xsl:otherwise>descending</xsl:otherwise>
  125. </xsl:choose>
  126. </xsl:attribute>
  127. <xsl:choose>
  128. <xsl:when test="key('env-param', 'sort_column') != ''">
  129. <xsl:value-of select="key('env-param', 'sort_column')"/>
  130. </xsl:when>
  131. <xsl:otherwise>lastModifiedDate</xsl:otherwise>
  132. </xsl:choose>
  133. </nav:sort>
  134. <!-- common nav params -->
  135. <admui:commonNavParams/>
  136. </nav:search>
  137. </SOAP-ENV:Body>
  138. </SOAP-ENV:Envelope>
  139. </xts:request>
  140. </response>
  141. </xts:append>
  142. </xts:sequence>
  143. <!-- get the counts for the graph -->
  144. <xts:sequence>
  145. <!--
  146. todo: put back the check to show/hide parts of the UI post beta once a solution is figured out for cogadmin
  147. <xsl:if test="key('system-param', 'enable-history-counts')='true'">
  148. -->
  149. <xts:append>
  150. <send:request provider="cm">
  151. <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">
  152. <requests xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:queryRequest[]">
  153. <item xsi:type="cm:queryRequest">
  154. <search xsi:type="xsd:string"><xsl:value-of select="$schedulePath"/>[@active='true']</search>
  155. <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:propEnum[]">
  156. <item xsi:type="cm:propEnum">active</item>
  157. <item xsi:type="cm:propEnum">position</item>
  158. </properties>
  159. <options xsi:type="cm:queryOptions">
  160. <skipObjects xsi:type="xsd:integer">-1</skipObjects>
  161. <maxObjects xsi:type="xsd:integer">1</maxObjects>
  162. </options>
  163. </item>
  164. <item xsi:type="cm:queryRequest">
  165. <search xsi:type="xsd:string"><xsl:value-of select="$schedulePath"/>[@active='false']</search>
  166. <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:propEnum[]">
  167. <item xsi:type="cm:propEnum">active</item>
  168. <item xsi:type="cm:propEnum">position</item>
  169. </properties>
  170. <options xsi:type="cm:queryOptions">
  171. <skipObjects xsi:type="xsd:integer">-1</skipObjects>
  172. <maxObjects xsi:type="xsd:integer">1</maxObjects>
  173. </options>
  174. </item>
  175. </requests>
  176. </cm:query>
  177. </send:request>
  178. </xts:append>
  179. </xts:sequence>
  180. </xsl:template>
  181. </xsl:stylesheet>
  182. </xts:block>
  183. <!-- Merge the tenantNames into the response -->
  184. <xts:block processor="XSLT" type="exec" mandatory="false"
  185. path="/portal/tenancy/mergeTenantNames.xslt"
  186. id="mergeTenantNames"
  187. dependency="getContent"
  188. condition=".[/root/session/param[@name='e_showTenantInfo']='true']">
  189. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  190. </xts:block>
  191. <!--
  192. Get the scheduled by information
  193. -->
  194. <xts:block id="getScheduledBy" dependency="frag_init mergeTenantNames" nodelist="header, response" type="exec" mode="interpret" processor="XSLT" condition=".[/root/response/*[local-name()='searchResponse']/*[local-name()='content']/*[local-name()='item']/*[local-name()='credential']/*[local-name()='internalId' and . != '']]" mandatory="false">
  195. <xts:logicsheet path="/cogadmin/logicsheets/buslogic.xslt"/>
  196. <xsl:stylesheet version="1.0"
  197. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  198. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  199. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  200. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  201. xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
  202. exclude-result-prefixes="xsl xts SOAP-ENV bus nav">
  203. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  204. <xsl:template match="/">
  205. <xts:sequence>
  206. <xts:append select="/root">
  207. <scheduledBy>
  208. <send:request provider="cm">
  209. <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">
  210. <requests xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:queryRequest[]">
  211. <xsl:for-each select="/root/response/nav:searchResponse/nav:content/nav:item[./nav:credential/nav:searchPath != '']">
  212. <!-- most users won't have access to the credential, so we need parse the user's searchPath from the credential searchPath -->
  213. <xsl:variable name="userSearchPath" select="substring-before(nav:credential/nav:searchPath, '/credential')"/>
  214. <xsl:if test="$userSearchPath!=''">
  215. <item xsi:type="cm:queryRequest">
  216. <search xsi:type="xsd:string"><xsl:value-of select="$userSearchPath"/></search>
  217. <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:propEnum[]">
  218. <item xsi:type="cm:propEnum">defaultName</item>
  219. <item xsi:type="cm:propEnum">userName</item>
  220. <item xsi:type="cm:propEnum">searchPath</item>
  221. <item xsi:type="cm:propEnum">shown</item>
  222. </properties>
  223. </item>
  224. </xsl:if>
  225. </xsl:for-each>
  226. </requests>
  227. </cm:query>
  228. </send:request>
  229. </scheduledBy>
  230. </xts:append>
  231. </xts:sequence>
  232. </xsl:template>
  233. </xsl:stylesheet>
  234. </xts:block>
  235. <!--
  236. Get the most recent event information
  237. -->
  238. <xts:block id="getMostRecentEvent" dependency="frag_init mergeTenantNames" nodelist="header, response" type="exec" mode="interpret" processor="XSLT" condition=".[/root/response/*[local-name()='searchResponse']/*[local-name()='content']/*[local-name()='item']/*[local-name()='item']/*[local-name()='type' and . = 'agentDefinition']]" mandatory="false">
  239. <xts:logicsheet path="/cogadmin/logicsheets/buslogic.xslt"/>
  240. <xsl:stylesheet version="1.0"
  241. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  242. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  243. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  244. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  245. xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
  246. exclude-result-prefixes="xsl xts SOAP-ENV bus nav">
  247. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  248. <xsl:template match="/">
  249. <xts:sequence>
  250. <xts:append select="/root">
  251. <mostRecentEvent>
  252. <send:request provider="cm">
  253. <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">
  254. <requests xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:queryRequest[]">
  255. <xsl:for-each select="/root/response/nav:searchResponse/nav:content/nav:item/nav:item[./nav:type = 'agentDefinition']">
  256. <item xsi:type="cm:queryRequest">
  257. <search xsi:type="xsd:string">/transientStateFolder/agentState[containsReferences(@definition, <xsl:value-of select="nav:searchPath"/>)]</search>
  258. <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:propEnum[]">
  259. <item xsi:type="cm:propEnum">storeID</item>
  260. <item xsi:type="cm:propEnum">definition</item>
  261. </properties>
  262. </item>
  263. <item xsi:type="cm:queryRequest">
  264. <search xsi:type="xsd:string">/transientStateFolder/agentState[containsReferences(@definition, <xsl:value-of select="nav:searchPath"/>)]/agentOutputHotList[last()]/output[@format="HTML"]</search>
  265. <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:propEnum[]">
  266. <item xsi:type="cm:propEnum">ancestors</item>
  267. </properties>
  268. </item>
  269. </xsl:for-each>
  270. </requests>
  271. </cm:query>
  272. </send:request>
  273. </mostRecentEvent>
  274. </xts:append>
  275. </xts:sequence>
  276. </xsl:template>
  277. </xsl:stylesheet>
  278. </xts:block>
  279. <xts:block id="getMeta" type="exec" mode="interpret" nodelist="env" processor="XSLT">
  280. <xsl:stylesheet version="1.0"
  281. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  282. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  283. xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
  284. exclude-result-prefixes="xsl xts xos xtsext">
  285. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  286. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  287. <xsl:template match="/">
  288. <xts:sequence>
  289. <xts:append select="/root/output">
  290. <xos:part>
  291. <xos:entityHeader>
  292. <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
  293. </xos:entityHeader>
  294. <xos:entityBody>
  295. <fragment>
  296. <library type="text/javascript" href="$WEB$/ps/cogadmin/js/barchart.js"/>
  297. <info>
  298. <title>
  299. <xts:string id="IDS_SCH_TITLE"/>
  300. </title>
  301. </info>
  302. <preferredTitle>
  303. <xts:string id="IDS_SCH_TITLE"/>
  304. </preferredTitle>
  305. <meta>
  306. <customProperties name="personalOnly">
  307. <datatype>xs:boolean</datatype>
  308. <default>
  309. <value>false</value>
  310. </default>
  311. <control appearance="hidden" />
  312. <validate>
  313. <name>fixed</name>
  314. <rule>
  315. <type>
  316. <boolean/>
  317. </type>
  318. </rule>
  319. </validate>
  320. </customProperties>
  321. <transientProperties name="timestamp">
  322. <validate>
  323. <name>timestamp</name>
  324. <ruleRef id="fragment-cogadmin:timestamp"/>
  325. </validate>
  326. </transientProperties>
  327. <transientProperties name="schedule_filter_status">
  328. <validate>
  329. <name>schedule_filter_status</name>
  330. <ruleRef id="fragment-cogadmin:filter_status"/>
  331. </validate>
  332. </transientProperties>
  333. <transientProperties name="schedule_filter_type">
  334. <validate>
  335. <name>schedule_filter_type</name>
  336. <ruleRef id="fragment-cogadmin:filter_type"/>
  337. </validate>
  338. </transientProperties>
  339. <transientProperties name="schedule_filter_scope">
  340. <validate>
  341. <name>schedule_filter_scope</name>
  342. <ruleRef id="fragment-cogadmin:filter_scope"/>
  343. </validate>
  344. </transientProperties>
  345. <transientProperties name="schedule_filter_priority">
  346. <validate>
  347. <name>schedule_filter_priority</name>
  348. <ruleRef id="fragment-cogadmin:filter_priority"/>
  349. </validate>
  350. </transientProperties>
  351. <transientProperties name="schedule_filter_tenantid">
  352. <validate>
  353. <name>schedule_filter_tenantid</name>
  354. <ruleRef id="fragment-cogadmin:filter_tenantid"/>
  355. </validate>
  356. </transientProperties>
  357. <transientProperties name="schedule_filter_scheduled_by">
  358. <validate>
  359. <name>schedule_filter_scheduled_by</name>
  360. <ruleRef id="fragment-cogadmin:user"/>
  361. </validate>
  362. </transientProperties>
  363. <transientProperties name="schedule_filter_owned_by">
  364. <validate>
  365. <name>schedule_filter_owned_by</name>
  366. <ruleRef id="fragment-cogadmin:user"/>
  367. </validate>
  368. </transientProperties>
  369. <globalValidator>
  370. <parameter>
  371. <name>sort_order</name>
  372. <ruleRef id="fragment-cogadmin:sort_order"/>
  373. </parameter>
  374. </globalValidator>
  375. <requiredCapabilities>canUseScheduling canUseMonitorActivityTool or</requiredCapabilities>
  376. </meta>
  377. <state>
  378. <xsl:variable name="state">
  379. <xsl:text>&lt;param name="personalOnly"&gt;</xsl:text>
  380. <xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='personalOnly']))"/>
  381. <xsl:text>&lt;/param&gt;</xsl:text>
  382. </xsl:variable>
  383. <xsl:value-of select="xtsext:base64encode($state,true())"/>
  384. </state>
  385. </fragment>
  386. </xos:entityBody>
  387. </xos:part>
  388. </xts:append>
  389. </xts:sequence>
  390. </xsl:template>
  391. </xsl:stylesheet>
  392. </xts:block>
  393. <xts:block id="getChart" dependency="frag_init mergeTenantNames" type="exec" mode="interpret" nodelist="cm:queryResponse, env, user, http" processor="XSLT" mandatory="true">
  394. <xsl:stylesheet version="1.0"
  395. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  396. xmlns:cm="http://developer.cognos.com/schemas/bibus/3/"
  397. exclude-result-prefixes="xsl cm">
  398. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  399. <xsl:variable name="cmResponse" select="/root/*[local-name()='queryResponse']/returns/item"/>
  400. <xsl:template match="/">
  401. <xts:sequence>
  402. <xts:append select="/root">
  403. <barChart>
  404. <type><xsl:value-of select="'Bars'"/></type>
  405. <yTitle><xts:string id="IDS_BARCHART_TITLE_NUMBER_OF_ACTIVITIES"/></yTitle>
  406. <xTitle><xts:string id="IDS_BARCHART_TITLE_MONITORING_ACTIVITIES"/></xTitle>
  407. <row>
  408. <label><xts:string id="IDS_BARCHART_ENABLED"/></label>
  409. <value>
  410. <xsl:choose>
  411. <xsl:when test="$cmResponse[1]/queryResult/item/position/value != ''">
  412. <xsl:value-of select="number($cmResponse[1]/queryResult/item/position/value) + 1"/>
  413. </xsl:when>
  414. <xsl:otherwise>0</xsl:otherwise>
  415. </xsl:choose>
  416. </value>
  417. </row>
  418. <row>
  419. <label><xts:string id="IDS_BARCHART_DISABLED"/></label>
  420. <value>
  421. <xsl:choose>
  422. <xsl:when test="$cmResponse[2]/queryResult/item/position/value != ''">
  423. <xsl:value-of select="number($cmResponse[2]/queryResult/item/position/value) + 1"/>
  424. </xsl:when>
  425. <xsl:otherwise>0</xsl:otherwise>
  426. </xsl:choose>
  427. </value>
  428. </row>
  429. </barChart>
  430. </xts:append>
  431. <xts:append select="/root">
  432. <xts:transform src="/cogadmin/transforms/getChartUrl.xslt" processor="XSLT">
  433. <xts:param name="logicsheet">/cogadmin/logicsheets/presentation/common.xslt</xts:param>
  434. <root>
  435. <xts:queryNode select="/root/barChart"/>
  436. </root>
  437. </xts:transform>
  438. </xts:append>
  439. </xts:sequence>
  440. </xsl:template>
  441. </xsl:stylesheet>
  442. </xts:block>
  443. <!--
  444. render the HTML
  445. -->
  446. <xts:block id="renderMarkup" dependency="getChart frag_init getMeta mergeTenantNames getScheduledBy getMostRecentEvent" nodelist="cogadminChartUrl, env, user, system" type="exec" mode="interpret" processor="XSLT">
  447. <xts:logicsheet path="cogadmin/logicsheets/admin.xslt"/>
  448. <xsl:stylesheet version="1.0"
  449. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  450. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  451. xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
  452. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  453. xmlns:nemo="http://developer.cognos.com/nemo"
  454. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  455. xmlns:val="http://developer.cognos.com/schemas/validator/1/"
  456. xmlns:fragment="urn:cognos:fragments:validator"
  457. xmlns:fragment-cogadmin="urn:cognos:fragments:validator:cogadmin"
  458. xmlns:admui="http://developer.cognos.com/schemas/xts/admui"
  459. exclude-result-prefixes="xsl nemo xts SOAP-ENV xos bus admui">
  460. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  461. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  462. <xsl:template match="/">
  463. <xts:sequence>
  464. <xts:append select="/root/output/*[local-name()='part']/*[local-name()='entityBody']/fragment">
  465. <markup>
  466. <mimeType>text/html</mimeType>
  467. <markupXml>
  468. <xts:transform src="/cogadmin/transforms/presentation/renderFragment.xslt" processor="XSLT">
  469. <xts:param name="messageBase">/messages/cogadminuimsgs.xml</xts:param>
  470. <xts:param name="logicsheet">/cogadmin/logicsheets/admin.xslt</xts:param>
  471. <root>
  472. <!-- Generate UI markup using the response and metadata -->
  473. <xts:transform src="/cogadmin/transforms/gen-ui-markup/schedule.xslt" processor="XSLT">
  474. <xts:param name="messageBase">/messages/cogadminuimsgs.xml</xts:param>
  475. <xts:param name="logicsheet">/cogadmin/logicsheets/presentation/common.xslt</xts:param>
  476. <xts:param name="logicsheet">/cogadmin/logicsheets/presentation/pager.xslt</xts:param>
  477. <xts:param name="logicsheet">/cogadmin/logicsheets/admin.xslt</xts:param>
  478. <root>
  479. <xts:queryNode select="/root/*[local-name()='queryResponse'] | /root/response/* | /root/scheduledBy | /root/mostRecentEvent | /root/user | /root/metadata | /root/system | /root/session | /root/env"/>
  480. </root>
  481. </xts:transform>
  482. <xts:queryNode select="/root/system | /root/session | /root/env | /root/user"/>
  483. </root>
  484. </xts:transform>
  485. </markupXml>
  486. </markup>
  487. <subfragment id="cogadminChart">
  488. <xsl:attribute name="href">
  489. <xsl:value-of select="/root/cogadminChartUrl"/>
  490. </xsl:attribute>
  491. </subfragment>
  492. </xts:append>
  493. </xts:sequence>
  494. </xsl:template>
  495. </xsl:stylesheet>
  496. </xts:block>
  497. </xts:morphlet>