Revision 4971
Added by daigle almost 15 years ago
scheduleWorkflow.js | ||
---|---|---|
1 |
/* |
|
2 |
*/ |
|
3 |
|
|
1 |
/* |
|
2 |
* '$RCSfile$' |
|
3 |
* Purpose: Basic funtions to support showing the schedule workflows |
|
4 |
* pages |
|
5 |
* Copyright: 2009 Regents of the University of California and the |
|
6 |
* National Center for Ecological Analysis and Synthesis |
|
7 |
* Authors: Michael Daigle |
|
8 |
* |
|
9 |
* '$Author: leinfelder $' |
|
10 |
* '$Date: 2008-06-17 13:16:32 -0700 (Tue, 17 Jun 2008) $' |
|
11 |
* '$Revision: 4006 $' |
|
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 |
|
|
28 |
/* puts together the url to get the workflow section of a page given the workflow |
|
29 |
* id. |
|
30 |
* Params: |
|
31 |
* url - metacat url to hit |
|
32 |
* workflowId - get all runs for this id |
|
33 |
* workflowName - used for display purposes. |
|
34 |
* divId - the name of the div where the results should be put |
|
35 |
*/ |
|
4 | 36 |
function getWorkflowRunSection(url, workflowId, workflowName, divId) { |
5 | 37 |
var requestUrl = url + '?action=getScheduledWorkflow&workflowid=' + workflowId + '&qformat=sanparks&workflowname=' + workflowName; |
6 | 38 |
var submitResults = submitUrlIntoDiv(requestUrl, divId); |
7 | 39 |
} |
8 | 40 |
|
9 |
function showSchedulePage(workflowId, schedulePage, qformat) { |
|
10 |
url = document.URL + '/../' + workflowRunPage + '?workflowid=' + workflowId + '?qformat=' + qformat; |
|
11 |
//alert('new url: ' + url); |
|
12 |
window.location = url; |
|
13 |
} |
|
14 |
|
|
15 |
function scheduleWorkflowRun(url, workflowId, startTime, interval, karId) { |
|
16 |
requestUrl = |
|
17 |
url + '?action=scheduleWorkflow&starttime=' + startTime |
|
18 |
+ '&interval=' + interval + '&jobparam_karId=' + karId; |
|
19 |
//alert('new url: ' + url); |
|
20 |
window.location = url; |
|
21 |
} |
|
22 |
|
|
23 | 41 |
|
Also available in: Unified diff
Beef up comments