Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add 'free' and 'warn' filter for rendering 'qstat -f' output

- useful for obtaining an overview about good/bad hosts
  similar to what already exists for the qhost rendering
  • Loading branch information...
commit 1d1a78a0bf452c9aabdb43627d1def42da16c89b 1 parent 6dc8dcc
Mark Olesen authored
View
33 httpi-modules/userfunc.in
@@ -14,12 +14,12 @@ should not be changed as other subroutines call it for their error handling.
#!/perl # provide a shebang for using perl -c -x userfunc.in
sub hterror {
- my ( $errstr, $expl ) = (@_);
+ my ( $errstr, @expl ) = (@_);
&htcontent( <<"EOF", "text/html" );
<html>
<body>
<h1>$errstr</h1>
-$expl
+@expl
<hr>
<address><a href = "http://httpi.floodgap.com/">httpi/$VERSION</a>
by Cameron Kaiser</address>
@@ -29,8 +29,8 @@ EOF
}
sub hterror404 {
- &htsponse( 404 => "File Not Found" );
- &hterror( "File Not Found",
+ &htsponse( 404 => "Not Found" );
+ &hterror( "Not Found",
"The resource <tt>$address</tt> was not found on this system." );
&log;
exit;
@@ -49,8 +49,8 @@ sub hterror301 {
# like hterror404, but optionally with our own message content
sub customError404 {
- &htsponse( 404 => "File Not Found" );
- &hterror( "Resource Not Found",
+ &htsponse( 404 => "Not Found" );
+ &hterror( "Not Found",
@_
? "@_"
: "Cannot resolve resource <b>$::address</b>" );
@@ -523,7 +523,10 @@ Cell directory <b>$root/$cell</b> does not exist
CONTENT
}
- local *ENV;
+ # localizing should be okay, but seems to fail:
+ # good that we are using a daemon mode anyhow
+ # local *ENV;
+ #
$ENV{SGE_ROOT} = $root;
$ENV{SGE_CELL} = $cell;
@@ -978,6 +981,7 @@ CONTENT
returnXML(
xmlProlog(
%xsltParam, #
+ renderMode => "jobs",
stylesheet => "xsl/qstatf-xhtml.xsl",
),
xmlFromCache(
@@ -1007,13 +1011,18 @@ CONTENT
}
#
- # queues : renderMode 'full'
+ # queues : with optional renderMode (free|warn)
#
if ( $function eq "queues" ) {
+ ( $xsltParam{renderMode} ) =
+ grep { m{^(free|warn)$} } keys %switch;
+
+ # default is "queues", but state it explicitly anyhow
+ $xsltParam{renderMode} ||= "queues";
+
returnXML(
xmlProlog(
%xsltParam, #
- renderMode => "full",
stylesheet => "xsl/qstatf-xhtml.xsl",
),
xmlFromCache(
@@ -1024,13 +1033,13 @@ CONTENT
}
#
- # summary : renderMode 'summary'
+ # report : renderMode 'report'
#
- if ( $function eq "summary" ) {
+ if ( $function eq "report" ) {
returnXML(
xmlProlog(
%xsltParam, #
- renderMode => "summary",
+ renderMode => "report",
stylesheet => "xsl/qstatf-xhtml.xsl",
),
xmlFromCache(
View
3  scripts/list-icons-used.pl
@@ -46,7 +46,8 @@ sub usage {
my %referenced;
while (<>) {
- while (s{css/screen/icons/(.+?\.png)\"}{}) {
+ ## parse until closing quote or next '<' for xsl attributes
+ while (s{css/screen/icons/(.+?\.png)[<\"]}{}) {
$referenced{$1}++;
}
}
View
0  icons/silk/control_pause.png → xmlqstat/css/screen/icons/control_pause.png
File renamed without changes
View
0  icons/silk/cross.png → xmlqstat/css/screen/icons/cross.png
File renamed without changes
View
0  icons/silk/delete.png → xmlqstat/css/screen/icons/delete.png
File renamed without changes
View
11 xmlqstat/sitemap.xmap
@@ -715,6 +715,7 @@
clusterName="{1}"
timestamp="{date:yyyy-MM-dd_HH:mm:ss}"
filterByUser="{request-param:user}"
+ renderMode="jobs"
menuMode="qstatf"
urlExt=".xml"
'/>
@@ -747,7 +748,7 @@
<map:parameter name="xslt-parameters" value='
clusterName="{1}"
timestamp="{date:yyyy-MM-dd_HH:mm:ss}"
- renderMode="queues"
+ renderMode="{request:queryString}"
menuMode="qstatf"
urlExt=".xml"
'/>
@@ -774,13 +775,13 @@
</map:match>
<!-- client-side XSLT for summary~NAME -->
- <map:match pattern="summary~*.xml">
+ <map:match pattern="report~*.xml">
<map:generate src="cocoon:/qstatf~{1}.xml" />
<map:transform src="xsl/cocoon/attach-stylesheet.xsl">
<map:parameter name="xslt-parameters" value='
clusterName="{1}"
timestamp="{date:yyyy-MM-dd_HH:mm:ss}"
- renderMode="summary"
+ renderMode="report"
menuMode="qstatf"
urlExt=".xml"
'/>
@@ -802,6 +803,7 @@
<map:parameter name="timestamp" value="{date:yyyy-MM-dd_HH:mm:ss}"/>
<map:parameter name="filterByUser" value="{request-param:user}"/>
<map:parameter name="menuMode" value="qstatf"/>
+ <map:parameter name="renderMode" value="jobs"/>
</map:transform>
<map:serialize type="xhtml"/>
</map:match>
@@ -828,7 +830,7 @@
<map:transform src="xsl/qstatf-xhtml.xsl">
<map:parameter name="clusterName" value="{1}" />
<map:parameter name="timestamp" value="{date:yyyy-MM-dd_HH:mm:ss}"/>
- <map:parameter name="renderMode" value="queues"/>
+ <map:parameter name="renderMode" value="{request:queryString}"/>
<map:parameter name="menuMode" value="qstatf"/>
</map:transform>
<map:serialize type="xhtml"/>
@@ -866,7 +868,6 @@
<map:serialize type="xhtml"/>
</map:match>
-
<!-- urls for accessing the default cluster paths -->
<map:match pattern="jobs">
<map:redirect-to uri="jobs~default" />
View
10 xmlqstat/xsl/cocoon/attach-stylesheet.xsl
@@ -1,4 +1,9 @@
-<xsl:stylesheet version="2.0"
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE stylesheet [
+<!ENTITY newline "<xsl:text>&#x0a;</xsl:text>">
+<!ENTITY space "<xsl:text> </xsl:text>">
+]>
+<xsl:stylesheet version="1.0"
xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
@@ -44,12 +49,14 @@
<xsl:text>type="text/xml" href="</xsl:text>
<xsl:value-of select="$stylesheet"/><xsl:text>"</xsl:text>
</xsl:processing-instruction>
+ &newline;
</xsl:when>
<xsl:otherwise>
<xsl:processing-instruction name="xml-stylesheet">
<xsl:text>type="text/xml" href="</xsl:text>
<xsl:value-of select="$stylesheet"/><xsl:text>"</xsl:text>
</xsl:processing-instruction>
+ &newline;
</xsl:otherwise>
</xsl:choose>
</xsl:if>
@@ -166,6 +173,7 @@
<xsl:value-of select="$value" />
<xsl:value-of select="$quote" />
</xsl:processing-instruction>
+ &newline;
</xsl:if>
<xsl:call-template name="create-pis">
View
25 xmlqstat/xsl/index-xhtml.xsl
@@ -531,6 +531,31 @@
/>
</xsl:element>
+
+ <!-- queues?free -->
+ &space;
+ <xsl:element name="a">
+ <xsl:attribute name="title">queues free</xsl:attribute>
+ <xsl:attribute name="href">queues~<xsl:value-of select="$name"/>
+ <xsl:value-of select="$urlExt"/>?free</xsl:attribute>
+ <img border="0"
+ src="css/screen/icons/tick.png"
+ alt="[queues free]"
+ />
+ </xsl:element>
+
+ <!-- queues?warn -->
+ &space;
+ <xsl:element name="a">
+ <xsl:attribute name="title">queue warnings</xsl:attribute>
+ <xsl:attribute name="href">queues~<xsl:value-of select="$name"/>
+ <xsl:value-of select="$urlExt"/>?warn</xsl:attribute>
+ <img border="0"
+ src="css/screen/icons/error.png"
+ alt="[warn queue]"
+ />
+ </xsl:element>
+
<!-- queues: using qstat -f output (cached or direct) -->
&space;
<xsl:element name="a">
View
6 xmlqstat/xsl/qhost-xhtml.xsl
@@ -461,18 +461,18 @@
<xsl:if
test="queuevalue[@name='state_string'] = '' and
(queuevalue[@name='slots'] - queuevalue[@name='slots_used']) != 0">
- true
+ <xsl:text>true</xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:when test="$renderMode='warn'">
<xsl:if test="queue/queuevalue[@name='state_string'][
contains(., 'a') or contains(., 'd') or contains(., 'E')]">
- true
+ <xsl:text>true</xsl:text>
</xsl:if>
</xsl:when>
<xsl:otherwise>
- true
+ <xsl:text>true</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
View
420 xmlqstat/xsl/qstatf-xhtml.xsl
@@ -12,9 +12,11 @@
| process XML generated by
| "qstat -u * -xml -r -f -explain aAcE"
| to produce
- | 1) a list of active and pending jobs (the default)
- | 2) a detailed list of the queue instances (renderMode = queues)
- | 3) a queue report (renderMode = report)
+ | - a list of active and pending jobs (renderMode = jobs)
+ | - a list of queue instances (renderMode = queues) [default]
+ | - a list of free queues (renderMode = free)
+ | - a list of queues with warnings (renderMode = warn)
+ | - a cluster text report (renderMode = report)
-->
<!--
@@ -54,7 +56,7 @@
<xsl:param name="renderMode">
<xsl:call-template name="pi-param">
<xsl:with-param name="name" select="'renderMode'"/>
- <xsl:with-param name="default" select="'jobs'"/>
+ <xsl:with-param name="default" select="'queues'"/>
</xsl:call-template>
</xsl:param>
@@ -145,9 +147,21 @@
&newline;
<xsl:choose>
-<xsl:when test="$renderMode='queues'">
- <link rel="icon" type="image/png" href="css/screen/icons/shape_align_left.png"/>
- <title> queue instances
+<xsl:when test="$renderMode='jobs'">
+ <link rel="icon" type="image/png" href="css/screen/icons/lorry.png"/>
+ <title> jobs
+ <xsl:if test="$clusterName"> @<xsl:value-of select="$clusterName"/></xsl:if>
+ </title>
+</xsl:when>
+<xsl:when test="$renderMode='free'">
+ <link rel="icon" type="image/png" href="css/screen/icons/tick.png"/>
+ <title> queues free
+ <xsl:if test="$clusterName"> @<xsl:value-of select="$clusterName"/></xsl:if>
+ </title>
+</xsl:when>
+<xsl:when test="$renderMode='warn'">
+ <link rel="icon" type="image/png" href="css/screen/icons/error.png"/>
+ <title> queue warnings
<xsl:if test="$clusterName"> @<xsl:value-of select="$clusterName"/></xsl:if>
</title>
</xsl:when>
@@ -158,8 +172,8 @@
</title>
</xsl:when>
<xsl:otherwise>
- <link rel="icon" type="image/png" href="css/screen/icons/lorry.png"/>
- <title> jobs
+ <link rel="icon" type="image/png" href="css/screen/icons/shape_align_left.png"/>
+ <title> queue instances
<xsl:if test="$clusterName"> @<xsl:value-of select="$clusterName"/></xsl:if>
</title>
</xsl:otherwise>
@@ -364,58 +378,136 @@
</xsl:if>
<xsl:choose>
-<xsl:when test="$renderMode='queues'">
+<xsl:when test="$renderMode='jobs'">
&newline;
- <xsl:comment> Queue Instance Information </xsl:comment>
+ <xsl:comment> Active Jobs </xsl:comment>
&newline;
- <!-- queue instances: -->
<blockquote>
- <table class="listing">
- <tr valign="middle">
- <td>
- <!-- NB: slots_total reported actually includes slots_used -->
- <xsl:variable name="valueUsed"
- select="sum(//Queue-List/slots_used)"
- />
- <xsl:variable name="valueTotal"
- select="sum(//Queue-List/slots_total) - sum(//Queue-List/slots_used)"
- />
- <xsl:variable name="percent"
- select="($valueUsed div $valueTotal)*100"
- />
+ <xsl:choose>
+ <xsl:when test="$AJ_total &gt; 0">
+ <!-- active jobs: -->
+ <table class="listing">
+ <tr>
+ <td valign="middle">
+ <div class="tableCaption">
+ <xsl:value-of select="$AJ_total"/> active jobs
+ <xsl:if test="string-length($filterByUser)">
+ for <xsl:value-of select="$filterByUser"/>
+ </xsl:if>
+ (<xsl:value-of select="$AJ_slots"/> slots)
+ </div>
+ <!-- show/hide the activeJobTable via javascript -->
+ <xsl:call-template name="toggleElementVisibility">
+ <xsl:with-param name="name" select="'activeJobTable'"/>
+ </xsl:call-template>
+ </td>
+ </tr>
+ </table>
+ <div id="activeJobTable">
+ <table class="listing">
+ <tr>
+ <th>jobId</th>
+ <th>owner</th>
+ <th>name</th>
+ <th>slots</th>
+ <th>tasks</th>
+ <th>queue</th>
+ <th><acronym title="priority">startTime</acronym></th>
+ <th>state</th>
+ </tr>
- <div class="tableCaption">Queue Instance Information</div>
- <div class="tableCaption" id="summaryGraph">
- <!-- summarize slot usage as percent or absolute value -->
- <xsl:choose>
- <xsl:when test="$showSlotUsage='percent'">
- <xsl:call-template name="progressBar">
- <xsl:with-param name="title"
- select="concat($valueUsed, ' of ', $valueTotal, ' slots in use')"
- />
- <xsl:with-param name="label"
- select="concat(format-number($percent,'##0.#'), '%')"
- />
- <xsl:with-param name="percent" select="$percent"/>
- </xsl:call-template>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="progressBar">
- <xsl:with-param name="label" select="concat($valueUsed, '/', $valueTotal)" />
- <xsl:with-param name="title"
- select="concat(format-number($percent,'##0.#'), '%')" />
- <xsl:with-param name="percent" select="$percent"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
+ <!--
+ | potential bug here
+ | we need to research all possible non-pending states that could be reported
+ | as we currently only catch items marked as running or transferring
+ -->
+
+ <!-- select running or transferring jobs -->
+ <xsl:for-each select="//job_list[@state='running'] | //job_list[@state='transferring']">
+ <!-- sorted by job number and by task-->
+ <xsl:sort select="JB_job_number"/>
+ <xsl:sort select="tasks"/>
+ <xsl:variable name="jobIdent" select="concat(JB_job_number,';',tasks)"/>
+ <xsl:variable name="thisNode" select="generate-id(.)"/>
+ <xsl:variable name="allNodes" select="key('jobTask-summary', $jobIdent)"/>
+ <xsl:variable name="firstNode" select="generate-id($allNodes[1])"/>
+
+ <xsl:if test="$thisNode = $firstNode">
+ <xsl:apply-templates select="." mode="report"/>
+ </xsl:if>
+ </xsl:for-each>
+ </table>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- no active jobs -->
+ <div class="skipTableFormat">
+ <img alt="*" src="css/screen/list_bullet.png" />
+ no active jobs
+ <xsl:if test="string-length($filterByUser)">
+ for user <em><xsl:value-of select="$filterByUser"/></em>
+ </xsl:if>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
+ </blockquote>
+
+ &newline;
+ <xsl:comment> Pending Jobs </xsl:comment>
+ &newline;
+
+ <blockquote>
+ <xsl:choose>
+ <xsl:when test="$PJ_total &gt; 0">
+ <!-- pending jobs: -->
+ <table class="listing">
+ <tr>
+ <td valign="middle">
+ <div class="tableCaption">
+ <xsl:value-of select="$PJ_total"/> pending jobs
+ <xsl:if test="string-length($filterByUser)">
+ for <xsl:value-of select="$filterByUser"/>
+ </xsl:if>
+ (<xsl:value-of select="$PJ_slots"/> slots)
</div>
+ <!-- show/hide the pendingJobTable via javascript -->
+ <xsl:call-template name="toggleElementVisibility">
+ <xsl:with-param name="name" select="'pendingJobTable'"/>
+ </xsl:call-template>
</td>
- </tr>
- </table>
- <div id="queueStatusTable">
- <xsl:apply-templates select="//queue_info" />
- </div>
+ </tr>
+ </table>
+ <div id="pendingJobTable">
+ <table class="listing">
+ <tr>
+ <th>jobId</th>
+ <th>owner</th>
+ <th>name</th>
+ <th>slots</th>
+ <th>tasks</th>
+ <th><acronym title="submissionTime">priority</acronym></th>
+ <th>state</th>
+ </tr>
+ <xsl:for-each select="//job_list[@state='pending']">
+ <!-- sorted by job number -->
+ <xsl:sort select="./JB_job_number"/>
+ <xsl:apply-templates select="."/>
+ </xsl:for-each>
+ </table>
+ </div>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- no pending jobs -->
+ <div class="skipTableFormat">
+ <img alt="*" src="css/screen/list_bullet.png" />
+ no pending jobs
+ <xsl:if test="string-length($filterByUser)">
+ for user <em><xsl:value-of select="$filterByUser"/></em>
+ </xsl:if>
+ </div>
+ </xsl:otherwise>
+ </xsl:choose>
</blockquote>
</xsl:when>
<xsl:when test="$renderMode='report'">
@@ -631,138 +723,98 @@
</div>
</blockquote>
</xsl:when>
-<xsl:otherwise>
+<xsl:when test="$renderMode='free'">
&newline;
- <xsl:comment> Active Jobs </xsl:comment>
+ <xsl:comment> Queues Free Information </xsl:comment>
&newline;
+ <!-- queue instances: -->
<blockquote>
- <xsl:choose>
- <xsl:when test="$AJ_total &gt; 0">
- <!-- active jobs: -->
- <table class="listing">
- <tr>
- <td valign="middle">
- <div class="tableCaption">
- <xsl:value-of select="$AJ_total"/> active jobs
- <xsl:if test="string-length($filterByUser)">
- for <xsl:value-of select="$filterByUser"/>
- </xsl:if>
- (<xsl:value-of select="$AJ_slots"/> slots)
- </div>
- <!-- show/hide the activeJobTable via javascript -->
- <xsl:call-template name="toggleElementVisibility">
- <xsl:with-param name="name" select="'activeJobTable'"/>
- </xsl:call-template>
+ <table class="listing">
+ <tr valign="middle">
+ <td>
+ <div class="tableCaption">Queues Free</div>
</td>
- </tr>
- </table>
- <div id="activeJobTable">
- <table class="listing">
- <tr>
- <th>jobId</th>
- <th>owner</th>
- <th>name</th>
- <th>slots</th>
- <th>tasks</th>
- <th>queue</th>
- <th><acronym title="priority">startTime</acronym></th>
- <th>state</th>
- </tr>
-
- <!--
- | potential bug here
- | we need to research all possible non-pending states that could be reported
- | as we currently only catch items marked as running or transferring
- -->
-
- <!-- select running or transferring jobs -->
- <xsl:for-each select="//job_list[@state='running'] | //job_list[@state='transferring']">
- <!-- sorted by job number and by task-->
- <xsl:sort select="JB_job_number"/>
- <xsl:sort select="tasks"/>
- <xsl:variable name="jobIdent" select="concat(JB_job_number,';',tasks)"/>
- <xsl:variable name="thisNode" select="generate-id(.)"/>
- <xsl:variable name="allNodes" select="key('jobTask-summary', $jobIdent)"/>
- <xsl:variable name="firstNode" select="generate-id($allNodes[1])"/>
+ </tr>
+ </table>
+ <div id="queueStatusTable">
+ <xsl:apply-templates select="//queue_info" />
+ </div>
+ </blockquote>
+</xsl:when>
+<xsl:when test="$renderMode='warn'">
+ &newline;
+ <xsl:comment> Queue Warnings Information </xsl:comment>
+ &newline;
- <xsl:if test="$thisNode = $firstNode">
- <xsl:apply-templates select="." mode="report"/>
- </xsl:if>
- </xsl:for-each>
- </table>
- </div>
- </xsl:when>
- <xsl:otherwise>
- <!-- no active jobs -->
- <div class="skipTableFormat">
- <img alt="*" src="css/screen/list_bullet.png" />
- no active jobs
- <xsl:if test="string-length($filterByUser)">
- for user <em><xsl:value-of select="$filterByUser"/></em>
- </xsl:if>
- </div>
- </xsl:otherwise>
- </xsl:choose>
+ <!-- queue instances: -->
+ <blockquote>
+ <table class="listing">
+ <tr valign="middle">
+ <td>
+ <div class="tableCaption">Queue Warnings</div>
+ </td>
+ </tr>
+ </table>
+ <div id="queueStatusTable">
+ <xsl:apply-templates select="//queue_info" />
+ </div>
</blockquote>
+</xsl:when>
+<xsl:otherwise>
&newline;
- <xsl:comment> Pending Jobs </xsl:comment>
+ <xsl:comment> Queue Instance Information </xsl:comment>
&newline;
+ <!-- queue instances: -->
<blockquote>
- <xsl:choose>
- <xsl:when test="$PJ_total &gt; 0">
- <!-- pending jobs: -->
- <table class="listing">
- <tr>
- <td valign="middle">
- <div class="tableCaption">
- <xsl:value-of select="$PJ_total"/> pending jobs
- <xsl:if test="string-length($filterByUser)">
- for <xsl:value-of select="$filterByUser"/>
- </xsl:if>
- (<xsl:value-of select="$PJ_slots"/> slots)
+ <table class="listing">
+ <tr valign="middle">
+ <td>
+ <!-- NB: slots_total reported actually includes slots_used -->
+ <xsl:variable name="valueUsed"
+ select="sum(//Queue-List/slots_used)"
+ />
+ <xsl:variable name="valueTotal"
+ select="sum(//Queue-List/slots_total) - sum(//Queue-List/slots_used)"
+ />
+ <xsl:variable name="percent"
+ select="($valueUsed div $valueTotal)*100"
+ />
+
+ <div class="tableCaption">Queue Instance Information</div>
+ <div class="tableCaption" id="summaryGraph">
+ <!-- summarize slot usage as percent or absolute value -->
+ <xsl:choose>
+ <xsl:when test="$showSlotUsage='percent'">
+ <xsl:call-template name="progressBar">
+ <xsl:with-param name="title"
+ select="concat($valueUsed, ' of ', $valueTotal, ' slots in use')"
+ />
+ <xsl:with-param name="label"
+ select="concat(format-number($percent,'##0.#'), '%')"
+ />
+ <xsl:with-param name="percent" select="$percent"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="progressBar">
+ <xsl:with-param name="label" select="concat($valueUsed, '/', $valueTotal)" />
+ <xsl:with-param name="title"
+ select="concat(format-number($percent,'##0.#'), '%')" />
+ <xsl:with-param name="percent" select="$percent"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
</div>
- <!-- show/hide the pendingJobTable via javascript -->
- <xsl:call-template name="toggleElementVisibility">
- <xsl:with-param name="name" select="'pendingJobTable'"/>
- </xsl:call-template>
</td>
- </tr>
- </table>
- <div id="pendingJobTable">
- <table class="listing">
- <tr>
- <th>jobId</th>
- <th>owner</th>
- <th>name</th>
- <th>slots</th>
- <th>tasks</th>
- <th><acronym title="submissionTime">priority</acronym></th>
- <th>state</th>
- </tr>
- <xsl:for-each select="//job_list[@state='pending']">
- <!-- sorted by job number -->
- <xsl:sort select="./JB_job_number"/>
- <xsl:apply-templates select="."/>
- </xsl:for-each>
- </table>
- </div>
- </xsl:when>
- <xsl:otherwise>
- <!-- no pending jobs -->
- <div class="skipTableFormat">
- <img alt="*" src="css/screen/list_bullet.png" />
- no pending jobs
- <xsl:if test="string-length($filterByUser)">
- for user <em><xsl:value-of select="$filterByUser"/></em>
- </xsl:if>
- </div>
- </xsl:otherwise>
- </xsl:choose>
+ </tr>
+ </table>
+ <div id="queueStatusTable">
+ <xsl:apply-templates select="//queue_info" />
+ </div>
</blockquote>
-
</xsl:otherwise>
</xsl:choose>
@@ -835,10 +887,31 @@
<!--
output a row for this queue instance
-->
-<xsl:template match="//Queue-List" mode="queues">
+<xsl:template match="Queue-List" mode="queues">
<xsl:variable name="qinstance" select="name"/>
<xsl:variable name="qname" select="substring-before(name,'@')"/>
+ <xsl:variable name="render">
+ <xsl:choose>
+ <xsl:when test="$renderMode='free'">
+ <xsl:if test="slots_used &lt; slots_total and not(state)">
+ <xsl:text>true</xsl:text>
+ </xsl:if>
+ </xsl:when>
+ <xsl:when test="$renderMode='warn'">
+ <xsl:if test="contains(state, 'a')
+ or contains(state, 'd') or contains(state, 'E')">
+ <xsl:text>true</xsl:text>
+ </xsl:if>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>true</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+
+<xsl:if test="contains($render, 'true')">
+
<tr>
<!-- queue -->
<td>
@@ -958,6 +1031,9 @@ $valueTotal0)*100"/>
</td>
</tr>
+&newline;
+</xsl:if>
+
</xsl:template>
View
27 xmlqstat/xsl/xmlqstat-masthead.xsl
@@ -273,6 +273,30 @@
/>
</xsl:element>
+ <!-- queues?free -->
+ <img alt=" | " src="css/screen/icon_divider.png" />
+ <xsl:element name="a">
+ <xsl:attribute name="title">queue free</xsl:attribute>
+ <xsl:attribute name="href">queues<xsl:value-of select="$clusterSuffix"/>
+ <xsl:value-of select="$urlExt"/>?free</xsl:attribute>
+ <img
+ src="css/screen/icons/tick.png"
+ alt="[queues free]"
+ />
+ </xsl:element>
+
+ <!-- queues?warn -->
+ <img alt=" | " src="css/screen/icon_divider.png" />
+ <xsl:element name="a">
+ <xsl:attribute name="title">queue warn</xsl:attribute>
+ <xsl:attribute name="href">queues<xsl:value-of select="$clusterSuffix"/>
+ <xsl:value-of select="$urlExt"/>?warn</xsl:attribute>
+ <img
+ src="css/screen/icons/error.png"
+ alt="[warn queues]"
+ />
+ </xsl:element>
+
<img alt=" | " src="css/screen/icon_divider.png" />
<xsl:element name="a">
<xsl:attribute name="title">queue instances</xsl:attribute>
@@ -379,8 +403,7 @@
<xsl:text>Rendered</xsl:text>
</xsl:element>
<xsl:text>: </xsl:text>
- <!-- replace 'T' in dateTime for easier reading -->
- <xsl:value-of select="translate($timestamp, 'T', '_')"/>
+ <xsl:value-of select="$timestamp"/>
</div>
&newline;
</xsl:if>
View
15 xmlqstat/xsl/xmlqstat-templates.xsl
@@ -448,13 +448,14 @@
<xsl:element name="img">
<xsl:attribute name="title"><xsl:value-of select="$state"/></xsl:attribute>
<xsl:attribute name="alt">(<xsl:value-of select="$state"/>) </xsl:attribute>
- <xsl:attribute name="src">css/screen/icons/<xsl:choose>
- <xsl:when test="contains($state, 'd')">delete.png</xsl:when>
- <xsl:when test="contains($state, 'E')">exclamation.png</xsl:when>
- <xsl:when test="contains($state, 'u')">cross.png</xsl:when>
- <xsl:when test="contains($state, 'a')">error.png</xsl:when>
- <xsl:when test="contains($state, 'S')">control_pause.png</xsl:when>
- <xsl:otherwise>tick.png</xsl:otherwise>
+ <xsl:attribute name="src">
+ <xsl:choose>
+ <xsl:when test="contains($state, 'd')">css/screen/icons/delete.png</xsl:when>
+ <xsl:when test="contains($state, 'E')">css/screen/icons/exclamation.png</xsl:when>
+ <xsl:when test="contains($state, 'u')">css/screen/icons/cross.png</xsl:when>
+ <xsl:when test="contains($state, 'a')">css/screen/icons/error.png</xsl:when>
+ <xsl:when test="contains($state, 'S')">css/screen/icons/control_pause.png</xsl:when>
+ <xsl:otherwise>css/screen/icons/tick.png</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:element>
Please sign in to comment.
Something went wrong with that request. Please try again.