<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslc="http://xslcomponents.org/TR/WD-xslc" version="1.0">
<xsl:import href="../xslc.xsl"/>
<xsl:import href="../Common.xsl"/>
<xsl:import href="../Treeview.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="ToolbarButtonsLeft">
<ToolbarButton/>
</xsl:with-param>
<xsl:with-param name="Head">
<xsl:call-template name="xslc:TreeviewHeader">
<xsl:with-param name="SelectedID" select="/document/PARAMS/SelectedID"/>
</xsl:call-template>
</xsl:with-param>
<xsl:with-param name="DisplayToolbarBorderRight">0</xsl:with-param>
<xsl:with-param name="Body">
<div id="DivContainer">
<xsl:call-template name="xslc:Treeview">
<xsl:with-param name="Tree">
<Item ID="Application" Caption="{/document/XMLC_Params/XMLC_InstanceName}" Expanded="True" ImagePath="{$XMLC_PictosPath}button_home.gif" HRef="?" Target="_top">
<xsl:call-template name="AdmItems"/>
</Item>
</xsl:with-param>
<xsl:with-param name="SelectedID" select="/document/PARAMS/SelectedID"/>
</xsl:call-template>
</div>
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="AdmItems">
<Item ID="XMLC_Dashboard" Caption="Dashboard" Expanded="True" ImagePath="{$XMLC_PictosPath}button_Monitoring.gif" Target="XMLC_AdmFrame">
<xsl:attribute name="HRef"><xsl:choose><xsl:when test="/document/XMLC_Params/XMLC_UseXMLC_Action = '1'">?XMLC_Action=XMLC_Dashboard</xsl:when><xsl:otherwise>XMLC_Dashboard</xsl:otherwise></xsl:choose></xsl:attribute>
</Item>
<Item ID="XMLC_Stats" Caption="Stats" Expanded="True" ImagePath="{$XMLC_PictosPath}button_Stats.gif" Target="XMLC_AdmFrame">
<xsl:attribute name="HRef"><xsl:choose><xsl:when test="/document/XMLC_Params/XMLC_UseXMLC_Action = '1'">?XMLC_Action=XMLC_Stats</xsl:when><xsl:otherwise>XMLC_Stats</xsl:otherwise></xsl:choose></xsl:attribute>
<xsl:apply-templates select="Pools/Pool"/>
</Item>
<Item ID="XMLC_CompareStats" Caption="Compare Stats" ImagePath="{$XMLC_PictosPath}button_CompareStats.gif" Target="XMLC_AdmFrame">
<xsl:attribute name="HRef"><xsl:choose><xsl:when test="/document/XMLC_Params/XMLC_UseXMLC_Action = '1'">?XMLC_Action=XMLC_CompareStats</xsl:when><xsl:otherwise>XMLC_CompareStats</xsl:otherwise></xsl:choose></xsl:attribute>
</Item>
<Item ID="XMLC_ListThreads" Caption="Threads" ImagePath="{$XMLC_PictosPath}button_Monitoring.gif" Target="XMLC_AdmFrame">
<xsl:attribute name="HRef"><xsl:choose><xsl:when test="/document/XMLC_Params/XMLC_UseXMLC_Action = '1'">?XMLC_Action=XMLC_ListThreads</xsl:when><xsl:otherwise>XMLC_ListThreads</xsl:otherwise></xsl:choose></xsl:attribute>
</Item>
<Item ID="XMLC_ListRequests" Caption="Requests" ImagePath="{$XMLC_PictosPath}button_Monitoring.gif" Target="XMLC_AdmFrame">
<xsl:attribute name="HRef"><xsl:choose><xsl:when test="/document/XMLC_Params/XMLC_UseXMLC_Action = '1'">?XMLC_Action=XMLC_ListRequests</xsl:when><xsl:otherwise>XMLC_ListRequests</xsl:otherwise></xsl:choose></xsl:attribute>
</Item>
<Item ID="AsyncErrors" Caption="AsyncErrors" ImagePath="{$XMLC_PictosPath}Button_Log.gif" HRef="{/document/Aliases/XMLRADDLL}ListAsyncErrorsDir?ProjectName={$XMLC_InstanceName}" Target="XMLC_AdmFrame"/>
<Item ID="Traces" Caption="Traces" ImagePath="{$XMLC_PictosPath}Button_Log.gif" HRef="{/document/Aliases/XMLRADDLL}XMLC_ListTrace?ProjectName={$XMLC_InstanceName}" Target="XMLC_AdmFrame"/>
<xsl:apply-templates select="Traces/Trace"/>
<Item ID="EventLog" Caption="EventLog" ImagePath="{$XMLC_PictosPath}Button_EventLog.gif" HRef="{/document/Aliases/XMLRADDLL}XMLC_ListEventLog?ProjectName={$XMLC_InstanceName}" Target="XMLC_AdmFrame"/>
<Item ID="Config" Caption="Config" ImagePath="{$XMLC_Portal}FileDialog/folder_opened.gif" HRef="" Target="XMLC_AdmFrame" Expanded="False">
<Item ID="EventLog" Caption="EventLog" ImagePath="{$XMLC_PictosPath}Button_EventLog.gif" HRef="{/document/Aliases/XMLRADDLL}FormEventLogConfig?ProjectName={$XMLC_InstanceName}" Target="XMLC_AdmFrame"/>
<Item ID="Profile" Caption="Profile" ImagePath="{$XMLC_PictosPath}Button_Profile.gif" HRef="{/document/Aliases/XMLRADDLL}ListProfiles?ProjectName={$XMLC_InstanceName}" Target="XMLC_AdmFrame"/>
<Item ID="Security" Caption="Security" ImagePath="{$XMLC_PictosPath}button_SecurityAdm.gif" HRef="{/document/Aliases/XMLRADDLL}FormSecurity?ProjectName={$XMLC_InstanceName}" Target="XMLC_AdmFrame"/>
<Item ID="SMTP" Caption="SMTP" ImagePath="{$XMLC_PictosPath}button_email.gif" HRef="{/document/Aliases/XMLRADDLL}FormInitParams?ProjectName={$XMLC_InstanceName}&amp;InitParams.Name=SMTP" Target="XMLC_AdmFrame"/>
<Item ID="Messenger" Caption="Messenger" ImagePath="{$XMLC_PictosPath}button_im.gif" HRef="{/document/Aliases/XMLRADDLL}FormInitParams?ProjectName={$XMLC_InstanceName}&amp;InitParams.Name=IM" Target="XMLC_AdmFrame"/>
</Item>
<Item ID="XMLRAD" Caption="XMLRAD" ImagePath="{$XMLC_PictosPath}button_XMLRAD.gif" HRef="{/document/Aliases/XMLRADDLL}Default?XMLC_DDAProject=1&amp;ProjectName={$XMLC_InstanceName}" Target="_blank"/>
</xsl:template>
<xsl:template match="Trace">
<Item ID="{Name}_Traces" Caption="{Name}" ImagePath="{$XMLC_PictosPath}Button_Log.gif" HRef="{/document/Aliases/XMLRADDLL}XMLC_ListTrace?ProjectName={ProjectName}&amp;TraceDir={TraceDir}" Target="XMLC_AdmFrame"/>
</xsl:template>
<xsl:template match="Pool">
<Item ID="{.}_Pool" Caption="{.}" ImagePath="{$XMLC_PictosPath}button_Stats.gif" Target="XMLC_AdmFrame">
<xsl:attribute name="HRef"><xsl:choose><xsl:when test="/document/XMLC_Params/XMLC_UseXMLC_Action = '1'">?XMLC_Action=XMLC_PoolStats&amp;XMLC_Pool=</xsl:when><xsl:otherwise>XMLC_PoolStats?XMLC_Pool=<xsl:value-of select="."/></xsl:otherwise></xsl:choose></xsl:attribute>
<Item ID="{.}_Queries" Caption="Queries" ImagePath="{$XMLC_PictosPath}Button_StatsQuery.gif" Target="XMLC_AdmFrame">
<xsl:attribute name="HRef"><xsl:choose><xsl:when test="/document/XMLC_Params/XMLC_UseXMLC_Action = '1'">?XMLC_Action=XMLC_StatsQueries&amp;XMLC_Pool=<xsl:value-of select="."/></xsl:when><xsl:otherwise>XMLC_StatsQueries?XMLC_Pool=<xsl:value-of select="."/></xsl:otherwise></xsl:choose></xsl:attribute>
</Item>
<Item ID="{.}_PerfCounter" Caption="Perf. Counters" ImagePath="{$XMLC_PictosPath}button_PerformanceCounters.gif" Target="XMLC_AdmFrame">
<xsl:attribute name="HRef"><xsl:choose><xsl:when test="/document/XMLC_Params/XMLC_UseXMLC_Action = '1'">?XMLC_Action=XMLC_ListPerformanceCounter&amp;XMLC_Pool=<xsl:value-of select="."/></xsl:when><xsl:otherwise>XMLC_ListPerformanceCounter?XMLC_Pool=<xsl:value-of select="."/></xsl:otherwise></xsl:choose></xsl:attribute>
</Item>
</Item>
</xsl:template>
</xsl:stylesheet>
