-
Notifications
You must be signed in to change notification settings - Fork 37
/
launch.html
720 lines (684 loc) · 30.7 KB
/
launch.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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
{% extends "base.html" %}
{% block extra_head %}
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<script>
var csrf_token;
var abort_fetch = false;
var clusters_list = Array(); // A list of existing clusters for the given cloud+acct
function get_dynamic_fields(cloud_id) {
$.post("{% url dynamic_fields %}",
{'cloud_id': cloud_id,
csrfmiddlewaretoken: csrf_token},
function(data) {
if (data.instance_types.length > 0) {
var types = '';
for (var i=0; i<data.instance_types.length; i++) {
var default_instance_type = '';
// First non-custom type becomes the default
if (i == 1) {
default_instance_type = 'selected="selected"';
}
types += '<option value="' + data.instance_types[i][0] +
'" ' + default_instance_type + '>'
+ data.instance_types[i][1] + "</option>";
}
$('#id_instance_type').html(types);
$('#id_instance_type').removeAttr('disabled');
} else {
$('#id_instance_type').attr('disabled', 'disabled');
$('#id_instance_type').html("<option>Choose cloud type first</option>");
}
if (data.image_ids.length > 0) {
var ids = '';
for (var i=0; i<data.image_ids.length; i++) {
// Ensure the default image is initially selected
// The assumption here is that the default image is marked
// as having '*' character in the description field (this
// char is automatically added in views.py->dynamicfields)
var selected = '';
if (data.image_ids[i][1].indexOf('*') > -1) {
selected = 'selected="selected"';
get_flavors(data.image_ids[i][0]);
}
ids += '<option value="' + data.image_ids[i][0] + '" ' + selected + '>'
+ data.image_ids[i][1] + "</option>";
}
$('#id_image_id').html(ids);
$('#id_image_id').removeAttr('disabled');
} else {
$('#id_image_id').attr('disabled', 'disabled');
$('#id_image_id').html("<option>Choose cloud type first</option>");
}
});
}
function get_flavors(image_id) {
$.post("{% url get_flavors %}",
{'image_id': image_id,
csrfmiddlewaretoken: csrf_token},
function(data) {
if (data.flavors.length > 0) {
var ids = '';
for (var i=0; i<data.flavors.length; i++) {
// Ensure the default flavor is initially selected
var selected = '';
if (data.flavors[i].default) {
selected = 'selected="selected"';
}
ids += '<option value="' + data.flavors[i].id + '" ' + selected + ' title="' + data.flavors[i].description + '">'
+ data.flavors[i].name + (data.flavors[i].default ? " *" : '') + "</option>";
}
$('#id_flavor_id').html(ids);
$('#id_flavor_id').removeAttr('disabled');
} else {
$('#id_flavor_id').attr('disabled', 'disabled');
$('#id_flavor_id').html("<option>No flavors available</option>");
}
});
}
function get_placements(explicitly) {
// Let's first lookup if we have placement in the clusters_list
var placement_found = false;
// If the user is creating a brand new cluster, do not look for placement
// automatically. This is because the process takes a while and is ambiguous
// anyhow so just let the cloud middleware choose it.
if (clusters_list.length > 0) {
// Look for placement for the given cluster name
var cluster_name = $('#id_cluster_name').val();
for (i=0; i<clusters_list.length; i++) {
if (cluster_name == clusters_list[i].cluster_name) {
if (clusters_list[i].placement != null) {
placement = '<option value="' + clusters_list[i].placement.placement + '">'
+ clusters_list[i].placement.placement + "</option>";
$('#id_placement').html(placement);
$('#id_placement').removeAttr('disabled');
placement_found = true;
}
}
}
}
if (explicitly === false && placement_found === false) {
// This means the user has selected an existing cluster and then
// changed to a brand new one. So we need to clean the placement
// selection that happened when the existing cluster choice was selected.
$('#id_placement').attr('disabled', 'disabled');
$('#id_placement').html("<option>Fill above fields & click refresh to fetch</option>");
}
// If no cached placement was found, go look for it
if (explicitly === true && placement_found === false) {
$('#id_placement').attr('disabled', 'disabled');
$('#id_placement').html("<option>Fetching data...</option>");
var jqxhr = $.post("{% url get_placements %}",
{// If not available cached, probably does not exist so don't look for it
//'cluster_name': $('#id_cluster_name').val(),
'cloud_id': $('#id_cloud').val(),
'a_key': $('#id_access_key').val(),
's_key': $('#id_secret_key').val(),
'instance_type': $('#id_instance_type').val(),
csrfmiddlewaretoken: csrf_token})
.success(function(data) {
if (data.error) {
$('#id_placement').attr('disabled', 'disabled');
$('#id_placement').html("<option>" + data.error + "</option>");
$('#error_container').text(data.error);
} else if (data.placements.length > 0) {
var placements = '';
for (var i=0; i<data.placements.length; i++) {
placements += '<option value="' + data.placements[i] + '">'
+ data.placements[i] + "</option>";
}
$('#id_placement').html(placements);
$('#id_placement').removeAttr('disabled');
} else {
$('#id_placement').attr('disabled', 'disabled');
$('#id_placement').html("<option>Click refresh to update</option>");
}
})
.error(function(data){
$('#id_placement').attr('disabled', 'disabled');
$('#id_placement').html("<option>" + data.error + "</option>");
});
}
}
function get_key_pairs(){
var jqxhr = $.ajax({
url: "{% url get_key_pairs %}",
type: "post",
data: {'cloud_id': $('#id_cloud').val(),
'a_key': $('#id_access_key').val(),
's_key': $('#id_secret_key').val(),
csrfmiddlewaretoken: csrf_token},
beforeSend: function(){
disable_fields(false);
$(this).attr('value', "Fetching data... please wait");
},
success: function(data) {
enable_fields();
if (data.key_pairs.length > 0) {
var key_pairs = '';
for (var i=0; i<data.key_pairs.length; i++) {
key_pairs += '<option value="' + data.key_pairs[i] + '">'
+ data.key_pairs[i] + "</option>";
}
$('#id_key_pair').html(key_pairs);
$('#id_key_pair').removeAttr('disabled');
} else if (data.error) {
$('#id_key_pair').attr('disabled', 'disabled');
$('#id_key_pair').html("<option>" + data.error + "</option>");
} else {
$('#id_key_pair').attr('disabled', 'disabled');
$('#id_key_pair').html("<option>Click refresh to update</option>");
}
},
error: function(data){
$('#id_key_pair').attr('disabled', 'disabled');
$('#id_key_pair').html("<option>" + data.error + "</option>");
}
});
}
function get_subnets(){
var jqxhr = $.ajax({
url: "{% url get_subnets %}",
type: "post",
data: {'cloud_id': $('#id_cloud').val(),
'a_key': $('#id_access_key').val(),
's_key': $('#id_secret_key').val(),
csrfmiddlewaretoken: csrf_token},
beforeSend: function(){
disable_fields(false);
$(this).attr('value', "Fetching data... please wait");
},
success: function(data) {
enable_fields();
if (data.subnets.length > 0){
var subnets = '';
for (var i=0; i<data.subnets.length; i++) {
subnets += '<option value="' + data.subnets[i].id + '">'
+ data.subnets[i].id + " | " + data.subnets[i].name
+ " (" + data.subnets[i].vpc_id + ")</option>";
}
$('#id_subnet_id').html(subnets);
$('#id_subnet_id').removeAttr('disabled');
} else if (data.error) {
$('#id_subnet_id').attr('disabled', 'disabled');
$('#id_subnet_id').html("<option>" + data.error + "</option>");
} else {
$('#id_subnet_id').attr('disabled', 'disabled');
$('#id_subnet_id').html("<option>Click refresh to update</option>");
}
},
error: function(data){
$('#id_subnet_id').attr('disabled', 'disabled');
$('#id_subnet_id').html("<option>" + data.error + "</option>");
}
});
}
function disable_fields(all){
// Disable inptu fields. Parameter ``all`` (default value is ``true``)
// indicates that all the input fields should be disabled. If the provided
// argument is set to ``false``, only fields with class ``disableable``
// are disabled
all = typeof all !== 'undefined' ? all : true; // Set a default value for the arg
if (all != true){
// Make all form fields with class ``disableable`` disabled.
f_elts = $('.disableable');
f_elts.attr('disabled', 'disabled');
$('#fetch_clusters_btn').hide();
} else {
// Disable all input fields
$('#launch-form :input').each(function(){
$(this).attr('disabled', 'disabled');
})
}
}
function enable_fields(){
// When enabling fields, enable all of the form input fields
$('#launch-form :input').each(function(){
$(this).removeAttr('disabled');
})
// A bit tailored for the fetch clusters call but shouldn't hurt anything
$('#id_cluster_name').attr("value", "Enter any desired name");
$('#abort_clusters_fetch').hide();
$('#fetch_clusters_btn').show();
}
function update_clusters(task_id) {
// Given a ``task_id``, keep polling for the status of the given task.
// Once the task is ready, populate appropriate field.
if (abort_fetch === false) {
var c_name_el = $('#id_cluster_name');
var jqxhr = $.ajax({
url: "{% url update_clusters %}",
type: "post",
data: {'task_id': task_id,
csrfmiddlewaretoken: csrf_token},
success: function(data){
if (data.ready === true){
$('#abort_clusters_fetch').hide();
var clusters = Array();
if (data.error != null){
$('#error_container').text(data.error);
enable_fields();
}
else if (data.clusters_list.length > 0) {
// Keep the list of clusters to reuse for placement
clusters_list = data.clusters_list;
for (var i=0; i<data.clusters_list.length; i++) {
clusters.push({'id': data.clusters_list[i].cluster_name,
'text': data.clusters_list[i].cluster_name});
}
c_name_el.removeAttr('disabled');
// Create a dropdown w/ list of existing clusters
var s = $('<select id="id_cluster_name" name="cluster_name" class="ui-input-basic" />');
for(var i in clusters_list) {
$('<option />', {value: clusters_list[i].cluster_name, text: clusters_list[i].cluster_name}).appendTo(s);
}
c_name_el.replaceWith(s[0]);
$('#existing-cluster-dropdown').show();
enable_fields();
// If choosing an existing cluster, look for placement automatically
c_name_el.attr("onChange", 'get_placements(false);');
} else {
enable_fields();
c_name_el.attr("value", "No exiting clusters; enter any desired name");
}
}
else {
c_name_el.attr('value', data.wait_text);
// Keep polling for task status every few seconds
window.setTimeout(function(){update_clusters(task_id)}, 5000);
}
},
error: function(){
// If anything goes wrong (also see #abort_clusters_fetch),
// allow the user to provide a cluster name
enable_fields();
}
});
// Fetching clusters can take a while so allow a user to abort
// the request (note that this does not cancel the request on the
// server size).
$("#abort_clusters_fetch").click(function(){
abort_fetch = true;
var jqxhr = $.post("{% url revoke_fetch_clusters %}",
{'task_id': task_id,
csrfmiddlewaretoken: csrf_token})
enable_fields();
});
}
}
function fetch_clusters() {
// Initiate retrieval of existing clusters. Note that this will call
// ``update_clusters`` method, which will keep updating the status of this,
// possibly long, action.
var s_key_el = $("#id_secret_key");
var a_key_el = $("#id_access_key");
var c_name_el = $('#id_cluster_name');
if (s_key_el.val().length > 0 && a_key_el.val().length > 0){
abort_fetch = false; // Reset flag on
// Get info about existing clusters and update fields
var jqxhr = $.ajax({
url: "{% url fetch_clusters %}",
type: "post",
data: {'cloud_id': $('#id_cloud').val(),
'a_key': a_key_el.val(),
's_key': s_key_el.val(),
csrfmiddlewaretoken: csrf_token},
beforeSend: function(){
$('#abort_clusters_fetch').show();
disable_fields(false);
c_name_el.attr('value', "Fetching data... please wait");
},
success: function(data) {
// Call the update method only after a few seconds
// window.setTimeout(function(){update_clusters(data.task_id)}, 5000);
update_clusters(data.task_id);
if ($('#id_cloud').val() == 1) {
// By default, Amazon cloud gets ID 1 and the warning applies
// to it.
$('#recreate_old_cluster_warning').show("slow");
}
},
error: function(data){
// If anything goes wrong (also see #abort_clusters_fetch),
// allow the user to provide a cluster name
enable_fields();
}
});
} else {
c_name_el.attr('value', "Enter cloud credentials first");
}
}
function launch_instance(){
// Initiate the process of launching an instance
$('#start_btn').button();
$('#start_btn').click(function() {
$(this).button('loading');
});
$('#launch-form').submit(function(event){
event.preventDefault();
sd = $("#launch-form").serialize();
$.ajax({
url: $('#launch-form').attr('action'),
type: $('#launch-form').attr('method'),
data: sd,
cache: 'false',
dataType: 'json',
async: 'true',
beforeSend: function(){
disable_fields();
$('#starting_updates').show();
},
success: function(data){
if (data.form_errors != "" || data.error != "") {
enable_fields();
$('#start_btn').button("reset");
$('#error_container').html("Error launching an instance: " + data.error + data.form_errors);
$('#error_container').addClass('alert alert-error');
for (i=0; i<data.form_errors.length; i++){
// Mark the label for missing field as being in error state
$("label[for='id_" + data.form_errors[i][0] + "']").parent().addClass('error');
// Add the error message inline with the errored field
$("#id_" + data.form_errors[i][0]).after(" <span class='help-inline error'>"
+ data.form_errors[i][1] + "</span>");
}
}
else {
// Redirect to monitor page
window.location.href="/monitor";
}
},
error: function(data){
enable_fields();
alert("Launch failed: " + data);
}
});
});
}
function change_cluster_type(cluster_type) {
switch (cluster_type) {
case "Galaxy":
$('#id_storage_type_0').prop('checked', true);
$('#id_storage_type_0').prop('disabled', false);
$('#id_storage_type_0').parent().parent().parent().parent().parent().parent().show();
$('#id_storage_size').parent().parent().parent().show();
$('#id_storage_size').parent().parent().show();
$('#id_iops').parent().parent().show();
break;
case "Data":
$('#id_storage_type_1').prop('disabled', false);
$('#id_storage_type_1').prop('checked', true);
$('#id_storage_type_1').parent().parent().parent().parent().parent().parent().show();
$('#id_storage_size').parent().parent().hide();
$('#id_iops').parent().parent().hide();
break;
case "None":
$('#id_storage_type_0').prop('checked', true);
$('#id_storage_size').parent().parent().hide();
$('#id_storage_type_0').parent().parent().parent().parent().parent().parent().hide();
$('#id_iops').parent().parent().show();
break;
}
}
function change_storage_option(storage_type) {
switch (storage_type) {
case "transient":
$('#id_storage_size').parent().parent().hide();
$('#id_iops').parent().parent().hide();
break;
case "volume":
$('#id_storage_size').parent().parent().show();
$('#id_iops').parent().parent().show();
break;
}
}
function is_number_key(evt) {
var charCode = (evt.which) ? evt.which : event.keyCode;
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
$(document).ready(function() {
// Along with this, must add a macthing csrf_token in the body
csrf_token = $('#csrf_token >div >input').attr("value");
// Get instance types for the selected cloud on page load
// This also keeps the instance types selected after a submission
// of the form with errors
get_dynamic_fields($("#id_cloud option:selected").val());
// Toggle advanced startup options
$('#hide_advanced_startup_options').click(function(event){
event.preventDefault();
$('.advanced_startup_options').hide();
$('#hide_advanced_startup_options').hide();
$('#show_advanced_startup_options').show();
});
$('#show_advanced_startup_options').click(function(event){
event.preventDefault();
customTypeHidden = $('#id_custom_instance_type').parent().parent().is(":hidden");
$('.advanced_startup_options').show();
$('#hide_advanced_startup_options').show();
$('#show_advanced_startup_options').hide();
// By default, custom image ID el. is hidden
$('#id_custom_image_id').parent().parent().hide();
if (customTypeHidden) {
$('#id_custom_instance_type').parent().parent().hide();
}
});
// Allow the user to fetch a list of existing clusters
$('#fetch_clusters_btn').click(function(){ fetch_clusters(); });
$('#fetch_clusters_btn').tooltip({"placement": "right",
'title': 'Fetch existing clusters (note that this may take a while)'});
$('#get_placements_btn').click(function(event){
event.preventDefault();
get_placements(true);
});
$('#get_placements_btn').tooltip({"placement": "right",
'title': 'Fetch available cluster placement options'});
$('#get_gey_pair_btn').click(function(event){
event.preventDefault();
get_key_pairs(true);
});
$('#get_gey_pair_btn').tooltip({"placement": "right",
'title': 'Fetch available key pairs'});
$('#get_subnets_btn').click(function(event){
event.preventDefault();
get_subnets(true);
});
$('#get_subnets_btn').tooltip({"placement": "right",
'title': 'Fetch available subnets.'});
$('#abort_clusters_fetch').tooltip({"placement": "right",
'title': 'Abort cluster fetch request'});
// Get ready to handle instance launch form submission
launch_instance();
// On text field focus, select all text
$(':text').focus(function(){
$(this).one('mouseup', function(event){
event.preventDefault();
}).select();
});
// On selecting image option, conditionally toggle visibility of custom
// image text field
$('#id_image_id').change(function(){
var isCustom = $(this).val() == 0;
$('#id_custom_image_id').parent().parent().toggle(isCustom);
if ($('#id_custom_image_id').is(":visible")) {
$('#id_custom_image_id').focus();
}
});
// On selecting custom type option, toggle visibility of custom
// instance type text field
$('#id_instance_type').change(function(){
var customType = $(this).val() == 0;
if (customType) {
$('#id_custom_instance_type').parent().parent().show();
$('#id_custom_instance_type').parent().parent().parent().show();
$('#id_custom_instance_type').focus();
} else {
$('#id_custom_instance_type').parent().parent().parent().hide();
}
});
// Depending on whether a user is creating or recreating a cluster,
// take appropriate (UI) action
$('#create_new_cluster_link').click(function(event){
event.preventDefault();
$('#cluster_name_container').hide();
$('#id_cluster_name_container').show();
});
$('#recreate_cluster_link').click(function(event){
event.preventDefault();
fetch_clusters();
$('#cluster_name_container').hide();
$('#id_cluster_name_container').show();
// Hide options for selecting a new cluster type
$('.cluster-type-choice').parent().parent().parent().parent().parent().hide();
$('#id_storage_size').parent().parent().hide();
});
// On cloud selection change, reset cloud-specific fields
$('#id_cloud').change(function(){
$('#id_access_key').val('');
$('#id_secret_key').val('');
var default_option = "Fill above fields & click refresh to fetch";
$('#id_placement option').text(default_option);
$('#id_placement').attr('disabled', 'disabled');
$('#id_key_pair option').text(default_option);
$('#id_key_pair').attr('disabled', 'disabled');
});
// Synchronise initial storage size field visibility
change_cluster_type($("input[name='initial_cluster_type']:checked").val());
});
</script>
{% endblock %}
{% block content %}
<div id="masthead-spacer"></div>
<div class="page-header">
<h2><small>
Easily launch your own cloud servers for use with
<a href="https://galaxyproject.org/">Galaxy</a> and
<a href="http://cloudman.irb.hr/">CloudMan</a>.
See <a href="https://wiki.galaxyproject.org/CloudMan/GettingStarted" target="_blank">
this page</a> for detailed instructions on how to get started.
</small></h2>
</div>
{% if notice %}
<div class="well">
{{ notice|safe }}
</div>
{% endif %}
<div id="error_container">
{% if form.non_field_errors|length > 0 %}
<div class="alert alert-error">Cloud connection problem: <br/>
{{ form.non_field_errors }}
</div>
{% endif %}
</div>
<form id="launch-form" action="{% url launch %}" method="post" class="form-horizontal">
{% csrf_token %}
{% for field in form %}
{% if not field.field.required %}
<span class="advanced_startup_options" style="display:none">
{% endif %}
<div class="control-group{% if field.errors %} error{% endif %}{% if field.field.required %} required{% endif %}">
<label class="control-label"{% if field.auto_id and input_type != "multicheckbox" and input_type != "radioset" %} for="{{ field.auto_id }}"{% endif %}>{{ field.label }}
</label>
<div class="controls{% if float %} controls-row{% endif %} ui-select">
{% if field.label == 'Cluster name' %}
{# Force users to explicitly choose if creating or recreating a cluster #}
<span id="cluster_name_container">
<button id="create_new_cluster_link" class="btn btn-small action-button">
Specify a new name
</button>
or
<button id="recreate_cluster_link" class="btn btn-small action-button">
Choose a saved cluster
</button>
</span>
<span id="id_cluster_name_container" style="display:none">
{{ field }}
<i id="fetch_clusters_btn" class="icon-list-ul action-icons"></i>
<i id="abort_clusters_fetch" class="icon-remove action-icons" style="display: none"></i>
</span>
<div id="existing-cluster-dropdown" class="button" style="display:none">
<i class="fa fa-caret-down"></i>
</div>
<div id="recreate_old_cluster_warning" class="well" style="display: none;">
<b>Crucial note (please read):</b> If you are recreating a cluster
that was created on AWS prior to the August 2015 CloudMan release,
you must select appropriate <i>Image</i> under the <i>Advanced
startup options</i> below. See <i>Deprecated AMIs</i> on
<a href="https://wiki.galaxyproject.org/CloudMan/#Galaxy_AMIs" target="_blank">
this page</a> for a list of old machine images. <b>Otherwise, your
cluster will get corrupted.</b>
</div>
{% else %}
{{ field }}
{% endif %}
{% if field.field.is_select %}
<div class="button">
<i class="fa fa-caret-down"></i>
</div>
{% endif %}
{% if field.label == 'Placement' %}
<i id="get_placements_btn" class="icon-location-arrow action-icons"></i>
{% endif %}
{% if field.label == 'Key pair' %}
<i id="get_gey_pair_btn" class="icon-location-arrow action-icons"></i>
{% endif %}
{% if field.label == 'Subnet IDs' %}
<i id="get_subnets_btn" class="icon-location-arrow action-icons"></i>
{% endif %}
</div>
{% include "bootstrap_toolkit/field_errors.html" with display="inline" %}
{% autoescape off %}
<span class="help-inline"><span class="text-muted">{{ field.help_text }}</muted></span>
{% endautoescape %}
</div>
{% if not field.field.required %}
</span>
{% endif %}
{% endfor %}
<h5>
<a id="hide_advanced_startup_options" style="display: none;" href="#" class="undecorated_a">
<i class="icon-arrow-up"></i>
Hide advanced options
</a>
<a id="show_advanced_startup_options" href="#" class="undecorated_a">
<i class="icon-arrow-down"></i>
Show advanced startup options
</a>
</h5>
<button id="start_btn" class="btn btn-large btn-primary" data-loading-text="Starting..." type="submit">
Create a cluster
</button>
<span id="starting_updates" class="muted" style="display:none; padding-left:20px">
Really starting
</span>
</form>
<footer class="well">
<p>
This website is an open service developed by the
<a href="https://wiki.galaxyproject.org/">Galaxy</a> and
<a href="http://cloudbiolinux.org">CloudBioLinux</a>
communities. The goal is to make it easy to get started doing
scalable biological analysis on cloud resources. See
<a href="http://youtu.be/AKu_CbbgEj0">this video</a> on how to
get started or
<a href="http://bcbio.wordpress.com/2011/11/29/making-next-generation-sequencing-analysis-pipelines-easier-with-biocloudcentral-and-galaxy-integration/">this guide</a>
for a detailed usage example when using the Amazon cloud. The
<a href="https://github.com/galaxyproject/biocloudcentral">open source code</a>
is available on Github allowing you to also run this application locally.
</p>
<p>
This site can be used for any of the available clouds.
Note that you must have appropriate credentials for the
chosen cloud. Provided credentials are not stored anywhere on this site
and are used only to make the initial request to launch the desired instance.
If a given cloud is not available in the list and you would like to see it
there, please <a href="mailto:galaxy-dev@lists.galaxyproject.org">contact us</a>.
</p>
<p>
Launching servers on the Amazon cloud will incur
<a href="http://aws.amazon.com/ec2/pricing/">usage fees</a>
from Amazon for their resources. By using this service you acknowledge your
sole responsibility for any costs accrued.
</p>
<div id="csrf_token" style='display:none'>{% csrf_token %}</div>
</div>
{% endblock %}