example1.html 8.5 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
109
110
111
112
113
114
115
116
117
				<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">
		    		<button id="refresh_workflow" class="btn"><i class="icon-refresh"></i> Refresh</button>
		    		<button id="rerun_workflow" class="btn btn-primary"><i class="icon-cog icon-white"></i> ReRun</button>
		    	</div>
		    </div>
		</div> <!-- /container -->

		<!-- Footer -->
    	<footer class="footer">
      		<div class="container">
118
        		<p>Copyright © 2014, INRA | Designed by GenoToul Bioinfo and Sigenae teams.</p>
119
120
121
122
123
124
125
126
127
128
129
130
131
        		<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
132
		<script type="text/javascript" src="js/jquery.min.js"></script>
Jerome Mariette's avatar
Jerome Mariette committed
133
134
		<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
135
136
		<script src="js/bootstrap.min.js"></script>
		<script src="js/prettify.js"></script>
137
	    
Jerome Mariette's avatar
Jerome Mariette committed
138
139
140
141
142
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>
		<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-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>
145
146
147
148
149
150
151
152
153
154
		
		<script type='text/javascript'>
			
			$(document).ready(function(){
				
				/**
				 * Use the plugins
				 */
				$("#available-workflows-list").availablewf();
				
155
				$("#available-workflows-list").on('select.available', function(event, workflow) {
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
				    $('#setAndRunModalLabel').html(workflow["name"] + " <small>" + workflow["help"] + "</small>");
				    $('#setAndRunModalBody').wfform({
						workflowClass: workflow["class"],
						displayRunButton: false,
						displayResetButton: false
				    });
					$('#setAndRunModal').modal();
				});
				
				$('#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');
			    });
				
				$("#refresh_workflow").click(function(){ $('#statusModalBody').wfstatus('reload'); });
			    $("#reset_workflow").click(function(){ $('#setAndRunModalBody').wfform('reset'); });
			    $("#run_workflow").click(function(){ $('#setAndRunModalBody').wfform('run'); });
				
			    $("#active-workflows-list").activewf();
181
				$("#active-workflows-list").on("select.active", function(event, workflow) {
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
					$('#statusModalLabel').html(workflow["name"] + " <small>" + workflow["id"] + "</small>");
				    $('#statusModalBody').wfstatus({
						workflowID: workflow["id"]
				    });
					$('#statusModal').modal();
				});
				
				/**
				 * 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>