example1.html 11.6 KB
Newer Older
1
2
<!DOCTYPE html>
<html lang="en">
Jerome Mariette's avatar
Jerome Mariette committed
3
4
5
6
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
7

Jerome Mariette's avatar
Jerome Mariette committed
8
    <title>Jflow</title>
9

Jerome Mariette's avatar
Jerome Mariette committed
10
11
12
13
14
15
16
    <!-- Bootstrap core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <!-- Bootstrap theme -->
    <link href="css/bootstrap-theme.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="css/theme.css" rel="stylesheet">
Jerome Mariette's avatar
Jerome Mariette committed
17
	
Jerome Mariette's avatar
Jerome Mariette committed
18
	<!-- jflow css -->
Jerome Mariette's avatar
Jerome Mariette committed
19
20
21
	<link href="../src/css/handsontable.full.min.css" rel="stylesheet">
	<link href="../src/css/cytoscape.js-panzoom.css" rel="stylesheet" type="text/css">
	<link href="../src/css/font-awesome.css" rel="stylesheet" type="text/css">
Jerome Mariette's avatar
Jerome Mariette committed
22
23
	<link href="../src/css/datepicker.css" rel="stylesheet">
	<link href="../src/css/jflow.css" rel="stylesheet">
24

Jerome Mariette's avatar
Jerome Mariette committed
25
26
27
28
29
30
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
31

Jerome Mariette's avatar
Jerome Mariette committed
32
  <body role="document">
33

Philippe Bardou's avatar
Philippe Bardou committed
34
    <!-- Fixed navbar -->
Jerome Mariette's avatar
Jerome Mariette committed
35
36
37
38
39
40
41
42
43
    <div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
Philippe Bardou's avatar
Philippe Bardou committed
44
          <a class="navbar-brand" href="./index.html">Jflow</a>
Jerome Mariette's avatar
Jerome Mariette committed
45
46
47
48
49
        </div>
        <div class="navbar-collapse collapse">
          <ul class="nav navbar-nav">
            <li><a href="./index.html">About</a></li>
            <li><a href="./jflow-install.html">Install</a></li>
Philippe Bardou's avatar
Philippe Bardou committed
50
            <li><a href="./jflow-quickstart.html">Quick start</a></li>
Jerome Mariette's avatar
Jerome Mariette committed
51
            <li class="dropdown">
Philippe Bardou's avatar
Philippe Bardou committed
52
              <a href="#" class="dropdown-toggle" data-toggle="dropdown">Documentation<span class="caret"></span></a>
Jerome Mariette's avatar
Jerome Mariette committed
53
              <ul class="dropdown-menu" role="menu">
Philippe Bardou's avatar
Philippe Bardou committed
54
                <li><a href="./jflow-core.html">Architecture</a></li>
Jerome Mariette's avatar
Jerome Mariette committed
55
                <li><a href="./jflow-core-workflow.html">Adding workflow</a></li>
Philippe Bardou's avatar
Philippe Bardou committed
56
57
                <li><a href="./jflow-core-component.html">Adding component</a></li>
                <li><a href="./jflow-plugin.html">Plugin insertion</a></li>
Philippe Bardou's avatar
Philippe Bardou committed
58
59
                <li><a href="./jflow-type.html">Adding data type</a></li>
                <li><a href="./jflow-format.html">Adding file format</a></li>
Jerome Mariette's avatar
Jerome Mariette committed
60
61
              </ul>
            </li>
Jerome Mariette's avatar
Jerome Mariette committed
62
			<li class="active"><a href="./example1.html">Example</a></li>
Jerome Mariette's avatar
Jerome Mariette committed
63
64
65
66
67
68
			<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>
Philippe Bardou's avatar
Philippe Bardou committed
69
 
Jerome Mariette's avatar
Jerome Mariette committed
70
    <div class="container theme-showcase" role="main">
Jerome Mariette's avatar
Jerome Mariette committed
71

Jerome Mariette's avatar
Jerome Mariette committed
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
      <!-- Jumbotron -->
      <div class="jumbotron">
        <h1>Hello Jflow!</h1>
        <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>
    
		<div class="row">
	      	<div class="col-lg-6">
	      		<div class="page-header">
	      			<h1>Available workflows <small>to run</small></h1>
	      		</div>
	      		<div id="available-workflows-list"></div>
	      	</div>
	      	<div class="col-lg-6">
	      		<div class="page-header">
	      			<h1>Actives workflows <small>to monitor</small></h1>
	      		</div>
	      		<div id="active-workflows-list"></div>
	      	</div>
		</div>
		
Jerome Mariette's avatar
Jerome Mariette committed
94
		
Jerome Mariette's avatar
Jerome Mariette committed
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
		<!-- setAndRunModal -->
		<div id="setAndRunModal" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="setAndRunModalLabel" aria-hidden="true">
			<div class="modal-dialog modal-lg">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
						<h3 class="modal-title" id="setAndRunModalLabel"> </h3>
					</div>
					<div id="setAndRunModalBody" class="modal-body"> </div>
					<div class="modal-footer">
						<div class="btn-group">
							<button id="reset_workflow" type="button" class="btn btn-default"><span class="glyphicon glyphicon-refresh"></span> Reset</button>
							<button id="run_workflow" type="button" class="btn btn-primary"><span class="glyphicon glyphicon-cog"></span> Run</button>
						</div>
					</div>
				</div>
			</div>
		</div>
113
		
Jerome Mariette's avatar
Jerome Mariette committed
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
		<!-- statusModal -->
		<div id="statusModal" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="statusModalLabel" aria-hidden="true">
			<div class="modal-dialog modal-lg">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
						<h3 class="modal-title" id="statusModalLabel"> </h3>
					</div>
					<div id="statusModalBody" class="modal-body"> </div>
					<div class="modal-footer">
			    		<div class="btn-group">
			    			<button id="refresh_workflow" class="btn btn-default status-panel"><span class="glyphicon glyphicon-refresh"></span> Refresh</button>
			    			<button id="rerun_workflow" class="btn btn-primary status-panel"><span class="glyphicon glyphicon-cog"></span> ReRun</button>
			    		</div>
						<button id="output_workflow" type="button" class="btn btn-success status-panel"><span class="glyphicon glyphicon-chevron-right"></span> Output</button>
						<button id="back_workflow" type="button" class="btn btn-default" style="display:none"><span class="glyphicon glyphicon-chevron-left"></span> Back</button>
					</div>
				</div>
			</div>
		</div>
	   
      <hr>
      <footer>
      	<div class="container" style="text-align: center;">
Philippe Bardou's avatar
Philippe Bardou committed
138
		  <p>Copyright © 2015, INRA | Designed by <a target="_blank" href="http://bioinfo.genotoul.fr/">GenoToul Bioinfo platform</a> and <a target="_blank" href="http://www.sigenae.org/">Sigenae platform</a>.</p>
Jerome Mariette's avatar
Jerome Mariette committed
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
		</div>
      </footer>
	    
	</div> <!-- /container -->

    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    
    <script src='../src/js/jquery.tmpl.min.js' type='text/javascript'></script>
	<script src='../src/js/jquery.validate.js' type='text/javascript'></script>
	<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>
157
	<script src="../src/js/ZeroClipboard.min.js"></script>
Philippe Bardou's avatar
Philippe Bardou committed
158
	<script src='../src/js/cytoscape-2.3.7.js' type='text/javascript'></script>	
Philippe Bardou's avatar
Philippe Bardou committed
159
	<script src='../src/js/cytoscape.js-panzoom.js' type='text/javascript'></script>
Philippe Bardou's avatar
Philippe Bardou committed
160
161
	<script src='../src/js/dagre.js' type='text/javascript'></script>
	
Jerome Mariette's avatar
Jerome Mariette committed
162
	<script src='../src/js/handsontable.full.min.js' type='text/javascript'></script>
Jerome Mariette's avatar
Jerome Mariette committed
163
164
165
166
167
168
169
170
171
172
173
	
	<script src='../src/js/jflow-activewf.js' type='text/javascript'></script>
	<script src='../src/js/jflow-availablewf.js' type='text/javascript'></script>
	<script src='../src/js/jflow-wfoutputs.js' type='text/javascript'></script>
	<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>
    
	<script type='text/javascript'>
		
		$(document).ready(function(){
Jerome Mariette's avatar
Jerome Mariette committed
174

Jerome Mariette's avatar
Jerome Mariette committed
175
176
177
178
179
			/**
			 * Use the plugins
			 */
			$("#available-workflows-list").availablewf();
			
Jerome Mariette's avatar
Jerome Mariette committed
180
			$("#available-workflows-list").on('select.availablewf', function(event, workflow) {
Jerome Mariette's avatar
Jerome Mariette committed
181
182
183
184
185
186
187
188
189
				$('#setAndRunModal .modal-footer').show();
				$('#setAndRunModalLabel').html(workflow["name"] + " <small>" + workflow["help"] + "</small>");
			    $('#setAndRunModalBody').wfform({
					workflowClass: workflow["class"],
					displayRunButton: false,
					displayResetButton: false
			    });
				$('#setAndRunModal').modal();
			});
190
			
Jerome Mariette's avatar
Jerome Mariette committed
191
			$('#setAndRunModalBody').on('uploading.wfform', function(event, running_wf) {
Jerome Mariette's avatar
Jerome Mariette committed
192
193
194
				$('#setAndRunModal .modal-footer').hide();
			});
			
Jerome Mariette's avatar
Jerome Mariette committed
195
			$('#setAndRunModalBody').on('run.wfform', function(event, running_wf) {
Jerome Mariette's avatar
Jerome Mariette committed
196
197
198
199
200
201
202
203
				$('#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');
Jerome Mariette's avatar
Jerome Mariette committed
204
205
				$("#output_workflow").unbind('click', outputWFHandler);
				$("#output_workflow").bind('click', {"workflow_id": running_wf.id}, outputWFHandler);
Jerome Mariette's avatar
Jerome Mariette committed
206
207
		    });
		    
Jerome Mariette's avatar
Jerome Mariette committed
208
209
210
211
			$("#refresh_workflow").click(function(){
				$('#statusModalBody').wfstatus('reload');
				$("#active-workflows-list").activewf('reload');
			});
Jerome Mariette's avatar
Jerome Mariette committed
212
213
			$("#rerun_workflow").click(function(){ $('#statusModalBody').wfstatus('rerun'); });
		    $("#reset_workflow").click(function(){ $('#setAndRunModalBody').wfform('reset'); });
Jerome Mariette's avatar
Jerome Mariette committed
214
215
216
217
218
		    $('#setAndRunModal').on('shown.bs.modal', function() {
		    	$('#setAndRunModalBody').wfform('render');
		    });
  			$("#back_workflow").click(function(){
  				$('#statusModalBody').wfstatus('reload');
Jerome Mariette's avatar
Jerome Mariette committed
219
220
				$('#back_workflow').hide();
				$('.status-panel').show();
Jerome Mariette's avatar
Jerome Mariette committed
221
  			});
Jerome Mariette's avatar
Jerome Mariette committed
222
223
224
225
226
227
228
229
230
231
232
233
234
		    $("#run_workflow").click(function(){
		    	$('#setAndRunModalBody').wfform('run');
		    	$('#back_workflow').hide();
				$('.status-panel').show();
		    });				
		    function outputWFHandler(event) {
				$('#statusModalBody').wfoutputs({
					workflowID: event.data.workflow_id
				})
				$('#back_workflow').show();
				$('.status-panel').hide();
		    }
		    $("#active-workflows-list").activewf();
Jerome Mariette's avatar
Jerome Mariette committed
235
			$("#active-workflows-list").on("select.activewf", function(event, workflow) {
Jerome Mariette's avatar
Jerome Mariette committed
236
237
238
				$('#statusModalLabel').html(workflow["name"] + " <small>" + workflow["id"] + "</small>");
			    $('#statusModalBody').wfstatus({
					workflowID: workflow.id
239
			    });
Jerome Mariette's avatar
Jerome Mariette committed
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
				$('#statusModal').modal();
				$('#back_workflow').hide();
				$('.status-panel').show();
				$("#output_workflow").unbind('click', outputWFHandler);
				$("#output_workflow").bind('click', {"workflow_id": workflow.id}, outputWFHandler);
			});
						    
			/**
			 * 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>');
					    	}
					    }
			    	});*/
270
			    }
Jerome Mariette's avatar
Jerome Mariette committed
271
272
273
274
			
	    	});
			 
		}); 
275

Jerome Mariette's avatar
Jerome Mariette committed
276
	</script>
277
278
279

	</body>
</html>