123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271 |
- <?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:xsi="http://www.w3.org/2001/XMLSchema-instance"
- 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/"
- xmlns:cm="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:nav="http://developer.cognos.com/schemas/cps/navigation/1/"
- exclude-result-prefixes="ui uic xts xtsext admui nav cm">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
- <xsl:key name="scheduledBy" match="/root/scheduledBy/*[local-name()='queryResponse']/returns/item" use="queryResult/item/searchPath/value"/>
- <xsl:key name="eventStateList" match="/root/mostRecentEvent/*[local-name()='queryResponse']/returns/item/queryResult/item[contains(@xsi:type, ':agentState')]" use="definition/value/item/storeID/value"/>
- <xsl:key name="eventOutputList" match="/root/mostRecentEvent/*[local-name()='queryResponse']/returns/item/queryResult/item[contains(@xsi:type, ':output')]/ancestors/value/item" use="storeID"/>
-
- <!-- display variables -->
- <admui:variables/>
- <!-- common pager variables -->
- <admui:pagerVariables pagerName="schedules"/>
- <xsl:variable name="personalOnly" select="key('env-param', 'personalOnly') ='true'"/>
- <!-- pager templates -->
- <pgr:cogadminPagerTemplates/>
- <!-- action templates-->
- <ui:commonActions/>
- <xsl:template match="/root">
- <uic:fragment>
- <!-- add the reload event listener -->
- <ui:standardReloadListener/>
- <uic:filterInitScript filterName="schedules"/>
-
- <uic:fragmentHeader>
- <uic:title><xts:string id="IDS_SCH_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="enable_schedule" tablename="schedules" />
- <ui:groupAction action="disable_schedule" tablename="schedules" />
- <ui:groupAction action="set_priority" tablename="schedules" setPriorityMode="updateSchedules">
- <ui:fragmentLocation>cogadmin/controls/set_priority.xts</ui:fragmentLocation>
- </ui:groupAction>
- </uic:headerActions>
- </uic:fragmentHeader>
- <script>
-
- <!-- create a json array of priority criteria for all the rows so that we can determine the priority of the selected entries in javascript-->
- var _THIS_entriesArray = [
- <xsl:for-each select="/root/nav:searchResponse/nav:content/nav:item">
- {'priority':'<xsl:value-of select="nav:priority"/>'}<xsl:if test="position()!=last()">,</xsl:if>
- </xsl:for-each>
- ];
- </script>
- <!-- display the chart at the top -->
- <uic:barChart/>
- <uic:table width="100%">
- <uic:features>
- <uic:name>schedules</uic:name>
- <uic:scrollable/>
- <uic:type>checkbox</uic:type>
- <uic:summary><xts:string id="IDS_SCH_TABLE_SUMMARY"/></uic:summary>
- <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="nav:searchResponse/nav:content/@start"/>
- <xsl:with-param name="pageEnd" select="nav:searchResponse/nav:content/@end"/>
- <xsl:with-param name="pageMax" select="nav:searchResponse/nav:content/@max"/>
- <xsl:with-param name="pageMore" select="nav:searchResponse/nav:content/@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_HEADING_NAME"/>
- </uic:text>
- </uic:column>
- <uic:column nowrap="nowrap" sort="lastModifiedDate">
- <uic:text>
- <xts:string id="IDS_HEADING_MODIFIED"/>
- </uic:text>
- </uic:column>
- <xsl:if test="not($personalOnly)">
- <uic:column nowrap="nowrap">
- <uic:text>
- <xts:string id="IDS_UAC_TABLE_SCHEDULED_BY"/>
- </uic:text>
- </uic:column>
- </xsl:if>
- <uic:column nowrap="nowrap" sort="active">
- <uic:text>
- <xts:string id="IDS_SCH_TABLE_STATUS"/>
- </uic:text>
- </uic:column>
- <uic:column nowrap="nowrap" sort="priority">
- <uic:text>
- <xts:string id="IDS_SCH_TABLE_PRIORITY"/>
- </uic:text>
- </uic:column>
- </uic:row>
- </uic:header>
- <uic:body>
- <xsl:for-each select="/root/nav:searchResponse/nav:content/nav:item">
- <uic:row label="{xtsext:htmlencode(string(nav:item/nav:name))}">
- <xsl:attribute name="value">
- <xsl:value-of select="nav:searchPath"/>
- </xsl:attribute>
- <uic:column align="center">
- <uic:icon>
- <xsl:if test="nav:item/nav:hidden='true'">
- <xsl:attribute name="disabled">true</xsl:attribute>
- </xsl:if>
- <uic:src>
- <admui:imageURL type="nav">
- <admui:image><xsl:value-of select="nav:imgURL"/></admui:image>
- </admui:imageURL>
- </uic:src>
- <uic:tooltip>
- <xsl:value-of select="nav:item/nav:screenTip"/>
- </uic:tooltip>
- </uic:icon>
- </uic:column>
- <uic:column scope="row" abbr="{xtsext:htmlencode(nav:item/nav:name)}">
- <uic:text>
- <xsl:value-of select="nav:item/nav:name"/>
- </uic:text>
- <!-- add the drop down menu -->
- <xsl:variable name="permissions" select="nav:item/nav:permissions"/>
- <xsl:variable name="eventStateId">
- <xsl:value-of select="key('eventStateList', nav:item/nav:internalId)/storeID/value"/>
- </xsl:variable>
- <xsl:variable name="hasEventOutput">
- <xsl:choose>
- <xsl:when test="$eventStateId != '' and key('eventOutputList', $eventStateId)/objectClass != ''">true</xsl:when>
- <xsl:otherwise>false</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:call-template name="ui:menuActions">
- <xsl:with-param name="obj-class" select="nav:item/nav:type"/>
- <xsl:with-param name="obj-id" select="nav:item/nav:internalId"/>
- <xsl:with-param name="obj-name" select="nav:item/nav:name"/>
- <xsl:with-param name="obj-path" select="nav:searchPath"/>
- <xsl:with-param name="obj-parent" select="nav:item/nav:searchPath"/>
- <xsl:with-param name="priority" select="nav:priority"/>
- <xsl:with-param name="setPriorityMode">updateSchedules</xsl:with-param>
- <xsl:with-param name="active" select="nav:active"/>
- <xsl:with-param name="supportViewRunHistory" select="true()"/>
- <xsl:with-param name="supportViewMostRecentEventList" select="$hasEventOutput = 'true'"/>
- <xsl:with-param name="supportRunOnce" select="true()"/>
- <xsl:with-param name="supportEditSchedule" select="true()"/>
- <xsl:with-param name="supportSetPriority" select="true()"/>
- <xsl:with-param name="supportEnableDisable" select="true()"/>
- <xsl:with-param name="canRead" select="contains($permissions, 'read')"/>
- <xsl:with-param name="canWrite" select="contains($permissions, 'write')"/>
- <xsl:with-param name="canExecute" select="contains($permissions, 'execute')"/>
- <xsl:with-param name="canTraverse" select="contains($permissions, 'traverse')"/>
- </xsl:call-template>
- </uic:column>
- <uic:column nowrap="nowrap">
- <uic:text>
- <xsl:value-of select="nav:lastModifiedDate"/>
- </uic:text>
- </uic:column>
- <xsl:if test="not($personalOnly)">
- <uic:column nowrap="nowrap">
- <!-- We really shouldn't be picking apart the searchPath like this, but we have no choice given the current model. -->
- <xsl:variable name="userInfo" select="key('scheduledBy',substring-before(nav:credential/nav:searchPath, '/credential'))/queryResult/item"/>
- <xsl:variable name="isDefaultNameCAMID" select="($userInfo/defaultName != '') and contains($userInfo/searchPath, normalize-space($userInfo/defaultName))"/>
- <uic:text>
- <xsl:choose>
- <xsl:when test="$userInfo/userName/value != '' or ($userInfo/defaultName/value != '' and not($isDefaultNameCAMID))">
- <xsl:value-of select="$userInfo/defaultName/value"/>
- <xsl:if test="$userInfo/userName/value != ''">
- <xsl:value-of select="concat(' (', $userInfo/userName/value, ')')"/>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_ADM_USER_UNAVAILABLE"/>
- </xsl:otherwise>
- </xsl:choose>
- </uic:text>
- </uic:column>
- </xsl:if>
- <uic:column nowrap="nowrap">
- <uic:text>
- <xsl:choose>
- <xsl:when test="nav:active='true'">
- <xts:string id="IDS_SCH_TABLE_STATUS_ENABLED"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_SCH_TABLE_STATUS_DISABLED"/>
- </xsl:otherwise>
- </xsl:choose>
- </uic:text>
- </uic:column>
- <uic:column nowrap="nowrap">
- <uic:text>
- <xsl:value-of select="nav:priority"/>
- </uic:text>
- </uic:column>
- </uic:row>
- <xsl:if test="nav:item/nav:fullPath != ''">
- <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_PATH">
- <xts:param name="path">
- <xsl:for-each select="nav:item/nav:fullPath/nav:pathStep//nav:pathStep">
- <uic:breadcrumb type="plaintext">
- <uic:text><xsl:value-of select="nav:name"/></uic:text>
- </uic:breadcrumb>
- </xsl:for-each>
- </xts:param>
- </xts:string>
- </uic:disabledText>
- </uic:column>
- </uic:rowDetails>
- </xsl:if>
- </xsl:for-each>
- </uic:body>
- <uic:footer displayLastUpdate="true" />
- </uic:table>
- </uic:fragment>
- </xsl:template>
- </xsl:stylesheet>
|