123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432 |
- <?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).
- -->
- <xts:morphlet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/cogadminuimsgs.xml" requiredCapability="canUseScheduling canUseMonitorActivityTool or">
- <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') and not(/root/env/param[@name='release_conversation'] = 'true')]" mandatory="true"/>
- <xts:block id="getCurrentUser" nodelist="header, env, http, cookies" type="exec" mode="interpret" processor="XSLT" dependency="frag_init" condition="/root/env/param[@name='personalOnly'] ='true'" mandatory="false">
- <xts:logicsheet path="/cogadmin/logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- exclude-result-prefixes="xsl xts send">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <currentUser>
- <send:request provider="cm">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/bibus/3/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <search xsi:type="xsd:string">~</search>
- <properties xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cm:propEnum[]">
- <item xsi:type="cm:propEnum">storeID</item>
- </properties>
- </cm:query>
- </send:request>
- </currentUser>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!-- the following two blocks are meant to release the JSM conversation (if any) when user is leaving the current window -->
-
- <xts:block id="initConversation" nodelist="env, credential" type="exec" mode="interpret" processor="XSLT" path="cogadmin/logicsheets/fragment_init.xslt" condition=".[(/root/env/param[@name='release_conversation'] = 'true')]" mandatory="true"/>
- <xts:block id="releaseConversation" dependency="initConversation" nodelist="session, env, header, http" type="exec" mode="interpret" processor="XSLT">
- <xts:logicsheet path="/cogadmin/logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:async="http://developer.cognos.com/schemas/xts/cogadmin/iAsyncRequest/1/"
- exclude-result-prefixes="xsl async xts send">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <send:request provider="xts" option="xml-multipart">
- <async:asyncRequest>
- <provider>eventManagementService</provider>
- <releaseConversation>true</releaseConversation>
- <conversation><xsl:value-of select="/root/env/param[@name='web64conversation']"/></conversation>
- <tracking><xsl:value-of select="/root/env/param[@name='tracking']"/></tracking>
- </async:asyncRequest>
- </send:request>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <!--
- Get the upcoming run activities summary
- -->
- <xts:block id="getUpcomingActivitiesSummary" type="exec" mode="interpret" nodelist="session, header, cookies, http, configProps, env, user, currentUser" dependency="frag_init getCurrentUser" processor="XSLT">
- <xts:logicsheet path="cogadmin/logicsheets/admin.xslt"/>
- <xts:logicsheet path="/cogadmin/logicsheets/buslogic.xslt"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:admui="http://developer.cognos.com/schemas/xts/admui"
- xmlns:async="http://developer.cognos.com/schemas/xts/cogadmin/iAsyncRequest/1/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- exclude-result-prefixes="xsl xsi xts SOAP-ENV bus xtsext admui send SOAP-ENV SOAP-ENC xsd soapenc">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <!-- common variables -->
- <admui:variables/>
- <xsl:variable name="personalOnly" select="/root/env/param[@name='personalOnly'] ='true' or not(key('session-param','capabilities')/canUseAdministrationPortal)"/>
- <xsl:template match="/">
- <xsl:variable name="now">
- <xsl:value-of select="xtsext:getCurrentDateTime(string($timeZone))"/>
- </xsl:variable>
- <xsl:variable name="now_date">
- <xsl:value-of select="substring-before($now,'T')"/>
- </xsl:variable>
- <xsl:variable name="now_time">
- <xsl:value-of select="substring-after($now,'T')"/>
- </xsl:variable>
- <xsl:variable name="summary_date">
- <xsl:choose>
- <xsl:when test="key('env-param','summary_date') and key('env-param','summary_date') != ''">
- <xsl:value-of select="key('env-param','summary_date')"/>
- </xsl:when>
- <xsl:when test="key('env-param','upcoming_filter_date[]') and key('env-param','upcoming_filter_date[]') != ''">
- <xsl:value-of select="substring-before(key('env-param','upcoming_filter_date[]'),'T')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$now_date"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="from_time">
- <xsl:choose>
- <xsl:when test="$summary_date = $now_date">
- <xsl:value-of select="$now_time"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'00:00:00'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xts:sequence>
- <xts:append select="/root">
- <send:request provider="xts" option="xml-multipart">
- <async:asyncRequest>
- <provider>eventManagementService</provider>
- <conversation><xsl:value-of select="/root/env/param[@name='web64conversation']"/></conversation>
- <tracking><xsl:value-of select="/root/env/param[@name='tracking']"/></tracking>
- <request>runSpecification</request>
- <specification>
- <bus:specification xsi:type="bus:eventManagementServiceSpecification">
- <bus:value xsi:type="bus:specification">
- <xts:transform name="XMLEncode">
- <eventManagementServiceSpecification>
- <sort>
- <order>ascending</order>
- <sortItem>startTime</sortItem>
- </sort>
- <xsl:if test="/root/env/param[@name='upcoming_filter_scope[]'] != ''">
- <scope>
- <searchPaths>
- <searchPath><xsl:value-of select="/root/env/param[@name='upcoming_filter_scope[]']"/></searchPath>
- </searchPaths>
- </scope>
- </xsl:if>
- <filters>
- <xsl:if test="/root/env/param[@name='upcoming_filter_type[]'] != ''">
- <objectClass><xsl:value-of select="/root/env/param[@name='upcoming_filter_type[]']"/></objectClass>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='upcoming_filter_scheduled_by[]'] != ''" >
- <user><xsl:value-of select="/root/env/param[@name='upcoming_filter_scheduled_by[]']"/></user>
- </xsl:when>
- <xsl:when test="$personalOnly">
- <user><xsl:value-of select="/root/currentUser/*[local-name()='queryResponse']/queryResult/item/storeID/value"/></user>
- </xsl:when>
- </xsl:choose>
- <xsl:if test="/root/env/param[@name='upcoming_filter_owned_by[]'] != ''" >
- <owner><xsl:value-of select="/root/env/param[@name='upcoming_filter_owned_by[]']"/></owner>
- </xsl:if>
- <!--Since JSM didn't isolate the summary query from the detail query, we pass a fake start and end time to improve the perf as possible-->
- <startTime><xsl:value-of select="concat($summary_date,'T23:59:58')"/></startTime>
- <endTime><xsl:value-of select="concat($summary_date,'T23:59:59')"/></endTime>
- <!-- add the priority filter -->
- <xsl:if test="/root/env/param[@name='upcoming_filter_priority[]'] and /root/env/param[@name='upcoming_filter_priority[]']!=''">
- <priority>
- <xsl:value-of select="/root/env/param[@name='upcoming_filter_priority[]']"/>
- </priority>
- </xsl:if>
- <xsl:if test="/root/env/param[@name='upcoming_filter_tenantid[]'] and /root/env/param[@name='upcoming_filter_tenantid[]']!=''">
- <tenantID>
- <xsl:value-of select="/root/env/param[@name='upcoming_filter_tenantid[]']"/>
- </tenantID>
- </xsl:if>
- </filters>
- <summary>
- <startTime><xsl:value-of select="xtsext:formatDateToUTC(concat($summary_date,'T',$from_time), string( $timeZone ))"/>Z</startTime>
- <endTime><xsl:value-of select="xtsext:formatDateToUTC(concat($summary_date,'T23:59:59'), string( $timeZone ))"/>Z</endTime>
- <groupBy>hour</groupBy>
- </summary>
- </eventManagementServiceSpecification>
- </xts:transform>
- </bus:value>
- </bus:specification>
- </specification>
- <parameters>
- <bus:parameterValues xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="bus:parameterValue[]"/>
- </parameters>
- <options>
- <bus:options SOAP-ENC:arrayType="bus:option[]" xsi:type="SOAP-ENC:Array">
- <item xsi:type="bus:asynchOptionInt">
- <bus:name xsi:type="bus:asynchOptionEnum">primaryWaitThreshold</bus:name>
- <bus:value xsi:type="xsd:int">0</bus:value>
- </item>
- <item xsi:type="bus:pagingOptionInt">
- <bus:name xsi:type="bus:pagingOptionEnum">maximumObjects</bus:name>
- <bus:value xsi:type="xsd:int">0</bus:value>
- </item>
- </bus:options>
- </options>
- </async:asyncRequest>
- </send:request>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <xts:block id="getMeta" type="exec" mode="interpret" nodelist="" processor="XSLT">
- <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: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><xts:string id="IDS_UAC_TITLE"/></title>
- </info>
- <preferredTitle>
- <xts:string id="IDS_UAC_TITLE"/>
- </preferredTitle>
- <meta/>
- </fragment>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <xts:block id="renderMarkup" type="exec" mode="interpret" processor="XSLT" nodelist="env, user, asyncRequestResponse" dependency="frag_init getMeta getUpcomingActivitiesSummary">
- <xts:logicsheet path="/cogadmin/logicsheets/admin.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xts="http://developer.cognos.com/schemas/xts/"
- xmlns:ui="http://developer.cognos.com/schemas/ui/presentation/markup/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:admui="http://developer.cognos.com/schemas/xts/admui"
- exclude-result-prefixes="xts xtsext xos admui xsi ui">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no" />
- <!-- common variables -->
- <admui:variables/>
-
- <xsl:template match="/">
- <xsl:variable name="now">
- <xsl:value-of select="xtsext:getCurrentDateTime(string($timeZone))"/>
- </xsl:variable>
- <xsl:variable name="now_date">
- <xsl:value-of select="substring-before($now,'T')"/>
- </xsl:variable>
- <xsl:variable name="now_time">
- <xsl:value-of select="substring-after($now,'T')"/>
- </xsl:variable>
- <xsl:variable name="select_granularity">
- <xsl:value-of select="/root/env/param[@name= 'upcoming_filter_granularity[]']"/>
- </xsl:variable>
- <xsl:variable name="select_date_time">
- <xsl:value-of select="/root/env/param[@name= 'upcoming_filter_date[]']"/>
- </xsl:variable>
- <xsl:variable name="summary_date">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='summary_date'] and /root/env/param[@name='summary_date'] != ''">
- <xsl:value-of select="/root/env/param[@name= 'summary_date']"/>
- </xsl:when>
- <xsl:when test="key('env-param','upcoming_filter_date[]') and key('env-param','upcoming_filter_date[]') != ''">
- <xsl:value-of select="substring-before(key('env-param','upcoming_filter_date[]'),'T')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$now_date"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="asynchDetailParameterValues" select="/root/asyncRequestResponse/response/*/result/details/details[contains(@xsi:type, ':asynchDetailParameterValues')]/parameters/parameters"/>
-
- <xsl:variable name="source">
- <xsl:value-of select="'['"/>
- <xsl:for-each select="$asynchDetailParameterValues">
- <xsl:value-of select="'{'"/>
- <xsl:value-of select="concat('status: "',*[local-name()='name'],'",')"/>
- <xsl:value-of select="'count: ['"/>
- <xsl:for-each select="*[local-name()='value']/*[local-name()='value']">
- <xsl:value-of select="'{'"/>
- <xsl:if test="contains(*[local-name()='use'],'T')">
- <xsl:variable name="localTime" select="xtsext:formatDateFromUTC( string( *[local-name()='use'] ), string('H'), string( $timeZone ), string( '' ))"/>
- <xsl:value-of select="concat('time: "',$localTime,'"',',')"/>
- </xsl:if>
- <xsl:value-of select="concat('number: "',*[local-name()='display'],'"')"/>
- <xsl:value-of select="'}'"/>
- <xsl:if test="position() != last()"><xsl:value-of select="','"/></xsl:if>
- </xsl:for-each>
- <xsl:value-of select="']'"/>
- <xsl:value-of select="'}'"/>
- <xsl:if test="position() != last()"><xsl:value-of select="','"/></xsl:if>
- </xsl:for-each>
- <xsl:value-of select="']'"/>
- </xsl:variable>
-
- <xts:sequence>
- <xts:append select="/root/output/xos:part/xos:entityBody/fragment">
- <library type="text/javascript" href="$WEB$/ps/j2html/js/j2html.js"/>
- <library type="text/javascript" href="$WEB$/dojo16/dojo/dojo.js"/>
- <library type="text/javascript" href="$WEB$/ps/cogadmin/js/com/ibm/cognos/admin/dojoInit.js"/>
- <state>
- <xsl:variable name="state">
- <xsl:if test="/root/asyncRequestResponse">
- <xsl:text><param name="web64conversation"></xsl:text>
- <xsl:value-of select="xtsext:xmlencode(string(/root/asyncRequestResponse/conversation))"/>
- <xsl:text></param></xsl:text>
- <xsl:text><param name="tracking"></xsl:text>
- <xsl:value-of select="xtsext:xmlencode(string(/root/asyncRequestResponse/tracking))"/>
- <xsl:text></param></xsl:text>
- </xsl:if>
- </xsl:variable>
- <xsl:value-of select="xtsext:base64encode($state,true())"/>
- </state>
- <markup>
- <mimeType>text/html</mimeType>
- <markupXml>
- <style type="text/css">
- .dojoxLegendNode {border: 1px solid #ccc; margin: 5px 10px 5px 10px; padding: 3px;}
- .dojoxLegendText {vertical-align: text-top;}
- .cogadminLegendText {padding-left:10px; height:20px;}
- .cogadminLegendValue {float:right;}
- </style>
-
- <script type="text/javascript">
- dojo.require("com.ibm.cognos.admin.chart.stackedColumns");
- dojo.addOnLoad(function(){(new com.ibm.cognos.admin.chart.stackedColumns(_THIS_,{
- selectDateTime : '<xsl:value-of select="$select_date_time"/>',
- selectGranularity : '<xsl:value-of select="$select_granularity"/>',
- summaryDate : '<xsl:value-of select="$summary_date"/>',
- data : '<xsl:value-of select="$source"/>'
- })).renderChart()});
-
- regAppOnLeaveEvent(_THIS_.id, function(evt) {
- var des = document.createElement("div");
- this.lockUpdates(false);
- return this.retrieve('release_conversation=true',des,true,true);
- },_THIS_);
- </script>
- <div id="dojoContainer">
- <table cellspacing="0" cellpadding="0" border="0" role="presentation">
- <tr>
- <td colspan="2">
- <div id="title_THIS_" align="center" style="display:none;">
- <table cellspacing="2" cellpadding="0" border="0" role="presentation">
- <tr nowrap="nowrap">
- <!--make the icon skinnable when the chart is skinnable.-->
- <td>
- <xsl:choose>
- <xsl:when test="xtsext:dateTimeCmp(concat($summary_date,'T00:00:00'), concat($now_date,'T00:00:00')) > 0">
- <img id="previous_THIS_" border="0" onmouseout="this.className='button'" role="button" onmouseover="this.className='button_hover'" onmousedown="this.className='button_pressed'" src="" class="button" style="margin-right: 2px; cursor: pointer;" tabindex="0">
- <xsl:attribute name="src"><xsl:value-of select="concat($webRoot,'/ps/cogadmin/images/control_btn_pageup.gif')"/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_PAGER_PREVIOUS"/></xsl:attribute>
- <xsl:attribute name="title"><xts:string id="IDS_PAGER_PREVIOUS"/></xsl:attribute>
- </img>
- </xsl:when>
- <xsl:otherwise>
- <img id="previous_THIS_" border="0" class="button" style="margin-right: 2px;">
- <xsl:attribute name="src"><xsl:value-of select="concat($webRoot,'/ps/cogadmin/images/control_btn_pageup_disabled.gif')"/></xsl:attribute>
- <xsl:attribute name="alt"></xsl:attribute>
- <xsl:attribute name="title"></xsl:attribute>
- </img>
- </xsl:otherwise>
- </xsl:choose>
- </td>
- <td nowrap="nowrap" style="text-align:center;font-weight:bold;">
- <xsl:value-of select="xtsext:formatDateOnlyFromUTC( string(concat($summary_date,'T00:00:00')), number('3'), string(''), string( $productLocale ))"/>
- </td>
- <td>
- <img id="next_THIS_" border="0" onmouseout="this.className='button'" role="button" onmouseover="this.className='button_hover'" onmousedown="this.className='button_pressed'" class="button" style="margin-right: 2px; cursor: pointer;" tabindex="0">
- <xsl:attribute name="src"><xsl:value-of select="concat($webRoot,'/ps/cogadmin/images/control_btn_pagedown.gif')"/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_PAGER_NEXT"/></xsl:attribute>
- <xsl:attribute name="title"><xts:string id="IDS_PAGER_NEXT"/></xsl:attribute>
- </img>
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <div id="chart_THIS_"/>
- </td>
- <td>
- <div id="legend_THIS_"/>
- </td>
- </tr>
- </table>
- </div>
- </markupXml>
- </markup>
- <state>
- <xsl:variable name="state">
- <xsl:text><param name="personalOnly"></xsl:text>
- <xsl:value-of select="xtsext:xmlencode(string(/root/env/param[@name='personalOnly']))"/>
- <xsl:text></param></xsl:text>
- </xsl:variable>
- <xsl:value-of select="xtsext:base64encode($state, true())"/>
- </state>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|