Bonjour à tous,
Je voudrai suivant l'ID des hosts afficher un voyant de couleur...
Je m'explique, si un host est vert et qu'un autre est rouge, je voudrai afficher un voyant rouge, et si tout est vert, alors afficher un voyant vert ...
Seulement, je suis confronté à des erreurs que je n'arrive pas à résoudre... Surement que mon code est faux concernant la sélection lorsqu'il s'agit de plusieurs hosts :
Si vous avez une idée, je vous remercie d'avance
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12 <div id="test"><xsl:value-of select="$host[2]" /><br/>x<xsl:value-of select="$ID" /></div> <xsl:choose> <xsl:when test="/host[_HOST_ID=('0;18' and '0;15') and current_state=0]"> <img src="images/green_45b.png" style="padding:2px;padding-left:14px;padding-right:5px;vertical-align:middle;" /> </xsl:when> <xsl:when test="/host[_HOST_ID=('0;18' or '0;15') and current_state=1]"> <img src="images/red_45b.png" style="padding:2px;padding-left:14px;padding-right:5px;vertical-align:middle;"/> </xsl:when> <xsl:otherwise> <img src="images/yellow_45b.png" style="padding:2px;padding-left:14px;padding-right:5px;vertical-align:middle;" /> </xsl:otherwise> </xsl:choose>
Modifier le message
Partager