new_drillthru_def3.xts 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. *****************************************************************
  4. ** Licensed Materials - Property of IBM
  5. **
  6. ** IBM Cognos Products: drill
  7. **
  8. ** (C) Copyright IBM Corp. 2001, 2015
  9. **
  10. ** US Government Users Restricted Rights - Use, duplication or
  11. ** disclosure restricted by GSA ADP Schedule Contract with
  12. ** IBM Corp.
  13. *****************************************************************
  14. -->
  15. <!--
  16. Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
  17. Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
  18. -->
  19. <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" messageBase="messages/drill.xml,messages/portal.xml, messages/portalRL.xml">
  20. <!--
  21. ===============================================================================================
  22. BLOCK: getRoutingServerContent
  23. PURPOSE: Get the TARGET routing server information from CM
  24. OUTPUT: routingServerGroupTarget
  25. This is used by getParameterRequest in execute-method block
  26. ===============================================================================================
  27. -->
  28. <xts:block id="getRoutingServerContent"
  29. processor="XSLT" type="exec" mandatory="false"
  30. condition=".[/root/env/param[@name='m_obj']]" nodelist="env, header">
  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:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  35. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  36. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  37. exclude-result-prefixes="xsl send xts cm">
  38. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  39. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  40. <xsl:template match="/">
  41. <xsl:variable name="useTarget">
  42. <xsl:choose>
  43. <xsl:when test="string(/root/env/param[@name='m_p_target'])!=''">
  44. <xsl:value-of select="/root/env/param[@name='m_p_target']"/>
  45. </xsl:when>
  46. <xsl:otherwise>
  47. <xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='target']/*[local-name()='report' or local-name()='query' or local-name()='analysis']/*[local-name()='searchPath']"/>
  48. </xsl:otherwise>
  49. </xsl:choose>
  50. </xsl:variable>
  51. <xts:sequence>
  52. <xts:append>
  53. <routing>
  54. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  55. <send:request provider="cm">
  56. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  57. <cm:query>
  58. <cm:search><xsl:value-of select="$useTarget"/></cm:search>
  59. <cm:properties>
  60. <cm:property name="searchPath"/>
  61. <cm:property name="routingServerGroup"/>
  62. </cm:properties>
  63. </cm:query>
  64. </xts:transform>
  65. </send:request>
  66. </xts:transform>
  67. </routing>
  68. </xts:append>
  69. <xts:append select="/root/env">
  70. <param name="routingServerGroupTarget"><xts:queryValue select="/root/routing/*[local-name()='queryResponse']/*/*[local-name()='routingServerGroup']"/></param>
  71. </xts:append>
  72. <xts:delete select="/root/routing"/>
  73. </xts:sequence>
  74. </xsl:template>
  75. </xsl:stylesheet>
  76. </xts:block>
  77. <!--
  78. ===============================================================================================
  79. BLOCK: getSourcePackageRoutingServerContent
  80. PURPOSE: Get the SOURCE package routing server information from CM
  81. OUTPUT: routingServerGroup
  82. This is only executed when routingServerGroup is not already passed to this page.
  83. If user set the scope first and then get to this page we get the routingServerGroup for the source package
  84. This is used for addDrillPath Request.
  85. ===============================================================================================
  86. -->
  87. <xts:block id="getSourcePackageRoutingServerContent"
  88. processor="XSLT" type="exec" mandatory="false"
  89. condition=".[/root/env/param[@name='m_path'] and not(/root/env/param[@name='routingServerGroup'])]" nodelist="env, header">
  90. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  91. <xsl:stylesheet version="1.0"
  92. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  93. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
  94. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  95. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  96. exclude-result-prefixes="xsl send xts cm">
  97. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  98. <xsl:key name="env-param" match="/root/env/param" use="@name"/>
  99. <xsl:template match="/">
  100. <xsl:variable name="sourcePackage">
  101. <xsl:value-of select="/root/env/param[@name='m_path']"/>
  102. </xsl:variable>
  103. <xts:sequence>
  104. <xts:append>
  105. <sourceRouting>
  106. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  107. <send:request provider="cm">
  108. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  109. <cm:query>
  110. <cm:search><xsl:value-of select="$sourcePackage"/></cm:search>
  111. <cm:properties>
  112. <cm:property name="searchPath"/>
  113. <cm:property name="routingServerGroup"/>
  114. </cm:properties>
  115. </cm:query>
  116. </xts:transform>
  117. </send:request>
  118. </xts:transform>
  119. </sourceRouting>
  120. </xts:append>
  121. <xts:append select="/root/env">
  122. <param name="routingServerGroup"><xts:queryValue select="/root/sourceRouting/*[local-name()='queryResponse']/*/*[local-name()='routingServerGroup']"/></param>
  123. </xts:append>
  124. <xts:delete select="/root/sourceRouting"/>
  125. </xts:sequence>
  126. </xsl:template>
  127. </xsl:stylesheet>
  128. </xts:block>
  129. <!--
  130. ===============================================================================================
  131. execute-method -
  132. ===============================================================================================
  133. -->
  134. <xts:block id="execute-method" processor="XSLT" dependency="getRoutingServerContent getSourcePackageRoutingServerContent" condition=".[ (not(/root/env/param[@name='promptRequest']) or /root/env/param[@name='promptRequest']='') and ((/root/env/param[@name='m_p_target'] != '' or /root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='target']/*/*[local-name()='searchPath']!='') and not(root/env/param[@name='method']) or /root/env/param[@name='method']='forward' or /root/env/param[@name='method']='cancel' or /root/env/param[@name='method']='wait' or /root/env/param[@name='method']='finish' or /root/env/param[@name='method']='back' or /root/env/param[@name='method']='edit' or /root/env/param[@name='method']='')]" type="exec" mandatory="false">
  135. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  136. <xts:logicsheet path="logicsheets/portal.xsl"/>
  137. <xsl:stylesheet version="1.0"
  138. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  139. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  140. xmlns:prompt="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/"
  141. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  142. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/">
  143. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  144. <pf:variables/>
  145. <xsl:template match="/">
  146. <xts:sequence>
  147. <xsl:if test="not(/root/env/param[@name='method'])">
  148. <xts:append select="/root/env">
  149. <param name="method"><xsl:value-of select="'edit'"/></param>
  150. </xts:append>
  151. </xsl:if>
  152. <xsl:variable name="useTarget">
  153. <xsl:choose>
  154. <xsl:when test="string(/root/env/param[@name='m_p_target'])!=''">
  155. <xsl:value-of select="/root/env/param[@name='m_p_target']"/>
  156. </xsl:when>
  157. <xsl:otherwise>
  158. <xsl:value-of select="/root/*[local-name()='queryResponse']/*[local-name()='drillPath']/*[local-name()='target']/*[local-name()='report' or local-name()='query' or local-name()='analysis']/*[local-name()='searchPath']"/>
  159. </xsl:otherwise>
  160. </xsl:choose>
  161. </xsl:variable>
  162. <xsl:variable name="returnTo">
  163. <xsl:choose>
  164. <xsl:when test="string(/root/env/param[@name='ps_nav_stack'])!=''">
  165. <xsl:value-of select="/root/env/param[@name='ps_nav_stack']"/>
  166. </xsl:when>
  167. <xsl:otherwise>
  168. <xsl:value-of select="concat($app, '/new_drillthru_def2.xts')"/>
  169. </xsl:otherwise>
  170. </xsl:choose>
  171. </xsl:variable>
  172. <xsl:variable name="returnOp">
  173. <xsl:choose>
  174. <xsl:when test="string(/root/env/param[@name='ps_nav_stack'])!=''">pop</xsl:when>
  175. <xsl:otherwise>maintain</xsl:otherwise>
  176. </xsl:choose>
  177. </xsl:variable>
  178. <!--
  179. targetClass is passed from new_drillthru_def2.xts to this page
  180. we don't send parameter request when we have abacab targets
  181. -->
  182. <xsl:if test="string(/root/env/param[@name='targetClass'])!='powerPlay8Report' and string(/root/env/param[@name='targetClass'])!='package' and string(/root/env/param[@name='targetClass'])!='powerPlay8ReportView'">
  183. <xts:append>
  184. <promptRequest>
  185. <send:request provider="xts" option="xml-multipart">
  186. <xsl:choose>
  187. <xsl:when test="not(/root/env/param[@name='method']) or /root/env/param[@name='method'] = 'edit' ">
  188. <prompt:collect>
  189. <getParametersRequest>true</getParametersRequest>
  190. <returnMorphlet><xsl:value-of select="$returnTo"/></returnMorphlet>
  191. <ps_nav_op><xsl:value-of select="$returnOp"/></ps_nav_op>
  192. <runAsync>true</runAsync>
  193. <promptObject><xsl:value-of select="$useTarget"/></promptObject>
  194. <routingServerGroup><xsl:value-of select="key('env-param','routingServerGroupTarget')"/></routingServerGroup>
  195. <showNoPromptsWarning>false</showNoPromptsWarning>
  196. <addToPromptingEnv>
  197. <param name="so.select"><xsl:value-of select="string(/root/env/param[@name='so.select'])"/></param>
  198. <param name="m_p_target"><xsl:value-of select="$useTarget"/></param>
  199. </addToPromptingEnv>
  200. </prompt:collect>
  201. </xsl:when>
  202. <xsl:otherwise>
  203. <xsl:element name="{/root/env/param[@name='method']}" namespace="http://developer.cognos.com/schemas/xts/portal/iPrompting/1/">
  204. <getParametersRequest>true</getParametersRequest>
  205. <returnMorphlet><xsl:value-of select="$returnTo"/></returnMorphlet>
  206. <ps_nav_op>maintain</ps_nav_op>
  207. <promptObject><xsl:value-of select="$useTarget"/></promptObject>
  208. <showNoPromptsWarning>false</showNoPromptsWarning>
  209. <callFinish>true</callFinish>
  210. <addToPromptingEnv>
  211. <param name="so.select"><xsl:value-of select="string(/root/env/param[@name='so.select'])"/></param>
  212. <param name="m_p_target"><xsl:value-of select="$useTarget"/></param>
  213. </addToPromptingEnv>
  214. </xsl:element>
  215. </xsl:otherwise>
  216. </xsl:choose>
  217. </send:request>
  218. </promptRequest>
  219. </xts:append>
  220. </xsl:if>
  221. </xts:sequence>
  222. </xsl:template>
  223. </xsl:stylesheet>
  224. </xts:block>
  225. <xts:block id="check-state" path="/portal/iPrompting/logicsheets/check-state.xslt" processor="XSLT" type="exec" dependency="execute-method getRoutingServerContent" condition=".[ (not(/root/env/param[@name='promptRequest']) or /root/env/param[@name='promptRequest']='') and not(/root/env/param[@name='controller_state']) or /root/env/param[@name='controller_state']='']" mandatory="false">
  226. <xts:logicsheet path="logicsheets/portal.xsl"/>
  227. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  228. </xts:block>
  229. <!--
  230. ===============================================================================================
  231. formlogic_init - standard form logic initialization
  232. ===============================================================================================
  233. -->
  234. <xts:block id="formlogic_init" type="exec" mode="interpret" dependency="execute-method check-state getRoutingServerContent" condition=".[/root/*[local-name()='view']='properties' or /root/env/param[@name='promptRequest']!='']" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http" mandatory="false"/>
  235. <xts:block id="addPosition" type="exec" mode="interpret" dependency="execute-method check-state formlogic_init" processor="XSLT" condition=".[(/root/*[local-name()='view']='properties' or /root/env/param[@name='promptRequest']!='')]" mandatory="false">
  236. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  237. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  238. <xsl:stylesheet version="1.0"
  239. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  240. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  241. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  242. xmlns:pm="http://developer.cognos.com/schemas/xts/pm"
  243. xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
  244. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  245. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  246. exclude-result-prefixes="xsl xtsext pf bus cm pm xts">
  247. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  248. <xsl:template match="root">
  249. <xsl:if test="not(/root/*[local-name()='promptRequest']/*/*[local-name()='parameters']/*[local-name()='item']/*[local-name()='position'])">
  250. <xts:sequence>
  251. <xts:replace select="/root/*[local-name()='promptRequest']">
  252. <xts:transform processor="XSLT" src="portal/drillthru/common/transforms/contentLogic.xslt" mimeType="text/xml">
  253. <xts:param name="logicsheet">logicsheets/portal.xsl</xts:param>
  254. <xts:param name="logicsheet">logicsheets/permissions.xsl</xts:param>
  255. <xts:param name="logicsheet">logicsheets/cm-logic.xsl</xts:param>
  256. <xts:param name="logicsheet">logicsheets/buslogic.xslt</xts:param>
  257. <root>
  258. <xts:queryNode select="/root/http | /root/session | /root/env | /root/system | root/*[local-name()='promptRequest'] "/>
  259. </root>
  260. </xts:transform>
  261. </xts:replace>
  262. </xts:sequence>
  263. </xsl:if>
  264. </xsl:template>
  265. </xsl:stylesheet>
  266. </xts:block>
  267. <!-- Set up the environment after prompt processing complete-->
  268. <xts:block id="cleandrill" type="exec" mode="interpret" dependency="execute-method check-state formlogic_init addPosition" processor="XSLT" path="/portal/drillthru/common/response/cleandrill.xslt" condition=".[(/root/*[local-name()='view']='properties' or /root/env/param[@name='promptRequest']!='') and (/root/env/param[@name='dp_path'] or /root/env/param[@name='selected_path'] or /root/env/param[@name='selected_scope'] or /root/env/param[@name='selected_query'])]" mandatory="false">
  269. <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
  270. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  271. </xts:block>
  272. <xts:block id="cleanpager" processor="XSLT" type="exec" dependency="execute-method check-state formlogic_init cleandrill addPosition" condition=".[/root/*[local-name()='view']='properties' or /root/env/param[@name='promptRequest']!='']" mandatory="false">
  273. <!-- <xts:block id="cleanpager" processor="XSLT" type="exec" dependency="formlogic_init cleandrill" mandatory="false"> -->
  274. <xsl:stylesheet version="1.0"
  275. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  276. xmlns:xts="http://developer.cognos.com/schemas/xts/">
  277. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  278. <xsl:template match="/">
  279. <xts:sequence>
  280. <xts:delete select="/root/env/param[starts-with(string(@name),'pager')]"/>
  281. </xts:sequence>
  282. </xsl:template>
  283. </xsl:stylesheet>
  284. </xts:block>
  285. <!--
  286. ===============================================================================================
  287. renderPage - render the page
  288. ===============================================================================================
  289. -->
  290. <xts:block id="render_page" mode="output" processor="XSLT" type="exec" mimeType="text/html" condition=".[/root/*[local-name()='view']='properties' or /root/env/param[@name='promptRequest']!='']" dependency="execute-method check-state formlogic_init cleandrill cleanpager addPosition getRoutingServerContent" mandatory="false">
  291. <!-- <xts:block id="render_page" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="formlogic_init cleandrill cleanpager"> -->
  292. <!-- get the presentation theme -->
  293. <xts:logicsheet path="logicsheets/portal.xsl"/>
  294. <xts:logicsheet path="portal/drillthru/common/response/target.xslt"/>
  295. <xts:logicsheet path="logicsheets/permissions.xsl"/>
  296. <xts:logicsheet path="logicsheets/presentation/dialog/connections.xslt"/>
  297. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  298. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  299. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  300. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  301. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  302. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  303. <!-- apply the form logic -->
  304. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  305. <xts:logicsheet path="logicsheets/validation.xslt"/> <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  306. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  307. xmlns:dcx="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/connections/1/"
  308. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  309. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  310. xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf"
  311. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  312. xmlns:pm="http://developer.cognos.com/schemas/xts/pm"
  313. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  314. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  315. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  316. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  317. xmlns:xts="http://developer.cognos.com/schemas/xts/"
  318. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  319. xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
  320. xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
  321. xmlns:rdb="http://developer.cognos.com/schemas/xts/rdb"
  322. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  323. exclude-result-prefixes="xsl dcx cf cp pf pm df dp dt mf lyt utml">
  324. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  325. <!-- current file name -->
  326. <xsl:variable name="mname" select="'new_drillthru_def3.xts'"/>
  327. <!-- add any theme variables -->
  328. <pf:variables/>
  329. <pm:permissions origin="/root/target/cm:queryResponse/*/"/>
  330. <!-- add target template utils -->
  331. <rdb:utils/>
  332. <mf:variables stateParams="m_listpagersection m_pagerfromlistpager m_pagertolistpager"/>
  333. <!-- start the output -->
  334. <xsl:template match="/root">
  335. <xsl:variable name="hasTargetPermissions">
  336. <xsl:choose>
  337. <xsl:when test="/root/target"><xsl:value-of select="contains(string(/root/target/cm:queryResponse/*/cm:permissions),'read') or contains(string(/root/target/cm:queryResponse/*/cm:permissions),'execute')"/></xsl:when>
  338. <xsl:otherwise><xsl:value-of select="false()"/></xsl:otherwise>
  339. </xsl:choose>
  340. </xsl:variable>
  341. <xsl:variable name="backURL" select="key('env-param','backURL')"/>
  342. <!-- get passed in parameters -->
  343. <xsl:variable name="wizardTitle">
  344. <xts:string id="IDS_NEW_DRILLPATH_TITLE"/>
  345. </xsl:variable>
  346. <xsl:variable name="canModify" select="$canWrite or $canSetPolicy"/>
  347. <xsl:variable name="browserTitle">
  348. <xsl:text/><xts:string id="IDS_NEW_TITLE_DRILLPATH_TARGET">
  349. <xts:param name="wizardTitle"><xsl:value-of select="$wizardTitle"/></xts:param>
  350. </xts:string><xsl:text/>
  351. </xsl:variable>
  352. <xsl:variable name="pageDescription">
  353. <xsl:text/><xts:string id="WIZ_NEW_INTRO_DRILLPATH_TARGET"/><xsl:text/>
  354. </xsl:variable>
  355. <!--Get the routingServerGroup from the environment and define a variable -->
  356. <!--This variable is used later on to setup to G_BusServer.F_SetRoutingServerGroup() to pass the request to the appropriate server-->
  357. <xsl:variable name="routingServerGroup">
  358. <xsl:choose>
  359. <xsl:when test="string(/root/env/param[@name='routingServerGroup'])!=''">
  360. <xsl:value-of select="/root/env/param[@name='routingServerGroup']"/>
  361. </xsl:when>
  362. <xsl:otherwise></xsl:otherwise>
  363. </xsl:choose>
  364. </xsl:variable>
  365. <!--Get the target class to generate the target ICON -->
  366. <xsl:variable name="targetClassforICON">
  367. <xsl:choose>
  368. <xsl:when test="/root/target">
  369. <xsl:value-of select="string(/root/target/cm:queryResponse/*/cm:objectClass)"/>
  370. </xsl:when>
  371. <xsl:otherwise></xsl:otherwise>
  372. </xsl:choose>
  373. </xsl:variable>
  374. <xsl:variable name="targetBaseClassforICON">
  375. <xsl:choose>
  376. <xsl:when test="/root/target">
  377. <xsl:value-of select="string(/root/target/cm:queryResponse/*/cm:base/*/cm:objectClass)"/>
  378. </xsl:when>
  379. <xsl:otherwise></xsl:otherwise>
  380. </xsl:choose>
  381. </xsl:variable>
  382. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text>
  383. <dp:page longTitle="$browserTitle">
  384. <dp:meta>
  385. <!-- Standard meta tags -->
  386. <pf:meta/>
  387. </dp:meta>
  388. <dp:script>
  389. <!-- Help system -->
  390. <pf:help context="HID_DRILL_THROUGH_ACTIONS"/>
  391. <script language="javascript" src="{$webcontent}/{$app}/js/connections.js"/>
  392. <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"/>
  393. <script language="javascript">
  394. <dt:checkMandatoryScript/>
  395. <dcx:checkReservedChar/>
  396. <xsl:if test="key('env-param','from_bmt')!=''">
  397. <!-- Called only when canceling back to BMT environment. -->
  398. function doCancel()
  399. {
  400. window.external.OnClose(1);
  401. }
  402. </xsl:if>
  403. //When click on cancel button we call this function to clear the state. This prevents keeping selected action around.
  404. function doCancelBack()
  405. {
  406. if (window.resetPageState)
  407. {
  408. resetPageState();
  409. }
  410. document.location.href = "<xsl:value-of select="/root/env/param[@name='backURL']"/>";
  411. return;
  412. }
  413. <!-- Start of HAL resources and CDrillPath related files -->
  414. //HAL Options: are used to specify the path that HAL libraries are loaded from
  415. G_HALOptions = { "isApplication" : false, "path" : "<xsl:value-of select="$webRoot"/>/" };
  416. G_CCHLOptions = { "path" : "<xsl:value-of select="$webRoot"/>/" };
  417. </script>
  418. <!-- Libraries that are used by HAL to handle the SOAP request, error message, and CAF -->
  419. <script language="javascript" src="{$webRoot}/hal/hal.js"/>
  420. <script language="javascript" src="{$webRoot}/cchl/cchl.js"/>
  421. <link type="text/css" rel="stylesheet" href="{$skin_root}/hal/hal_skin.css"/>
  422. <link type="text/css" rel="stylesheet" href="{$skin_root}/hal/hal_portal_skin.css"/>
  423. <script src="{$webRoot}/camcrypto/base64.js"></script>
  424. <script src="{$webRoot}/camcrypto/camcryptoutil.js"></script>
  425. <script src="{$webRoot}/camcrypto/sha1.js"></script>
  426. <script src="{$webRoot}/camcrypto/authtoken1.js"></script>
  427. <script>
  428. G_CCHL.M_sProductLocale ='<xsl:value-of select="$productLocale"/>';
  429. G_CCHL.M_sContentLocale ='<xsl:value-of select="$contentLocale"/>';
  430. G_CCHL.M_sGatewayURL ='<xsl:value-of select="$gateway"/>';
  431. G_HAL.F_Include("hal/C_WebRequest.js");
  432. G_HAL.F_Include("cchl/C_BusRequest.js");
  433. G_HAL.F_Include("hal/D_Progress.js");
  434. G_HAL.F_Include( "hal/C_Dialog.js" );
  435. G_HAL.F_Include( "cchl/dialogs/D_DetailedMsgBox.js" );
  436. G_HAL.F_Include( "hal/G_ResManager.js" );
  437. G_HAL.F_Include( "hal/C_Error.js" );
  438. var webRoot = '<xsl:value-of select="$webRoot"/>';
  439. G_HAL.F_EnableAccessibility(true);
  440. // Used to disable the form controls
  441. // This is used as a part of work around for
  442. // showing the controls behind the rename replace dialog blocker
  443. F_selectBlocker = function()
  444. {
  445. //This is specific to drill through wizard
  446. //We should hide the select due to a browser bug
  447. //otherwise the won't stay underneath the dialogBlocker
  448. if (document.pform.m_action)
  449. {
  450. document.pform.m_action.style.backgroundColor = 'LightGrey';
  451. document.pform.m_action.disabled = true;
  452. }
  453. if (document.pform.tg_fmtselect)
  454. {
  455. document.pform.tg_fmtselect.style.backgroundColor = 'LightGrey';
  456. document.pform.tg_fmtselect.disabled = true;
  457. }
  458. if (document.pform.m_prompt)
  459. {
  460. document.pform.m_prompt.style.backgroundColor = 'LightGrey';
  461. document.pform.m_prompt.disabled = true;
  462. }
  463. }
  464. F_selectUnblocker = function()
  465. {
  466. // This is specific to drill through wizard
  467. // it is used to visible the controls we hide
  468. // in the onBeforeVisible method
  469. if (document.pform.m_action)
  470. {
  471. document.pform.m_action.disabled = false;
  472. document.pform.m_action.style.backgroundColor = 'white';
  473. }
  474. if (document.pform.tg_fmtselect)
  475. {
  476. document.pform.tg_fmtselect.disabled = false;
  477. document.pform.tg_fmtselect.style.backgroundColor = 'white';
  478. }
  479. if (document.pform.m_prompt)
  480. {
  481. document.pform.m_prompt.disabled = false;
  482. document.pform.m_prompt.style.backgroundColor = 'white';
  483. }
  484. }
  485. </script>
  486. <!--These style are used for Dialog Blockers-->
  487. <style>
  488. DIV.clsDialogBlocker
  489. {
  490. background-color: Gray;
  491. filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);
  492. -moz-opacity:0.5;
  493. opacity:0.5;
  494. }
  495. blockedSelect
  496. {
  497. background-color: Gray;
  498. filter:progid:DXImageTransform.Microsoft.Alpha(opacity=50);
  499. -moz-opacity:0.5;
  500. opacity:0.5;
  501. }
  502. iframe
  503. {
  504. display:none;
  505. display/**/:block;
  506. position:absolute;
  507. top:0;
  508. left:0;
  509. z-index:-1;
  510. filter:mask();
  511. width:500px;
  512. height:235px;
  513. }
  514. </style>
  515. <script language="javascript" src="{$webRoot}/drill/CDrillPath.js"/>
  516. <script language="javascript" src="{$webRoot}/drill/Dialogs/D_RenameReplace.js"/>
  517. <!-- End of HAL resources and CDrillPath related files -->
  518. <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"/>
  519. <rdb:scripts/>
  520. </dp:script>
  521. <utml:form name="pform" method="post" action="{$gateway}">
  522. <!-- added to prevent form automatically regenerate the format inputs that
  523. we already have in the form. this has caused bug# 581771 -->
  524. <utml:exclude-prefix>m_ro_outputFormat_</utml:exclude-prefix>
  525. <dp:header>
  526. <!-- header titles-->
  527. <dp:title><xsl:value-of select="normalize-space($browserTitle)"/></dp:title>
  528. <dp:description>
  529. <xsl:value-of select="$pageDescription"/>
  530. </dp:description>
  531. <dp:close>
  532. <xsl:choose>
  533. <xsl:when test="key('env-param','from_bmt')">
  534. <a href="javascript:doCancel()">
  535. <dp:closeMarker/>
  536. </a>
  537. </xsl:when>
  538. <xsl:otherwise>
  539. <a href="{$backURL}">
  540. <dp:closeMarker/>
  541. </a>
  542. </xsl:otherwise>
  543. </xsl:choose>
  544. </dp:close>
  545. </dp:header>
  546. <!-- Body -->
  547. <!--Show the selected target-->
  548. <lyt:layout style="2">
  549. <lyt:section width="50%">
  550. <dp:list>
  551. <dp:section>
  552. <dp:label>
  553. <xts:string id="IDS_PROP_DRILLPATH_DEF_TARGET"/>
  554. </dp:label>
  555. </dp:section>
  556. <xsl:choose>
  557. <xsl:when test="string($hasTargetPermissions)='false'">
  558. <dp:section >
  559. <dp:text nospace="nospace" >
  560. <xts:string id="IDS_PROP_DRILLPATH_NOTARGET"/>
  561. </dp:text>
  562. </dp:section>
  563. </xsl:when>
  564. <xsl:when test="/root/target">
  565. <xsl:variable name="object-start-at-path">
  566. <xsl:choose>
  567. <!-- Do not provide a path for contact otherwise invalid path displayed for logged on user -->
  568. <xsl:when test="starts-with(/root/target/cm:queryResponse/*/cm:searchPath, '~') or starts-with(/root/target/cm:queryResponse/*/cm:searchPath,key('session-param', 'e_hp'))">
  569. <xsl:value-of select="concat(key('session-param', 'e_hp'), '/folder')"/>
  570. </xsl:when>
  571. <xsl:when test="starts-with(/root/target/cm:queryResponse/*/cm:target/*/cm:searchPath,'/content')">
  572. <xsl:value-of select="$defaultContentRoot"/>
  573. </xsl:when>
  574. </xsl:choose>
  575. </xsl:variable>
  576. <dp:section>
  577. <div>
  578. <table role="presentation"><tr><td>
  579. <xsl:call-template name="gen-icon">
  580. <xsl:with-param name="class" select="$targetClassforICON"/>
  581. <xsl:with-param name="baseClass" select="$targetBaseClassforICON"/>
  582. </xsl:call-template>
  583. </td>
  584. <td valign="middle" class="tableText" lang="{$contentLocale}">
  585. <cf:do-the-path-link>
  586. <cf:param name="familytree">/root/target/cm:queryResponse/*/cm:ancestors</cf:param>
  587. <cf:param name="familymember">/root/target/cm:queryResponse/*/cm:defaultName</cf:param>
  588. <cf:param name="home">
  589. <xsl:value-of select="$object-start-at-path"/>
  590. </cf:param>
  591. </cf:do-the-path-link>
  592. </td></tr></table>
  593. </div>
  594. </dp:section>
  595. </xsl:when>
  596. <xsl:otherwise>
  597. <dp:section>
  598. <dp:text nospace="nospace">
  599. <xts:string id="IDS_PROP_DRILLPATH_TARGETNOTSPECIFIED"/>
  600. </dp:text>
  601. </dp:section>
  602. </xsl:otherwise>
  603. </xsl:choose>
  604. </dp:list>
  605. </lyt:section>
  606. </lyt:layout>
  607. <!--END of Show the selected target-->
  608. <!-- The code for this part is in target.xslt -->
  609. <rdb:target mode="wizard" origin="/root/target/cm:queryResponse/*" targetOrigin="/root/*[local-name()='promptRequest']/*/*[local-name()='parameters']/*" targetPermissions="$hasTargetPermissions" canModifyParams="'true'"/>
  610. <dp:footer>
  611. <!-- Cancel button -->
  612. <xsl:choose>
  613. <xsl:when test="key('env-param','from_bmt')!=''">
  614. <df:button df:id="IDS_CANCEL" df:style="href" df:href="javascript:doCancel()"/>
  615. </xsl:when>
  616. <xsl:otherwise>
  617. <df:button df:id="IDS_CANCEL" df:style="href" df:href="javascript:doCancelBack()"/>
  618. </xsl:otherwise>
  619. </xsl:choose>
  620. <!-- Back button -->
  621. <df:button df:id="IDS_BACK" df:label="IDS_BACK_LABEL" df:style="maintain" onclick="javascript:setBookMarks();resetPageState();">
  622. <df:target>
  623. <xsl:value-of select="concat($app, '/new_drillthru_def2.xts')"/>
  624. </df:target>
  625. </df:button>
  626. <!-- Next button -->
  627. <df:button df:id="IDS_NEXT"/>
  628. <script language="javascript">
  629. function validate()
  630. {
  631. var frm = document.pform;
  632. frm.m_return.value = "";
  633. <!--set the prompt run option in the drillpath -->
  634. <!-- There are following 3 options we can set for display prompt page:
  635. 1. Only when required parameter values are missing (missingReq)
  636. 2. Always (always)
  637. 3. Based on the default prompt settings of the target report (useTarget)-->
  638. // a gard to prevent error when m_prompt does not exist
  639. if (frm.m_prompt){
  640. if ( frm.m_prompt.value == 'always')
  641. frm.m_ro_prompt.value= 'true';
  642. else if (frm.m_prompt.value == 'missingReq')
  643. frm.m_ro_prompt.value = 'false';
  644. else <!-- if it is set to "useTarget', remove the prompt from drillpath -->
  645. frm.m_ro_prompt.value='';
  646. }
  647. <!--If the selected target is pp8, only set m_ro_drillTragetPath (runOption for promptFormat), otherwise, set both
  648. m_ro_drillTragetPath and m_p_target. -->
  649. if (frm.m_p_target)
  650. {
  651. frm.m_ro_drillTragetPath.value = frm.m_p_target.value;
  652. }
  653. if(frm.m_action)
  654. frm.m_p_action.value = frm.m_action.value;
  655. <!-- Set or update useEditSpecification in Drillpath-->
  656. frm.m_dt_useEditSpecification.value ='false';
  657. if (frm.m_p_action.value == "runDyn")
  658. {
  659. frm.m_p_action.value = "run";
  660. frm.m_dt_useEditSpecification.value ='true';
  661. }
  662. if(frm.m_p_action.value!="viewOutput")
  663. {
  664. if( frm.m_p_action.value == "editWPS" || frm.m_p_action.value == "editWPP8")
  665. frm.m_p_action.value = "edit";
  666. setBookMarks();
  667. resetPageState();
  668. // instead of returning true we call addDrillPath this function returns true or false
  669. return addDrillPath();
  670. }
  671. if(checkForParams())
  672. {
  673. setBookMarks();
  674. resetPageState();
  675. // instead of returning true we call addDrillPath this function returns true or false
  676. return addDrillPath();
  677. }
  678. return false;
  679. }
  680. /**
  681. * calls G_DrillPath.addDrillPath()
  682. * get the form object, sets cafContextID, and get the targetClass
  683. */
  684. function addDrillPath(){
  685. <!-- This condition used to return true without calling the new adddrillpath method when we don't have targets that uses drill spec.
  686. This is should be removed as soon as we make sure we have covered all the possible targets in our library-->
  687. <xsl:if test="$targetClass !='report' and $targetClass !='reportView' and $targetClass !='query' and $targetClass !='analysis' and $targetClass !='package' and $targetClass != 'powerPlay8Report' and $targetClass != 'powerPlay8ReportView'">
  688. return true;
  689. </xsl:if>
  690. // this is defined so CAF let the request get into the server
  691. G_BusServer.F_SetCafContextId(cafContextId);
  692. <xsl:if test="$routingServerGroup!=''">
  693. // Set the routing Server Group
  694. // This is used to send the requests to the appropriate server based on routing Server Group settings
  695. var routingServerGroup = '<xsl:value-of select="$routingServerGroup"/>';
  696. G_BusServer.F_SetRoutingServerGroup(routingServerGroup) ;
  697. </xsl:if>
  698. // Gets all the variables that are required to save the drill path
  699. var targetClass = '<xsl:value-of select="$targetClass"/>';
  700. var frm = document.pform;
  701. var useEditSpecification = frm.m_dt_useEditSpecification.value;
  702. /*calls F_addDrillPath with the form object that contains the required information
  703. *always returns false. prevents the page to be submited
  704. *the page is submited by G_DrillPath.F_Request_OnComplete if the response does not have any error (e.g. when drill path exist)
  705. */
  706. return G_DrillPath.F_addDrillPath(frm,targetClass);
  707. }
  708. </script>
  709. <!-- This condition used to show the old button if we don't have abacab targets
  710. TODO: this should be removed when we use add,query, and update methods for all targetClasses-->
  711. <xsl:if test="$targetClass !='package' and $targetClass != 'powerPlay8Report'">
  712. <df:button df:id="IDS_FINISH" df:style="submit" utml:validate="true"/>
  713. </xsl:if>
  714. <xsl:if test="$targetClass='package' or $targetClass= 'powerPlay8Report'">
  715. <df:button df:id="IDS_FINISH" df:style="maintain" utml:validate="true">
  716. <df:target>
  717. <xsl:value-of select="concat($app, '/cc_drillthrough.xts')"/>
  718. </df:target>
  719. </df:button>
  720. </xsl:if>
  721. <utml:input type="hidden" name="promptRequest">
  722. <utml:value>
  723. <xsl:choose>
  724. <xsl:when test="not(/root/env/param[@name='promptRequest'])">
  725. <xsl:variable name="parameters-markup">
  726. <xsl:call-template name="serialize-xml">
  727. <xsl:with-param name="node-set" select="/root/*[local-name()='promptRequest']"/>
  728. </xsl:call-template>
  729. </xsl:variable>
  730. <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport), xtsext:web64encode(string($parameters-markup), true()))"/>
  731. </xsl:when>
  732. <xsl:otherwise><xsl:value-of select="/root/env/param[@name='promptRequest']"/></xsl:otherwise>
  733. </xsl:choose>
  734. </utml:value>
  735. </utml:input>
  736. </dp:footer>
  737. <!--This is used by HAL to write the required HTML elements on the page-->
  738. <script>
  739. G_HAL.F_WriteHtml();
  740. </script>
  741. <!--Used for Debuging: enable this text area and the request is dumped into it-->
  742. <!--textarea id="requestDump" rows="30" cols="150"></textarea-->
  743. </utml:form>
  744. </dp:page>
  745. </xsl:template>
  746. <xsl:template match="*[local-name()='messageString']">
  747. <xsl:value-of select="xtsext:javascriptencode(string(.))"/><xsl:if test="string-length(normalize-space(.)) > 0">\n</xsl:if>
  748. </xsl:template>
  749. <pf:serialize-xml/>
  750. <pf:gen-icon/>
  751. </xsl:stylesheet>
  752. </xts:block>
  753. <!--
  754. ===============================================================================================
  755. debug - display debug information
  756. ===============================================================================================
  757. -->
  758. <xts:block id="debug" dependency="render_page" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
  759. <!-- get the debug logic sheet -->
  760. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  761. <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">
  762. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  763. <xsl:template match="/">
  764. <dbg:dumpxml select="/root"/>
  765. </xsl:template>
  766. </xsl:stylesheet>
  767. </xts:block>
  768. </xts:morphlet>