-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlauncher.html
259 lines (232 loc) · 12.1 KB
/
launcher.html
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
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
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
176
177
178
179
180
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
252
253
254
255
256
257
258
259
{% extends "internal_tpl_base.html" %}
{% block content_title %}Launcher{% endblock %}
{% block content %}
<!-- Main content -->
<section class="content">
<!-- Info boxes -->
<!-- Main row -->
<div class="row">
<div class="col-md-6">
<form role="form" method="post" action="/submit" enctype="multipart/form-data">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Select graph input file: </h3>
</div>
<!-- /.box-header -->
<!-- form start -->
<div class="box-body">
<div class="form-group">
<label>Select Graph Format File:</label>
<div class="form-group">
<div class="radio">
<label>
<input type="radio" name="graphFileType" id="graphFileType" value="pajek">
Pajek
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="graphFileType" id="graphFileType" value="graphml" checked>
GraphML
</label>
</div>
</div>
<div class="form-group">
<label for="graphInputFile">File input</label>
<input type="file" name="graphInputFile" id="graphInputFile">
</div>
</div>
</div>
</div>
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Select Consensus Algorithm: </h3>
</div>
<!-- /.box-header -->
<!-- form start -->
<div class="box-body">
<div class="form-group">
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-danger">OWL's Ontology URI</button>
</div>
<input type="text" class="form-control" name="OWLURI" id="OWLURI" value="http://www.dsic.upv.es/%7ecarrasco/MAMbO5.owl">
</div>
</div>
</div>
<!-- /.box-body -->
</div>
<div class="box-footer">
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-play"></span> Submit</button>
<button type="submit" class="btn btn-danger" id="stopMAS" value="True"><span class="glyphicon glyphicon-stop"></span> Stop MAS Execution</button>
</div>
</form>
</div>
<div class="col-md-6">
<form id="graphForm" role="form" method="post" action="/submit_graph" enctype="multipart/form-data">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Generating GraphML file: </h3>
</div>
<!-- /.box-header -->
<!-- form start -->
<div class="box-body">
<h4>GraphML file name to save the new graph into:</h4>
<div class="input-group">
<input type="text" class="form-control" name="graphOutputFile" id="graphOutputFile" value="example">
<span class="input-group-addon">.gml</span>
</div>
</div>
</div>
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Select Graph Features: </h3>
</div>
<!-- /.box-header -->
<!-- form start -->
<div class="box-body">
<div class="form-group">
<label>Available Graph Generators:</label>
<select class="form-control" name="graphGenerator" id="graphGenerator" onchange="myHide(this)">
<option value="complete" selected="selected">Complete</option>
<option value="path">Path</option>
<option value="cycle">Cycle</option>
<option value="wheel">Wheel</option>
<option value="star" >Star</option>
<option value="random">Erdos - Reny (Random)</option>
<option value="watts">Watts - Strogatz</option>
<option value="barabasi">Barabasi - Albert</option>
<option value="geometric">Random Geometric</option>
</select>
</div>
<div class="form-group">
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-danger">Nodes number</button>
</div>
<input type="text" class="form-control" name="nodesNumber" id="nodesNumber" value="10">
</div>
</div>
<div class="form-group">
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-danger">Value range size</button>
</div>
<input type="text" class="form-control" name="rangeSize" id="rangeSize" value="1">
</div>
</div>
<div class="form-group">
<label>Initial value centered in range:</label>
<div class="form-group">
<div class="radio">
<label>
<input type="radio" name="initialCentered" id="initialCentered" value="yes">
Yes
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="initialCentered" id="initialCentered" value="random" checked>
Random
</label>
</div>
</div>
</div>
<div class="form-group">
<label>Nodes Weight: A random value in [0, 1]</label>
<div class="form-group">
<div class="radio">
<label>
<input type="radio" name="nodeWeight" id="nodeWeight" value="same">
The same for all nodes
</label>
</div>
<div class="radio">
<label>
<input type="radio" name="nodeWeight" id="nodeWeight" value="different" checked>
Each node has a different value
</label>
</div>
</div>
</div>
<div class="form-group" style="display: none" id="prob-group">
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-danger" onclick="myFunction()">Probability</button>
</div>
<input type="text" class="form-control" name="probability" id="probability"
value="log(<Nodes Number>)/<Nodes Number>">
</div>
</div>
<div class="form-group" style="display: none" id="neigh-group">
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-danger">Neighbours' Distance</button>
</div>
<input type="text" class="form-control" name="neighDist" id="neighDist" value="2">
</div>
</div>
<div class="form-group" style="display: none" id="edgesNew-group">
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-danger">Edges to attach to a new node</button>
</div>
<input type="text" class="form-control" name="edgesNew" id="edgesNew" value="2">
</div>
</div>
<div class="form-group" style="display: none" id="radius-group">
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-danger">Radius distance threshold value</button>
</div>
<input type="text" class="form-control" name="radius" id="radius" value="0.5">
</div>
</div>
<!-- /.box-body -->
</div>
<div class="box-footer">
<button type="submit" class="btn btn-primary">Generate File</button>
</div>
</form>
</div>
</div>
<script>
function myShowIter(selectObject){
var generator = selectObject.value;
var i;
//console.log(generator);
if (generator == "ICORa")
document.getElementById('ICORa_delta_iter').style.display = "block";
else document.getElementById('ICORa_delta_iter').style.display = "none";
}
function myHide(selectObject){
var generator = selectObject.value;
var i;
//console.log(generator);
if (generator == "random" || generator == "watts") {
if (generator == "watts")
document.getElementById('neigh-group').style.display = "block";
else document.getElementById('neigh-group').style.display = "none";
document.getElementById('prob-group').style.display = "block";
i = document.getElementById('nodesNumber').value ;
document.getElementById('probability').value = Math.log(i) / i;
}
else {
document.getElementById('neigh-group').style.display = "none";
document.getElementById('prob-group').style.display = "none";
}
if (generator == "barabasi")
document.getElementById('edgesNew-group').style.display = "block";
else document.getElementById('edgesNew-group').style.display = "none";
if (generator == "geometric")
document.getElementById('radius-group').style.display = "block";
else document.getElementById('radius-group').style.display = "none";
}
function myFunction() {
var i;
i = document.getElementById('nodesNumber').value ;
document.getElementById('probability').value = Math.log(i) / i;
}
</script>
</section>
{% endblock content %}