123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <?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" requiredCapability="canUseServerAdministrationTool">
- <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"/>
- <xts:block id="getMeta" type="exec" mode="interpret" nodelist="header, env" 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:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:resourceId="xalan://com.cognos.admin.xts.ResourceId"
- exclude-result-prefixes="xsl xts xos xtsext SOAP-ENV bus">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
-
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:variable name="resourceIdentifier">
- <xsl:choose>
- <xsl:when test="not(key('env-param','resourceID'))">
- <xsl:value-of select="resourceId:getDefaultResourceId(string(key('env-param','application')))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="resourceId:getMetricsAndSettingsResourceId(xtsext:urldecode(string(key('env-param','resourceID'))))"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <!-- need to get the metadata -->
- <xts:append>
- <metadata>
- <xts:request protocol="GetMultipleResourceProperties">
- <SOAP-ENV:Envelope
- xmlns:nemo="http://developer.cognos.com/nemo"
- xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Header>
- <xsl:copy-of select="/root/header/bus:biBusHeader"/>
- <nemo:cogadminHeader>
- <nemo:ResourceIdentifier><xsl:value-of select="$resourceIdentifier"/></nemo:ResourceIdentifier>
- </nemo:cogadminHeader>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <wsrf-rp:GetMultipleResourceProperties>
- <wsrf-rp:ResourceProperty>MetadataDescriptor</wsrf-rp:ResourceProperty>
- <wsrf-rp:ResourceProperty>Caption</wsrf-rp:ResourceProperty>
- </wsrf-rp:GetMultipleResourceProperties>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- </metadata>
- </xts:append>
- <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_ADM_MET_TITLE"/>
- </title>
- </info>
- <preferredTitle>
- <xts:transform name="XMLEncode">
- <xts:string id="IDS_ADM_MET_HEADER">
- <xts:param name="0">
- <xts:queryValue select="/root/metadata/*[local-name()='GetMultipleResourcePropertiesResponse']/*[local-name()='Caption']"/>
- </xts:param>
- </xts:string>
- </xts:transform>
- </preferredTitle>
- <state>
- <xsl:variable name="state">
- <xsl:choose>
- <!-- we have no state (first time we hit the page) so create the defaults -->
- <xsl:when test="not(/root/env/param[@name='frag-state'])">
- <xsl:text><param name="metricsFilter">None:Poor:Average:Good:NotApplicable::</param></xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text><param name="metricsFilter"></xsl:text>
- <xsl:value-of select="key('env-param','metricsFilter')"/>
- <xsl:text></param></xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:value-of select="xtsext:base64encode($state,true())"/>
- </state>
- <meta>
- <globalValidator>
- <parameter>
- <name>scrollPos</name>
- <rule>
- <type>
- <unsignedInt/>
- </type>
- </rule>
- </parameter>
- <parameter>
- <name>expandedGroups</name>
- <rule>
- <type>
- <string/>
- </type>
- </rule>
- </parameter>
- </globalValidator>
- <transientProperties name="resourceID">
- <default>
- <value>cm:system</value>
- </default>
- <validate>
- <name>resourceID</name>
- <ruleRef id="fragment-cogadmin:resourceID"/>
- </validate>
- </transientProperties>
- <transientProperties name="resourceLabel">
- <validate>
- <name>resourceLabel</name>
- <ruleRef id="fragment-cogadmin:resourceLabel"/>
- </validate>
- </transientProperties>
- <requiredCapabilities>canUseServerAdministrationTool</requiredCapabilities>
- </meta>
- </fragment>
- </xos:entityBody>
- </xos:part>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
-
- <xts:block id="renderMarkup" dependency="frag_init getMeta" type="exec" 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:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:bus="http://developer.cognos.com/schemas/bibus/3/"
- xmlns:nemo="http://developer.cognos.com/nemo"
- xmlns:val="http://developer.cognos.com/schemas/validator/1/"
- xmlns:fragment="urn:cognos:fragments:validator"
- xmlns:fragment-cogadmin="urn:cognos:fragments:validator:cogadmin"
- xmlns:resourceId="xalan://com.cognos.admin.xts.ResourceId"
- exclude-result-prefixes="xsl nemo xts SOAP-ENV xos bus">
-
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:variable name="resourceIdentifier">
- <xsl:choose>
- <xsl:when test="not(key('env-param','resourceID'))">
- <xsl:value-of select="resourceId:getDefaultResourceId(string(key('env-param','application')))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="resourceId:getMetricsAndSettingsResourceId(xtsext:urldecode(string(key('env-param','resourceID'))))"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root/output/*[local-name()='part']/*[local-name()='entityBody']/fragment">
- <markup>
- <mimeType>text/html</mimeType>
- <markupXml>
- <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>
- <!-- Generate UI markup using the response and metadata -->
- <xts:transform src="/cogadmin/transforms/gen-ui-markup/metrics.xslt" processor="XSLT">
- <xts:param name="messageBase">/messages/cogadminuimsgs.xml</xts:param>
- <xts:param name="logicsheet">/cogadmin/logicsheets/presentation/common.xslt</xts:param>
- <xts:param name="logicsheet">/cogadmin/logicsheets/admin.xslt</xts:param>
-
- <root>
- <!-- Get the metrics -->
- <xts:request protocol="GetMultipleResourceProperties" responseEnvelope="false">
- <SOAP-ENV:Envelope
- xmlns:nemo="http://developer.cognos.com/nemo"
- xmlns:resource-prop="http://developer.cognos.com/admin/properties"
- xmlns:wsrf-rp="http://docs.oasis-open.org/wsrf/rp-2"
- xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <SOAP-ENV:Header>
- <xsl:copy-of select="/root/header/bus:biBusHeader"/>
- <nemo:cogadminHeader>
- <nemo:ResourceIdentifier><xsl:value-of select="$resourceIdentifier"/></nemo:ResourceIdentifier>
- </nemo:cogadminHeader>
- </SOAP-ENV:Header>
- <SOAP-ENV:Body>
- <!-- Generate the GetMultipleResourceProperties request to get only the metric properties -->
- <xts:transform src="/cogadmin/transforms/gen-GetMultipleResourceProperties.xslt" processor="XSLT">
- <root>
- <xts:queryNode select="/root/metadata"/>
- <capability>http://docs.oasis-open.org/wsdm/2004/12/muws/capabilities/Metrics</capability>
- <capability>http://cognos.com/admin/supportedactions/metricgroup</capability>
- </root>
- </xts:transform>
- </SOAP-ENV:Body>
- </SOAP-ENV:Envelope>
- </xts:request>
- <resourceID>
- <xsl:value-of select="$resourceIdentifier"/>
- </resourceID>
- <xts:queryNode select="/root/metadata | /root/system | /root/user | /root/env"/>
-
- <contentLocale>
- <xsl:value-of select="/root/user/param[@name='contentLocale']"/>
- </contentLocale>
- <timezone>
- <xsl:value-of select="/root/user/param[@name='timeZoneID']"/>
- </timezone>
- </root>
- </xts:transform>
- <xts:queryNode select="/root/system | /root/session | /root/user"/>
- </root>
- </xts:transform>
- </markupXml>
- </markup>
- </xts:append>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - display debug information
- ===============================================================================================
- -->
- <xts:block id="debug" dependency="renderMarkup" 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="cogadmin/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"/>
- <xsl:template match="/">
- <dbg:dumpxml select="/root"/>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|