Project

General

Profile

1
<%@ page language="java" %>
2
<%@ page import="java.util.TimeZone" %>
3
<%@ page import="edu.ucsb.nceas.metacat.accesscontrol.AccessControlInterface" %>
4
<%@ page import="edu.ucsb.nceas.metacat.PermissionController" %>
5
<%@ page import="edu.ucsb.nceas.utilities.LSIDUtil" %>
6
<%
7
/*
8
*  '$RCSfile$'
9
*    Copyright: 2009 Regents of the University of California and the
10
*               National Center for Ecological Analysis and Synthesis
11
*
12
*   '$Author: daigle $'
13
*     '$Date: 2008-07-06 21:25:34 -0700 (Sun, 06 Jul 2008) $'
14
* '$Revision: 4080 $'
15
*
16
* This program is free software; you can redistribute it and/or modify
17
* it under the terms of the GNU General Public License as published by
18
* the Free Software Foundation; either version 2 of the License, or
19
* (at your option) any later version.
20
*
21
* This program is distributed in the hope that it will be useful,
22
* but WITHOUT ANY WARRANTY; without even the implied warranty of
23
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
24
* GNU General Public License for more details.
25
*
26
* You should have received a copy of the GNU General Public License
27
* along with this program; if not, write to the Free Software
28
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
29
*/
30

    
31
String karLsid = request.getParameter("karid");
32
String karId = LSIDUtil.getDocId(karLsid, false);
33
PermissionController permissionController = new PermissionController(karId);
34
boolean hasSchedulePermissions = 
35
	permissionController.hasPermission(request.getSession().getId(), AccessControlInterface.READSTRING);
36

    
37
%>
38
<%@ include file="settings.jsp"%>
39

    
40
<html>
41
    <head>
42
        <title>Sanparks TPC Report Search</title>
43
        <link rel="stylesheet" type="text/css" href="<%=STYLE_SKINS_URL%>/sanparks/sanparks.css"/>
44
        <link rel="stylesheet" type="text/css" href="<%=STYLE_SKINS_URL%>/sanparks/sanparks-tpc.css"/>
45
        <link rel="stylesheet" type="text/css" href="<%=STYLE_SKINS_URL%>/sanparks/sanparks-scheduled-jobs.css"/>
46
        <link rel="stylesheet" type="text/css" href="<%=STYLE_SKINS_URL%>/sanparks/header2.css"/>
47
        <link rel="stylesheet" type="text/css" href="<%=STYLE_SKINS_URL%>/sanparks/left-nav2.css"/>
48
        <link rel="stylesheet" type="text/css" href="<%=STYLE_SKINS_URL%>/sanparks/footer2.css"/>
49
        <script language="JavaScript" type="text/JavaScript" src="<%=STYLE_SKINS_URL%>/sanparks/sanparks.js"></script>
50
        <script language="JavaScript" type="text/JavaScript" src="<%=STYLE_COMMON_URL%>/style/skins/sanparks/searchWorkflowPathQuery.js"></script>
51
        <script language="JavaScript" type="text/JavaScript" src="<%=STYLE_COMMON_URL%>/branding.js"></script>
52
        <script language="JavaScript" type="text/JavaScript" src="<%=STYLE_COMMON_URL%>/widgets/form-fields-widget.js"></script>
53
        <script language="JavaScript" type="text/JavaScript" src="<%=STYLE_COMMON_URL%>/prototype-1.5.1.1/prototype.js"></script>
54
        <script language="JavaScript" type="text/JavaScript" src="<%=STYLE_COMMON_URL%>/ajax-utils.js"></script>
55
        <script language="JavaScript" type="text/JavaScript" src="<%=STYLE_COMMON_URL%>/scheduleWorkflow.js"></script>
56
    </head>
57
    <body onload="getWorkflowRunSection('<%=SERVLET_URL%>','<%=request.getParameter("workflowid")%>','<%=request.getParameter("workflowname")%>','workflow-run-content')">
58
		<table class="page-section" cellpadding="0" cellspacing="0" border="0">
59
        	<tr>
60
        		<td>
61
        			<jsp:include page="header2.jsp"/>
62
        		</td>
63
        	</tr>
64
			<tr>
65
				<td>
66
        			<table class="center-content-section" cellpadding="0" cellspacing="0" border="0">
67
        				<tr>
68
        					<td class="left-nav-section">
69
        						<!-- Main content -->
70
								<jsp:include page="left-nav2.jsp"/>
71
 							</td>
72
           
73
    						<td class="schedule-section">  
74
    	    					<div class="content-subsection" id="workflow-summary-section"> 
75
<%
76
    	    						if (! hasSchedulePermissions) {
77
%>
78
									<div class="warning-header">You have view permissions only for this workflow</div>
79
<%
80
    	    						} 
81
%>		
82
									<div class="content-subsection-header">Workflow Summary</div> 
83
    								<div class="form-input-row" id="form-base-row">
84
    									<div class="summary-field" id='workflow-name-label' >Name: </div>  
85
<%
86
										if (request.getParameter("workflowname") != null) {
87
%>
88
										<div class="summary-value" id='workflow-name-value' ><%=request.getParameter("workflowname")%></div>
89
<%
90
										}
91
%>	  
92
										<br>
93
										<div class="summary-field" id='workflow-lsid-label' >LSID: </div>  
94
<%
95
										if (request.getParameter("workflowid") != null) {
96
%>
97
										<div class="summary-value" id='workflow-lsid-value' ><%=request.getParameter("workflowid")%></div>
98
<%
99
    	    								if (hasSchedulePermissions) {
100
%>
101
											(<jsp:text><![CDATA[<a href=./workflowAccess.jsp?workflowid=]]></jsp:text><jsp:expression>request.getParameter("workflowid")</jsp:expression><jsp:text><![CDATA[&workflowname=]]></jsp:text><jsp:expression>request.getParameter("workflowname")</jsp:expression><jsp:text><![CDATA[>Change Access Permissions</a>]]></jsp:text>)						
102
<%
103
    	    								}
104
										}
105
%>	  
106
									</div>
107
								</div>
108
								<div class="content-subsection" id="schedule-section">   
109
    								<div class="content-subsection-header">Schedule Workflow </div> 
110
        							<form action="<%=SERVLET_URL%>" name="workflowScheduler" id="workflowScheduler">
111
										<input name="qformat" value="sanparks" type="hidden" />
112
										<input name="action" value="scheduleWorkflow" type="hidden" />  
113
										<input name="forwardto" value="scheduleWorkflowRun.jsp" type="hidden" /> 
114
<%
115
										if (request.getParameter("workflowid") != null) {
116
%>
117
										<input name='workflowid' value='<%=request.getParameter("workflowid")%>' type='hidden' />
118
<%
119
										}
120
										if (request.getParameter("karid") != null) {
121
%>
122
										<input name='karid' value='<%=request.getParameter("karid")%>' type='hidden' />
123
<%
124
										}
125
										if (request.getParameter("workflowname") != null) {
126
%>
127
										<input name='workflowname' value='<%=request.getParameter("workflowname")%>' type='hidden' />
128
<%
129
										}
130
%>	  		 
131
										<div class="form-input-row">
132
											<div class="field-label" id='start-time-label' >Start Time: </div>  
133
											<input class="date-input" name='starttime' id='starttime' /> 
134
											<div class="field-suffix"><%= TimeZone.getDefault().getDisplayName(true, TimeZone.SHORT) %> &nbsp;&nbsp;(mm/dd/yyyy hh:mm:ss)</div>
135
										</div>
136
										<div class="form-input-row">
137
											<div class="field-label" id='start-time-label' >End Time: </div>  
138
											<input class="date-input" name='endtime' id='endtime' /> 
139
											<div class="field-suffix"><%= TimeZone.getDefault().getDisplayName(true, TimeZone.SHORT) %> &nbsp;&nbsp;(mm/dd/yyyy hh:mm:ss)</div>
140
										</div>
141
										<div class="form-input-row">
142
											<div class="field-label" id='interval-label' >Interval: </div>  
143
											<input class="int-input" name='intervalvalue' id='intervalvalue' /> 
144
											<select class="dropdown-input" name='intervalunit'>
145
												<!-- option name="seconds" value="sec">seconds</option -->
146
												<!-- option name="minutes" value="min">minutes</option -->
147
												<option name="hours" value="hour">hours</option>
148
												<option name="days" value="day">days</option>
149
												<option name="weeks" value="week">weeks</option>
150
												<option name="months" value="mon">months</option>
151
											</select>
152
										</div>
153
										<br> <br>     		
154
					        			<input class="submit-button" value="Schedule" type="submit"
155
<%
156
					    	    		if (! hasSchedulePermissions) {
157
%>
158
											disabled="disabled"
159
<%
160
					    	    		}
161
%>      			
162
					        			> 
163
        							</form>
164
								</div>		
165
								<div class="content-subsection" id="workflow-run-section"> 
166
									<div class="content-subsection-header">Workflow Run Schedule</div> 
167
					    			<div class="workflow-run-content" id="workflow-run-content"></div>
168
								</div>
169
        					</td>
170
        				</tr>
171
        				<tr class="footer-content-section">
172
			    			<td colspan="3">     
173
			        			<!-- Footer Content -->
174
			       				<jsp:include page="footer2.jsp" />
175
			     			</td>
176
			    		</tr>
177
        			</table>
178
        		</td>
179
        	</tr>
180
        </table>
181
    </body>
182
</html>
(30-30/38)