123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: AGS
- (C) Copyright IBM Corp. 2005, 2014
- 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,canUseMetricsManagerAdministration">
- <!--
- ===============================================================================================
- get the information for the agent - we only need the defaultName thought for the time being
- ===============================================================================================
- -->
- <xts:block id="getSelectedPath" type="exec" mode="interpret" processor="XSLT" condition=".[/root/env/param[@name = 'selected_path']!='' and /root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup']" mandatory="false">
- <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" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm" requester="AGS:addMatrics">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <query xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
- <search>
- <!-- Get the report - we know only it's search path now -->
- <xsl:value-of select="/root/env/param[@name = 'selected_path']"/>
- </search>
- <properties>
- <property name="defaultName"/>
- <property name="searchPath"/>
- </properties>
- </query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- returnResult - We're done with the email options morphlet, so return the appropriate response
- ===============================================================================================
- -->
- <xts:block id="returnResult" path="/ags/tabResultTemplate.xslt" type="exec" processor="XSLT" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'finished']" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!--
- ===============================================================================================
- genMarkup -
- ===============================================================================================
- -->
- <xts:block id="genMarkup" type="exec" processor="XSLT" dependency="getSelectedPath" condition=".[/root/*[local-name()='requestParams']/*[local-name()='param' and @name='requestState'] = 'markup'] ">
- <!-- logicsheets -->
- <xts:logicsheet path="ags/logicsheets/run_options.xslt"/>
- <!-- portal specific information -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="ags/logicsheets/dialogs.xsl"/>
- <xts:logicsheet path="ags/logicsheets/condition-ui-templates.xslt"/>
- <!-- Dialog specific logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/dialog/ui-templates.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/layout.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/dialog/presentation.xsl"/>
- <!-- Generic logicsheets -->
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <!-- apply the form logic -->
- <xts:logicsheet path="logicsheets/formlogic.xslt"/>
- <!-- Prevent the href from appearing in the status bar. -->
- <xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:out="http://www.w3.org/1999/XSL/Transform" xmlns:agsdlg="http://developer.cognos.com/schemas/xts/logicsheets/xslt/ags/dialog/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:pf="http://developer.cognos.com/schemas/xts/pf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" xmlns:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/" xmlns:cf="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/framework/" xmlns:cp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/controls/presentation/" xmlns:xos="http://developer.cognos.com/schemas/xts/output/" xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/" xmlns:agsro="http://developer.cognos.com/schemas/xts/agsro" exclude-result-prefixes="out agsdlg xsi cm pf xtsext lyt dp df cf cp xos utml agsro">
- <xsl:output method="xml" encoding="utf-8" indent="no"/>
- <xsl:key name="request-param" match="/root/*[local-name()='requestParams']/*[local-name()='param']" use="@name"/>
- <pf:variables/>
- <xsl:variable name="ags_image_root">../ags/images/summary/</xsl:variable>
- <xsl:variable name="mname" select="'dialogAdapter.xts'"/>
- <xsl:variable name="spacer">
- <img height="10" width="10">
- <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute>
- </img>
- </xsl:variable>
- <!-- SEC_INFO hasTask is not javascript encoded, it is always a boolean value true|false-->
- <xsl:variable name="hasTask">
- <xsl:choose>
- <xsl:when test="key('env-param','selected_path') != ''"><xsl:text>true</xsl:text></xsl:when>
- <xsl:otherwise><xsl:text>false</xsl:text></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="metricTaskName">
- <xsl:value-of select="/root/*[local-name()='queryResponse'][starts-with(*,'metric')]//*[local-name()='defaultName']"/>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <xsl:element name="{key('request-param','resultNode')}" namespace="">
- <markup>
- <xts:transform name="XMLEncode">
- <utml:form name="pform">
- <!-- this defines the form command operation to be performed when all the collected properties are submitted... -->
- <!-- ================================================================ -->
- <!-- H E A D E R -->
- <!-- ================================================================ -->
- <utml:exclusion-list><xsl:value-of select="' pageitem '"/></utml:exclusion-list>
- <agsdlg:header>
- <dp:image>
- <img alt="" border="0">
- <xsl:attribute name="src"><xsl:value-of select="$ags_image_root"/>icon_metrics_maintenance_24.gif</xsl:attribute>
- </img>
- </dp:image>
- <dp:title>
- <xts:string id="DIALOG_METRICS_TITLE"/>
- </dp:title>
- <dp:description>
- <xts:string id="DIALOG_METRICS_DESCRIPTION"/>
- </dp:description>
- </agsdlg:header>
- <utml:input type="hidden" name="report_visited" id="report_visited" value="true"/>
- <utml:input type="hidden" name="taskName" id="taskName" utml:update="false">
- <utml:value>
- <xsl:choose>
- <xsl:when test="$hasTask='true' and $metricTaskName != '' ">
- <xsl:value-of select="$metricTaskName"/>
- </xsl:when>
- <xsl:when test="key('env-param', 'taskName') and string-length(string(key('env-param', 'taskName'))) > 0">
- <xsl:value-of select="key('env-param', 'taskName')"/>
- </xsl:when>
- </xsl:choose>
- </utml:value>
- </utml:input>
- <!-- ================================================================ -->
- <!-- B O D Y -->
- <!-- ================================================================ -->
- <!-- Define a new layout-->
- <lyt:layout style="2">
- <lyt:section>
- <dp:textarea section3_align="left">
- <!-- the CM name label-->
- <dp:section1>
- <xts:string id="DIALOG_METRICS_LABEL"/>
- </dp:section1>
- <dp:section2>
- <!-- get the name of the metric -->
- <xsl:choose>
- <xsl:when test="$hasTask='true' and $metricTaskName != '' ">
- <xsl:copy-of select="$spacer"/>
- <xsl:value-of select="$metricTaskName"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="DIALOG_MESSAGE_NONE"/>
- </xsl:otherwise>
- </xsl:choose>
- </dp:section2>
- <!-- metricsMaintenanceTask -->
- <dp:section3>
- <a href="#" onclick="doSelectObject('metricTask.es', '{xtsext:javascriptencode(/root/env/param[@name = 'selected_path'])}')">
- <xts:string id="SELECT_METRICS"/>
- </a>
- </dp:section3>
- </dp:textarea>
- </lyt:section>
- <lyt:section>
- <xsl:value-of select="key('request-param','suppressionDetails')" disable-output-escaping="yes"/>
- </lyt:section>
- </lyt:layout>
- <dp:emptyFooter/>
- <script type="text/javascript">
- function init() {
- <xsl:if test="not(/root/env/param[@name='report_visited'])">
- <xsl:if test="not(/root/env/param[@name='selected_path'])">
- doSelectObject('metricTask.es')
- </xsl:if>
- </xsl:if>
- }
-
- /*
- * validate the report page and popup an appropriate alert message
- */
- function validate() {
- var hasTask = <xsl:value-of select="string($hasTask)"/>;
- var isValid = true;
-
- if (hasTask==false) {
- isValid = false;
- alert("<xts:string id="DIALOG_METRICS_NO_TASK" encode="javascript"/>");
- }
- return isValid;
- }
-
- function leavingDialog() {
- var oc = "<xsl:value-of select="/root/*[local-name()='queryResponse'][starts-with(*,'metric')]//*[local-name()='objectClass']"/>";
- if(window.argumentsLeavingDialog){
- argumentsLeavingDialog();
- }
- if (oc != "") {
- var i = document.getElementById("objectClass");
- if (i == undefined || i == null) {
- i = document.createElement("INPUT");
- }
- i.setAttribute("name", "objectClass");
- i.setAttribute("id", "objectClass");
- i.setAttribute("value", oc);
- i.setAttribute("type", "hidden");
- document.pform.appendChild(i);
- }
- }
- </script>
- </utml:form>
- </xts:transform>
- </markup>
- </xsl:element>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - special debug block for nested requests
- ===============================================================================================
- -->
- <xts:block id="debug" type="exec" processor="XSLT" mimeType="text/html" dependency="genMarkup" condition=".[/root/session/param[@name='debug']='1']" mandatory="false">
- <!-- Get the debug logic sheet -->
- <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>
|