123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: cogadmin
- (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).
- -->
- <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:uic="http://developer.cognos.com/schemas/uic/presentation/markup/"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:admui="http://developer.cognos.com/schemas/xts/admui"
- xmlns:pgr="http://developer.cognos.com/schemas/uic/presentation/cogadminpager/"
- exclude-result-prefixes="ui uic xts xtsext admui">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
-
- <!-- display variables -->
- <admui:variables/>
-
- <!-- common pager variables -->
- <admui:pagerVariables pagerName="current_interactive"/>
-
- <!-- templates -->
- <pgr:cogadminPagerTemplates/>
- <ui:runnableTemplates/>
- <!-- action templates-->
- <ui:commonActions/>
-
- <xsl:template match="/root">
- <uic:fragment>
- <!-- add the reload event listener, and override the default fragment.refresh -->
- <ui:standardReloadListener/>
- <uic:fragmentHeader>
- <uic:title><xts:string id="IDS_CUR_INTERACTIVE_TITLE"/></uic:title>
- <uic:headerActions>
- <ui:groupActionMsgs/>
- <xsl:choose>
- <xsl:when test="key('env-param', 'frag-view') = 'details'">
- <ui:groupAction action="show_details" state="details"/>
- <ui:groupAction action="hide_details" state="details"/>
- </xsl:when>
- <xsl:otherwise>
- <ui:groupAction action="show_details" state="hide"/>
- <ui:groupAction action="hide_details" state="hide"/>
- </xsl:otherwise>
- </xsl:choose>
- <uic:headerSeperator/>
- <ui:groupAction action="cancel_interactive" tablename="current_interactive"/>
- </uic:headerActions>
- </uic:fragmentHeader>
- <script>
- var entriesArray = new Array(
- <xsl:for-each select="/root/response/*[local-name() = 'GetInteractiveActivitiesResponse']/*[local-name() = 'Activity']">
- <xsl:variable name="repName">
- <xsl:choose>
- <xsl:when test="*[local-name() = 'Property' and @name='RequestDefaultName'] != ''">
- <xsl:value-of select="*[local-name() = 'Property' and @name='RequestDefaultName']"/>
- </xsl:when>
- <xsl:otherwise><xts:string id="IDS_CUR_TABLE_NAME_NEW"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- new Array('<xsl:value-of select="xtsext:javascriptencode(*[local-name() = 'Property' and @name='RequestID'])"/>', '<xsl:value-of select="xtsext:javascriptencode(*[local-name() = 'Property' and @name='DispatcherName'])"/>', '<xsl:value-of select="xtsext:javascriptencode($repName)"/>')
- <xsl:if test="position()!=last()">,</xsl:if>
- </xsl:for-each>
- );
- </script>
- <uic:filterInitScript filterName="currentactivities"/>
- <!-- display the chart at the top -->
- <uic:barChart/>
- <uic:table width="100%">
- <uic:features>
- <uic:name>current_interactive</uic:name>
- <uic:summary><xts:string id="IDS_CUR_INTERACTIVE_TABLE_SUMMARY"/></uic:summary>
- <uic:scrollable/>
- <uic:type>checkbox</uic:type>
- <ui:tableFeatures/>
- </uic:features>
- <!-- pager: entries, goto, first, previous, next, last-->
- <xsl:call-template name="pgr:cogadminPager">
- <xsl:with-param name="pagerName" select="$pagerName"/>
- <xsl:with-param name="pageStart" select="/root/response/*[local-name() = 'GetInteractiveActivitiesResponse']/*[local-name() = 'PageInfo']/*[local-name() = 'PageProperty' and @name ='start']"/>
- <xsl:with-param name="pageEnd" select="/root/response/*[local-name() = 'GetInteractiveActivitiesResponse']/*[local-name() = 'PageInfo']/*[local-name() = 'PageProperty' and @name = 'end']"/>
- <xsl:with-param name="pageMax" select="/root/response/*[local-name() = 'GetInteractiveActivitiesResponse']/*[local-name() = 'PageInfo']/*[local-name() = 'PageProperty' and @name = 'maxObjects']"/>
- <xsl:with-param name="pageMore" select="/root/response/*[local-name() = 'GetInteractiveActivitiesResponse']/*[local-name() = 'PageInfo']/*[local-name() = 'PageProperty' and @name = 'more']"/>
- <xsl:with-param name="linesPerPage" select="$linesPerPage"/>
- </xsl:call-template>
-
- <uic:header>
- <uic:row>
- <!-- TODO: replace style with CSS class -->
- <uic:column nowrap="nowrap"/>
- <uic:column width="100%" nowrap="nowrap">
- <uic:text>
- <xts:string id="IDS_CUR_TABLE_NAME"/>
- </uic:text>
- </uic:column>
- <uic:column nowrap="nowrap" sort="RequestTime">
- <uic:text>
- <xts:string id="IDS_CUR_TABLE_REQUEST_TIME"/>
- </uic:text>
- </uic:column>
- <uic:column nowrap="nowrap">
- <uic:text>
- <xts:string id="IDS_CUR_TABLE_RAN_BY"/>
- </uic:text>
- </uic:column>
- <uic:column nowrap="nowrap" sort="Status">
- <uic:text>
- <xts:string id="IDS_CUR_TABLE_STATUS"/>
- </uic:text>
- </uic:column>
- </uic:row>
- </uic:header>
- <uic:body>
- <xsl:for-each select="/root/response/*[local-name() = 'GetInteractiveActivitiesResponse']/*[local-name() = 'Activity']">
- <xsl:variable name="repName">
- <xsl:choose>
- <xsl:when test="*[local-name() = 'Property' and @name='RequestDefaultName'] != ''">
- <xsl:value-of select="*[local-name() = 'Property' and @name='RequestDefaultName']"/>
- </xsl:when>
- <xsl:otherwise><xts:string id="IDS_CUR_TABLE_NAME_NEW"/></xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="isHidden">
- <xsl:value-of select="*[local-name() = 'Property' and @name='hidden']"/>
- </xsl:variable>
- <xsl:variable name="activityStatus" select="*[local-name() = 'Property' and @name='Status']"/>
- <xsl:variable name="processId" select="*[local-name() = 'Property' and @name='ProcessID']"/>
- <uic:row label="{xtsext:htmlencode($repName)}">
- <uic:column align="center">
- <admui:gen-runnable-icon>
- <admui:objectClass><xsl:value-of select="*[local-name() = 'Property' and @name='ObjectClass']"/></admui:objectClass>
- <admui:defaultName><xsl:value-of select="$repName"/></admui:defaultName>
- <admui:screenTip><xsl:value-of select="*[local-name() = 'Property' and @name='ScreenTip']"/></admui:screenTip>
- <admui:disabled><xsl:value-of select="$isHidden"/></admui:disabled>
- </admui:gen-runnable-icon>
- </uic:column>
- <uic:column scope="row" abbr="{xtsext:htmlencode($repName)}">
- <xsl:variable name="supportGetProp">
- <xsl:choose>
- <xsl:when test="*[local-name() = 'Property' and @name='StoreID'] != ''">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <uic:text>
- <xsl:value-of select="$repName"/>
- </uic:text>
- <!-- show the actions menu: set properties, cancel -->
- <xsl:call-template name="ui:menuActions">
- <xsl:with-param name="obj-class" select="*[local-name() = 'Property' and @name='ObjectClass']"/>
- <xsl:with-param name="obj-id" select="*[local-name() = 'Property' and @name='StoreID']"/>
- <xsl:with-param name="obj-name" select="$repName"/>
- <xsl:with-param name="obj-path" select="*[local-name() = 'Property' and @name='StoreID']"/>
- <xsl:with-param name="req-id" select="*[local-name() = 'Property' and @name='RequestID']"/>
- <xsl:with-param name="disp-name" select="*[local-name() = 'Property' and @name='DispatcherName']"/>
- <xsl:with-param name="supportSetProperties" select="$supportGetProp"/>
- <xsl:with-param name="supportCancelInteractiveActivities" select="true()"/>
- </xsl:call-template>
- </uic:column>
- <uic:column nowrap="nowrap">
- <uic:text>
- <xsl:value-of select="xtsext:formatDateFromUTC( string(*[local-name() = 'Property' and @name='RequestTime'] ), number( '2' ), number( '3' ), string( $timeZone ), string( $contentLocale ) )"/>
- </uic:text>
- </uic:column>
- <uic:column nowrap="nowrap">
- <uic:text>
- <xsl:choose>
- <xsl:when test="(*[local-name() = 'Property' and @name='UserID'] != '') or (*[local-name() = 'Property' and @name='UserName'] != '')">
- <xsl:value-of select="*[local-name() = 'Property' and @name='UserName']"/>
- <xsl:if test="*[local-name() = 'Property' and @name='UserID'] != ''">
- <xsl:value-of select="concat(' (', *[local-name() = 'Property' and @name='UserID'], ')')"/>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_ADM_USER_UNAVAILABLE"/>
- </xsl:otherwise>
- </xsl:choose>
- </uic:text>
- </uic:column>
- <uic:column nowrap="nowrap">
- <xsl:call-template name="ui:filterStatus">
- <xsl:with-param name="filterStatus" select="*[local-name() = 'Property' and @name='Status']"/>
- </xsl:call-template>
- </uic:column>
- </uic:row>
- <uic:rowDetails>
- <xsl:if test="key('env-param', 'frag-view') = 'details'">
- <xsl:attribute name="expanded">true</xsl:attribute>
- </xsl:if>
- <uic:column/>
- <uic:column colspan="5">
- <uic:disabledText>
- <xts:string id="IDS_TABLE_DETAILS_DISPATCHER">
- <xts:param name="dispatcher"><xsl:value-of select="*[local-name() = 'Property' and @name='DispatcherName']"/></xts:param>
- </xts:string>
- <!--
- Ignore the processId for pending state
- -->
- <xsl:if test="$activityStatus = 'running' and $processId != ''">
- <xts:string id="IDS_TABLE_DETAILS_PROCESS_ID">
- <xts:param name="processId"><xsl:value-of select="*[local-name() = 'Property' and @name='ProcessID']"/></xts:param>
- </xts:string>
- </xsl:if>
- <xts:string id="IDS_TABLE_DETAILS_START_TIME">
- <xts:param name="startTime"><xsl:value-of select="xtsext:formatDateFromUTC( string(*[local-name() = 'Property' and @name='StartTime'] ), number( '2' ), number( '3' ), string( $timeZone ), string( $contentLocale ) )"/></xts:param>
- </xts:string>
- </uic:disabledText>
- </uic:column>
- </uic:rowDetails>
- </xsl:for-each>
- </uic:body>
- <uic:footer displayLastUpdate="true" />
- </uic:table>
- </uic:fragment>
- </xsl:template>
- </xsl:stylesheet>
|