123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2015
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/AGS.xml,messages/portal.xml, messages/portalRL.xml" resolverBase="prompting" includeConfig="true" requiredCapability="canUseEventStudio">
- <!--
- ================================================================================
- decode the agent items
- ===============================================================================================
- -->
- <xts:block id="decode_agent_definition" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = 'agent_definition_blob']">
- <!-- decode the agent items -->
- <xts:append select="/root">
- <xsl:value-of select="xtsext:web64decode( xtsext:cafaction('sign_unwrap_settemplatename_decodeagentdefinition_settemplateid_presave001', string( /root/env/param[@name = 'agent_definition_blob'])), true() )" disable-output-escaping="yes"/>
- </xts:append>
- <!-- delete the agent definition blob - we're putting it back later -->
- <xts:delete select="/root/env/param[@name='agent_definition_blob']"/>
- </xsl:when>
- </xsl:choose>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- getPageData - create the request parameters for the content page
- ===============================================================================================
- -->
- <xts:block id="getPageData" dependency="decode_agent_definition" path="ags/navigator.xslt" processor="XSLT" type="exec"/>
- <!--
- ===============================================================================================
- Handle controller template results - some pages/condition/schedule/email are written in the controller_template form. This means
- we have to call them a second time to get the result
- ===============================================================================================
- -->
- <xts:block id="callControllerTemplateResults" path="/ags/callResultTemplate.xslt" dependency="getPageData" condition=".[/root/env/param[@name='tabSelectedID']!='AgentTask-condition']" mandatory="false" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- Handle controller template results - some pages/condition/schedule/email are written in the controller_template form. This means
- we have to call them a second time to get the result
- ===============================================================================================
- -->
- <xts:block id="handleControllerTemplateResults" path="/ags/handleResultTemplate.xslt" dependency="callControllerTemplateResults" condition=".[/root/env/param[@name='tabSelectedID']!='AgentTask-condition']" mandatory="false" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- Correct the task name if required ... the agent task action names which are now not specified by
- user and are taken from task property
- for Email it is subject, report .. report name, webservice - operation name, SQL - proc name etc.
- thus in order to avoid duplicate names we need to manage these names and we do it by putting a
- sequence number at the end of task name
- ===============================================================================================
- -->
- <xts:block id="manageTaskNameBlock" path="/ags/manageTaskName.xslt" dependency="handleControllerTemplateResults" mandatory="false" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- Save the agent action info. The encoded contents will be stored in /root/env/param[@name='<action>']. where the action is
- the contents of /root/env/param[@name='prevTabID'] which can be schedule/message/agent/job/report.
-
- Once the individual elements have been saved into the environment they will be removed.
- ===============================================================================================
- -->
- <xts:block id="storePreviousTab" path="/ags/storeTabTemplate.xslt" dependency="manageTaskNameBlock" mandatory="false" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ================================================================================
- encode the agent items again
- ================================================================================
- -->
- <xts:block id="encode_agent_definition" dependency="storePreviousTab" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:serialize-xml/>
- <pf:variables/>
- <xsl:template match="/">
- <xts:sequence>
- <xsl:variable name="markup">
-
- <xsl:call-template name="serialize-xml">
- <xsl:with-param name="node-set" select="/root/agent_definition"/>
- </xsl:call-template>
- </xsl:variable>
- <xts:append select="/root/env">
- <param name="agent_definition_blob">
- <xsl:value-of select="xtsext:cafaction( concat('sign_wrap_setpassportid_', $passport, '_settemplatename_encodeagentdefinition_settemplateid_presave002'), xtsext:web64encode( string( $markup ), true()))"/>
- </param>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ================================================================================
- rename all the save items
- ===============================================================================================
- -->
- <xts:block id="renameSaveParameters" dependency="encode_agent_definition" processor="XSLT" type="exec">
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <!--xts:delete select="/root/env/param[@name='m_path' or @name='m_new_class']"/-->
- <xts:delete select="/root/env/param[@name='m_new_class']"/>
- <xts:append select="/root/env">
- <!-- copy all save as parameters into non save parameters -->
- <xsl:for-each select="/root/env/param[starts-with(@name, 'agsSave_')]">
- <param name="{substring-after(@name, 'agsSave_')}">
- <xsl:value-of select="."/>
- </param>
- </xsl:for-each>
- <!-- remove code to set m_path to the path of the agentDefinition - ie always force this to be myfolders. Cannot have path
- being the path of the agentDefinition now - as the agentDefinition path is held as a storeID - not a searchPath.
- this is actually wrong - but there it a bug logged 460608.0 which says that save location is always myfolders
- need to fix this when we fix that bug -->
- <!--param name="m_path">
- <xsl:value-of select="'~/folder'"/>
- </param-->
- </xts:append>
- <!-- get rid of the copies and blanks-->
- <xts:delete select="/root/env/param[starts-with(@name, 'agsSave_')]"/>
- <xts:delete select="/root/env/param[text() = '']"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- render-page
- ===============================================================================================
- -->
- <xts:block id="renderPage" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="renameSaveParameters">
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <!-- Get the new theme logicsheets. -->
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <!-- apply the form logic -->
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="utml dp pf xtsext">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <!-- add any theme variables -->
- <pf:variables/>
- <xsl:template match="/">
- <xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page>
- <!-- specify the style sheet(used to render the active/inactive hint text)
- todo move this into its own xslt file. Do not put it into the dp stuff because that is relevant to the whole portal
- -->
- <utml:form name="pform" method="post" action="{$gateway}">
- </utml:form>
- <dp:script>
-
- <script type="text/javascript">
- function init()
- {
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='ifrmcmd'] = 'validate_condition'">
- var target = "/ags/submit.xts";
- </xsl:when>
- <xsl:when test="starts-with(/root/env/param[@name='ifrmcmd'], 'validate')">
- var target = "/ags/submit.xts";
- </xsl:when>
- <xsl:when test="(/root/env/param[@name='ifrmcmd'] = 'create') or not(/root/agent_definition/agentDefinition)">
- var path = parent.cfgGet("so.defaultLocation");
- if (path) {
- var location = document.createElement("input");
- location.setAttribute('type', 'hidden');
- location.setAttribute('name', "so.searchPath");
- location.value = path;
- document.pform.appendChild(location);
- }
- var target = "/portal/save_as.xts";
- </xsl:when>
- <xsl:otherwise>
- var target = "/ags/submit.xts";
- </xsl:otherwise>
- </xsl:choose>
- try{
- // forward to the correct location
- document.pform.m.value = target;
- document.pform.ps_nav_op.value = "maintain";
- document.pform.submit();
- }catch(e){
- var cf = parent.getConfigFrame();
- if(cf){
- cf.doClosePopUp();
- }
- }
- }
- </script>
- </dp:script>
- </dp:page>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
-
- <!--
- ===============================================================================================
- render-fault page
- ===============================================================================================
- -->
- <xts:block id="faultHandler" processor="XSLT" type="fault" >
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:output method="xml"/>
- <xsl:template match="/root/fault">
- <xts:append select="/root">
- <error>
- <xsl:value-of select="//*[local-name() = 'messageString']"/>
- </error>
- </xts:append>
- </xsl:template>
- <xsl:template match="text()"/>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- ===============================================================================================
- debug - display debug information
- ===============================================================================================
- -->
- <xts:block id="debug" dependency="renderPage" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">
- <xts:logicsheet path="logicsheets/debuglogic.xslt"/>
- <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">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|