specify_connection.xts 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. Licensed Materials - Property of IBM
  4. IBM Cognos Products: ps
  5. (C) Copyright IBM Corp. 2005, 2017
  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/" 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/portal.xml, messages/portalRL.xml" includeConfig="true" requiredCapability="canUseAdministrationPortal">
  13. <!--
  14. ===============================================================================================
  15. formlogic_init
  16. Standard form logic initialization
  17. ===============================================================================================
  18. -->
  19. <xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>
  20. <!--
  21. ===============================================================================================
  22. load_metadata
  23. ===============================================================================================
  24. -->
  25. <xts:block id="load_metadata" processor="XSLT" type="exec" mode="interpret" nodelist="" dependency="formlogic_init">
  26. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  27. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  28. <xsl:template match="/">
  29. <xts:sequence>
  30. <xts:append>
  31. <xts:transform src="transforms/portal/dataSource/extractDatasourceMetadata.xslt" processor="XSLT">
  32. <root>
  33. <getJDBCDatasource>true</getJDBCDatasource>
  34. <xts:queryNode select="/root/env"/>
  35. <xts:transform src="/transforms/portal/dataSource/generateDatasourceMetadata.xslt" processor="XSLT">
  36. <xts:param name="messageBase">/messages/portal.xml</xts:param>
  37. <root/>
  38. </xts:transform>
  39. </root>
  40. </xts:transform>
  41. </xts:append>
  42. <xts:append>
  43. <xts:function name="getConfiguration">
  44. <xts:param name="aliasRoots"/>
  45. </xts:function>
  46. </xts:append>
  47. </xts:sequence>
  48. </xsl:template>
  49. </xsl:stylesheet>
  50. </xts:block>
  51. <!--
  52. ================================================================================
  53. get_content
  54. Retrieve the namespace information from CM
  55. ================================================================================
  56. -->
  57. <xts:block id="get_content" mode="interpret" type="exec" processor="XSLT" dependency="formlogic_init load_metadata">
  58. <xts:logicsheet path="logicsheets/buslogic.xslt"/>
  59. <xsl:stylesheet version="1.0"
  60. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  61. xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/">
  62. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  63. <xsl:template match="/">
  64. <xts:sequence>
  65. <xsl:if test="/root/datasources/datasource/authentication[type='namespace']">
  66. <xts:append>
  67. <namespaces>
  68. <xts:transform src="transforms/portal/dataSource/stripnamespace.xslt" processor="XSLT">
  69. <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
  70. <send:request provider="cm">
  71. <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
  72. <query xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
  73. <search>/directory/namespace</search>
  74. <properties>
  75. <cm:property name="defaultName"/>
  76. <cm:property name="searchPath"/>
  77. <cm:property name="active"/>
  78. </properties>
  79. </query>
  80. </xts:transform>
  81. </send:request>
  82. </xts:transform>
  83. </xts:transform>
  84. </namespaces>
  85. </xts:append>
  86. </xsl:if>
  87. <!-- get a list of installed components -->
  88. <xts:append>
  89. <installedComponents>
  90. <xts:function name="getConfiguration">
  91. <xts:param name="installedComponents"/>
  92. </xts:function>
  93. </installedComponents>
  94. </xts:append>
  95. <!-- get a list of additional datasources -->
  96. <xts:append faultBlock="ignore">
  97. <xts:request protocol="FILEREAD" target="$CONFIG_ROOT$/datasources.xml" faultBlock="ignore" cache="false"/>
  98. </xts:append>
  99. </xts:sequence>
  100. </xsl:template>
  101. </xsl:stylesheet>
  102. </xts:block>
  103. <!--
  104. ================================================================================
  105. decrypt_credentials
  106. Decrypts the proxy credentials.
  107. ================================================================================
  108. -->
  109. <xts:block id="decrypt_credentials" dependency="get_content" type="exec" mode="interpret" processor="XSLT" nodelist="env" mandatory="false" condition=".[/root/env/param[@name='m_proxy_credentials']]">
  110. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  111. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  112. <xsl:variable name="xtscm" select="'http://developer.cognos.com/schemas/xts-cm/1/'"/>
  113. <xsl:template match="/">
  114. <xts:sequence>
  115. <xsl:if test="/root/env/param[@name='m_proxy_credentials']!=''">
  116. <xts:append>
  117. <decrypted-credentials xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
  118. <xts:decrypt>
  119. <xts:param name="provider">cognos.cam</xts:param>
  120. <xts:param name="source"><xsl:value-of select="substring-before(substring-after(xtsext:xmldecode( string(/root/env/param[@name='m_proxy_credentials'])), '&lt;encryptedValue&gt;'), '&lt;/encryptedValue&gt;')"/></xts:param>
  121. </xts:decrypt>
  122. </decrypted-credentials>
  123. </xts:append>
  124. </xsl:if>
  125. </xts:sequence>
  126. </xsl:template>
  127. </xsl:stylesheet>
  128. </xts:block>
  129. <!--
  130. ================================================================================
  131. extract_user_info
  132. Extracts the userid from the decrypted credentials.
  133. ================================================================================
  134. -->
  135. <xts:block id="extract_user_info" type="exec" mode="interpret" dependency="decrypt_credentials" processor="XSLT" mandatory="false" condition=".[/root/*[local-name()='decrypted-credentials']]">
  136. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
  137. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  138. <xsl:variable name="xtscm" select="'http://developer.cognos.com/schemas/xts-cm/1/'"/>
  139. <xsl:template match="/">
  140. <xts:sequence>
  141. <xsl:variable name="username" select="xtsext:xmldecode(string(/root/cm:decrypted-credentials/cm:credential/cm:username))"/>
  142. <xsl:variable name="password" select="xtsext:xmldecode(string(/root/cm:decrypted-credentials/cm:credential/cm:password))"/>
  143. <xts:delete select="/root/env/param[@name='m_connection_proxy_user' or @name='m_connection_proxy_password']"/>
  144. <xts:append select="/root/env">
  145. <param name="m_connection_proxy_user"><xsl:value-of select="$username"/></param>
  146. <param name="m_connection_proxy_password"><xsl:value-of select="$password"/></param>
  147. </xts:append>
  148. <xts:delete select="/root/*[local-name()='decrypted-credentials']"/>
  149. </xts:sequence>
  150. </xsl:template>
  151. </xsl:stylesheet>
  152. </xts:block>
  153. <!--
  154. ================================================================================
  155. process_datasources
  156. ================================================================================
  157. -->
  158. <xts:block id="process_datasources" type="exec" mode="interpret" dependency="get_content" processor="XSLT" nodelist="env,credential,system,http,datasources,additionalDatasources">
  159. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  160. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  161. <xsl:template match="/">
  162. <xts:sequence>
  163. <xts:append select="root/datasources/datasource[value='jdbc-generic']/supportedDataSources">
  164. <xsl:for-each select="root/additionalDatasources/datasource[@type='jdbc-generic']">
  165. <!-- simple check for .xml extension -->
  166. <xsl:if test="substring(@filename, (string-length(@filename) - string-length('.xml')) + 1) = '.xml'">
  167. <xts:request protocol="FILEREAD" target="{concat('$CONFIG_ROOT$','/datasources/',@filename)}" faultBlock="ignore" cache='false' debug="false"/>
  168. </xsl:if>
  169. </xsl:for-each>
  170. </xts:append>
  171. </xts:sequence>
  172. </xsl:template>
  173. </xsl:stylesheet>
  174. </xts:block>
  175. <xts:block id="ignore" processor="XML" type="fault">
  176. <ignore/>
  177. </xts:block>
  178. <!--
  179. ================================================================================
  180. parse_sap_connection
  181. Determines the server type for a SAP connection.
  182. ================================================================================
  183. -->
  184. <xts:block id="parse_sap_connection" mode="interpret" type="exec" processor="XSLT" mandatory="false" dependency="formlogic_init" condition=".[/root/env/param[@name='m_connection_type']='sap' and not(/root/env/param[@name='m_connection_sap_type'])]">
  185. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  186. <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
  187. <xsl:template match="/">
  188. <xsl:variable name="sap-server-type">
  189. <xsl:value-of select="substring-before(substring-after(/root/env/param[@name='m_p_connectionString'], 'serverType='), ';')"/>
  190. </xsl:variable>
  191. <xts:sequence>
  192. <xts:append select="/root/env">
  193. <param name="m_connection_sap_type">
  194. <xsl:value-of select="$sap-server-type"/>
  195. </param>
  196. </xts:append>
  197. </xts:sequence>
  198. </xsl:template>
  199. </xsl:stylesheet>
  200. </xts:block>
  201. <!--
  202. ===============================================================================================
  203. render_page
  204. Render the page
  205. ===============================================================================================
  206. -->
  207. <xts:block id="render_page" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="extract_user_info parse_sap_connection process_datasources">
  208. <!-- get the presentation theme -->
  209. <xts:logicsheet path="logicsheets/portal.xsl"/>
  210. <xts:logicsheet path="logicsheets/presentation/dialog/connections.xslt"/>
  211. <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
  212. <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
  213. <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
  214. <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
  215. <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
  216. <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
  217. <xts:logicsheet path="logicsheets/presentation/dialog/confirm.xslt"/>
  218. <xts:logicsheet path="logicsheets/formlogic.xslt"/>
  219. <xts:logicsheet path="logicsheets/validation.xslt"/>
  220. <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
  221. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  222. xmlns:dcx="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/connections/1/"
  223. xmlns:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"
  224. xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"
  225. xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
  226. xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/"
  227. xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/"
  228. xmlns:dc="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/confirm/1/"
  229. xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/"
  230. xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/"
  231. xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/"
  232. xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
  233. exclude-result-prefixes="xsl dcx dt pf cf cp df dp dc lyt utml">
  234. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
  235. <!-- current file name -->
  236. <xsl:variable name="mname" select="'specify_connection.xts'"/>
  237. <!-- add any theme variables -->
  238. <pf:variables/>
  239. <!-- add the connection templates -->
  240. <dcx:connectionTemplates/>
  241. <xsl:variable name="connectionType" select="key('env-param','m_connection_type')"/>
  242. <xsl:variable name="connectionVariant" select="key('env-param','m_connection_variant')"/>
  243. <xsl:variable name="connectionTab" select="key('env-param','m_connection_tab')"/>
  244. <xsl:variable name="jdbcConnectionType" select="/root/datasources/datasource/queryServiceEquivalent"/>
  245. <xsl:variable name="queryServiceInstalled" select="count(/root/installedComponents/configuration/property/component[string(.)='queryService'])!=0"/>
  246. <xsl:key name="installedComponents" match="/root/installedComponents/cm:queryResponse/cm:installedComponent" use="cm:componentID/cm:value"/>
  247. <dcx:testConnection/>
  248. <!-- start the output -->
  249. <xsl:template match="/root">
  250. <!-- get passed in parameters -->
  251. <xsl:variable name="connection_typeName">
  252. <xsl:choose>
  253. <xsl:when test="/root/datasources/datasource/neutralName != ''">
  254. <xsl:value-of select="/root/datasources/datasource/neutralName"/>
  255. </xsl:when>
  256. <xsl:otherwise>
  257. <xsl:value-of select="/root/datasources/datasource/name"/>
  258. </xsl:otherwise>
  259. </xsl:choose>
  260. </xsl:variable>
  261. <xsl:variable name="sap-server-type">
  262. <xsl:choose>
  263. <xsl:when test="key('env-param','m_connection_sap_type') != ''">
  264. <xsl:value-of select="key('env-param','m_connection_sap_type')"/>
  265. </xsl:when>
  266. <xsl:otherwise>
  267. <xsl:value-of select="/root/morphlet/variable[@name='sap-server-type']"/>
  268. </xsl:otherwise>
  269. </xsl:choose>
  270. </xsl:variable>
  271. <xsl:variable name="title">
  272. <xts:string id="IDS_PROP_CONN_STRING_TITLE">
  273. <xts:param name="connectionStringType">
  274. <xsl:value-of select="$connection_typeName"/>
  275. </xts:param>
  276. </xts:string>
  277. </xsl:variable>
  278. <xsl:variable name="validationConnectionType">
  279. <xsl:if test="$connectionTab='odbc'">
  280. <xsl:value-of select="$connectionType"/>
  281. </xsl:if>
  282. <xsl:if test="$connectionTab='jdbc'">
  283. <xsl:value-of select="$jdbcConnectionType"/>
  284. </xsl:if>
  285. </xsl:variable>
  286. <xsl:variable name="proxyEnabled">
  287. <xsl:value-of select="key('env-param','m_connection_proxy_enabled')='true'"/>
  288. </xsl:variable>
  289. <xsl:variable name="isDatasourceSignon">
  290. <xsl:call-template name="dcx-isDatasourceSignon">
  291. <xsl:with-param name="connectionString" select="key('env-param','m_p_connectionString')"/>
  292. </xsl:call-template>
  293. </xsl:variable>
  294. <xsl:text disable-output-escaping='yes'>&lt;!DOCTYPE html></xsl:text><dp:page longTitle="$title">
  295. <dp:meta>
  296. <!-- Standard meta tags -->
  297. <pf:meta/>
  298. </dp:meta>
  299. <dp:script>
  300. <!-- Help system -->
  301. <pf:help context="HID_DATA_SOURCES"/>
  302. <pf:dojo/>
  303. <script language="javascript" src="{$webcontent}/{$app}/js/connections.js"/>
  304. <script language="javascript">
  305. <dt:checkMandatoryScript/>
  306. <dcx:checkReservedChar/>
  307. var g_signon_authentication_warning_msg='<xts:string id="IDS_SELECT_CONNECT_CHANGE_AUTENTICATION_WARNING" encode="javascript"/>';
  308. function validateConnection()
  309. {
  310. var f = document.pform;
  311. <xsl:call-template name="get-validations">
  312. <xsl:with-param name="connection-type" select="$validationConnectionType"/>
  313. <xsl:with-param name="connection-variant" select="$connectionVariant"/>
  314. </xsl:call-template>
  315. }
  316. //whether you are in JDBC tab and JDBC section is disabled.
  317. function isJdbcDisabled(){
  318. return (document.pform.m_connection_tab.value == 'jdbc') &amp;&amp; (document.pform.m_connection_enable_JDBC.value == 'false');
  319. }
  320. function validate()
  321. {
  322. var f = document.pform;
  323. var confirm = 'false';
  324. <xsl:if test="$isDatasourceSignon='true'">
  325. <!-- determine what authentication type is selected -->
  326. var signonSelected = 'false';
  327. /* not all connections types will have the f.authentications */
  328. if ((f.authentication !== undefined) &amp;&amp; (f.authentication !== null)){
  329. for (var i=0; i &lt; f.authentication.length; i++)
  330. {
  331. if (f.authentication[i].value == 'signon' &amp;&amp; f.authentication[i].checked) {
  332. signonSelected = 'true';
  333. }
  334. }
  335. }
  336. <!-- display confirmation window when removing datasourceSignons -->
  337. if (signonSelected=='false'){
  338. confirm = window.confirm(g_signon_authentication_warning_msg);
  339. <!-- return state of checkboxes if user cancels-->
  340. if (!confirm) {
  341. for (var i=0; i &lt; f.authentication.length; i++)
  342. {
  343. if (f.authentication[i].value == 'signon') {
  344. f.authentication[i].checked='true';
  345. }
  346. }
  347. onChangeAuthentication();
  348. return false;
  349. }
  350. }
  351. </xsl:if>
  352. if (isJdbcDisabled() || validateConnection())
  353. {
  354. var f = document.pform;
  355. <xsl:choose>
  356. <xsl:when test="($queryServiceInstalled)">
  357. if (f.m_connection_enable_JDBC.value=='true') {
  358. buildConnectString('<xsl:value-of select="$connectionType"/>,<xsl:value-of select="$jdbcConnectionType"/>','<xsl:value-of select="xtsext:javascriptencode($connectionVariant)"/>');
  359. }
  360. if (f.m_connection_enable_JDBC.value=='false') {
  361. buildConnectString('<xsl:value-of select="$connectionType"/>','<xsl:value-of select="xtsext:javascriptencode($connectionVariant)"/>');
  362. }
  363. </xsl:when>
  364. <xsl:otherwise>
  365. buildConnectString('<xsl:value-of select="$connectionType"/>','<xsl:value-of select="xtsext:javascriptencode($connectionVariant)"/>');
  366. </xsl:otherwise>
  367. </xsl:choose>
  368. return true;
  369. }
  370. return false;
  371. }
  372. function doTest()
  373. {
  374. if(isJdbcDisabled() || validateBeforeTest())
  375. {
  376. f=document.pform;
  377. <xsl:if test="$connectionTab='odbc'">
  378. buildConnectString('<xsl:value-of select="$connectionType"/>','<xsl:value-of select="$connectionVariant"/>');
  379. </xsl:if>
  380. <xsl:if test="$connectionTab='jdbc'">
  381. buildConnectString('<xsl:value-of select="$jdbcConnectionType"/>','<xsl:value-of select="$connectionVariant"/>');
  382. </xsl:if>
  383. f.ps_nav_op.value = 'push';
  384. f.m.value = '<xsl:value-of select="concat($app,'/test_connection.xts')"/>';
  385. f.submit();
  386. }
  387. return;
  388. }
  389. function validateBeforeTest()
  390. {
  391. var f = document.pform;
  392. <xsl:call-template name="get-validations">
  393. <xsl:with-param name="connection-type" select="$validationConnectionType"/>
  394. <xsl:with-param name="connection-variant" select="$connectionVariant"/>
  395. <xsl:with-param name="test" select="true()"/>
  396. </xsl:call-template>
  397. }
  398. function changeTab(tab) {
  399. if(isJdbcDisabled() || validateBeforeTest()) {
  400. document.pform.ps_nav_op.value = 'maintain';
  401. document.pform.m_connection_tab.value = tab;
  402. document.pform.submit();
  403. }
  404. return;
  405. }
  406. <![CDATA[
  407. /*
  408. summary: generate an iframe to cover the div, to prevent any event (against div) from happening. Basically it's another approach to "disable" the div.
  409. @param div: an existing element in DOM
  410. */
  411. function coverDiv(div) {
  412. this.origDiv = document.getElementById(div);
  413. this.backingID = this.origDiv.id + "_backing";
  414. this.backing = document.getElementById(this.backingID);
  415. if (this.backing == null) {
  416. this.backing = document.createElement("iframe");
  417. this.backing.id = this.backingID;
  418. this.backing.name = this.backingID;
  419. this.backing.src = "about:blank";
  420. this.backing.style.backgroundColor="#dddddd";
  421. this.backing.setAttribute('frameBorder', "0");
  422. this.backing.style.display= "none";
  423. this.backing.style.position="absolute";
  424. dojo.style(this.backing,"opacity",0.5);
  425. document.body.appendChild(this.backing);
  426. dojo.connect(window,"resize",this,"caliberate");
  427. }
  428. }
  429. coverDiv.prototype = {
  430. coverUp: function(cover){
  431. if (cover) {
  432. this.caliberate();
  433. this.backing.style.display = "";
  434. } else {
  435. this.backing.style.display = "none";
  436. }
  437. this.disableTabbing(cover);
  438. },
  439. caliberate: function(){
  440. var position = dojo.coords(this.origDiv);
  441. //-1 mean to remove the horizental scroll bar in browser.
  442. dojo.style(this.backing,"width",position.w-1);
  443. dojo.style(this.backing,"height",position.h);
  444. dojo.style(this.backing,"top",position.t);
  445. dojo.style(this.backing,"left",position.l);
  446. },
  447. disableTabbing: function(cover){
  448. var getElems = function(elem) {
  449. var targetTags = ["input","select","a"];
  450. var elems = [];
  451. if (elem.nodeType == 1 /*Node.ELEMENT_NODE*/) {
  452. if (dojo.indexOf(targetTags,elem.tagName.toLowerCase()) > -1){
  453. elems.push(elem);
  454. }
  455. var children = elem.childNodes;
  456. for(var i=0; i < children.length; i++) {
  457. elems = elems.concat(getElems(children[i]));
  458. }
  459. }
  460. return elems;
  461. };
  462. var targetElems = getElems(this.origDiv);
  463. for(var j=0; j<targetElems.length; j++) {
  464. targetElems[j].tabIndex = cover ? -1 : 0;
  465. }
  466. }
  467. }
  468. ]]>
  469. function enableJDBCClicked() {
  470. var chkBoxChecked = document.getElementById("enableJDBC").checked;
  471. document.pform.m_connection_enable_JDBC.value=chkBoxChecked ? 'true' : 'false';
  472. (new coverDiv('connection_body')).coverUp(!chkBoxChecked);
  473. document.getElementById("connection_body").setAttribute("aria-hidden", !chkBoxChecked);
  474. }
  475. function init()
  476. {
  477. var f = document.pform;
  478. // the first time we hit the ODBC tab
  479. <xsl:choose>
  480. <xsl:when test="not(key('env-param','visited_specify_connection_odbc_tab'))">
  481. // set the initial state of the Enable JDBC checkbox
  482. f.m_connection_enable_JDBC.value=isDualStackConnectString(f.m_p_connectionString.value) ? 'true' : 'false';
  483. // Parse the string if we have it, but only the first time the page is loaded
  484. if (f.m_p_connectionString.value != '')
  485. {
  486. parseConnectString('<xsl:value-of select="$connectionType"/>,<xsl:value-of select="$jdbcConnectionType"/>', '<xsl:value-of select="xtsext:javascriptencode(key('env-param','m_p_credentialNamespaces')) != '' "/>','<xsl:value-of select="xtsext:javascriptencode(string($connectionVariant))"/>');
  487. }
  488. </xsl:when>
  489. <!-- update the proxy host controls -->
  490. <xsl:when test="$connectionType='sfdc'">
  491. <xsl:choose>
  492. <xsl:when test="key('env-param','m_connection_proxy_enabled') and $proxyEnabled='true'">
  493. f.m_connection_proxy_enabled.value='true';
  494. f.m_connection_proxy_enabled.checked='true';
  495. disableProxyControls(false);
  496. </xsl:when>
  497. <xsl:otherwise>
  498. disableProxyControls(true);
  499. </xsl:otherwise>
  500. </xsl:choose>
  501. </xsl:when>
  502. </xsl:choose>
  503. <!-- this will update the signon controls so the appropriate ones are disabled -->
  504. <xsl:choose>
  505. <xsl:when test="contains(' dbtwoolap tm1R tm1 odata sql jdbc-sql sql2005 sql2008 sql2012-2014 sqlodbc composite virtualviewmanager msanalysis2017 msanalysis2016 msanalysis2014 msanalysis2012 msanalysis2008 msanalysis2005 sap powercube teradata jdbc-teradata db2 jdbc-db2 odbc netezza jdbc-netezza jdbc-generic lob-jdbc oracle ', concat(' ',$connectionType,' '))">
  506. onChangeAuthentication();
  507. </xsl:when>
  508. <xsl:when test="$connectionType!='other'">
  509. if (f.m_connection_use_userid)
  510. {
  511. f.m_connection_use_pword.disabled = !f.m_connection_use_userid.checked;
  512. }
  513. if (f.m_connection_default_signon &amp;&amp; f.m_connection_use_userid)
  514. {
  515. f.m_connection_default_signon.disabled=!f.m_connection_use_userid.checked;
  516. }
  517. </xsl:when>
  518. </xsl:choose>
  519. <xsl:if test="$connectionType='contributorSeries7'">
  520. checkPADIDValue();
  521. </xsl:if>
  522. <xsl:if test="$connectionType = 'filenet'">
  523. initRepositoryConnectionPage();
  524. </xsl:if>
  525. <xsl:if test="$connectionType = 'db2'">
  526. updateTrustedContext();
  527. </xsl:if>
  528. updateJdbcOracle();
  529. updateJdbcSortOptions();
  530. <!--
  531. Setting the href for the cancel button and the close icon
  532. There is a cancel form which contains only the necessary hidden fields
  533. This is to avoid submitting invalid values when clicking cancel or closing the window
  534. -->
  535. var idsCancel = document.getElementById("IDS_CANCEL");
  536. var idsClose = document.getElementById("IDS_CLOSE_REF");
  537. var idsHiddenCancel = document.getElementById("IDS_HIDDEN_CANCEL");
  538. if (idsCancel != null &amp;&amp; idsClose != null &amp;&amp; idsHiddenCancel != null) {
  539. idsCancel.href = idsHiddenCancel.href;
  540. idsClose.href = idsHiddenCancel.href;
  541. }
  542. // every time we hit the JDBC tab
  543. if (document.pform.m_connection_tab.value=='jdbc'){
  544. var bCoverUp = document.pform.m_connection_enable_JDBC.value == 'false';
  545. (new coverDiv('connection_body')).coverUp(bCoverUp);
  546. document.getElementById("connection_body").setAttribute("aria-hidden", bCoverUp);
  547. }
  548. } // end of init()
  549. </script>
  550. <script language="javascript" src="{$webcontent}/{$app}/js/utilities.js"/>
  551. <dc:confirm-cancel/>
  552. </dp:script>
  553. <xsl:variable name="connTypeDescription">
  554. <xsl:choose>
  555. <xsl:when test="$connectionTab='odbc'">
  556. <xsl:value-of select="/root/datasources/datasource/editDescription"/>
  557. </xsl:when>
  558. <xsl:otherwise>
  559. <xsl:value-of select="/root/jdbcdatasources/datasource/editDescription"/>
  560. </xsl:otherwise>
  561. </xsl:choose>
  562. </xsl:variable>
  563. <!-- hidden cancel form used when clicking on cancel or on the close button; see the init() method -->
  564. <div style="display:none">
  565. <utml:form name="cancelForm" method="post" action="{$gateway}" >
  566. <df:button df:id="IDS_HIDDEN_CANCEL" df:style="stack-down" />
  567. </utml:form>
  568. </div>
  569. <utml:form name="pform" method="post" action="{$gateway}">
  570. <dp:header>
  571. <!-- header titles-->
  572. <dp:title>
  573. <xsl:value-of select="$title"/>
  574. </dp:title>
  575. <dp:close>
  576. <utml:a utml:op="stack-down" id="IDS_CLOSE_REF">
  577. <dp:closeMarker/>
  578. </utml:a>
  579. </dp:close>
  580. </dp:header>
  581. <xsl:variable name="JDBCconnectionTypeToUse">
  582. <xsl:choose>
  583. <xsl:when test="$jdbcConnectionType!=''">
  584. <xsl:value-of select="$jdbcConnectionType"/>
  585. </xsl:when>
  586. <xsl:otherwise>
  587. <xsl:value-of select="$connectionType"/>
  588. </xsl:otherwise>
  589. </xsl:choose>
  590. </xsl:variable>
  591. <!-- tab section -->
  592. <xsl:if test="$queryServiceInstalled and $jdbcConnectionType!=''" >
  593. <cp:tabset>
  594. <cp:select><xsl:value-of select="$connectionTab"/></cp:select>
  595. <cp:tab name="odbc" position="start">
  596. <a href="javascript:changeTab('odbc');">
  597. <cp:label>
  598. <xsl:choose>
  599. <xsl:when test="/root/datasources/datasource/tabLabel != ''">
  600. <xsl:value-of select="/root/datasources/datasource/tabLabel"/>
  601. </xsl:when>
  602. <xsl:otherwise>
  603. <xts:string id="IDS_SELECT_CONNECT_COMPATIBLE_TAB_LABEL"/>
  604. </xsl:otherwise>
  605. </xsl:choose>
  606. </cp:label>
  607. </a>
  608. </cp:tab>
  609. <cp:tab name="jdbc" position="end">
  610. <a href="javascript:changeTab('jdbc');">
  611. <cp:label><xts:string id="IDS_SELECT_CONNECT_JDBC_TAB_LABEL"/></cp:label>
  612. </a>
  613. </cp:tab>
  614. </cp:tabset>
  615. </xsl:if>
  616. <dp:description>
  617. <xsl:choose>
  618. <xsl:when test="$connectionType = 'contributor'">
  619. <xsl:text><xts:string id="IDS_NEW_INTRO_CONNECT_NEWCONTRIBUTOR"/></xsl:text>
  620. </xsl:when>
  621. <xsl:otherwise>
  622. <xts:string id="IDS_NEW_INTRO_CONNECT">
  623. <xts:param name="connectionType">
  624. <xsl:value-of select="$connTypeDescription"/>
  625. </xts:param>
  626. </xts:string>
  627. </xsl:otherwise>
  628. </xsl:choose>
  629. </dp:description>
  630. <xsl:if test="$connectionTab='jdbc'">
  631. <lyt:layout style="1">
  632. <lyt:section>
  633. <dp:group>
  634. <dp:groupItem>
  635. <dp:choice noSpace="true">
  636. <dp:section1>
  637. <utml:input type="checkbox" name="enableJDBC" id="enableJDBC" value="false">
  638. <xsl:if test="key('env-param','m_connection_enable_JDBC')='true'">
  639. <xsl:attribute name="checked"/>
  640. </xsl:if>
  641. <xsl:attribute name="onclick">enableJDBCClicked();</xsl:attribute>
  642. </utml:input>
  643. </dp:section1>
  644. <dp:section2 for="enableJDBC">
  645. <xts:string id="IDS_SELECT_CONNECT_ENABLE_JDBC"/>
  646. </dp:section2>
  647. </dp:choice>
  648. </dp:groupItem>
  649. </dp:group>
  650. </lyt:section>
  651. </lyt:layout>
  652. </xsl:if>
  653. <utml:input type="hidden" name="m_p_connectionString"/>
  654. <utml:input type="hidden" name="visited_specify_connection_odbc_tab" value="true" utml:update="false"/>
  655. <div id="connection_body">
  656. <xsl:if test="$connectionTab='jdbc'">
  657. <xsl:attribute name="style">
  658. <xsl:value-of select="'padding-left: 2em;'"/>
  659. </xsl:attribute>
  660. </xsl:if>
  661. <div id="odbc">
  662. <xsl:if test="$connectionTab='jdbc'">
  663. <xsl:attribute name="style">
  664. <xsl:value-of select="'display:none'"/>
  665. </xsl:attribute>
  666. </xsl:if>
  667. <xsl:choose>
  668. <xsl:when test="$connectionType = 'composite' or $connectionType = 'virtualviewmanager' or $connectionType = 'db2' or $connectionType = 'odbc' or $connectionType = 'openEdge' or $connectionType = 'redbrick' or $connectionType = 'teradata' or $connectionType = 'sqlodbc' or $connectionType = 'sybaseIQ' or $connectionType = 'netezza' or $connectionType = 'jdbc-teradata' or $connectionType = 'jdbc-db2' or $connectionType = 'jdbc-netezza' or $connectionType = 'jdbc-sql'">
  669. <!--
  670. =========================================================================
  671. D B 2 / O D B C
  672. =========================================================================
  673. -->
  674. <xsl:call-template name="dcx-db2-odbc-template">
  675. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  676. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  677. </xsl:call-template>
  678. </xsl:when>
  679. <xsl:when test="$connectionType = 'msas_xmla'">
  680. <!--
  681. =========================================================================
  682. Microsoft Analysis Services (via XMLA)
  683. =========================================================================
  684. -->
  685. <xsl:call-template name="dcx-msas_xmla-template">
  686. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  687. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  688. </xsl:call-template>
  689. </xsl:when>
  690. <xsl:when test="$connectionType = 'consolidation'">
  691. <!--
  692. =========================================================================
  693. Cognos Consolidation
  694. =========================================================================
  695. -->
  696. <xsl:call-template name="dcx-consolidation-template">
  697. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  698. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  699. </xsl:call-template>
  700. </xsl:when>
  701. <!--
  702. The contributor connection does not have any parameters (except the namespace).
  703. The contributor series 7 has parameters (server, padid, port and namespace).
  704. -->
  705. <xsl:when test="$connectionType = 'contributorSeries7'">
  706. <!--
  707. =========================================================================
  708. Cognos Contributor Series 7
  709. =========================================================================
  710. -->
  711. <xsl:call-template name="dcx-contributorSeries7-template">
  712. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  713. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  714. </xsl:call-template>
  715. </xsl:when>
  716. <xsl:when test="$connectionType = 'powercube'">
  717. <!--
  718. =========================================================================
  719. Cognos PowerCube
  720. =========================================================================
  721. -->
  722. <xsl:call-template name="dcx-powercube-template">
  723. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  724. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  725. </xsl:call-template>
  726. </xsl:when>
  727. <xsl:when test="$connectionType = 'dbtwoolap'">
  728. <!--
  729. =========================================================================
  730. IBM DB2/Hyperion ESSBase OLAP Server
  731. =========================================================================
  732. -->
  733. <xsl:call-template name="dcx-db2olap-template">
  734. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  735. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  736. </xsl:call-template>
  737. </xsl:when>
  738. <xsl:when test="$connectionType = 'tm1'">
  739. <!--
  740. =========================================================================
  741. TM1
  742. =========================================================================
  743. -->
  744. <xsl:call-template name="dcx-tm1-template">
  745. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  746. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  747. </xsl:call-template>
  748. </xsl:when>
  749. <xsl:when test="$connectionType = 'tm1R'">
  750. <!--
  751. =========================================================================
  752. Planning Analytics
  753. =========================================================================
  754. -->
  755. <xsl:call-template name="dcx-tm1R-template">
  756. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  757. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  758. </xsl:call-template>
  759. </xsl:when>
  760. <xsl:when test="$connectionType = 'odata'">
  761. <!--
  762. =========================================================================
  763. OData
  764. =========================================================================
  765. -->
  766. <xsl:call-template name="dcx-odata-template">
  767. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  768. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  769. </xsl:call-template>
  770. </xsl:when>
  771. <xsl:when test="$connectionType = 'json'">
  772. <!--
  773. =========================================================================
  774. JSON
  775. =========================================================================
  776. -->
  777. <xsl:call-template name="dcx-json-template">
  778. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  779. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  780. </xsl:call-template>
  781. </xsl:when>
  782. <xsl:when test="$connectionType = 'cognosnow'">
  783. <!--
  784. =========================================================================
  785. COGNOSNOW
  786. =========================================================================
  787. -->
  788. <xsl:call-template name="dcx-cognosnow-template">
  789. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  790. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  791. </xsl:call-template>
  792. </xsl:when>
  793. <xsl:when test="contains(' msanalysis2005 msanalysis2008 msanalysis2012 msanalysis2014 msanalysis2016 msanalysis2017', concat(' ',$connectionType,' '))">
  794. <!--
  795. =========================================================================
  796. Microsoft Analysis Services 2005 or 2008 or 2012 or 2014
  797. =========================================================================
  798. -->
  799. <xsl:call-template name="dcx-msanalysis2005-template">
  800. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  801. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  802. </xsl:call-template>
  803. </xsl:when>
  804. <xsl:when test="contains(' sql sql2005 sql2008 sql2012-2014 jdbc-sql ', concat(' ',$connectionType,' '))">
  805. <!--
  806. =========================================================================
  807. M S S Q L S e r v e r (OLEDB or 2005 or 2008 or 2012 or 2014)
  808. =========================================================================
  809. -->
  810. <xsl:call-template name="dcx-sql-template">
  811. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  812. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  813. </xsl:call-template>
  814. </xsl:when>
  815. <xsl:when test="$connectionType = 'oracle' or $connectionType = 'jdbc-oracle'">
  816. <!--
  817. =========================================================================
  818. O R A C L E
  819. =========================================================================
  820. -->
  821. <xsl:call-template name="dcx-oracle-template">
  822. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  823. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  824. </xsl:call-template>
  825. </xsl:when>
  826. <xsl:when test="$connectionType = 'sybase' or $connectionType = 'sybase_ct15'">
  827. <!--
  828. =========================================================================
  829. S Y B A S E CT-Lib or CT-15
  830. =========================================================================
  831. -->
  832. <xsl:call-template name="dcx-sybase-template">
  833. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  834. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  835. <xsl:with-param name="connection-type" select="$connectionType"/>
  836. </xsl:call-template>
  837. </xsl:when>
  838. <xsl:when test="$connectionType = 'informix'">
  839. <!--
  840. =========================================================================
  841. I N F O R M I X
  842. =========================================================================
  843. -->
  844. <xsl:call-template name="dcx-informix-template">
  845. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  846. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  847. </xsl:call-template>
  848. </xsl:when>
  849. <!--
  850. =========================================================================
  851. S A P B W
  852. =========================================================================
  853. -->
  854. <xsl:when test="$connectionType = 'sap'">
  855. <xsl:call-template name="dcx-sap-template">
  856. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  857. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  858. </xsl:call-template>
  859. </xsl:when>
  860. <!--
  861. =========================================================================
  862. S A P R 3 or SAP BW ECC
  863. =========================================================================
  864. -->
  865. <xsl:when test="$connectionType = 'sapR3' or $connectionType = 'sapECC'">
  866. <xsl:call-template name="dcx-sapR3-template">
  867. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  868. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  869. </xsl:call-template>
  870. </xsl:when>
  871. <xsl:when test="$connectionType = 'xml'">
  872. <!--
  873. =========================================================================
  874. X M L
  875. =========================================================================
  876. -->
  877. <xsl:call-template name="dcx-xml-template">
  878. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  879. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  880. </xsl:call-template>
  881. </xsl:when>
  882. <xsl:when test="$connectionType = 'jdbc-generic' or $connectionType = 'lob-jdbc'">
  883. <!--
  884. =========================================================================
  885. JDBC Generic
  886. =========================================================================
  887. -->
  888. <xsl:call-template name="dcx-jdbc-generic">
  889. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  890. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  891. </xsl:call-template>
  892. </xsl:when>
  893. <xsl:when test="$connectionType = 'filenet'">
  894. <!--
  895. =========================================================================
  896. FileNet
  897. =========================================================================
  898. -->
  899. <xsl:call-template name="dcx-filenet">
  900. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  901. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  902. </xsl:call-template>
  903. </xsl:when>
  904. <xsl:when test="$connectionType = 'sr3'">
  905. <!--
  906. =========================================================================
  907. S A P R 3
  908. =========================================================================
  909. -->
  910. <xsl:call-template name="dcx-sapr3-template">
  911. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  912. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  913. </xsl:call-template>
  914. </xsl:when>
  915. <xsl:when test="$connectionType = 'sfdc'">
  916. <!--
  917. =========================================================================
  918. S F D C
  919. =========================================================================
  920. -->
  921. <xsl:call-template name="dcx-sfdc-template">
  922. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  923. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  924. </xsl:call-template>
  925. </xsl:when>
  926. <xsl:when test="$connectionType = 'siebel'">
  927. <!--
  928. =========================================================================
  929. S I E B E L
  930. =========================================================================
  931. -->
  932. <xsl:call-template name="dcx-siebel-template">
  933. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  934. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  935. </xsl:call-template>
  936. </xsl:when>
  937. </xsl:choose>
  938. </div>
  939. <div id="jdbc">
  940. <xsl:if test="$connectionTab='odbc'">
  941. <xsl:attribute name="style">
  942. <xsl:value-of select="'display:none'"/>
  943. </xsl:attribute>
  944. </xsl:if>
  945. <xsl:choose>
  946. <xsl:when test="contains('jdbc-sql sql sql2005 sql2008 sql2012-2014 sqlodbc ', concat(' ',$connectionType,' '))">
  947. <!--
  948. =========================================================================
  949. SQL Server (JDBC)
  950. =========================================================================
  951. -->
  952. <xsl:call-template name="dcx-jdbc-sql">
  953. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  954. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  955. </xsl:call-template>
  956. </xsl:when>
  957. <xsl:when test="$connectionType = 'jdbc-db2' or $connectionType = 'db2'">
  958. <!--
  959. =========================================================================
  960. IBM DB2 (JDBC)
  961. =========================================================================
  962. -->
  963. <xsl:call-template name="dcx-jdbc-db2">
  964. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  965. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  966. </xsl:call-template>
  967. </xsl:when>
  968. <xsl:when test="$connectionType = 'jdbc-teradata' or $connectionType = 'teradata'">
  969. <!--
  970. =========================================================================
  971. Teradata (JDBC)
  972. =========================================================================
  973. -->
  974. <xsl:call-template name="dcx-jdbc-teradata">
  975. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  976. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  977. </xsl:call-template>
  978. </xsl:when>
  979. <xsl:when test="$connectionType = 'jdbc-netezza' or $connectionType = 'netezza'">
  980. <!--
  981. =========================================================================
  982. Netezza (JDBC)
  983. =========================================================================
  984. -->
  985. <xsl:call-template name="dcx-jdbc-netezza">
  986. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  987. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  988. </xsl:call-template>
  989. </xsl:when>
  990. <xsl:when test="$connectionType = 'jdbc-oracle' or $connectionType = 'oracle'">
  991. <!--
  992. =========================================================================
  993. Oracle (JDBC)
  994. =========================================================================
  995. -->
  996. <xsl:call-template name="dcx-jdbc-oracle">
  997. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  998. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  999. </xsl:call-template>
  1000. </xsl:when>
  1001. </xsl:choose>
  1002. </div>
  1003. <xsl:if test="contains(' composite virtualviewmanager sap consolidation powercube dbtwoolap tm1R tm1 odata json msanalysis2017 msanalysis2016 msanalysis2014 msanalysis2012 msanalysis2008 msanalysis2005 msas_xmla sqlodbc redbrick teradata jdbc-teradata db2 jdbc-db2 odbc openEdge sql sql2005 sql2008 sql2012-2014 jdbc-sql oracle jdbc-oracle jdbc-generic lob-jdbc filenet netezza jdbc-netezza sybase sybase_ct15 sybaseIQ informix sr3 sfdc siebel', $connectionType)">
  1004. <xsl:variable name="divDisplayValue">
  1005. <xsl:choose>
  1006. <xsl:when test="/root/env/param[@name='m_connection_tab'] = 'odbc'">
  1007. <xsl:value-of select="'block'"/>
  1008. </xsl:when>
  1009. <xsl:otherwise>
  1010. <xsl:value-of select="'none'"/>
  1011. </xsl:otherwise>
  1012. </xsl:choose>
  1013. </xsl:variable>
  1014. <div id="gen-signon-section" style="display: {$divDisplayValue}">
  1015. <xsl:call-template name="gen-signon-section">
  1016. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  1017. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  1018. <xsl:with-param name="uid-pwd-checkboxes">true</xsl:with-param>
  1019. <xsl:with-param name="connectionType" select="$connectionType"/>
  1020. <xsl:with-param name="wizard" select="'false'"/>
  1021. </xsl:call-template>
  1022. </div>
  1023. </xsl:if>
  1024. <xsl:if test="$connectionType = 'contributor' or $connectionType = 'contributorSeries7'">
  1025. <xsl:call-template name="gen-contributor-section">
  1026. <xsl:with-param name="form-read-only" select="$form-read-only"/>
  1027. <xsl:with-param name="utml-form-name" select="$utml-form-name"/>
  1028. <xsl:with-param name="uid-pwd-checkboxes"><xsl:value-of select="'true'"/></xsl:with-param>
  1029. <xsl:with-param name="connectionType" select="$connectionType"/>
  1030. <xsl:with-param name="wizard" select="'true'"/>
  1031. </xsl:call-template>
  1032. </xsl:if>
  1033. <xsl:if test="$connectionType = 'powercube'">
  1034. <dcx:cubePassword specifyConnection="true"/>
  1035. </xsl:if>
  1036. <!-- test the connection section -->
  1037. <div id="test_connection">
  1038. <lyt:layout title="IDS_PROP_CONN_TESTING" style="1" border="yes">
  1039. <lyt:section>
  1040. <dp:choice>
  1041. <dp:section1>
  1042. <a id="test_connection_link" href="javascript:doTest();">
  1043. <xsl:text><xts:string id="IDS_PROP_CONN_TEST_CONNECTION"/></xsl:text>
  1044. </a>
  1045. </dp:section1>
  1046. </dp:choice>
  1047. </lyt:section>
  1048. </lyt:layout>
  1049. </div>
  1050. </div>
  1051. <dp:footer>
  1052. <df:button df:id="IDS_OK" df:style="stack-down-save" utml:validate="true"/>
  1053. <df:button df:id="IDS_CANCEL" df:style="stack-down" onclick="{$dc-confirm-cancel}"/>
  1054. </dp:footer>
  1055. </utml:form>
  1056. <!-- if we're building a Cognos Finance connection and there aren't any namesapces defined, then show
  1057. a warning dialog -->
  1058. <xsl:if test="$connectionType = 'consolidation' and not(/root/namespaces/cm:queryResponse/cm:namespace)">
  1059. <script language="javascript">
  1060. alert('<xts:string id="IDS_PROP_CONN_FINANCE_NO_NAMESPACE_WARNING" encode="javascript"/>');
  1061. </script>
  1062. </xsl:if>
  1063. </dp:page>
  1064. </xsl:template>
  1065. <dcx:isDatasourceSignon/>
  1066. </xsl:stylesheet>
  1067. </xts:block>
  1068. <!--
  1069. ===============================================================================================
  1070. - display debug information
  1071. ===============================================================================================
  1072. -->
  1073. <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">
  1074. <!-- get the debug logic sheet -->
  1075. <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
  1076. <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">
  1077. <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
  1078. <xsl:template match="/">
  1079. <dbg:dumpxml select="/root"/>
  1080. </xsl:template>
  1081. </xsl:stylesheet>
  1082. </xts:block>
  1083. </xts:morphlet>