| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319 | <?xml version="1.0" encoding="UTF-8"?><!--    Licensed Materials - Property of IBM    IBM Cognos Products: ps    (C) Copyright IBM Corp. 2005, 2014    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/portal.xml, messages/portalRL.xml">	<xts:block id="formlogic_init" type="exec" mode="interpret" processor="XSLT" path="/logicsheets/formlogic_init.xslt" nodelist="env,credential,system,http"/>		<!--	===============================================================================================		getRerunList: Query the Monitor service to find out if anything can be rerun.		Should only do this when the status is failed	===============================================================================================	-->	<xts:block id="getRerunList" path="/portal/history/getRerunList.xsl" nodelist="header, env, queryResponse" type="exec" mode="interpret" processor="XSLT" dependency="formlogic_init">		<xts:logicsheet path="logicsheets/buslogic.xslt"/>	</xts:block>	<!--		===============================================================================================		eatFault - eat up any fault that occured while trying to release the conversation	===============================================================================================	-->	<xts:block id="eatFault" 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="/">				<eatFault/>			</xsl:template>		</xsl:stylesheet>	</xts:block>       <!--    ===============================================================================================        Load class names map    ===============================================================================================    -->    <xts:block id="getClassNames" type="exec" mode="input"  processor="XML" path="/portal/uiExtensions.xml">        <xts:logicsheet path="/logicsheets/uiobjects/uiobjects_names.xslt"/>    </xts:block>   <!--	===============================================================================================	main	===============================================================================================	-->	<xts:block id="main" mode="output" processor="XSLT" type="exec" mimeType="text/html" dependency="getClassNames getRerunList">		<xts:logicsheet path="logicsheets/portal.xsl"/>		<xts:logicsheet path="logicsheets/presentation/dialog/templates.xsl"/>		<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"/>		<xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>		<xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>		<xts:logicsheet path="logicsheets/presentation/dialog/confirm.xslt"/>		<xts:logicsheet path="logicsheets/formlogic.xslt"/>		<xts:logicsheet path="logicsheets/validation.xslt"/>				<xts:logicsheet path="logicsheets/presentation/touch_up.xslt"/>						<xsl:stylesheet version="1.0" 			xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 			xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" 			xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/"  			xmlns:pf="http://developer.cognos.com/schemas/xts/pf"					xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt" 			xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf"				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:dt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/templates/"  			xmlns:utml="http://developer.cognos.com/schemas/xts/logicsheet/xslt/formlogic/" 			xmlns:xts="http://developer.cognos.com/schemas/xts/"			xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"			exclude-result-prefixes="xsl cm lyt pf mt mf dp df cf cp utml xts xtsext dt">					<xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>			<!-- current file name -->			<xsl:variable name="mname" select="'history/rerun.xts'"/>			<xsl:variable name="rerunList" select="/root/rerunList/*[local-name()='Envelope']/*[local-name()='Body']/*[local-name()='runSpecificationResponse']/result/details/details[contains(@*[local-name()='type'], ':asynchDetailEventRecord')]"/>			<!-- add any theme variables -->			<pf:variables/>			<!-- start the output -->			<xsl:template match="/root">				<xsl:variable name="browserTitle">					<xts:string id="IDS_HRE_TITLE">						<xts:param name="objectName">							<span lang="{$contentLocale}"><xsl:value-of select="key('env-param','m_name')"/></span>						</xts:param>					</xts:string>				</xsl:variable>				<xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text><dp:page longTitle="$browserTitle">				<mf:head/>					<dp:meta>						<pf:meta/>	<!-- Standard meta tags -->					</dp:meta>					<dp:script>						<!-- Help system -->						<pf:help context="HID_PERMISSIONS"/>						<dt:selectDeselectAll/>															<script language="javascript">							function validate() {								var frm = document.pform;								var restartCount = '<xsl:value-of select="count($rerunList)"/>';								var bChecked = false;								<!-- 									the UI asks the UI which items he wants to rerun while the API takes a list of items									to be skipped. Go through all the checkboxes and for everyone not checked update the									associated 'skip' hidden field.								-->								for (var i = 1; i <= restartCount; i++) {									if (!document.getElementById('checkbox_eventID_' + i).checked) {										document.getElementById('skipEventID_' + i).value = document.getElementById('checkbox_eventID_' + i).value;									}									else {										bChecked = true;										document.getElementById('skipEventID_' + i).value = '';									}								}																<!-- user selected something to rerun -->								if (bChecked) {																frm.ifrmcmd.value = 'rerun';								}								<!-- user didn't select anything to rerun -->								else {									alert('<xts:string id="IDS_HRE_NO_SELECTION" encode="javascript"/>');									return false;								}								return true;							}						</script>							</dp:script>										<xsl:variable name="objString">						<xsl:choose>							<xsl:when test="key('env-param','m_class')='jobDefinition'"><xts:string id="IDS_HRE_STEPS"/></xsl:when>							<xsl:otherwise><xts:string id="IDS_HRE_TASKS"/></xsl:otherwise>						</xsl:choose>					</xsl:variable>										<utml:form name="pform" method="post" action="{$gateway}">						<xsl:variable name="useStack" select="key('env-param', 'ps_nav_stack') and not(key('env-param', 'ps_nav_stack') = '')"/>						<utml:input type="hidden" name="ifrmcmd" value="" utml:update="false"/>												<!-- dialog header -->						<dp:header useBackURL="not($useStack)">							<!-- header titles-->							<dp:title><xsl:copy-of select="$browserTitle"/></dp:title>							<dp:description>								<xsl:choose>									<xsl:when test="key('env-param','m_class')='jobDefinition'">										<xts:string id="IDS_HRE_DESCRIPTION_STEPS"/>									</xsl:when>									<xsl:otherwise>										<xts:string id="IDS_HRE_DESCRIPTION">											<xts:param name="objectClass"><xsl:value-of select="$objString"/></xts:param>										</xts:string>									</xsl:otherwise>								</xsl:choose>							</dp:description>						</dp:header>						<br/>                        <xsl:variable name="tableLabel">                            <xsl:choose>                                <xsl:when test="key('env-param','m_class')='jobDefinition'">                                    <xts:string id="IDS_HRE_TABLE_DESCRIPTION_STEPS"/>                                </xsl:when>                                <xsl:otherwise>                                    <xts:string id="IDS_HRE_TABLE_DESCRIPTION">                                        <xts:param name="objectClass">                                            <xsl:value-of select="$objString"/>                                        </xts:param>                                    </xts:string>                                </xsl:otherwise>                            </xsl:choose>                        </xsl:variable>						<dp:list>							<dp:section>								<dp:label><xsl:copy-of select="$tableLabel"/></dp:label>								<dp:text width="100%"/>								<xsl:choose>									<xsl:when test="count($rerunList/*) > 0">										<dp:text nospace="nospace">													1 - <xsl:value-of select="count($rerunList)"/>										</dp:text>									</xsl:when>									<xsl:otherwise>										<dp:text/>									</xsl:otherwise>								</xsl:choose>							</dp:section>						</dp:list>									<cp:table name="outstanding" iterate="$rerunList" showEmptyMsg="true">                            <cp:tableSummary><xsl:copy-of select="$tableLabel"/></cp:tableSummary>							<!-- Column Headers -->							<cp:tableHeader>								<cp:columnHeader width="16" toggleName="checkbox_eventID"/>								<!-- Icon Column -->								<cp:columnHeader width="20"/>								<!-- Path Column -->								<cp:columnHeader width="50%">									<span style="padding-left: 1px; padding-right: 1px;"><xts:string id="IDS_PATH_INDICATOR"/> </span>									<xsl:text/><xts:string id="IDS_HEADING_REPORT_NAME"/><xsl:text/>								</cp:columnHeader>								<cp:columnHeader width="50%">									<xts:string id="IDS_HEADING_STATUS"/>								</cp:columnHeader>							</cp:tableHeader>							<!-- Column contents -->							<cp:tableContent>								<!-- checkbox column -->								<cp:columnContent>									<input type="checkbox" name="checkbox_eventID_{position()}" id="checkbox_eventID_{position()}" value="{history/history/eventID/value}" utml:update="false">                                        <xsl:attribute name="aria-label"><xts:string id="IDS_SELECTION_FOR_PAGER_ITEM"><xts:param name="pagerItemName"><xsl:value-of select="runnable/runnable/defaultName/value"/></xts:param></xts:string></xsl:attribute>                                    </input> 									<input type="hidden" name="skipEventID_{position()}" id="skipEventID_{position()}" value="" utml:update="false"/>								</cp:columnContent>								<!-- Icon Column -->								<cp:columnContent>									<xsl:variable name="runnable" select="runnable/runnable"/>									<xsl:call-template name="gen-icon">										<xsl:with-param name="class" select="$runnable/objectClass/value"/>										<xsl:with-param name="hiddenObject" select="$runnable/hidden/value"/>										<xsl:with-param name="iconURIOverride" select="$runnable/iconURI/value"/>									</xsl:call-template>								</cp:columnContent>								<cp:columnContent scope="row">									<img align="absmiddle" height="16" width="20" src="{$skin_images}path.gif">										<xsl:attribute name="alt">											<!-- we can't use the do-the-path-link template since the response didn't go through post-process -->											<xsl:for-each select="runnable/runnable/ancestors/value/value">												<xsl:value-of select="title"/>												<xsl:if test="position() != last()"> > </xsl:if>											</xsl:for-each>										</xsl:attribute>									</img>									<xsl:text> </xsl:text>									<xsl:value-of select="runnable/runnable/defaultName/value"/>								</cp:columnContent>								<!-- Status Column -->								<cp:columnContent>									<xsl:choose>										<xsl:when test="string(history/history/status/value)='pending'">											<xts:string id="IDS_JOB_STATUS_PENDING"/>										</xsl:when>										<xsl:when test="string(history/history/status/value)='suspended'">											<xts:string id="IDS_JOB_STATUS_SUSPENDED"/>										</xsl:when>										<xsl:when test="string(history/history/status/value)='executing'">											<xts:string id="IDS_JOB_STATUS_EXECUTING"/>										</xsl:when>										<xsl:when test="string(history/history/status/value)='succeeded'">											<xts:string id="IDS_JOB_STATUS_SUCCEEDED"/>										</xsl:when>										<xsl:when test="string(history/history/status/value)='failed'">											<xts:string id="IDS_JOB_STATUS_FAILED"/>										</xsl:when>										<xsl:when test="string(history/history/status/value)='cancelled' or string(history/history/status/value)='terminated' or string(history/history/status/value)='purged'">											<xts:string id="IDS_JOB_STATUS_CANCELLED"/>										</xsl:when>									</xsl:choose>								</cp:columnContent>													</cp:tableContent>						</cp:table>										<dp:footer>							<df:button df:id="IDS_OK" utml:validate="true" df:style="submit"/>							<xsl:choose>								<xsl:when test="$useStack">									<df:button df:id="IDS_CANCEL" df:style="stack-down"/>								</xsl:when>								<xsl:otherwise>									<df:button df:id="IDS_CANCEL" df:style="back-url"/>								</xsl:otherwise>							</xsl:choose>						</dp:footer>					</utml:form>				</dp:page>			</xsl:template>			<pf:gen-icon/>		</xsl:stylesheet>	</xts:block>	<!--	===============================================================================================	debug	===============================================================================================	-->	<xts:block id="debug" dependency="main" condition=".[/root/session/param[@name='debug']='1']" type="exec" mode="output" processor="XSLT" mandatory="false" mimeType="text/html">			<!-- 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" omit-xml-declaration="yes"/>				<xsl:template match="/">					<dbg:dumpxml select="/root"/>				</xsl:template>			</xsl:stylesheet>	</xts:block></xts:morphlet>
 |