example1.html 10.4 KB
Newer Older
1
2
3
4
5
6
7
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
    	<title>Jflow</title>

		<!-- Le styles -->
Jerome Mariette's avatar
Jerome Mariette committed
8
		<link href="css/bootstrap.css" rel="stylesheet">
9
10
11
12
13
14
		<style type="text/css">
		body {
			padding-top: 60px;
			padding-bottom: 40px;
		}
		</style>
Jerome Mariette's avatar
Jerome Mariette committed
15
		<link href="css/ladda-themeless.min.css" rel="stylesheet">
Jerome Mariette's avatar
Jerome Mariette committed
16
		<link href="css/bootstrap-responsive.css" rel="stylesheet">
Jerome Mariette's avatar
Jerome Mariette committed
17
18
		<link href="../src/js/datepicker.css" rel="stylesheet">
		<link href="../src/js/jflow.css" rel="stylesheet">
19
20
    	<link rel="shortcut icon" href="../assets/ico/favicon.png">
    	   	
Jerome Mariette's avatar
Jerome Mariette committed
21
22
    	<link href="css/docs.css" rel="stylesheet">
    	<link href="css/prettify.css" rel="stylesheet">
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
	</head>

	<body>
    
		<div class="navbar navbar-inverse navbar-fixed-top">
			<div class="navbar-inner">
				<div class="container">
					<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>
					<a class="brand" href="#">Jflow</a>
					<div class="nav-collapse collapse">
						<ul class="nav">
							<li><a href="./index.html">About</a></li>
Jerome Mariette's avatar
Jerome Mariette committed
39
							<li><a href="./jflow-install.html">Install</a></li>
40
41
42
43
44
45
46
47
48
49
50
51
							<li class="dropdown">
								<a class="dropdown-toggle" data-toggle="dropdown" href="#">
									Core
									<b class="caret"></b>
								</a>
								<ul class="dropdown-menu">
									<li> <a href="./jflow-core.html">Jflow overview</a> </li>
									<li> <a href="./jflow-core-component.html">Adding component</a> </li>
									<li> <a href="./jflow-core-workflow.html">Adding workflow</a> </li>
								</ul>
							</li>
							<li><a href="./jflow-plugin.html">JS Plugin</a></li>
Philippe Bardou's avatar
Philippe Bardou committed
52
53
							<li class="active"><a href="./example1.html">Example 1</a></li>
							<li><a href="./example2.html">Example 2</a></li>
54
55
56
57
58
59
60
61
62
63
64
							<li><a target="_blank" href="https://mulcyber.toulouse.inra.fr/plugins/mediawiki/wiki/jflow/index.php/Accueil">Sources</a></li>
							<li><a href="mailto:support.genopole@toulouse.inra.fr">Contact</a></li>
						</ul>
					</div><!--/.nav-collapse -->
				</div>
			</div>
		</div>

		<!-- Subhead ================================================== -->
		<header class="jumbotron subhead" id="overview">
  			<div class="container">
65
				<h1>Hello jflow!</h1>
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
				<p class="lead">
					This is a template for a simple workflow manager website. Use it as a starting point to create something more unique.
				</p>
  			</div>
		</header>

		<div class="container">		
			<div class="row">
		      	<div class="span6">
		      		<div class="page-header">
		      			<h1>Available workflows <small>to run</small></h1>
		      		</div>
		      		<div id="available-workflows-list"></div>
		      	</div>
		      	<div  class="span6">
		      		<div class="page-header">
		      			<h1>Actives workflows <small>to monitor</small></h1>
		      		</div>
		      		<div id="active-workflows-list"></div>
		      	</div>
			</div>
     
		    <!-- setAndRunModal -->
		    <div id="setAndRunModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="setAndRunModalLabel" aria-hidden="true">
		    	<div class="modal-header">
		    		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
		    		<h3 id="setAndRunModalLabel"></h3>
		    	</div>
		    	<div id="setAndRunModalBody" class="modal-body"></div>
		    	<div class="modal-footer">
		    		<button id="reset_workflow" class="btn"><i class="icon-refresh"></i> Reset</button>
		    		<button id="run_workflow" class="btn btn-primary"><i class="icon-cog icon-white"></i> Run</button>
		    	</div>
		    </div>
			
		    <!-- statusModal -->
		    <div id="statusModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="statusModalLabel" aria-hidden="true">
		    	<div class="modal-header">
		    		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
		    		<h3 id="statusModalLabel"></h3>
		    	</div>
		    	<div id="statusModalBody" class="modal-body"></div>
		    	<div class="modal-footer">
Philippe Bardou's avatar
Philippe Bardou committed
109
110
		    		<div class="btn-group">
		    			<button id="refresh_workflow" class="btn status-panel"><i class="icon-refresh"></i> Refresh</button>
Jerome Mariette's avatar
Jerome Mariette committed
111
		    			<button id="reset_component" class="btn status-panel"><i class="icon-remove"></i> Reset</button>
Philippe Bardou's avatar
Philippe Bardou committed
112
113
114
115
		    			<button id="rerun_workflow" class="btn status-panel"><i class="icon-cog"></i> ReRun</button>
		    		</div>
		    		<button id="output_workflow" class="btn btn-success status-panel"><i class="icon-chevron-right icon-white"></i> Output</button>
		    		<button id="back_workflow" class="btn" style="display:none"><i class="icon-chevron-left"></i> Back</button>
116
117
118
119
120
121
122
		    	</div>
		    </div>
		</div> <!-- /container -->

		<!-- Footer -->
    	<footer class="footer">
      		<div class="container">
123
        		<p>Copyright © 2014, INRA | Designed by GenoToul Bioinfo and Sigenae teams.</p>
124
125
126
127
128
129
130
131
132
133
134
135
136
        		<ul class="footer-links">
          			<li><a href="http://bioinfo.genotoul.fr/" target="_blank">GenoToul Bioinfo platform</a></li>
          			<li class="muted">&middot;</li>
          			<li><a href="http://www.sigenae.org/" target="_blank">Sigenae platform</a></li>
          			<li class="muted">&middot;</li>
          			<li><a href="http://www.international.inra.fr/" target="_blank">INRA</a></li>
        		</ul>
      		</div>
    	</footer>

		<!-- Le javascript
		================================================== -->
		<!-- Placed at the end of the document so the pages load faster -->
Philippe Bardou's avatar
Philippe Bardou committed
137
		<script type="text/javascript" src="js/jquery.min.js"></script>
Jerome Mariette's avatar
Jerome Mariette committed
138
139
		<script src="js/spin.min.js" type="text/javascript"></script>
		<script src="js/ladda.min.js" type="text/javascript"></script>
Philippe Bardou's avatar
Philippe Bardou committed
140
141
		<script src="js/bootstrap.min.js"></script>
		<script src="js/prettify.js"></script>
142
	    
Jerome Mariette's avatar
Jerome Mariette committed
143
144
		<script src='../src/js/jquery.tmpl.min.js' type='text/javascript'></script>
		<script src='../src/js/jquery.validate.js' type='text/javascript'></script>
Jerome Mariette's avatar
Jerome Mariette committed
145
146
147
148
149
		<script src="../src/js/jquery.ui.widget.js"></script>
		<script src="../src/js/jquery.iframe-transport.js"></script>
		<script src="../src/js/jquery.fileupload.js"></script>
		<script src="../src/js/jquery.fileupload-process.js"></script>
		<script src="../src/js/jquery.fileupload-validate.js"></script>
Philippe Bardou's avatar
Philippe Bardou committed
150
		<script src='../src/js/cytoscape.js' type='text/javascript'></script>
Jerome Mariette's avatar
Jerome Mariette committed
151
		
Jerome Mariette's avatar
Jerome Mariette committed
152
153
		<script src='../src/js/jflow-activewf.js' type='text/javascript'></script>
		<script src='../src/js/jflow-availablewf.js' type='text/javascript'></script>
Philippe Bardou's avatar
Philippe Bardou committed
154
		<script src='../src/js/jflow-wfoutputs.js' type='text/javascript'></script>
Jerome Mariette's avatar
Jerome Mariette committed
155
156
157
		<script src='../src/js/jflow-wfform.js' type='text/javascript'></script>
		<script src='../src/js/jflow-wfstatus.js' type='text/javascript'></script>
		<script src="../src/js/bootstrap-datepicker.js"></script>
158
159
160
161
162
163
164
165
166
167
		
		<script type='text/javascript'>
			
			$(document).ready(function(){
				
				/**
				 * Use the plugins
				 */
				$("#available-workflows-list").availablewf();
				
168
				$("#available-workflows-list").on('select.available', function(event, workflow) {
169
170
					$('#setAndRunModal .modal-footer').show();
					$('#setAndRunModalLabel').html(workflow["name"] + " <small>" + workflow["help"] + "</small>");
171
172
173
174
175
176
177
178
				    $('#setAndRunModalBody').wfform({
						workflowClass: workflow["class"],
						displayRunButton: false,
						displayResetButton: false
				    });
					$('#setAndRunModal').modal();
				});
				
179
180
181
182
				$('#setAndRunModalBody').on('uploading', function(event, running_wf) {
					$('#setAndRunModal .modal-footer').hide();
				});
				
183
184
185
186
187
188
189
190
191
192
				$('#setAndRunModalBody').on('run', function(event, running_wf) {
					$('#setAndRunModal').modal('hide');
				    $('#statusModalLabel').html(running_wf["name"] + " <small>" + running_wf["id"] + "</small>");
				    $('#statusModalBody').wfstatus({
				    	workflowID: running_wf.id,
				    	forceUsingWorkflow: running_wf
				    });
					$('#statusModal').modal();
					$("#active-workflows-list").activewf('reload');
			    });
Philippe Bardou's avatar
Philippe Bardou committed
193
			    
194
				$("#refresh_workflow").click(function(){ $('#statusModalBody').wfstatus('reload'); });
Jerome Mariette's avatar
Jerome Mariette committed
195
				$("#rerun_workflow").click(function(){ $('#statusModalBody').wfstatus('rerun'); });
Jerome Mariette's avatar
Jerome Mariette committed
196
				$("#reset_component").click(function(){ $('#statusModalBody').wfstatus('reset'); });
197
			    $("#reset_workflow").click(function(){ $('#setAndRunModalBody').wfform('reset'); });
Philippe Bardou's avatar
Philippe Bardou committed
198
199
200
201
202
   				$("#back_workflow").click(function(){
   					$('#statusModalBody').wfstatus('reload');
					$('#back_workflow').hide();
					$('.status-panel').show();
   				});
203
204
205
206
			    $("#run_workflow").click(function(){
			    	$('#setAndRunModalBody').wfform('run');
			    	$('#back_workflow').hide();
					$('.status-panel').show();
207
208
209
210
211
212
213
214
			    });				
			    function outputWFHandler(event) {
					$('#statusModalBody').wfoutputs({
						workflowID: event.data.workflow_id
					})
					$('#back_workflow').show();
					$('.status-panel').hide();
			    }
215
			    $("#active-workflows-list").activewf();
216
				$("#active-workflows-list").on("select.active", function(event, workflow) {
217
218
					$('#statusModalLabel').html(workflow["name"] + " <small>" + workflow["id"] + "</small>");
				    $('#statusModalBody').wfstatus({
219
						workflowID: workflow.id
220
221
				    });
					$('#statusModal').modal();
Philippe Bardou's avatar
Philippe Bardou committed
222
223
					$('#back_workflow').hide();
					$('.status-panel').show();
224
225
					$("#output_workflow").unbind('click', outputWFHandler);
					$("#output_workflow").bind('click', {"workflow_id": workflow.id}, outputWFHandler);
226
				});
Philippe Bardou's avatar
Philippe Bardou committed
227
							    
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
				/**
				 * Use services
				 */
				$.ajax({
				    url: 'http://localhost:8080/get_available_workflows?callback=?',
				    dataType: "json",
				    success: function(data) {
				    	var workflow_by_class = {};
				    	$("#dropdown-workflows").append('<li class="nav-header">to run ...</li>');
				    	for (var i in data) {
				    		$("#dropdown-workflows").append('<li><a id="availablewf_btn_'+data[i]["class"]+'" href="#">' + data[i]["name"] + '</a></li>');
				    	}
				    	$("#dropdown-workflows").append('<li class="divider"></li>');
				    	$("#dropdown-workflows").append('<li class="nav-header">to monitor ...</li>');
						/*$.ajax({
						    url: 'http://localhost:8080/get_workflows_status?callback=?',
						    dataType: "json",
						    success: function(data) {
						    	for (var i in data) { 
						    		$("#dropdown-workflows").append('<li><a id="activeewf_btn_'+data[i]["id"]+'" href="#">' + data[i]["id"] + '</a></li>');
						    	}
						    }
				    	});*/
				    }
				
		    	});
				 
			}); 

		</script>

	</body>
</html>