index.html 15.8 KB
Newer Older
Janez K's avatar
Janez K committed
1
2
<!DOCTYPE html>
<html>
Janez K's avatar
Janez K committed
3
4
5
6
7
<head>
<title>Workflow editor</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
	@import url({{ STATIC_URL }}css/reset.css);
Janez K's avatar
Janez K committed
8
	@import url({{ STATIC_URL }}css/style.css?v=2);
Janez K's avatar
Janez K committed
9
10
11
12
13
14
15
16
17
18
19
20
21
</style>
<!--[if IE]><script type="text/javascript" src="{{ STATIC_URL }}js/excanvas.js"></script><![endif]-->
<!--[if IE 7]>
<style type="text/css">
	@import url({{ STATIC_URL }}css/style-ie7.css);
</style>
<![endif]-->
<!--[if IE 6]>
<style type="text/css">
	@import url({{ STATIC_URL }}css/style-ie6.css);
</style>
<![endif]-->

Janez K's avatar
Janez K committed
22
<link type="text/css" href="{{ STATIC_URL }}css/ui-lightness/jquery-ui-1.8rc3.custom.css" rel="stylesheet" />
Janez K's avatar
Janez K committed
23
24
25
<link href="{{ STATIC_URL }}css/jquery.contextmenu.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="{{ STATIC_URL }}css/jquery.treeview.css" />
<link href="{{ STATIC_URL }}css/fileuploader.css" rel="stylesheet" type="text/css" />
Janez K's avatar
Janez K committed
26
<link type="text/css" href="http://onehackoranother.com/projects/jquery/tipsy/stylesheets/tipsy.css" rel="stylesheet" />
Janez K's avatar
Janez K committed
27
28
29
30
31
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-ui-1.8rc3.custom.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery.cookie.js"></script>
<script src="{{ STATIC_URL }}js/jquery.treeview.js" type="text/javascript"></script>
<script src="{{ STATIC_URL }}js/jquery.treeview.edit.js" type="text/javascript"></script>
32
33
<!-- <script src="{{ STATIC_URL }}js/jquery.jstree.js" type="text/javascript"></script>
 --><script src="{{ STATIC_URL }}js/jquery.dataTables.min.js" type="text/javascript"></script>
34
<script src="{{ STATIC_URL }}js/jquery.jeditable.mini.js" type="text/javascript"></script>
Janez K's avatar
Janez K committed
35
36
37
<!-- <script type="text/javascript" src="{{ STATIC_URL }}js/graphics.js"></script>-->
<script type="text/javascript" src="{{ STATIC_URL }}js/fileuploader.js"></script>
<script src="{{ STATIC_URL }}js/jquery.contextmenu.js" type="text/javascript"></script>
Janez K's avatar
Janez K committed
38
<script type="text/javascript" src="{{ STATIC_URL }}js/new-script.js?v=2"></script>
Janez K's avatar
Janez K committed
39
40
<script src="{{STATIC_URL}}js/highcharts-2.2.5-tooltip-id.js"></script>
<script src="{{STATIC_URL}}js/highcharts-exporting.js"></script>
41
<script type="text/javascript" src="https://raw.github.com/jaz303/tipsy/master/src/javascripts/jquery.tipsy.js"></script>
42
<script src="{{STATIC_URL}}js/d3/d3.v3.min.js"></script>
43
<script type="text/javascript" src="{{ STATIC_URL }}js/search.js"></script>
44
<script type="text/javascript" src="{{ STATIC_URL }}js/tipsy.js"></script>
45
46
<!-- <script src="{{STATIC_URL}}js/d3/d3.js"></script>
<script src="{{STATIC_URL}}js/d3/d3.layout.js"></script> -->
Janez K's avatar
Janez K committed
47

Janez K's avatar
Janez K committed
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<script type="text/javascript">
{% load url from future %}

url = new Array();

url['new-workflow'] = "{% url 'new workflow' %}";
url['add-widget'] = "{% url 'add widget' %}";
url['save-position'] = "{% url 'save position' %}";
url['add-connection'] = "{% url 'add connection' %}";
url['delete-widget'] = "{% url 'delete widget' %}";
url['delete-connection'] = "{% url 'delete connection' %}";
url['add-subprocess'] = "{% url 'add subprocess' %}";
url['get-subprocess'] = "{% url 'get subprocess' %}";
url['add-input'] = "{% url 'add input' %}";
url['add-output'] = "{% url 'add output' %}";
url['synchronize-widgets'] = "{% url 'synchronize widgets' %}";
url['synchronize-connections'] = "{% url 'synchronize connections' %}";
url['get-widget'] = "{% url 'get widget' %}";
url['get-parameters'] = "{% url 'get parameters' %}";
url['save-parameter'] = "{% url 'save parameter' %}";
68
69
url['get-configuration'] = "{% url 'get configuration' %}";
url['save-configuration'] = "{% url 'save configuration' %}";
Janez K's avatar
Janez K committed
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
url['get-rename'] = "{% url 'rename widget dialog' %}";
url['rename-widget'] = "{% url 'rename widget' %}";
url['rename-workflow'] = "{% url 'rename workflow' %}";
url['run-widget'] = "{% url 'run widget' %}";
url['widget-results'] = "{% url 'widget results' %}";
url['get-unfinished'] = "{% url 'get unfinished' %}";
url['widget-interaction'] = "{% url 'widget interaction' %}";
url['finish-interaction'] = "{% url 'finish interaction' %}";
url['import-webservice'] = "{% url 'import webservice' %}";
url['widget-visualization'] = "{% url 'widget visualization' %}";
url['widget-progress'] = "{% url 'widget progress' %}";
url['add-for'] = "{% url 'add for' %}";
url['get-category'] = "{% url 'get category' %}";
url['documentation'] = "{% url 'documentation' %}";
url['get-designate-dialogs'] = "{% url 'get designate dialogs' %}";
url['save-designation'] = "{% url 'save designation' %}";
url['workflow-url'] = "{% url 'workflow url' %}";
url['unfinish-vizualizations'] = "{% url 'unfinish visualizations' %}";
88
89
90
url['reset-widget'] = "{% url 'reset widget' %}";
url['reset-workflow'] = "{% url 'reset workflow' %}";
url['get-executed-status'] = "{% url 'get executed status' %}";
Janez K's avatar
Janez K committed
91
92
93

static_url = "{{STATIC_URL}}";

94
95
activeCanvasId = {{ user.userprofile.active_workflow.id }};
userIsStaff = '{{ user.is_staff }}'=='True';
Janez K's avatar
Janez K committed
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114

</script>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-2921908-12']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>
<body>
	<div id="toolbar">
		<div style="float:left;">
Janez K's avatar
Janez K committed
115
			<ul id="icons" class="ui-widget ui-helper-clearfix">
Janez K's avatar
Janez K committed
116
117
118
119
120
121
122
123
124
125
				<li class="ui-state-default ui-corner-all new" title="New workflow"><span class="ui-icon ui-icon-document"></span></li>
				<li class="ui-state-default ui-corner-all open" title="Open a workflow"><span class="ui-icon ui-icon-folder-open"></span></li>
				<li class="ui-state-default ui-corner-all save" title="Save workflow"><span class="ui-icon ui-icon-disk"></span></li>
				<li class="ui-state-default ui-corner-all run" title="Run"><span class="ui-icon ui-icon-play"></span></li>
				<li class="ui-state-default ui-corner-all info" title="Information"><span class="ui-icon ui-icon-info"></span></li>
				<li class="ui-state-default ui-corner-all preferences" title="Preferences"><span class="ui-icon ui-icon-wrench"></span></li>
				<li class="ui-state-default ui-corner-all delete" title="Delete selected"><span class="ui-icon ui-icon-trash"></span></li>
			</ul>
		</div>
		<div class="ui-widget">
Janez K's avatar
Janez K committed
126
			<div id="status" class="ui-state-highlight ui-corner-all" style="padding: 5px .7em;">
Janez K's avatar
Janez K committed
127
				<span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em; margin-top:1px;"></span>
Janez K's avatar
Janez K committed
128
				<span class="infotext"><strong>Hello!</strong> Welcome to ClowdFlows. Start by clicking on widgets in the treeview on the left side!</span>
Janez K's avatar
Janez K committed
129
130
131
			</div>
		</div>
	</div>
Janez K's avatar
Janez K committed
132
	<div id="widgets" class="logging">
133
		<input type="text" name="searchBox" id="searchBox" placeholder="Search"/>
134
		<ul id="widgetsTree" class="browser filetree">
Janez K's avatar
Janez K committed
135
136
137
			<li class="closed"><span class="folder">Local services</span>
			<ul id="corewidgets">
			{% for category in categories %}
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
	            {% if not category.parent %}
		            {% if not category.user %}
		                <li class="closed">
		                	<span class="folder" rel="{{ category.id }}" relType="category">{{ category.name }}</span>
		                	<ul>
		                    	{% for c in category.children.all %}
				                    <li class="closed"><span class="folder" rel="{{ c.id }}" relType="category">{{ c.name }}</span>
				                    	<ul>
					                        {% for d in c.children.all %}
					                            <li class="closed"><span class="folder" rel="{{ d.id }}" relType="category">{{ d.name }}</span>
					                            	<ul>
					                                {% for widget in d.widgets.all %}
					                                	{% include "treeview_widget.html" with widget=widget %}
					                                {% endfor %}
					                				</ul>
					                			</li>
			                        		{% endfor %}
					                        {% for widget in c.widgets.all %}
												{% include "treeview_widget.html" with widget=widget %}
					                        {% endfor %}
			                    		</ul>
		                			</li>
			                    {% endfor %}
			                    {% for widget in category.widgets.all %}
									{% include "treeview_widget.html" with widget=widget %}
			                    {% endfor %}
		                	</ul>
		                </li>
		            {% endif %}
	            {% endif %}
Janez K's avatar
Janez K committed
168
169
170
            {% endfor %}
			</ul>
			</li>
Janez K's avatar
Janez K committed
171

Janez K's avatar
Janez K committed
172
173
174
175
176
177
178
179
			<li class="closed"><span class="folder">Subprocess widgets</span>
			<ul id="specialwidgets">
				<li><a class="subprocess wid" rel=""><span class="image" style="background-image:url('{{MEDIA_URL}}treeview/120px-Gears_icon.png');">Subprocess</span></a></li>
				<li><a class="input wid" rel=""><span class="image" style="background-image:url('{{MEDIA_URL}}treeview/forward-arrow.png');">Input</span></a></li>
				<li><a class="output wid" rel=""><span class="image" style="background-image:url('{{MEDIA_URL}}treeview/forward-arrow.png');">Output</span></a></li>
                <li><a class="forloop wid" rel=""><span class="image" style="background-image:url('{{MEDIA_URL}}treeview/Toolbar_-_Loop.png');">For loop (input and output)</span></a></li>
			</ul>
			</li>
Janez K's avatar
Janez K committed
180

Janez K's avatar
Janez K committed
181
182
183
184
185
186
187
188
189
190
			<li class="closed"><span class="folder">WSDL Imports</span>
			<ul id="userwidgets">
			{% for category in user_categories %}
                <li class="closed"><span class="folder">{{ category.name }}</span><ul>
                    {% for widget in category.widgets.all %}
                    <li><a class="widget wid" rel="{{ widget.id }}"><span class="image" style="background-image:url('{% if widget.treeview_image %}{{MEDIA_URL}}{{widget.treeview_image}}{% else %}{% if widget.wsdl %}{{STATIC_URL}}widget-icons/ws_1.png{% else %}{{STATIC_URL}}widget-icons/question-mark.png{% endif %}{% endif %}');">{{ widget.name }}</span></a></li>
                    {% endfor %}
                </ul></li>
            {% endfor %}
            {% for widget in user_widgets %}
Janez K's avatar
Janez K committed
191
                <li><a class="widget wid" rel="{{ widget.id }}"><span class="image" style="background-image:url('{% if widget.abstract_widget.treeview_image %}{{MEDIA_URL}}{{widget.abstract_widget.treeview_image}}{% else %}{% if widget.abstract_widget.wsdl %}{{STATIC_URL}}widget-icons/ws_1.png{% else %}{{STATIC_URL}}widget-icons/question-mark.png{% endif %}{% endif %}');">{{ widget.name }}</span></a></li>
Janez K's avatar
Janez K committed
192
193
194
            {% endfor %}
			</ul>
			</li>
Janez K's avatar
Janez K committed
195

Janez K's avatar
Janez K committed
196
197
198
		</ul>
		<a href="javascript:;" class="importWebservice">Import webservice</a>
	</div>
Janez K's avatar
Janez K committed
199
	<div id="content" class="logging">
Janez K's avatar
Janez K committed
200
201
202
		<div id="tabs">
			<ul style="height:32px;">
				<li><a href="#canvas{{ user.userprofile.active_workflow.id }}"><span rel="#canvas{{ user.userprofile.active_workflow.id }}">{{ user.userprofile.active_workflow }}</span></a></li>
Janez K's avatar
Janez K committed
203
			</ul>
Janez K's avatar
Janez K committed
204
			<div rel="{{ user.userprofile.active_workflow.id }}" class="canvas{{ user.userprofile.active_workflow.id }} canvas" id="canvas{{ user.userprofile.active_workflow.id }}">
205
206
                <div style="width:100%;height:100%;">
                </div>
207
                <svg xmlns="http://www.w3.org/2000/svg" version="1.1" style="position:absolute;top:0px;left:0px;width:100%;height:100%;">
Janez K's avatar
Janez K committed
208
209

                </svg>
Janez K's avatar
Janez K committed
210
211
212
			</div>
		</div>
	</div>
Janez K's avatar
Janez K committed
213
214

    <div id="logging">
215
        <textarea readonly id="logtext" style="position:relative;top:0px;right:0px;left:0px;bottom:0px;">Welcome to ClowdFlows. This is the console where success and error messages are logged.</textarea>
Janez K's avatar
Janez K committed
216
217
    </div>

Janez K's avatar
Janez K committed
218
219
220
221
222
223
224
	<div style="display:none;" id="dialogs">
	<div id="newdialog" title="Create a new workflow?">
		<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 50px 0;"></span>
Are you sure you wish to start a new workflow?</p>
	</div>
	<div id="preferencesdialog" title="Preferences">

Janez K's avatar
Janez K committed
225
	</div>
Janez K's avatar
Janez K committed
226
227
228
229
230
231
232
233
	<div id="rundialog" title="Running the workflow">
		<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 50px 0;"></span>
Some widgets have already been run. Do you wish to run the whole workflow again?</p>
	</div>
	<div id="preconditionsdialog" title="Preconditions not met">
		<p><span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 50px 0;"></span>
Preconditions for running this widget have not yet been met. Do you want to run all required widgets?</p>
	</div>
Janez K's avatar
Janez K committed
234

Janez K's avatar
Janez K committed
235
236
237
	<div id="wsdldialog" title="Import a webservice">
		<p><label>Please enter the URL of the WSDL:<input type="text" value="" name="wsdl" id="wsdlinput" /></label>
		</p>
Janez K's avatar
Janez K committed
238
239
	</div>

Janez K's avatar
Janez K committed
240
241
242
	<div id="opendialog" title="Load a workflow">
		Please select one of your workflows:<br />
        <br />
Janez K's avatar
Janez K committed
243
        <div style="height:300px;overflow:auto;">
Janez K's avatar
Janez K committed
244
245
246
247
248
        {% for w in user.workflows.all %}
        {% if not w.widget %}
        <a onClick="$(this).parent().dialog('close');$('.ajax-loader').show();" href="{{ w.get_absolute_url }}"><span rel="#canvas{{ w.id }}">{{ w }}</span></a> <a onClick="$(this).parent().dialog('close');$('.ajax-loader').show();" href="{{ w.get_copy_url }}">Open as new</a><br />
        {% endif %}
        {% endfor %}
Janez K's avatar
Janez K committed
249
        </div>
Janez K's avatar
Janez K committed
250

Janez K's avatar
Janez K committed
251
	</div>
Janez K's avatar
Janez K committed
252

Janez K's avatar
Janez K committed
253
254
255
256
	<div rel="{{ user.userprofile.active_workflow.id }}" id="savedialog" title="Save your workflow">
        <fieldset>
		Enter a name for your workflow:
        <br />
Janez K's avatar
Janez K committed
257

Janez K's avatar
Janez K committed
258
        <input type="text" class="workflownameinput" name="workflowname" id="workflowname" value="{{ user.userprofile.active_workflow.name }}" />
Janez K's avatar
Janez K committed
259

Janez K's avatar
Janez K committed
260
        Enter a description of what the workflow does:<br />
Janez K's avatar
Janez K committed
261

Janez K's avatar
Janez K committed
262
263
264
        <textarea type="text" class="workflowdescriptioninput" style="width:100%;height:250px;" name="workflowdescription" id="workflowdescription">{{ user.userprofile.active_workflow.description }}</textarea><br /> <br />
        <label><input id="workflowpublicinput" class="workflowpublicinput" name="workflowpublicinput" type="checkbox" value="true" {% if user.userprofile.active_workflow.public %}checked{% endif %} style="width:15px;display:inline;float:left;" /> Public workflow</label>
        </fieldset>
Janez K's avatar
Janez K committed
265
266
267

	</div>

Janez K's avatar
Janez K committed
268
269
270
271
	</div>


    <ul id="widgetMenu" class="contextMenu">
272
273
274
        <li class="runtree"><a href="#runtree">Run</a></li>
        <li class="runwidget"><a href="#run">Run only this</a></li>
        <li style="font-size: 3px;"><hr style="border:0px; height:1px; color:lightgray;background-color:lightgray;"/></li>
Janez K's avatar
Janez K committed
275
        <li class="edit"><a href="#properties">Properties</a></li>
276
        <li style="font-size: 3px;"><hr style="border:0px; height:1px; color:lightgray;background-color:lightgray;"/></li>
Janez K's avatar
Janez K committed
277
        <li class="view"><a href="#results">Results</a></li>
278
279
280
        <li class="resetwidget"><a href="#resetwidget">Reset Widget</a></li>
        <li class="resetworkflow"><a href="#resetworkflow">Reset Workflow</a></li>
        <li style="font-size: 3px;"><hr style="border:0px; height:1px; color:lightgray;background-color:lightgray;"/></li>
Janez K's avatar
Janez K committed
281
282
        <li class="rename"><a href="#rename">Rename</a></li>
        <li class="copy"><a href="#copy">Copy Widget</a></li>
283
284
        <li class="delete"><a href="#delete">Delete</a></li>
        <li style="font-size: 3px;"><hr style="border:0px; height:1px; color:lightgray;background-color:lightgray;"/></li>
Janez K's avatar
Janez K committed
285
286
287
        <li class="help"><a href="#help">Help</a></li>
    </ul>

288
289
290
291
    <ul id="widMenu" class="contextMenu">
        <li class="edit"><a href="#edit">Edit Definition</a></li>
    </ul>

Janez K's avatar
Janez K committed
292
293
294
    <div style="position:absolute;top:50%;left:50%;display:none;z-index:1003;" class="ajax-loader">
        <img src="{{STATIC_URL}}images/ajax-loader-big.gif">
    </div>
Janez K's avatar
Janez K committed
295

296
297
298
299
300
    <div id="treecontrol">
    	<a href="#"></a>
    	<a href="#"></a>
    	<a href="#"></a>
	</div>
Janez K's avatar
Janez K committed
301
</body>
Janez K's avatar
Janez K committed
302
</html>