<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xmc="http://xmlcomponents.org/TR/WD-xmc" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslc="http://xslcomponents.org/TR/WD-xslc">
<xsl:import href="../xslc.xsl"/>
<xsl:import href="XMLCAdm_Tabs.xsl"/>
<xsl:template match="/">
<xsl:apply-templates select="document"/>
</xsl:template>
<xsl:template match="document">
<xsl:call-template name="xslc:Page">
<xsl:with-param name="Title" select="/document/Locales/XMLC_ListRequestsTitle"/>
<xsl:with-param name="PageTitle">
<img align="absmiddle" src="{$XMLC_PictosPath}button_Monitoring.gif"/>&#160;<xsl:value-of select="/document/Requests/@Count"/>&#160;<xsl:value-of select="/document/Locales/XMLC_ListRequestsTitle"/>
</xsl:with-param>
<xsl:with-param name="ToolbarButtonsLeft">
<xsl:call-template name="AdmCommonToolbarButtonsLeft"/>
</xsl:with-param>
<xsl:with-param name="ToolbarButtonsRight">
<xsl:call-template name="AdmCommonToolbarButtonsRight"/>
</xsl:with-param>
<xsl:with-param name="ActivePageName">XMLC_ListRequests</xsl:with-param>
<xsl:with-param name="Tabs">
<Item Name="XMLC_ListRequests" Caption="{/document/Locales/ListRequestsAlt}" Hint="{/document/Locales/ListRequestsAlt}" HRef="" ImagePath="{$XMLC_PictosPath}button_Monitoring.gif">
<xsl:attribute name="HRef"><xsl:value-of select="/document/XMLC_Params/XMLC_ScriptName"/><xsl:choose><xsl:when test="/document/XMLC_Params/XMLC_UseXMLC_Action = '1'">?XMLC_Action=</xsl:when><xsl:otherwise>/</xsl:otherwise></xsl:choose>XMLC_ListRequests</xsl:attribute>
</Item>
</xsl:with-param>
<xsl:with-param name="DisplayTabs">1</xsl:with-param>
<xsl:with-param name="Body">
<xsl:apply-templates select="Requests"/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template match="Requests">
<table border="0" cellpadding="2" cellspacing="0" class="clFlatTable" width="100%">
<tr class="clRowHeader">
<td>
<xsl:value-of select="@Count"/>
</td>
<td valign="top">
<xsl:value-of select="/document/Locales/ID"/>&#160;</td>
<td valign="top">
<xsl:value-of select="/document/Locales/Created"/>
</td>
<td valign="top">
<xsl:value-of select="/document/Locales/Async"/>
</td>
<td valign="top">
<xsl:value-of select="/document/Locales/IP"/>
</td>
<td valign="top">
<xsl:value-of select="/document/Locales/User"/>
</td>
<td valign="top">
<xsl:value-of select="/document/Locales/Action"/>
</td>
<td valign="top">
<xsl:value-of select="/document/Locales/Read"/>
</td>
<td valign="top">
<xsl:value-of select="/document/Locales/Write"/>
</td>
<td valign="top">
<xsl:value-of select="/document/Locales/Callstack"/>
</td>
</tr>
<xsl:apply-templates select="Request"/>
</table>
</xsl:template>
<xsl:template match="Request">
<xsl:variable name="clValue">
<xsl:choose>
<xsl:when test="(position() mod 2)=0">clRowDark</xsl:when>
<xsl:otherwise>clRowLight</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<tr class="{$clValue}">
<td width="5">
<a>
<xsl:attribute name="href"><xsl:value-of select="/document/XMLC_Params/XMLC_ScriptName"/><xsl:choose><xsl:when test="/document/XMLC_Params/XMLC_UseXMLC_Action = '1'">?XMLC_Action=</xsl:when><xsl:otherwise>/</xsl:otherwise></xsl:choose>XMLC_KillThread<xsl:choose><xsl:when test="/document/XMLC_Params/XMLC_UseXMLC_Action = '1'">&amp;</xsl:when><xsl:otherwise>?</xsl:otherwise></xsl:choose>ID=<xsl:value-of select="ID"/></xsl:attribute>
<img border="0" alt="{/document/Locales/KillThreadAlt}" src="{$XMLC_PictosPath}ico_xminus.gif"/>
</a>
</td>
<td valign="top">
<xsl:value-of select="ID"/>
</td>
<td valign="top">
<xsl:value-of select="TimeCreated"/>
</td>
<td valign="top">
<xsl:value-of select="Async"/>
</td>
<td valign="top">
<xsl:value-of select="RemoteHost"/>
</td>
<td valign="top">
<xsl:value-of select="XMLC_UserID"/>
</td>
<td valign="top">
<xsl:value-of select="Action"/>
</td>
<td valign="top">
<xsl:value-of select="RequestContentReadClient"/> / <xsl:value-of select="RequestContentLength"/>
</td>
<td valign="top">
<xsl:value-of select="ResponseContentWriteClient"/> / <xsl:value-of select="ResponseContentLength"/>
</td>
<td valign="top">
<xsl:variable name="CallstackCount" select="count(CALLSTACK/LINE)"/>
<xsl:value-of select="CALLSTACK/LINE[position() = $CallstackCount]"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
