1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294 |
- <?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" requiredCapability="canUseAdministrationPortal">
- <!--
- ===============================================================================================
- If external backURLs are not allowed then verify the backURL is in the crn domain and replace it if it isn't
- ===============================================================================================
- -->
- <xts:block id="secureBackURL" path="portal/secureBackURL.xml" processor="XSLT" type="exec" condition=".[/root/system/param[@name = 'allowExternalURLs'] = 'false']" mandatory="false"/>
- <!--
- ===============================================================================================
- Saves cut/copied entries in a user session - Only executes after a cut or a copy operation.
- ===============================================================================================
- -->
- <xts:block id="groupEdit" path="portal/set_clipboard.xml" processor="XSLT" type="exec" mandatory="false" condition=".[/root/env/param[@name='editentries']]">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- </xts:block>
- <!-- ======================================================== -->
- <!-- Session Management -->
- <!-- ======================================================== -->
- <!-- Reads session-sensitive info from CM -->
- <xts:block processor="XSLT" type="exec" mandatory="false"
- id="refreshSession"
- path="portal/cc/read_session.xml"
- condition=".[
- string(/root/cookies/cookie[@name = 'cc_session']) = ''
- or /root/env/param[@name='m_reload']
- or /root/env/param[@name='m_root'] ]">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- </xts:block>
- <!-- Update the <session> element for this request. -->
- <xts:block id="buildSession" path="portal/session.xml" dependency="refreshSession secureBackURL" processor="XSLT" type="exec"
- condition=".[
- /root/newSession
- or /root/env/param[@name='ui']
- or /root/env/param[@name='d']
- or /root/env/param[starts-with(@name,'m_s_')]
- or /root/env/param[@name = 'resetSort'] ]"
- mandatory="false"/>
- <!-- Save changes to the state info in a cookie -->
- <xts:block mode="interpret" processor="XSLT" type="exec"
- id="setSession"
- path="portal/set_session.xml"
- dependency="buildSession groupEdit getContent"
- condition=".[/root/updateSession]"
- mandatory="false"/>
- <!--
- ===============================================================================================
- 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>
- <!--
- ===============================================================================================
- generateSearchExp - Generate the search expression
- ===============================================================================================
- -->
- <xts:block id="generateSearchExp" processor="XSLT" type="exec" dependency="buildSession" condition=".[/root/env/param[@name='search']]" mandatory="false">
- <xts:logicsheet path="logicsheets/searchlogic.xslt"/>
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:search="http://developer.cognos.com/schemas/xts/logicsheets/xslt/searchlogic/"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- exclude-result-prefixes="search cml">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" indent="no"/>
- <cml:object-predicates/>
- <xsl:template match="root">
- <xsl:variable name="path">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name = 'm_path'] and /root/env/param[@name = 'm_path'] != ''">
- <xsl:value-of select="/root/env/param[@name = 'm_path']"/>
- </xsl:when>
- <xsl:otherwise>/configuration</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xts:sequence>
- <search:gen-search-exp defaultRoot="configuration">
- <search:defaultTypes>
- <search:defaultType>service</search:defaultType>
- <search:defaultType>dispatcher</search:defaultType>
- </search:defaultTypes>
- </search:gen-search-exp>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- ckFilterChange:
- When the filter changes, the 'm_page' variables must be deleted before recalculating maxObjects and skipObjects.
- ===============================================================================================
- -->
- <xts:block id="ckFilterChange" processor="XSLT" type="exec" dependency="generateSearchExp" mandatory="false" condition=".[/root/env/param[@name = 'm_FilterChange'] and .[/root/env/param[@name = 'm_FilterChange'] ='true']]">
- <xsl:stylesheet xmlns:adm="http://developer.cognos.com/schemas/xts/logicsheets/contentadmin/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/" xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:key name="env-param" match="/root/env/param" use="@name"/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:delete select="/root/env/param[@name='m_pagerfrom' or @name='m_pagerto' or @name='m_pagerfrom_d' or @name='m_pagerto_d' or @name='m_section' or @name='m_pg_e' or @name='m_FilterChange']"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- getContent - get information from CM.
- ===============================================================================================
- -->
- <xts:block id="getContent" processor="XSLT" type="exec" dependency="generateSearchExp ckFilterChange">
- <xts:logicsheet path="logicsheets/cm-logic.xsl"/>
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:send="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/brl/1/"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- xmlns:cml="http://developer.cognos.com/schemas/xts/logic-sheet/xslt/cml/1/"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- exclude-result-prefixes="xsl pf send cm cml xtsext">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <cml:object-predicates/>
- <xsl:key name="env-params" match="/root/env/param" use="@name"/>
- <xsl:variable name="m_sort">
- <xsl:choose>
- <xsl:when test="key('env-params', 'm_monitor_type') and key('env-params', 'm_monitor_type') != 'dispatcher'">
- <xsl:value-of select="/root/session/param[@name='s_serv']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/session/param[@name='s_disp']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="m_class">
- <xsl:choose>
- <xsl:when test="key('env-params', 'm_monitor_type')">
- <xsl:value-of select="key('env-params', 'm_monitor_type')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'dispatcher'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="m_service_type">
- <xsl:choose>
- <xsl:when test="key('env-params', 'm_service_type')">
- <xsl:value-of select="key('env-params', 'm_service_type')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'allServices'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="all_services_filter">
- <xsl:text>[</xsl:text>
- <xsl:for-each select="/root/system/param[@name='ui_objects']/object[@service='T'][position()!=last()]">
- <xsl:value-of select="concat('@objectClass="', @class, '" or ')"/>
- </xsl:for-each>
- <xsl:text>@objectClass="</xsl:text>
- <xsl:value-of select="/root/system/param[@name='ui_objects']/object[@service='T'][position()=last()]/@class"/>
- <xsl:text>"]</xsl:text>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append>
- <!-- Don't need to query CM if we are in search dialog without running a search query. -->
- <xsl:if test="/root/search/expression or not(/root/search)">
- <data>
- <xts:transform src="transforms/CM/post-process.xslt" processor="XSLT">
- <send:request provider="cm">
- <xts:transform src="transforms/CM/pre-process.xslt" processor="XSLT">
- <cm:query>
- <cm:requests>
- <xsl:choose>
- <!-- query the content for search page -->
- <xsl:when test="/root/search/expression">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search>
- <xsl:value-of select="/root/search/expression"/>
- </cm:search>
- <cm:properties>
- <cm:property name="ancestors"/>
- <cm:property name="searchPath"/>
- <cm:property name="defaultName"/>
- <cm:property name="objectClass"/>
- <cm:property name="modificationTime"/>
- <cm:property name="defaultScreenTip"/>
- <cm:property name="disabled"/>
- <cm:property name="hidden"/>
- <cm:property name="runningState"/>
- <cm:property name="startAsActive"/>
- <cm:property name="iconURI"/>
- </cm:properties>
- <cm:sortBy>
- <xsl:choose>
- <xsl:when test="$m_sort = 'na'">
- <cm:sort name="defaultName" order="ascending"/>
- </xsl:when>
- <xsl:when test="$m_sort = 'nd'">
- <cm:sort name="defaultName" order="descending"/>
- </xsl:when>
- <xsl:otherwise>
- <cm:sort name="defaultName"/>
- </xsl:otherwise>
- </xsl:choose>
- </cm:sortBy>
- </cm:query>
- </xsl:when>
- <xsl:when test="$m_class = 'service'">
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:choose>
- <xsl:when test="$m_service_type = 'allServices'">
- <cm:search>/configuration//dispatcher/*<xsl:value-of select="concat($all_services_filter, $visibility-predicate)"/>
- </cm:search>
- </xsl:when>
- <xsl:otherwise>
- <cm:search>/configuration//*[@objectClass='<xsl:value-of select="$m_service_type"/>']<xsl:value-of select="$visibility-predicate"/>
- </cm:search>
- </xsl:otherwise>
- </xsl:choose>
- <cm:properties>
- <cm:property name="ancestors"/>
- <cm:property name="searchPath"/>
- <cm:property name="defaultName"/>
- <cm:property name="objectClass"/>
- <cm:property name="rsMaximumProcesses"/>
- <cm:property name="rsQueueLimit"/>
- <cm:property name="brsMaximumProcesses"/>
- <cm:property name="defaultScreenTip"/>
- <cm:property name="disabled"/>
- <cm:property name="hidden"/>
- <cm:property name="runningState"/>
- <cm:property name="startAsActive"/>
- <cm:property name="iconURI"/>
- </cm:properties>
- <cm:sortBy>
- <xsl:choose>
- <xsl:when test="$m_sort = 'na'">
- <cm:sort name="defaultName" order="ascending"/>
- </xsl:when>
- <xsl:when test="$m_sort = 'nd'">
- <cm:sort name="defaultName" order="descending"/>
- </xsl:when>
- <xsl:when test="$m_sort = 'ta'">
- <cm:sort name="objectClass" order="ascending"/>
- </xsl:when>
- <xsl:when test="$m_sort = 'td'">
- <cm:sort name="objectClass" order="descending"/>
- </xsl:when>
- <xsl:otherwise>
- <cm:sort name="defaultName"/>
- </xsl:otherwise>
- </xsl:choose>
- </cm:sortBy>
- </cm:query>
- <cm:query>
- <xsl:choose>
- <xsl:when test="$m_service_type = 'allServices'">
- <cm:search>/configuration//dispatcher/*[@objectClass != 'runTimeState']<xsl:value-of select="$visibility-predicate"/>/runTimeState[permission('read')]</cm:search>
- </xsl:when>
- <xsl:otherwise>
- <cm:search>/configuration//*[@objectClass='<xsl:value-of select="$m_service_type"/>']<xsl:value-of select="$visibility-predicate"/>/runTimeState[permission('read')]</cm:search>
- </xsl:otherwise>
- </xsl:choose>
- <cm:properties>
- <cm:property name="state"/>
- <cm:property name="ancestors"/>
- <cm:property name="modificationTime"/>
- </cm:properties>
- </cm:query>
- </xsl:when>
- <!-- query dispatcher list-->
- <xsl:otherwise>
- <cm:query xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/">
- <cm:search>/configuration//dispatcher<xsl:value-of select="$visibility-predicate"/>
- </cm:search>
- <cm:properties>
- <cm:property name="ancestors"/>
- <cm:property name="searchPath"/>
- <cm:property name="defaultName"/>
- <cm:property name="objectClass"/>
- <cm:property name="capacity"/>
- <cm:property name="defaultScreenTip"/>
- <cm:property name="disabled"/>
- <cm:property name="hidden"/>
- <cm:property name="runningState"/>
- <cm:property name="iconURI"/>
- </cm:properties>
- <cm:sortBy>
- <xsl:choose>
- <xsl:when test="$m_sort = 'na'">
- <cm:sort name="defaultName" order="ascending"/>
- </xsl:when>
- <xsl:when test="$m_sort = 'nd'">
- <cm:sort name="defaultName" order="descending"/>
- </xsl:when>
- <xsl:otherwise>
- <cm:sort name="defaultName"/>
- </xsl:otherwise>
- </xsl:choose>
- </cm:sortBy>
- </cm:query>
- <cm:query>
- <cm:search>/configuration//dispatcher/runTimeState<xsl:value-of select="$visibility-predicate"/>
- </cm:search>
- <cm:properties>
- <cm:property name="state"/>
- <cm:property name="ancestors"/>
- <cm:property name="modificationTime"/>
- </cm:properties>
- </cm:query>
- </xsl:otherwise>
- </xsl:choose>
- <cm:query>
- <cm:search>~~</cm:search>
- <cm:properties>
- <cm:property name="modificationTime"/>
- </cm:properties>
- </cm:query>
- <cm:query>
- <cm:search>/configuration</cm:search>
- <cm:properties>
- <cm:property name="permissions"/>
- <cm:property name="defaultName"/>
- </cm:properties>
- </cm:query>
- <cm:query>
- <cm:search>/configuration//dispatcher/installedComponent</cm:search>
- <cm:properties>
- <cm:property name="componentID"/>
- </cm:properties>
- </cm:query>
- </cm:requests>
- </cm:query>
- </xts:transform>
- </send:request>
- </xts:transform>
- </data>
- </xsl:if>
- </xts:append>
- </xts:sequence>
- <xts:sequence>
- <xts:delete select="/root/env/param[starts-with(@name, 'checkbox_')]"/>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- getResults - get all the results for display.
- ===============================================================================================
- -->
- <xts:block id="getResults" dependency="getContent getClassNames" mode="interpret" processor="XSLT" type="exec">
- <xts:logicsheet path="logicsheets/toollogic.xslt"/>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:tool="http://developer.cognos.com/schemas/xts/logicsheets/xslt/toollogic/" xmlns:bus="http://developer.cognos.com/schemas/bibus/3/" exclude-result-prefixes="tool cm">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <tool:gen-path-str/>
- <!-- the portal.xsl has too many dependencies and all we need is the content locale -->
- <xsl:variable name="userPreferences" select="/root/header/bus:biBusHeader/*[local-name() = 'userPreferenceVars']"/>
- <xsl:variable name="contentLocale">
- <xsl:choose>
- <xsl:when test="$userPreferences/*[name='contentLocale' and value != '']">
- <xsl:value-of select="$userPreferences/*[name='contentLocale']/value"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/system/param[@name='contentLocale']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="sort-key">
- <xsl:choose>
- <xsl:when test="/root/env/param[@name='m_monitor_type'] and /root/env/param[@name='m_monitor_type'] != 'dispatcher'">
- <xsl:value-of select="/root/session/param[@name='s_serv']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="/root/session/param[@name='s_disp']"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:template match="/">
- <xts:sequence>
- <xts:append select="/root">
- <xts:transform src="transforms/portal/config/sort.xslt" processor="XSLT">
- <results>
- <sortkey>
- <xsl:value-of select="$sort-key"/>
- </sortkey>
- <result>
- <xsl:for-each select="/root/data/cm:queryResponse/cm:queryReply[1]/*[cm:runningState != 'disabled']">
- <xsl:variable name="thePath" select="cm:searchPath"/>
- <xsl:variable name="theStateObj" select="/root/data/cm:queryResponse/cm:queryReply[2]/cm:runTimeState[./cm:ancestors/child::*[position() = last()]/cm:searchPath = $thePath]"/>
- <xsl:variable name="stateModTime" select="$theStateObj/cm:modificationTime"/>
- <xsl:variable name="currentServerTime" select="/root/data/cm:queryResponse/cm:queryReply[3]/cm:session/cm:modificationTime"/>
- <xsl:variable name="theRunTimeInfoObj" select="$theStateObj/cm:state/*"/>
- <xsl:variable name="interval" select="./cm:perfmonUpdateInterval"/>
- <xsl:variable name="updateInterval">
- <xsl:choose>
- <xsl:when test="$interval != ''">
- <xsl:value-of select="$interval"/>
- </xsl:when>
- <!-- by default, the update interval is 30 seconds -->
- <xsl:otherwise>30</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- By default, the sample interval is 30 seconds. -->
- <xsl:variable name="sampleInterval">30</xsl:variable>
- <xsl:variable name="isStateLatest">
- <xsl:choose>
- <xsl:when test="$stateModTime != '' and xtsext:dateTimeOffsetCmp(string($stateModTime), string($currentServerTime), $updateInterval * 2 ) < 0">false</xsl:when>
- <xsl:otherwise>true</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="obj-name" select="local-name()"/>
- <xsl:variable name="obj-class" select="cm:objectClass"/>
- <xsl:element name="{$obj-name}" xmlns="http://developer.cognos.com/schemas/xts-cm/1/">
- <xsl:copy-of select="./*"/>
- <!-- Needed for the sorting block -->
- <pathSorting>
- <xsl:choose>
- <xsl:when test="cm:objectClass = 'dispatcher' ">
- <xsl:call-template name="gen-path-str">
- <xsl:with-param name="ancestorsInfo" select="cm:ancestors"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="gen-parent-path-str">
- <xsl:with-param name="ancestorsInfo" select="cm:ancestors"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </pathSorting>
- <nameSorting>
- <xsl:choose>
- <xsl:when test="cm:objectClass = 'dispatcher' ">
- <xsl:value-of select="cm:defaultName"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="concat(cm:ancestors/child::cm:ancestorInfo[position() = last()]/cm:title, ' > ', cm:defaultName)"/>
- </xsl:otherwise>
- </xsl:choose>
- </nameSorting>
- <localizedServiceType>
- <xsl:value-of select="/root/objectClass/class[@name=string($obj-class)]"/>
- </localizedServiceType>
- <status>
- <xsl:variable name="status" select="cm:runningState/cm:value"/>
- <xsl:choose>
- <xsl:when test="$status != '' and $isStateLatest = 'true' ">
- <xsl:value-of select="$status"/>
- </xsl:when>
- <xsl:otherwise>unknown</xsl:otherwise>
- </xsl:choose>
- </status>
- <dispCapacity>
- <xsl:choose>
- <xsl:when test="cm:capacity != ''">
- <xsl:value-of select="xtsext:formatNumber(string(cm:capacity),string('#,##0.0##'),string($contentLocale), number(1))"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_MISSING_VALUE"/>
- </xsl:otherwise>
- </xsl:choose>
- </dispCapacity>
- <process>
- <xsl:variable name="maxProc" select="./*[contains( local-name(), 'MaximumProcesses')]"/>
- <xsl:variable name="maxProcVal">
- <xsl:choose>
- <xsl:when test="$maxProc != ''">
- <xsl:value-of select="xtsext:formatNumber(string($maxProc), string($contentLocale), number(1))"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_MISSING_VALUE"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="curProc" select="$theRunTimeInfoObj/cm:processCount/@value"/>
- <xsl:variable name="curProcVal">
- <xsl:choose>
- <xsl:when test="$curProc != '' and $isStateLatest = 'true'">
- <xsl:value-of select="xtsext:formatNumber(string($curProc), string($contentLocale), number(1))"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_MISSING_VALUE"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:value-of select="concat($curProcVal, '/', $maxProcVal)"/>
- </process>
- <latency>
- <xsl:variable name="maxLat" select="./*[contains( local-name(), 'QueueLimit')]"/>
- <xsl:variable name="maxLatVal">
- <xsl:choose>
- <xsl:when test="$maxLat != ''">
- <xsl:value-of select="xtsext:formatNumber(string($maxLat), string($contentLocale), number(1))"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_MISSING_VALUE"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="curLat" select="$theRunTimeInfoObj/cm:requestQueue/@averageDuration"/>
- <xsl:variable name="curLatVal">
- <xsl:choose>
- <xsl:when test="$curLat != '' and $isStateLatest = 'true'">
- <xsl:value-of select="xtsext:formatNumber(string($curLat div 1000), string($contentLocale), number(1))"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_MISSING_VALUE"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:value-of select="concat($curLatVal, '/', $maxLatVal)"/>
- </latency>
- <secPerHit>
- <xsl:variable name="secPerHit" select="$theRunTimeInfoObj/cm:requestProcess/@averageDuration"/>
- <xsl:choose>
- <xsl:when test="$secPerHit != '' and $isStateLatest = 'true'">
- <xsl:value-of select="xtsext:formatNumber(string($secPerHit div 1000), string($contentLocale), number(1))"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_MISSING_VALUE"/>
- </xsl:otherwise>
- </xsl:choose>
- </secPerHit>
- <reqPerMin>
- <xsl:variable name="reqPerSampleInterval" select="$theRunTimeInfoObj/cm:requestProcess/@count"/>
- <xsl:choose>
- <xsl:when test="$reqPerSampleInterval != '' and $isStateLatest = 'true'">
- <xsl:value-of select="xtsext:formatNumber(string(($reqPerSampleInterval div $sampleInterval) * 60), string($contentLocale), number(1))"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_MISSING_VALUE"/>
- </xsl:otherwise>
- </xsl:choose>
- </reqPerMin>
- <updateInterval>
- <xsl:choose>
- <xsl:when test="$interval != ''">
- <xsl:value-of select="xtsext:formatNumber(string($interval div 1000), string($contentLocale), number(1))"/>
- </xsl:when>
- <xsl:otherwise>
- <xts:string id="IDS_MISSING_VALUE"/>
- </xsl:otherwise>
- </xsl:choose>
- </updateInterval>
- </xsl:element>
- </xsl:for-each>
- </result>
- </results>
- </xts:transform>
- </xts:append>
- <xts:delete select="/root/env/param[@name='pagerto']"/>
- <xts:delete select="/root/env/param[@name='pagerfrom']"/>
- <xts:delete select="/root/env/param[@name='pagerto_d']"/>
- <xts:delete select="/root/env/param[@name='pagerfrom_d']"/>
- </xts:sequence>
- </xsl:template>
- <xsl:template name="gen-parent-path-str">
- <xsl:param name="ancestorsInfo"/>
- <xsl:for-each select="$ancestorsInfo/child::cm:ancestorInfo[position() != last()]">
- <xsl:choose>
- <xsl:when test="position() < last()">
- <xsl:value-of select="concat(string(./cm:title), ' > ')"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="./cm:title"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- final - Final output block.
- ===============================================================================================
- -->
- <xts:block id="final" dependency="getContent getResults" mode="output" processor="XSLT" type="exec" mimeType="text/html">
- <xts:logicsheet path="logicsheets/buslogic.xslt"/>
- <xts:logicsheet path="logicsheets/toollogic.xslt"/>
- <!-- Cognos Central main behaviour logic -->
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/presentation.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/main/search.xsl"/>
- <!-- Cognos Central controls logic -->
- <xts:logicsheet path="logicsheets/presentation/controls/framework.xsl"/>
- <xts:logicsheet path="logicsheets/presentation/controls/presentation.xsl"/>
- <!-- Generic logicsheets -->
- <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/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:bus="http://developer.cognos.com/schemas/bibus/3/" xmlns:tool="http://developer.cognos.com/schemas/xts/logicsheets/xslt/toollogic/" xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/" xmlns:mt="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mt" xmlns:lyt="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/layout/" xmlns:dp="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/presentation/" 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:df="http://developer.cognos.com/schemas/xts/logicsheets/xslt/presentation/dialog/framework/" xmlns:mf="http://developer.cognos.com/schemas/xts/logicsheets/presentation/main/mf" xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt" exclude-result-prefixes="bus tool cm mt lyt dp cf cp xtsext df">
- <xsl:output method="html" version="1.0" encoding="UTF-8" indent="no" omit-xml-declaration="yes"/>
- <!-- current file name -->
- <xsl:variable name="mname" select="'legacy_tools/tools_service_monitor.xts'"/>
- <xsl:variable name="servicesType">
- <xsl:text> </xsl:text>
- <xsl:for-each select="/root/system/param[@name='ui_objects']/object[@service='T']">
- <xsl:value-of select="concat(@class, ' ')"/>
- </xsl:for-each>
- </xsl:variable>
- <xsl:variable name="query-values" select="/root/env/param"/>
- <!-- add any theme variables -->
- <df:variables/>
- <!-- Used to modify the appearance according to the currently viewed class -->
- <xsl:variable name="tool_name">
- <xsl:choose>
- <xsl:when test="$query-values[@name='m_monitor_type']!=''">
- <xsl:value-of select="$query-values[@name='m_monitor_type']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'dispatcher'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:key name="installedComponents" match="/root/data/cm:queryResponse/cm:queryReply[5]/cm:installedComponent" use="cm:componentID/cm:value"/>
- <cp:flyoutControl/>
- <!-- start the output -->
- <xsl:template match="/root">
- <xsl:variable name="tab"><xts:string id="IDS_SERVICE_MONITOR"/></xsl:variable>
- <xsl:variable name="toolName"><xts:string id="IDS_TOOLS_SERVER_ADMINISTRATION"/></xsl:variable>
- <tool:page formName="frmEntryAdmin" stateParams="m_monitor_type m_service_type m_section m_pagerfrom m_pagerto" helpid="HID_SERVERS_MONITOR" hideHeaders="true">
- <!-- To track filter change so we can delete 'm_pager' values -->
- <input type="hidden" name="m_FilterChange" value="false"/>
- <tool:name>
- <xts:string id="IDS_TOOLS_TITLE">
- <xts:param name="toolTab"><xsl:value-of select="$tab"/></xts:param>
- <xts:param name="toolName"><xsl:value-of select="$toolName"/></xts:param>
- </xts:string>
- </tool:name>
- <tool:title><xsl:value-of select="$toolName"/></tool:title>
- <tool:hideEditToolbarButtons test="true()"/>
- <tool:search toolBar="true" mod="true()">
- <mt:stypes>
- <mt:stype name="dispatcher">
- <xts:string id="IDS_OBJ_DISPATCHER"/>
- </mt:stype>
- <mt:stype name="service">
- <xts:string id="IDS_SERVICE"/>
- </mt:stype>
- </mt:stypes>
- <mt:close-params>
- <param>backURL</param>
- <param>tool_tab</param>
- <param>m_path</param>
- <param>m_monitor_type</param>
- <param>m_service_type</param>
- <param>m_section</param>
- </mt:close-params>
- </tool:search>
- <tool:script>
- var MSG_ERR_NO_SELECTION = "<xts:string id="IDS_ERR_NO_SELECTION" encode="javascript"/>";
- var MSG_CONF_UNREGISTER = "<xts:string id="IDS_CONF_UNREGISTER" encode="javascript"/>";
- var appPath = "<xsl:value-of select="$app"/>";
- var backURL="<xsl:value-of select="xtsext:javascriptencode(string($back-url))"/>";
- <![CDATA[
- <!-- Returns a list of paths of those entries whose checkboxes are checked -->
- function getSelectionList()
- {
- var slist = "";
- var items = document.forms[frmEditForm].elements.length;
- for (var i=0; i<items; i++)
- {
- if (document.forms[frmEditForm].elements[i].name)
- {
- if (document.forms[frmEditForm].elements[i].name.substring(0,9) == "checkbox_" && document.forms[frmEditForm].elements[i].checked)
- {
- slist = slist + document.forms[frmEditForm].elements[i].value + sDelimiter;
- }
- }
- }
- return slist;
- }
- function doAction( action, isImmediately )
- {
- var m_sIDList = getSelectionList();
- <!-- check for no selection -->
- if (m_sIDList.length == 0 || (m_sIDList.length == 8 && m_sIDList == "service*") || (m_sIDList.length == 11 && m_sIDList == "dispatcher*"))
- {
- alert(MSG_ERR_NO_SELECTION);
- return;
- }
- <!-- Perform the action -->
- if ( action == 'unregister')
- {
- if (confirm(MSG_CONF_UNREGISTER))
- {
- document.forms[frmEditForm].ifrmcmd.value = 'unregister';
- document.forms[frmEditForm].m.value = appPath + "/dialog_action_result.xts";
- document.forms[frmEditForm].backURL.value = backURL;
- document.forms[frmEditForm].submit();
- }
- }
- else
- {
- document.forms[frmEditForm].ifrmcmd.value = action;
- document.forms[frmEditForm].m_smt_imm.value = isImmediately;
- document.forms[frmEditForm].m.value = appPath + "/dialog_action_result.xts";
- document.forms[frmEditForm].backURL.value = backURL;
- document.forms[frmEditForm].submit();
- }
- }
- function setMonitorType (type)
- {
- var items = document.forms[frmEditForm].elements.length;
- if (document.forms[frmEditForm].m_FilterChange)
- document.forms[frmEditForm].m_FilterChange.value = 'true';
- for (var i=0; i<items; i++)
- {
- var e = document.forms[frmEditForm].elements[i];
- if (e.name == "m_monitor_type" && e.value == type)
- {
- e.checked = true;
- setTimeout('showMonitoringPage();', 1)
- break;
- }
- }
- }
- ]]>
- function showMonitoringPage( )
- {
- var sURL = "<xsl:value-of select="xtsext:javascriptencode(string(concat($gateway, '?b_action=xts.run&m=', $app, '/', $mname)))"/>";
- var monitorType;
- var serviceType = "allServices";
- for (var i=0; i <2; i++)
- {
- var e = document.forms[frmEditForm].m_monitor_type[i];
- if (e.checked == true)
- {
- monitorType = e.value;
- break;
- }
- }
- var selectedService = document.forms[frmEditForm].m_service_type.selectedIndex;
- var serviceType = document.forms[frmEditForm].m_service_type.options[selectedService].value;
- sURL += "&backURL=" + "<xsl:value-of select="xtsext:protect(xtsext:urlencode(string(/root/env/param[@name='backURL'])),'url','url','getdata')"/>";
- sURL += "&m_monitor_type=" + monitorType + "&m_service_type=" + serviceType;
- document.location.href = sURL;
- }
- function doActivate(path)
- {
- if ( confirm("<xts:string id="IDS_ACTION_CONFIRM_ACTIVATE" encode="javascript"/>"))
- {
- document.forms[frmEditForm].ifrmcmd.value = 'activate';
- document.forms[frmEditForm].m.value = appPath + "/dialog_action_result.xts";
- document.forms[frmEditForm].m_obj.value = path;
- document.forms[frmEditForm].backURL.value = backURL;
- document.forms[frmEditForm].submit();
- }
- }
- function init()
- {
- var pForm = document.forms[frmEditForm];
- <xsl:variable name="monitorType">
- <xsl:choose>
- <xsl:when test="$query-values[@name='m_monitor_type'] and $query-values[@name='m_monitor_type'] !=''">
- <xsl:value-of select="$query-values[@name='m_monitor_type']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'dispatcher'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- if ('<xsl:value-of select="$monitorType"/>' == 'dispatcher')
- {
- pForm.m_monitor_type[0].checked = true;
- }
- else
- {
- pForm.m_monitor_type[1].checked = true;
- }
- <xsl:variable name="serviceType">
- <xsl:choose>
- <xsl:when test="$query-values[@name='m_service_type'] and $query-values[@name='m_service_type'] !=''">
- <xsl:value-of select="$query-values[@name='m_service_type']"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'allServices'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- pForm.m_service_type.value = '<xsl:value-of select="xtsext:javascriptencode(string($serviceType))"/>';
- }
- function showCogadminInfo(event) {
- if (event.altKey)
- {
- if (getSessionValue("frag") != "1")
- setStateValue("frag", "1");
- else
- setStateValue("frag", "0");
- location.reload();
- }
- }
- </tool:script>
- <tool:pathSearch>
- <mt:directPath>
- <mt:searchLabel>IDS_SERVICE_MONITOR</mt:searchLabel>
- <mt:close-params>
- <param>backURL</param>
- <param>tool_tab</param>
- <param>m_path</param>
- <param>m_monitor_type</param>
- <param>m_service_type</param>
- </mt:close-params>
- </mt:directPath>
- </tool:pathSearch>
- <tool:path>
- <!-- this will represent the root with the given label -->
- <xsl:variable name="section_label">
- <xts:string id="IDS_MONITOR_DESCRIPTION"/>
- </xsl:variable>
- <span><xsl:value-of select="$section_label"/></span>
- </tool:path>
- <tool:tabs tabset-name="server">m</tool:tabs>
- <tool:actions>
- <mt:toolbar>
- <mt:tool-group>
- <xsl:if test="$tool_name = 'dispatcher'">
- <mt:tool>
- <a href="javascript:doAction('unregister', false)">
- <img height="16" width="16" border="0">
- <xsl:attribute name="src"><xsl:value-of select="concat($image_root, 'action_unregister.gif')"/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_ACTION_UNREGISTER"/></xsl:attribute>
- </img>
- </a>
- </mt:tool>
- <mt:tool>
- <a href="javascript:doAction('test', false)">
- <img height="16" width="16" border="0">
- <xsl:attribute name="src"><xsl:value-of select="concat($image_root, 'action_test.gif')"/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_ACTION_TEST"/></xsl:attribute>
- </img>
- </a>
- </mt:tool>
- </xsl:if>
- <mt:tool>
- <a href="javascript:doAction('start', false)">
- <img height="16" width="16" border="0">
- <xsl:attribute name="src"><xsl:value-of select="concat($image_root, 'action_start.gif')"/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_ACTION_START"/></xsl:attribute>
- </img>
- </a>
- </mt:tool>
- <mt:tool>
- <a href="javascript:doAction('stop', true)">
- <img height="16" width="16" border="0">
- <xsl:attribute name="src"><xsl:value-of select="concat($image_root, 'action_stop.gif')"/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_ACTION_STOP_IMMEDIATELY"/></xsl:attribute>
- </img>
- </a>
- </mt:tool>
- <mt:tool>
- <a href="javascript:doAction('stop', false)">
- <img height="16" width="16" border="0">
- <xsl:attribute name="src"><xsl:value-of select="concat($image_root, 'action_stop_after_queue_processed.gif')"/></xsl:attribute>
- <xsl:attribute name="alt"><xts:string id="IDS_ACTION_STOP_QUEUE"/></xsl:attribute>
- </img>
- </a>
- </mt:tool>
- </mt:tool-group>
- <mt:tool-group>
- <mt:tool name="search"/>
- </mt:tool-group>
- </mt:toolbar>
- </tool:actions>
- <tool:contents>
- <xsl:if test="not(/root/search)">
- <table width="100%">
- <tr>
- <td width="30%">
- <dp:list>
- <dp:section>
- <dp:label><xts:string id="IDS_MONITOR_TYPE"/></dp:label>
- </dp:section>
- </dp:list>
- <dp:choice>
- <dp:section1>
- <input type="radio" name="m_monitor_type" value="dispatcher" onClick="javascript:showMonitoringPage()">
- <xsl:if test="not ($query-values[@name='m_monitor_type']) or ($query-values[@name='m_monitor_type'] = 'dispatcher') or ($query-values[@name='m_monitor_type']='')">
- <xsl:attribute name="checked">checked</xsl:attribute>
- </xsl:if>
- </input>
- </dp:section1>
- <dp:section2>
- <xts:string id="IDS_DISPATCHERS"/>
- </dp:section2>
- <dp:section1>
- <input type="radio" name="m_monitor_type" value="service" onClick="javascript:showMonitoringPage()">
- <xsl:if test="$query-values[@name='m_monitor_type'] = 'service'">
- <xsl:attribute name="checked">checked</xsl:attribute>
- </xsl:if>
- </input>
- </dp:section1>
- <dp:section2>
- <xts:string id="IDS_SERVICES"/>
- </dp:section2>
- <dp:section3>
- <select size="1" name="m_service_type" onChange="javascript:setMonitorType('service')">
- <option value="allServices">
- <xsl:if test="$query-values[@name='m_service_type'] = 'allServices'">
- <xsl:attribute name="selected">selected</xsl:attribute>
- </xsl:if>
- <xts:string id="IDS_ALL_SERVICES"/>
- </option>
- <xsl:for-each select="/root/objectClass/class">
- <xsl:sort select="." lang="$productLocale"/>
- <xsl:variable name="localized_classname" select="."/>
- <xsl:variable name="classname" select="@name"/>
- <xsl:if test="/root/system/param[@name='ui_objects']/object[@class=string($classname) and @service='T' and key('installedComponents', @class)]">
- <option value="{$classname}">
- <xsl:value-of select="$localized_classname"/>
- </option>
- </xsl:if>
- </xsl:for-each>
- </select>
- </dp:section3>
- </dp:choice>
- </td>
- </tr>
- </table>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="$tool_name = 'dispatcher'">
- <tool:browser>
- <tool:containers>dispatcher</tool:containers>
- <tool:selectables><xsl:if test="not(/root/search/expression)">dispatcher<xsl:value-of select="$servicesType"/></xsl:if></tool:selectables>
- <tool:columnHeaders session-name="monitor-sort">
- <cp:columnHeader width="16" toggleName="checkbox_dispatcher_" form="pfrmEntryAdmin"/>
- <cp:columnHeader width="10"/>
- <!-- Path-Name Column -->
- <cp:columnHeader width="100%" sort="n">
- <cp:sortHref>
- <xsl:value-of select="$back-url"/>&m_s_disp=<xsl:text/>
- <xsl:choose>
- <xsl:when test="key('session-param', 's_disp') = 'na' ">nd</xsl:when>
- <xsl:when test="key('session-param', 's_disp') = 'nd' "/>
- <xsl:otherwise>na</xsl:otherwise>
- </xsl:choose>
- </cp:sortHref>
- <!-- All of this is to align the header (...> Name) with the contents of the table-->
- <img height="5" width="1" border="0" src="{$webcontent}/images/space.gif"/>
- <xsl:text/>
- <xts:string id="IDS_PATH_INDICATOR"/>
- <xsl:text> </xsl:text>
- <img height="5" width="1" border="0" src="{$webcontent}/images/space.gif"/>
- <xsl:text/>
- <xts:string id="IDS_NAME"/>
- <xsl:text/>
- </cp:columnHeader>
- <cp:columnHeader sort="s">
- <cp:sortHref>
- <xsl:value-of select="$back-url"/>&m_s_disp=<xsl:text/>
- <xsl:choose>
- <xsl:when test="key('session-param', 's_disp') = 'sa' ">sd</xsl:when>
- <xsl:when test="key('session-param', 's_disp') = 'sd' "/>
- <xsl:otherwise>sa</xsl:otherwise>
- </xsl:choose>
- </cp:sortHref>
- <xsl:text/>
- <xts:string id="IDS_HEADING_STATUS"/>
- <xsl:text/>
- </cp:columnHeader>
- <cp:columnHeader>
- <xsl:attribute name="title"><xts:string id="IDS_HEADING_CAPACITY"/></xsl:attribute>
- <xsl:text/>
- <xts:string id="IDS_HEADING_CAPACITY"/>
- <xsl:text/>
- </cp:columnHeader>
- </tool:columnHeaders>
- <tool:columnContents>
- <xsl:variable name="state_tool_tip">
- <xsl:choose>
- <xsl:when test="./cm:status='started' or ./cm:status='running'">
- <xsl:text/><xts:string id="IDS_TOOLS_SERVER_ADMINISTRATION_STATE_RUNNING"/><xsl:text/>
- </xsl:when>
- <xsl:when test="./cm:status='stopped' or ./cm:status='suspended'">
- <xsl:text/><xts:string id="IDS_TOOLS_SERVER_ADMINISTRATION_STATE_STOPPED"/><xsl:text/>
- </xsl:when>
- <xsl:when test="./cm:status='stopping'">
- <xsl:text/><xts:string id="IDS_TOOLS_SERVER_ADMINISTRATION_STATE_STOPPING"/><xsl:text/>
- </xsl:when>
- <xsl:when test="./cm:status='standby'">
- <xsl:text/><xts:string id="IDS_TOOLS_SERVER_ADMINISTRATION_STATE_STANDBY"/><xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text/><xts:string id="IDS_TOOLS_SERVER_ADMINISTRATION_STATE_UNKNOWN"/><xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- Path-Name Column -->
- <cp:columnContent scope="row">
- <img height="16" width="20" align="absmiddle" src="{$skin_images}path.gif">
- <xsl:attribute name="alt"><xsl:value-of select="cm:pathSorting"/></xsl:attribute>
- </img>
- <xsl:text> </xsl:text>
- <xsl:value-of select="cm:nameSorting"/>
- <!-- Render the disabled icon if this entry is disabled -->
- <xsl:if test="cm:disabled = 'true'">
- <img height="16" width="16" hspace="4" align="absmiddle" src="{$image_root}state_disabled.gif">
- <xsl:attribute name="alt"><xts:string id="IDS_DISABLED"/></xsl:attribute>
- </img>
- </xsl:if>
- <xsl:text>  </xsl:text>
- </cp:columnContent>
- <cp:columnContent>
- <xsl:variable name="image">
- <xsl:choose>
- <xsl:when test="./cm:status='started' or ./cm:status='running'">
- <xsl:text>component_running.gif</xsl:text>
- </xsl:when>
- <xsl:when test="./cm:status='stopped' or ./cm:status='suspended'">
- <xsl:text>component_stopped.gif</xsl:text>
- </xsl:when>
- <xsl:when test="./cm:status='stopping'">
- <xsl:text>component_stopping.gif</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>component_unknown.gif</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <img width="16" height="16">
- <xsl:attribute name="src"><xsl:value-of select="concat($image_root, $image)"/></xsl:attribute>
- <xsl:attribute name="alt"><xsl:value-of select="$state_tool_tip"/></xsl:attribute>
- </img>
- </cp:columnContent>
- <cp:columnContent>
- <xsl:value-of select="cm:dispCapacity"/>
- </cp:columnContent>
- </tool:columnContents>
- <tool:columnFooters session-name="s_dir">
- <cp:columnFooter width="100%" colspan="15" timezone="string(/root/user/param[@name='timeZoneID'])">
- <!-- display the current timestamp -->
- <xsl:variable name="time_now" select="xtsext:getCurrentDateTime(string(/root/user/param[@name='timeZoneID']))"/>
- <xts:string id="IDS_LAST_UPDATED"/>: <xsl:value-of select="xtsext:formatDateFromUTC(string($time_now), number('2'), number('3'), string(/root/timezone), string(/root/contentLocale))"/>
- </cp:columnFooter>
- </tool:columnFooters>
- <tool:row-actions>
- <tool:action name="supportPropertiesAction"/>
- <tool:action name="supportActivateAction" test="cm:status='standby'"/>
- <tool:action name="supportAllActionsAction"/>
- </tool:row-actions>
- </tool:browser>
- </xsl:when>
- <xsl:when test="$tool_name = 'service'">
- <tool:browser valign="top">
- <tool:containers>dispatcher</tool:containers>
- <tool:selectables><xsl:if test="not(/root/search/expression)">dispatcher<xsl:value-of select="$servicesType"/></xsl:if></tool:selectables>
- <tool:columnHeaders session-name="monitor-sort">
- <cp:columnHeader width="16" tallDivider="t" toggleName="checkbox_" form="pfrmEntryAdmin"/>
- <cp:columnHeader width="10" tallDivider="t"/>
- <!-- Path-Name Column -->
- <cp:columnHeader width="100%" sort="n" wrap="wrap" tallDivider="t" valign="top">
- <cp:sortHref>
- <xsl:value-of select="$back-url"/>&m_s_serv=<xsl:text/>
- <xsl:choose>
- <xsl:when test="key('session-param', 's_serv') = 'na' ">nd</xsl:when>
- <xsl:when test="key('session-param', 's_serv') = 'nd' "/>
- <xsl:otherwise>na</xsl:otherwise>
- </xsl:choose>
- </cp:sortHref>
- <!-- All of this is to align the header (...> Name) with the contents of the table-->
- <img height="5" width="1" border="0">
- <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute>
- </img>
- <xsl:text/>
- <xts:string id="IDS_PATH_INDICATOR"/>
- <xsl:text> </xsl:text>
- <img height="5" width="1" border="0">
- <xsl:attribute name="src"><xsl:value-of select="$webcontent"/>/images/space.gif</xsl:attribute>
- </img>
- <xsl:text/>
- <xts:string id="IDS_NAME"/>
- <xsl:text/>
- </cp:columnHeader>
- <cp:columnHeader wrap="wrap" tallDivider="t" valign="top">
- <xsl:text/>
- <xts:string id="IDS_SERVICE"/>
- <xsl:text/>
- </cp:columnHeader>
- <cp:columnHeader sort="s" wrap="wrap" tallDivider="t" valign="top">
- <cp:sortHref>
- <xsl:value-of select="$back-url"/>&m_s_serv=<xsl:text/>
- <xsl:choose>
- <xsl:when test="key('session-param', 's_serv') = 'sa' ">sd</xsl:when>
- <xsl:when test="key('session-param', 's_serv') = 'sd' "/>
- <xsl:otherwise>sa</xsl:otherwise>
- </xsl:choose>
- </cp:sortHref>
- <xsl:text/>
- <xts:string id="IDS_HEADING_STATUS"/>
- <xsl:text/>
- </cp:columnHeader>
- <cp:columnHeader wrap="wrap" tallDivider="t" valign="top">
- <xsl:attribute name="title"><xts:string id="IDS_TOOLTIP_PROCESS"/></xsl:attribute>
- <xsl:text/>
- <xts:string id="IDS_HEADING_PROCESS"/>
- <xsl:text/>
- </cp:columnHeader>
- <cp:columnHeader wrap="wrap" tallDivider="t" valign="top">
- <xsl:attribute name="title"><xts:string id="IDS_TOOLTIP_LATENCY"/></xsl:attribute>
- <xsl:text/>
- <xts:string id="IDS_HEADING_LATENCY"/>
- <xsl:text/>
- </cp:columnHeader>
- <cp:columnHeader wrap="wrap" tallDivider="t" valign="top">
- <xsl:attribute name="title"><xts:string id="IDS_HEADING_SEC_HIT"/></xsl:attribute>
- <xsl:text/>
- <xts:string id="IDS_HEADING_SEC_HIT"/>
- <xsl:text/>
- </cp:columnHeader>
- <cp:columnHeader wrap="wrap" tallDivider="t" valign="top">
- <xsl:attribute name="title"><xts:string id="IDS_HEADING_HITS_MIN"/></xsl:attribute>
- <xsl:text/>
- <xts:string id="IDS_HEADING_HITS_MIN"/>
- <xsl:text/>
- </cp:columnHeader>
- <cp:columnHeader wrap="wrap" tallDivider="t" valign="top">
- <xsl:attribute name="title"><xts:string id="IDS_TOOLTIP_UPDATE_INTERVAL"/></xsl:attribute>
- <xsl:text/>
- <xts:string id="IDS_HEADING_UPDATE_INTERVAL"/>
- <xsl:text/>
- </cp:columnHeader>
- </tool:columnHeaders>
- <tool:columnContents>
- <xsl:variable name="state_tool_tip">
- <xsl:choose>
- <xsl:when test="./cm:status='started' or ./cm:status='running'">
- <xsl:text/><xts:string id="IDS_TOOLS_SERVER_ADMINISTRATION_STATE_RUNNING"/><xsl:text/>
- </xsl:when>
- <xsl:when test="./cm:status='stopped' or ./cm:status='suspended'">
- <xsl:text/><xts:string id="IDS_TOOLS_SERVER_ADMINISTRATION_STATE_STOPPED"/><xsl:text/>
- </xsl:when>
- <xsl:when test="./cm:status='stopping'">
- <xsl:text/><xts:string id="IDS_TOOLS_SERVER_ADMINISTRATION_STATE_STOPPING"/><xsl:text/>
- </xsl:when>
- <xsl:when test="./cm:status='standby'">
- <xsl:text/><xts:string id="IDS_TOOLS_SERVER_ADMINISTRATION_STATE_STANDBY"/><xsl:text/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text/><xts:string id="IDS_TOOLS_SERVER_ADMINISTRATION_STATE_UNKNOWN"/><xsl:text/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <!-- Path-Name Column -->
- <cp:columnContent wrap="wrap">
- <img height="16" width="20" align="absmiddle" src="{$skin_images}path.gif">
- <xsl:attribute name="alt"><xsl:value-of select="cm:pathSorting"/></xsl:attribute>
- </img>
- <xsl:text> </xsl:text>
- <xsl:value-of select="cm:nameSorting"/>
- <!-- Render the disabled icon if this entry is disabled -->
- <xsl:if test="cm:disabled = 'true'">
- <img height="16" width="16" hspace="4" align="absmiddle" src="{$image_root}state_disabled.gif">
- <xsl:attribute name="alt"><xts:string id="IDS_DISABLED"/></xsl:attribute>
- </img>
- </xsl:if>
- </cp:columnContent>
- <cp:columnContent wrap="wrap">
- <xsl:value-of select="./cm:localizedServiceType"/>
- </cp:columnContent>
- <cp:columnContent>
- <xsl:variable name="image">
- <xsl:choose>
- <xsl:when test="./cm:status='started' or ./cm:status='running'">
- <xsl:text>component_running.gif</xsl:text>
- </xsl:when>
- <xsl:when test="./cm:status='stopped' or ./cm:status='suspended'">
- <xsl:text>component_stopped.gif</xsl:text>
- </xsl:when>
- <xsl:when test="./cm:status='stopping'">
- <xsl:text>component_stopping.gif</xsl:text>
- </xsl:when>
- <xsl:when test="./cm:status='standby'">
- <xsl:text>component_standby.gif</xsl:text>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>component_unknown.gif</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <img width="16" height="16">
- <xsl:attribute name="src"><xsl:value-of select="concat($image_root, $image)"/></xsl:attribute>
- <xsl:attribute name="alt"><xsl:value-of select="$state_tool_tip"/></xsl:attribute>
- </img>
- </cp:columnContent>
- <cp:columnContent>
- <xsl:value-of select="./cm:process"/>
- </cp:columnContent>
- <cp:columnContent>
- <xsl:value-of select="./cm:latency"/>
- </cp:columnContent>
- <cp:columnContent>
- <xsl:value-of select="./cm:secPerHit"/>
- </cp:columnContent>
- <cp:columnContent>
- <xsl:value-of select="./cm:reqPerMin"/>
- </cp:columnContent>
- <cp:columnContent>
- <xsl:value-of select="./cm:updateInterval"/>
- </cp:columnContent>
- </tool:columnContents>
- <tool:columnFooters session-name="s_dir">
- <cp:columnFooter width="100%" colspan="39" timezone="string(/root/user/param[@name='timeZoneID'])">
- <!-- display the current timestamp -->
- <xsl:variable name="time_now" select="xtsext:getCurrentDateTime(string(/root/user/param[@name='timeZoneID']))"/>
- <xts:string id="IDS_LAST_UPDATED"/>: <xsl:value-of select="xtsext:formatDateFromUTC(string($time_now), number('2'), number('3'), string(/root/timezone), string(/root/contentLocale))"/>
- </cp:columnFooter>
- </tool:columnFooters>
- <tool:row-actions>
- <tool:action name="supportPropertiesAction"/>
- <tool:action name="supportActivateAction" test="cm:status='standby'"/>
- <tool:action name="supportAllActionsAction"/>
- </tool:row-actions>
- </tool:browser>
- </xsl:when>
- </xsl:choose>
- </tool:contents>
- <!-- for action "stop immediatelyl" -->
- <input type="hidden" name="m_smt_imm" value=""/>
- <!-- for action "activate" -->
- <input type="hidden" name="m_obj" value=""/>
- </tool:page>
- </xsl:template>
- <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
- <xsl:template match="text()"/>
- <!--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-->
- <mf:tweak-url/>
- <cp:tabControl/>
- </xsl:stylesheet>
- </xts:block>
- <!--
- ===============================================================================================
- debug - display the debug info.
- ===============================================================================================
- -->
- <xts:block id="debug" dependency="final" condition=".[/root/env/param[@name='d'] = '1' or /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>
|