123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cogadmin
- (C) Copyright IBM Corp. 2005, 2013
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <!--
- Copyright (C) 2008 Cognos ULC, an IBM Company. All rights reserved.
- Cognos (R) is a trademark of Cognos ULC, (formerly Cognos Incorporated).
- -->
- <xts:morphlet xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/cogadminuimsgs.xml" resolverBase="cogadmin">
- <!--
- clickedOkUpdateCurrentActivitiess - executed once the user hit the OK button on the Suspend popup dialog to update the schedules
- -->
- <xts:block id="frag_init" nodelist="env, credential" type="exec" mode="interpret" processor="XSLT" path="cogadmin/logicsheets/fragment_init.xslt" condition=".[not(/root/env/param[@name='frag-directive']='meta-only')]" mandatory="true"/>
-
- <!--
- clickedOk to update current background activities - executed once the user hit the OK button on the suspend popup dialog to update the current background activities
- -->
- <xts:block id="clickedOkUpdateCurrentActivities" dependency="frag_init" type="exec" nodelist="env, header, user, system" processor="XSLT" mandatory="false" condition=".[/root/env/param[@name='userClickedOk']='true']">
- <xts:logicsheet path="/cogadmin/logicsheets/presentation/common.xslt"/>
- <xts:logicsheet path="/cogadmin/logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:ui="http://developer.cognos.com/schemas/ui/presentation/markup/"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:es="http://developer.cognos.com/schemas/eventManagementService/1"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:uic="http://developer.cognos.com/schemas/uic/presentation/markup/"
- exclude-result-prefixes="xsl ui SOAP-ENC SOAP-ENV xos send xsd cm es xtsext xsi uic">
-
- <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="/">
- <!-- update the upcoming_activities with the selected suspend criteria (from upcoming_activities) -->
- <xts:sequence>
- <xts:append>
- <result>
- <xsl:variable name="xsl_UTC_until">
- <xsl:value-of select="xtsext:formatDateToUTC( string( /root/env/param[@name='release'] ), string( /root/user/param[@name='timeZoneID'] ) )"/>
- </xsl:variable>
- <send:request provider="eventManagementService" faultBlock="faultHandler">
- <xsl:choose>
- <xsl:when test="not($xsl_UTC_until='')">
- <delayEventsUntil>
- <eventIDs xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[{count(/root/env/param[contains(@name, '_checkbox_')])}]">
- <xsl:for-each select="/root/env/param[contains(@name, '_checkbox_')]">
- <item xsi:type="xsd:string"><xsl:value-of select="."/></item>
- </xsl:for-each>
- </eventIDs>
- <until xsi:type="xsd:dateTime"><xsl:value-of select="$xsl_UTC_until"/></until>
- </delayEventsUntil>
- </xsl:when>
- <xsl:otherwise>
- <holdEvents>
- <eventIDs xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string[{count(/root/env/param[contains(@name, '_checkbox_')])}]">
- <xsl:for-each select="/root/env/param[contains(@name, '_checkbox_')]">
- <item xsi:type="xsd:string"><xsl:value-of select="."/></item>
- </xsl:for-each>
- </eventIDs>
- </holdEvents>
- </xsl:otherwise>
- </xsl:choose>
- </send:request>
- </result>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- checkResult - check result of request
- -->
- <xts:block id="checkResult" type="exec" dependency="frag_init clickedOkUpdateCurrentActivities" nodelist="env, header, user, system, result" processor="XSLT" mandatory="false" condition=".[/root/env/param[@name='userClickedOk']='true']">
- <xts:logicsheet path="/cogadmin/logicsheets/presentation/common.xslt"/>
- <xts:logicsheet path="/cogadmin/logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:ui="http://developer.cognos.com/schemas/ui/presentation/markup/"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:es="http://developer.cognos.com/schemas/eventManagementService/1"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:uic="http://developer.cognos.com/schemas/uic/presentation/markup/"
- exclude-result-prefixes="xsl ui SOAP-ENC SOAP-ENV xos send xsd cm es xtsext xsi uic">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:template match="/">
- <xts:sequence>
- <!-- create an empty fragment to run javascript -->
- <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>
- <fragment>
- <markup>
- <mimeType>text/html</mimeType>
- <markupXml>
- <script>
- <!-- Display alert when a fault was returned -->
- <xsl:if test="/root/result/actionFault">
- <xsl:variable name="errorMessageString">
- <xsl:variable name="faultIdMarker" select="'CNC-EVE-3125'"/>
- <xsl:variable name="faultMessage" select="/root/result/actionFault//*[local-name()='messageString' and contains(.,$faultIdMarker)]"/>
- <xsl:choose>
- <xsl:when test="$faultMessage != ''">
- <xsl:value-of select="substring-after($faultMessage, $faultIdMarker)"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_SPD_PRIORITY_INFO"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- alert('<xsl:value-of select="xtsext:javascriptencode($errorMessageString)"/>');
- </xsl:if>
- _THIS_.uiDialog.destroy();
- raiseReloadEvent(_THIS_);
- </script>
- </markupXml>
- </markup>
- </fragment>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <xts:block id="getMeta" type="exec" mode="interpret" nodelist="env" processor="XSLT" mandatory="false" condition=".[not(/root/env/param[@name='userClickedOk']='true')]">
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- exclude-result-prefixes="xsl xts xos xtsext">
- <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 select="/root/output">
- <xos:part>
- <xos:entityHeader>
- <xos:param name="Content-Type">text/xml; charset=utf-8</xos:param>
- </xos:entityHeader>
- <xos:entityBody>
- <fragment>
- <info>
- <title>IDS_SSD_TITLE</title>
- </info>
- <globalValidator>
- <parameter>
- <name>userClickedOk</name>
- <ruleRef id="fragment-cogadmin:boolean"/>
- </parameter>
- </globalValidator>
- <meta/>
- </fragment>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- render - renders the Set the suspend schedule popup dialog
- -->
- <xts:block id="renderMarkup" type="exec" dependency="frag_init getMeta clickedOkUpdateCurrentActivities checkResult" nodelist="env, header, user, system" processor="XSLT" mandatory="false" condition=".[not(/root/env/param[@name='userClickedOk'])]">
- <xts:logicsheet path="cogadmin/logicsheets/presentation/filters.xslt"/>
-
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:ui="http://developer.cognos.com/schemas/ui/presentation/markup/"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:flt="http://developer.cognos.com/schemas/uic/presentation/filters/"
- xmlns:uic="http://developer.cognos.com/schemas/uic/presentation/markup/"
- xmlns:val="http://developer.cognos.com/schemas/validator/1/"
- xmlns:fragment="urn:cognos:fragments:validator"
- xmlns:fragment-cogadmin="urn:cognos:fragments:validator:cogadmin"
- exclude-result-prefixes="xsl ui xos xtsext SOAP-ENV uic">
-
- <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 select="/root/output/xos:part/xos:entityBody/fragment">
- <markup>
- <library type="text/javascript" href="$WEB$/prompting/PRMTcompiled.js"/>
- <library type="text/javascript" href="$WEB$/prompting/properties.js"/>
- <library type="text/javascript" href="$WEB$/ps/j2html/js/j2html.js"/>
- <library type="text/javascript" href="$WEB$/ps/cogadmin/js/extension/Suspend.js"/>
- <mimeType>text/html</mimeType>
- <markupXml>
- <!-- render the HTML -->
- <xts:transform src="/cogadmin/transforms/presentation/renderFragment.xslt" processor="XSLT">
- <xts:param name="messageBase">/messages/cogadminuimsgs.xml</xts:param>
- <xts:param name="logicsheet">/cogadmin/logicsheets/admin.xslt</xts:param>
- <root>
- <uic:fragment>
- <!-- body -->
- <uic:header modal="true">
- <uic:width>400</uic:width>
- <uic:height>185</uic:height>
- <uic:title><xts:string id="IDS_SSD_TITLE"/></uic:title>
- <uic:description><xts:string id="IDS_SSD_DESCRIPTION"/></uic:description>
- </uic:header>
- <uic:body>
- <form name="pform">
-
- <uic:choice role="radiogroup" aria-labelledby="_THIS_suspend_label">
- <uic:label id="_THIS_suspend_label"><xts:string id="IDS_SSD_SUSPEND"/></uic:label>
- <uic:control>
- <input type="radio" name="_THIS_suspend_period" id="_THIS_suspend_indefinite">
- <xsl:if test="not(key('env-param','_SP_filter_suspend_finite') = 'true')">
- <xsl:attribute name="checked"/>
- </xsl:if>
- </input>
- </uic:control>
- <uic:controlContext><label for="_THIS_suspend_indefinite"><xts:string id="IDS_SSD_INDEFINATELY"/></label></uic:controlContext>
- <uic:control>
- <input type="radio" name="_THIS_suspend_period" id="_THIS_suspend_finite">
- <xsl:if test="key('env-param','_SP_filter_suspend_finite') = 'true'">
- <xsl:attribute name="checked"/>
- </xsl:if>
- </input>
- </uic:control>
- <uic:controlContext><label for="_THIS_suspend_finite"><xts:string id="IDS_SSD_UNTIL"/></label></uic:controlContext>
- <uic:control/>
- <uic:controlContext>
- <uic:choice>
- <uic:control>
- <div id="selectDate_THIS_endDate"/>
- <div id="selectTime_THIS_endTime"/>
- <script>
- _THIS_.env = {};
- _THIS_.env.fragment = _THIS_;
-
- <!-- add the selected checkboxes to a variable for passing into the retrieve() function-->
- _THIS_.env.context = {
- <xsl:for-each select="/root/env/param[contains(@name, '_checkbox_')]">
- '<xsl:value-of select="@name"/>':'<xsl:value-of select="xtsext:urlencode(.)"/>'<xsl:if test="position()!=last()">,</xsl:if>
- </xsl:for-each>
- };
- _THIS_.env.i18n = {'IDS_FLT_MSG_INVALID_DATE':'<xts:string id="IDS_FLT_MSG_INVALID_DATE" encode="javascript"/>','IDS_FLT_MSG_INVALID_TIME':'<xts:string id="IDS_FLT_MSG_INVALID_TIME" encode="javascript"/>'}
- _THIS_.Suspend = new com.cognos.admin.extension.Suspend(_THIS_.env);
- </script>
- </uic:control>
- </uic:choice>
- </uic:controlContext>
- </uic:choice>
- </form>
- </uic:body>
- </uic:fragment>
- <xts:queryNode select="/root/system | /root/session"/>
- </root>
- </xts:transform>
- </markupXml>
- </markup>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- Fault handler: If a fault happens during an action, then we need to catch it and process it.
- -->
- <xts:block id="faultHandler" type="fault" processor="XSLT">
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
- <xsl:output method="xml"/>
- <xsl:template match="/root/fault">
- <actionFault>
- <xsl:copy-of select="."/>
- </actionFault>
- </xsl:template>
- <xsl:template match="text()"/>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|