<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" encoding="iso-8859-1" indent="yes"/>

<!-- ============================= templates principal ============================= -->

<xsl:template match="/">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"/>
<meta http-equiv="Refresh" content="1800;URL=http://www.christopher.compagnon.name/activedesktop/disques.xml"/>
<title>Etat des disques</title>
<link rel="stylesheet" type="text/css" href="http://www.christopher.compagnon.name/activedesktop/ActiveDesktop.css"/>
</head>


<body>
<div>


<fieldset>
<legend>Etat des disques</legend>
<br/>
<table>
<tr>
<th>Montage</th>
<th>Capacité</th>
<th>Occupation</th>
</tr>
<xsl:for-each select="Disques/Disk">
<xsl:if test="NbBlocks > 2">
<tr>
<xsl:choose>
<xsl:when test="(Capacity &gt;= 90) and (Capacity &lt; 95)">
<th class="warning"><xsl:value-of select="MountedOn"/></th>
<td class="warning"><xsl:value-of select="NbBlocks"/></td>
<td class="warning"><xsl:value-of select="Capacity"/> %</td>
</xsl:when>

<xsl:when test="(Capacity &gt;= 95)">
<th class="error"><xsl:value-of select="MountedOn"/></th>
<td class="error"><xsl:value-of select="NbBlocks"/></td>
<td class="error"><xsl:value-of select="Capacity"/> %</td>
</xsl:when>

<xsl:otherwise>
<th><xsl:value-of select="MountedOn"/></th>
<td><xsl:value-of select="NbBlocks"/></td>
<td><xsl:value-of select="Capacity"/> %</td>

</xsl:otherwise>
</xsl:choose>

</tr>
</xsl:if>
</xsl:for-each>
</table>
</fieldset>

<br/>





<xsl:if test=" count(ActiveDesktop/LastComm/Line) > 0">
<fieldset>
<legend>Historique des commandes</legend>
<br/>
<table>
<tr>
<th>Commande</th>
<th>Utilisateur</th>
<th>Console</th>
</tr>
<xsl:for-each select="ActiveDesktop/LastComm/Line">

<tr>
<td><xsl:value-of select="CMD"/></td>
<td><xsl:value-of select="User"/></td>
<td><xsl:value-of select="Console"/></td>
</tr>
</xsl:for-each>
</table>
</fieldset>
<br/>
</xsl:if>

</div>

<div>
<xsl:if test=" count(ActiveDesktop/Snort/Line) > 0">
<fieldset>
<legend>SNORT</legend>
<br/>

<xsl:for-each select="ActiveDesktop/Snort/Line">
<pre><xsl:value-of select="substring(.,0,150)"/></pre>
</xsl:for-each>

</fieldset>
<br/>
</xsl:if>

<xsl:if test=" count(ActiveDesktop/Who/Line) > 0">
<fieldset>
<legend>Utilisateurs connectés</legend>
<br/>
<table>
<tr>
<th>Utilisateur</th>
<th>Machine</th>
</tr>
<xsl:for-each select="ActiveDesktop/Who/Line">

<tr>
<td><xsl:value-of select="User"/></td>
<td><xsl:value-of select="Machine"/></td>
</tr>
</xsl:for-each>
</table>
</fieldset>
<br/>
</xsl:if>


</div>

</body>
</html>
</xsl:template>

</xsl:stylesheet>
