1
|
<?xml version="1.0"?>
|
2
|
<!--
|
3
|
* '$RCSfile$'
|
4
|
* Authors: Michael Daigle
|
5
|
* Copyright: 2009 Regents of the University of California and the
|
6
|
* National Center for Ecological Analysis and Synthesis
|
7
|
* For Details: http://www.nceas.ucsb.edu/
|
8
|
*
|
9
|
* '$Author: leinfelder $'
|
10
|
* '$Date: 2009-04-02 14:20:05 -0800 (Thu, 02 Apr 2009) $'
|
11
|
* '$Revision: 4893 $'
|
12
|
*
|
13
|
* This program is free software; you can redistribute it and/or modify
|
14
|
* it under the terms of the GNU General Public License as published by
|
15
|
* the Free Software Foundation; either version 2 of the License, or
|
16
|
* (at your option) any later version.
|
17
|
*
|
18
|
* This program is distributed in the hope that it will be useful,
|
19
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21
|
* GNU General Public License for more details.
|
22
|
*
|
23
|
* You should have received a copy of the GNU General Public License
|
24
|
* along with this program; if not, write to the Free Software
|
25
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
26
|
*
|
27
|
* This is an XSLT (http://www.w3.org/TR/xslt) stylesheet designed to
|
28
|
* convert an XML file showing the resultset of a query
|
29
|
* into an HTML format suitable for rendering with modern web browsers.
|
30
|
-->
|
31
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
32
|
|
33
|
<xsl:output method="html" />
|
34
|
<xsl:param name="sessid" />
|
35
|
<xsl:param name="qformat">default</xsl:param>
|
36
|
<xsl:param name="enableediting">false</xsl:param>
|
37
|
<xsl:param name="contextURL"/>
|
38
|
<xsl:param name="webServletURL"/>
|
39
|
|
40
|
<xsl:template match="/">
|
41
|
<div class="row row-header" >
|
42
|
<div class="col col1">Run Name</div>
|
43
|
<div class="col col2">Status</div>
|
44
|
<div class="col col3">Start Time</div>
|
45
|
<div class="col col4">End Time</div>
|
46
|
<div class="col col5">Interval</div>
|
47
|
<div class="col col6">Action</div>
|
48
|
</div>
|
49
|
<!-- div>jobs: <xsl:number value="count(scheduledWorkflowResultset/scheduledJob)" /> </div -->
|
50
|
<!-- This tests to see if there are returned documents,
|
51
|
if there are not then don't show the query results -->
|
52
|
<xsl:if test="count(scheduledWorkflowResultset/scheduledJob) > 0">
|
53
|
<xsl:for-each select="scheduledWorkflowResultset/scheduledJob">
|
54
|
<div>
|
55
|
<xsl:attribute name="class">
|
56
|
<xsl:choose>
|
57
|
<xsl:when test="position() mod 2 = 1">row row-odd</xsl:when>
|
58
|
<xsl:when test="position() mod 2 = 0">row row-even</xsl:when>
|
59
|
</xsl:choose>
|
60
|
</xsl:attribute>
|
61
|
|
62
|
<div class="col col1">
|
63
|
<xsl:value-of select='./name' />
|
64
|
</div>
|
65
|
<div class="col col2">
|
66
|
<xsl:value-of select='./status' />
|
67
|
</div>
|
68
|
<div class="col col3">
|
69
|
<xsl:value-of select='./startTime' />
|
70
|
</div>
|
71
|
<div class="col col4">
|
72
|
<xsl:value-of select='./endTime' />
|
73
|
</div>
|
74
|
<div class="col col5">
|
75
|
<xsl:value-of select='./intervalValue' /><xsl:value-of select='./intervalUnit' />
|
76
|
</div>
|
77
|
<div class="col col6">
|
78
|
<a>
|
79
|
<xsl:choose>
|
80
|
<xsl:when test="./status = 'scheduled'">
|
81
|
<xsl:attribute name="class">underlined</xsl:attribute>
|
82
|
<xsl:attribute name="href"><xsl:value-of select='$webServletURL' />?action=unscheduleWorkflow&workflowjobid=<xsl:value-of select='./name' />&workflowname=<xsl:value-of select='./jobParam[@name='workflowname']/value' />&workflowid=<xsl:value-of select='./jobParam[@name='workflowid']/value' />&qformat=<xsl:value-of select='$qformat' />&forwardto=scheduleWorkflowRun.jsp</xsl:attribute>
|
83
|
Unschedule
|
84
|
</xsl:when>
|
85
|
<xsl:otherwise>
|
86
|
<xsl:attribute name="class">underlined</xsl:attribute>
|
87
|
<xsl:attribute name="href"><xsl:value-of select='$webServletURL' />?action=rescheduleWorkflow&workflowjobid=<xsl:value-of select='./name' />&workflowname=<xsl:value-of select='./jobParam[@name='workflowname']/value' />&workflowid=<xsl:value-of select='./jobParam[@name='workflowid']/value' />&qformat=<xsl:value-of select='$qformat' />&forwardto=scheduleWorkflowRun.jsp</xsl:attribute>
|
88
|
Reschedule
|
89
|
</xsl:otherwise>
|
90
|
</xsl:choose>
|
91
|
</a>|
|
92
|
<xsl:choose>
|
93
|
<xsl:when test="./status = 'unscheduled'">
|
94
|
<a>
|
95
|
<xsl:attribute name="class">underlined</xsl:attribute>
|
96
|
<xsl:attribute name="href"><xsl:value-of select='$webServletURL' />?action=deleteScheduledWorkflow&workflowjobid=<xsl:value-of select='./name' />&&workflowname=<xsl:value-of select='./jobParam[@name='workflowname']/value' />&workflowid=<xsl:value-of select='./jobParam[@name='workflowid']/value' />&qformat=<xsl:value-of select='$qformat' />&forwardto=scheduleWorkflowRun.jsp</xsl:attribute>
|
97
|
Delete
|
98
|
</a>
|
99
|
</xsl:when>
|
100
|
<xsl:otherwise>
|
101
|
Delete
|
102
|
</xsl:otherwise>
|
103
|
</xsl:choose>
|
104
|
</div>
|
105
|
</div>
|
106
|
</xsl:for-each>
|
107
|
</xsl:if>
|
108
|
</xsl:template>
|
109
|
|
110
|
</xsl:stylesheet>
|