2 <xsl:stylesheet version=
"1.0" xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform">
3 <xsl:output method=
"html" indent=
"yes"/>
4 <xsl:template match=
"/domain">
6 <img src=
"/images/{./os/type}.png" alt=
"{./os/type}" style=
"float: left;"/>
8 <xsl:when test=
"@id > 0">
9 <a href=
"/virt/{translate(./name,'_', '/')}/virDomainShutdown" style=
"background-image: url('/images/power.png'); background-repeat: no-repeat; display: block; width: 45px; height: 47px; font-size: 0; float: left;">Shutdown
</a>
10 <a href=
"/virt/{translate(./name,'_', '/')}/virDomainReboot" style=
"background-image: url('/images/reboot.png'); background-repeat: no-repeat; display: block; width: 45px; height: 47px; font-size: 0; float: left;">Reboot
</a>
13 <a href=
"/virt/{translate(./name,'_', '/')}/virDomainCreate" style=
"background-image: url('/images/power.png'); background-repeat: no-repeat; display: block; width: 45px; height: 47px; font-size: 0; float: left;">Create
</a>
17 <h1 style=
"clear: both;" ><xsl:value-of select=
"translate(./name,'_', ' ')"/></h1>
18 <img src=
"/virt/{translate(./name,'_', '/')}/virGraphLoad" alt=
"Load of {substring-after(./name,'_')}" />
19 <img src=
"/virt/{translate(./name,'_', '/')}/virGraphInterface" alt=
"Traffic of {substring-after(./name,'_')}" />
23 <xsl:template match=
"domain">
25 <xsl:when test=
"@status = 'running'">
26 <xsl:variable name=
"color" select=
"'background-color: #0f0;'" />
27 <a href=
"/virt/{translate(./name,'_', '/')}" style=
"float: left; margin: 0.2em; font-size: 1em; display: block; width: 7em; height: 7em; text-align: center; border: 1px black solid; vertical-align: middle; {$color} text-decoration: none;"><xsl:value-of select=
"substring-before(./name,'_')"/><br /><xsl:value-of select=
"substring-after(./name,'_')"/></a>
29 <xsl:when test=
"@status = 'running'">
30 <xsl:variable name=
"color" select=
"'background-color: #000;'" />
31 <a href=
"/virt/{translate(./name,'_', '/')}" style=
"float: left; margin: 0.2em; font-size: 1em; display: block; width: 7em; height: 7em; text-align: center; border: 1px black solid; vertical-align: middle; {$color} text-decoration: none;"><xsl:value-of select=
"substring-before(./name,'_')"/><br /><xsl:value-of select=
"substring-after(./name,'_')"/></a>
34 <xsl:variable name=
"color" select=
"'background-color: #fef;'" />
35 <a href=
"/virt/{translate(./name,'_', '/')}" style=
"float: left; margin: 0.2em; font-size: 1em; display: block; width: 7em; height: 7em; text-align: center; border: 1px black solid; vertical-align: middle; {$color} text-decoration: none;"><xsl:value-of select=
"substring-before(./name,'_')"/><br /><xsl:value-of select=
"substring-after(./name,'_')"/></a>
40 <xsl:template match=
"/">
41 <html xmlns=
"http://www.w3.org/1999/xhtml">
43 <title>VPS; Do you need an other argument to migrate?
</title>
44 <link rel=
"stylesheet" type=
"text/css" href=
"/css/default.css" />
47 <img src=
"/images/vps.png" alt=
"VPS" />
48 <xsl:apply-templates />