Project

General

Profile

1 4966 daigle
<?xml version="1.0"?>
2
<!--
3
	*  '$RCSfile$'
4 4971 daigle
	*      Authors: Michael Daigle
5 4966 daigle
	*    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 5037 daigle
	<xsl:param name="servletURL"/>
39 4966 daigle
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 5013 daigle
			<div class="col col4">End Time</div>
46
			<div class="col col5">Interval</div>
47 5012 daigle
			<div class="col col6">Action</div>
48 4966 daigle
		</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) &gt; 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 5013 daigle
						<xsl:value-of select='./endTime' />
73 4966 daigle
					</div>
74
					<div class="col col5">
75 5117 daigle
						<xsl:value-of select='./intervalValue' />&#xa0;<xsl:value-of select='./intervalUnit' />
76 5012 daigle
					</div>
77
					<div class="col col6">
78 4966 daigle
						<a>
79
							<xsl:choose>
80
							<xsl:when test="./status = 'scheduled'">
81
								<xsl:attribute name="class">underlined</xsl:attribute>
82 5080 daigle
								<xsl:attribute name="href"><xsl:value-of select='$servletURL' />?action=unscheduleWorkflow&amp;workflowjobname=<xsl:value-of select='./name' />&amp;workflowname=<xsl:value-of select='./jobParam[@name=&apos;workflowname&apos;]/value' />&amp;workflowid=<xsl:value-of select='./jobParam[@name=&apos;workflowid&apos;]/value' />&amp;karid=<xsl:value-of select='./jobParam[@name=&apos;karid&apos;]/value' />&amp;qformat=<xsl:value-of select='$qformat' />&amp;forwardto=scheduleWorkflowRun.jsp</xsl:attribute>
83 4966 daigle
								Unschedule
84
							</xsl:when>
85
							<xsl:otherwise>
86
								<xsl:attribute name="class">underlined</xsl:attribute>
87 5080 daigle
								<xsl:attribute name="href"><xsl:value-of select='$servletURL' />?action=rescheduleWorkflow&amp;workflowjobname=<xsl:value-of select='./name' />&amp;workflowname=<xsl:value-of select='./jobParam[@name=&apos;workflowname&apos;]/value' />&amp;workflowid=<xsl:value-of select='./jobParam[@name=&apos;workflowid&apos;]/value' />&amp;karid=<xsl:value-of select='./jobParam[@name=&apos;karid&apos;]/value' />&amp;qformat=<xsl:value-of select='$qformat' />&amp;forwardto=scheduleWorkflowRun.jsp</xsl:attribute>
88 4966 daigle
								Reschedule
89
							</xsl:otherwise>
90
							</xsl:choose>
91 5013 daigle
						</a>|
92
						<xsl:choose>
93
						<xsl:when test="./status = 'unscheduled'">
94
							<a>
95
								<xsl:attribute name="class">underlined</xsl:attribute>
96 5117 daigle
								<xsl:attribute name="href"><xsl:value-of select='$servletURL' />?action=deleteScheduledWorkflow&amp;workflowjobname=<xsl:value-of select='./name' />&amp;workflowname=<xsl:value-of select='./jobParam[@name=&apos;workflowname&apos;]/value' />&amp;workflowid=<xsl:value-of select='./jobParam[@name=&apos;workflowid&apos;]/value' />&amp;karid=<xsl:value-of select='./jobParam[@name=&apos;karid&apos;]/value' />&amp;qformat=<xsl:value-of select='$qformat' />&amp;forwardto=scheduleWorkflowRun.jsp</xsl:attribute>
97 5013 daigle
								Delete
98
							</a>
99
						</xsl:when>
100
						<xsl:otherwise>
101
							Delete
102
						</xsl:otherwise>
103
						</xsl:choose>
104 4966 daigle
					</div>
105
				</div>
106
			</xsl:for-each>
107
		</xsl:if>
108
	</xsl:template>
109
110
</xsl:stylesheet>