index.html 13.5 KB
Newer Older
Janez K's avatar
Janez K committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<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);
	@import url({{ STATIC_URL }}css/style.css);
</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]-->

<link type="text/css" href="{{ STATIC_URL }}css/ui-lightness/jquery-ui-1.8rc3.custom.css" rel="stylesheet" />	
<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" />
<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>
<script src="{{ STATIC_URL }}js/jquery.jstree.js" type="text/javascript"></script>
<!-- <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>
<script type="text/javascript" src="{{ STATIC_URL }}js/new-script.js"></script>
<script src="{{STATIC_URL}}js/highcharts-2.2.5-tooltip-id.js"></script>
<script src="{{STATIC_URL}}js/highcharts-exporting.js"></script>
<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' %}";
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' %}";
76
77
url['get-configuration'] = "{% url 'get configuration' %}";
url['save-configuration'] = "{% url 'save configuration' %}";
Janez K's avatar
Janez K committed
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
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
168
169
170
171
172
173
174
175

static_url = "{{STATIC_URL}}";

activeCanvasId = {{ user.userprofile.active_workflow.id }}

</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;">
			<ul id="icons" class="ui-widget ui-helper-clearfix">			
				<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">
			<div id="status" class="ui-state-highlight ui-corner-all" style="padding: 5px .7em;"> 
				<span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em; margin-top:1px;"></span>
				<span class="infotext"><strong>Hello!</strong> Welcome to the new web-based DM tool.</span>
			</div>
		</div>
	</div>
	<div id="widgets"> 
		<ul class="browser filetree">
			<li class="closed"><span class="folder">Local services</span>
			<ul id="corewidgets">
			{% for category in categories %}
            {% if not category.parent %}
            {% if not category.user %}
                <li class="closed"><span class="folder">{{ category.name }}</span><ul>
                    {% for c in category.children.all %}
                    <li class="closed"><span class="folder">{{ c.name }}</span><ul>
                    {% for widget in c.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 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>
            {% endif %}
            {% endif %}
            {% endfor %}
			</ul>
			</li>
			
			<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>
			
			<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 %}
                <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>          
            {% endfor %}
			</ul>
			</li>
			
		</ul>
		<a href="javascript:;" class="importWebservice">Import webservice</a>
	</div>
	<div id="content">
		<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>
			</ul>	
			<div rel="{{ user.userprofile.active_workflow.id }}" class="canvas{{ user.userprofile.active_workflow.id }} canvas" id="canvas{{ user.userprofile.active_workflow.id }}">
176
177
                <div style="width:100%;height:100%;">
                </div>
178
                <svg xmlns="http://www.w3.org/2000/svg" version="1.1" style="position:absolute;top:0px;left:0px;width:100%;height:100%;">
179
180
                 
                </svg> 
Janez K's avatar
Janez K committed
181
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
222
223
224
225
226
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
			</div>
		</div>
	</div>
	
	<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">

	</div>	
	<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>
	
	<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>
	</div>	
	
	<div id="opendialog" title="Load a workflow">
		Please select one of your workflows:<br />
        <br />
        {% 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 %}
        
	</div>
    
	<div rel="{{ user.userprofile.active_workflow.id }}" id="savedialog" title="Save your workflow">
        <fieldset>
		Enter a name for your workflow:
        <br />
        
        <input type="text" class="workflownameinput" name="workflowname" id="workflowname" value="{{ user.userprofile.active_workflow.name }}" />
        
        Enter a description of what the workflow does:<br />
        
        <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>
        
	</div>    
	
	</div>


    <ul id="widgetMenu" class="contextMenu">
        <li class="runwidget"><a href="#run">Run</a></li>
        <li class="edit"><a href="#properties">Properties</a></li>
        <li class="delete"><a href="#delete">Delete</a></li>
        <li class="view"><a href="#results">Results</a></li>
        <li class="rename"><a href="#rename">Rename</a></li>
        <li class="copy"><a href="#copy">Copy Widget</a></li>
        <li class="help"><a href="#help">Help</a></li>
    </ul>

    <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>
    
</body>
</html>