##// END OF EJS Templates
Optmize plots mods
jespinoza -
r3:83075d03134d
parent child
Show More

The requested changes are too big and content was truncated. Show full diff

1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
@@ -1,67 +1,68
1 {% extends "base.html" %}
1 {% extends "base.html" %}
2
2
3 {% comment %}
3 {% comment %}
4 Written by Bill Rideout brideout@haystack.mit.edu
4 Written by Bill Rideout brideout@haystack.mit.edu
5
5
6 Base template for Madrigal show experiment web interface
6 Base template for Madrigal show experiment web interface
7
7
8 $Id: show_experiment.html 7310 2021-03-02 14:31:06Z brideout $
8 $Id: show_experiment.html 7310 2021-03-02 14:31:06Z brideout $
9 {% endcomment %}
9 {% endcomment %}
10
10
11 {% block title %}Show Madrigal experiment{% endblock %}
11 {% block title %}Show Madrigal experiment{% endblock %}
12
12
13 {% block extra_head %}
13 {% block extra_head %}
14 <script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
14 <script>
15 <script>
15
16
16 function changeFile (select) {
17 function changeFile (select) {
17 var basename = select.options[select.selectedIndex].value;
18 var basename = select.options[select.selectedIndex].value;
18 {% if form.exp_id %}
19 {% if form.exp_id %}
19 var url = '{% url 'change_files' %}' + '?experiment_list={{ form.exp_id.label }}&file_list=' + basename;
20 var url = '{% url 'change_files' %}' + '?experiment_list={{ form.exp_id.label }}&file_list=' + basename;
20 {% else %}
21 {% else %}
21 var exp_id = $("#id_experiment_list")[0].options[$("#id_experiment_list")[0].selectedIndex].value;
22 var exp_id = $("#id_experiment_list")[0].options[$("#id_experiment_list")[0].selectedIndex].value;
22 var url = '{% url 'change_files' %}' + '?experiment_list=' + exp_id + '&file_list=' + basename;
23 var url = '{% url 'change_files' %}' + '?experiment_list=' + exp_id + '&file_list=' + basename;
23 {% endif %}
24 {% endif %}
24 // first delete all forms that are now out of date
25 // first delete all forms that are now out of date
25 divIndex = $(".single_form").index($( "#file_buttons" ))
26 divIndex = $(".single_form").index($( "#file_buttons" ))
26 $(".single_form").slice(divIndex).empty()
27 $(".single_form").slice(divIndex).empty()
27 // second populate the file_list html if '0' not selected
28 // second populate the file_list html if '0' not selected
28 if (basename != '0') {
29 if (basename != '0') {
29 $(".single_form").slice(divIndex,divIndex+1).load(url);
30 $(".single_form").slice(divIndex,divIndex+1).load(url);
30 }
31 }
31 }
32 }
32
33
33 {% include "madweb/fileDownload.js" %}
34 {% include "madweb/fileDownload.js" %}
34
35
35 </script>
36 </script>
36 {% endblock %}
37 {% endblock %}
37
38
38 {% block content %}
39 {% block content %}
39 <center><h4> {{ form.exp_desc.label }} </h4></center>
40 <center><h4> {{ form.exp_desc.label }} </h4></center>
40
41
41 {% include "madweb/file_list.html" %}
42 {% include "madweb/file_list.html" %}
42
43
43 <!-- file select div -->
44 <!-- file select div -->
44 <div class="col-md-12 single_form" id="file_buttons">
45 <div class="col-md-12 single_form" id="file_buttons">
45 {% if form.file_buttons %}
46 {% if form.file_buttons %}
46 {% include "madweb/file_buttons.html" %}
47 {% include "madweb/file_buttons.html" %}
47 {% endif %}
48 {% endif %}
48 </div> <!-- end subdivide -->
49 </div> <!-- end subdivide -->
49 <div>&nbsp;</div>
50 <div>&nbsp;</div>
50
51
51 <!-- file select div -->
52 <!-- file select div -->
52 <div class="col-md-12 single_form" id="file_data">
53 <div class="col-md-12 single_form" id="file_data">
53 {% if form.show_plots %}
54 {% if form.show_plots %}
54 {% include "madweb/show_plots.html" %}
55 {% include "madweb/show_plots.html" %}
55 {% elif form.plot_list %}
56 {% elif form.plot_list %}
56 {% include "madweb/show_plots.html" %}
57 {% include "madweb/show_plots.html" %}
57 {% endif %}
58 {% endif %}
58 </div> <!-- end subdivide -->
59 </div> <!-- end subdivide -->
59
60
60 <!-- file select div -->
61 <!-- file select div -->
61 <div class="col-md-12 single_form" id="file_plot">
62 <div class="col-md-12 single_form" id="file_plot">
62 {% if form.show_plots %}
63 {% if form.show_plots %}
63 {% include "madweb/parameter_selection.html" %}
64 {% include "madweb/parameter_selection.html" %}
64 {% endif %}
65 {% endif %}
65 </div> <!-- end subdivide -->
66 </div> <!-- end subdivide -->
66
67
67 {% endblock %} No newline at end of file
68 {% endblock %}
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
General Comments 0
You need to be logged in to leave comments. Login now