123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325 |
- {% extends "bootstrapheader.html" %}
-
- {% block body %}
- <body>
- <div class="container">
- <h2>Experiment</h2>
- Loged in as {{email}}
-
-
- <div class=container>
-
- <div class="panel panel-primary">
- <div class="panel-heading">
- <h3>{{experiment['name']}}</h3>
- </div>
- <div class="panel-body">
- <p>Description: {{experiment['description']}}<p>
-
- {% if exp_peaks %}
- <table class="table table-striped">
- <tr><th>Peaks</th>
- {% for p in exp_peaks %}
- <tr><td>{{p['peak']}}</td></tr>
- {% endfor %}
- </table>
- {% endif %}
-
- Experiment date: {{experiment['date']}}
-
- <form role="form" action="/editExperiment" method="post">
- <button type="submit" class="btn btn-primary" name="editInfo" value="edit">Edit</button>
- </form>
-
- </div>
- </div>
-
- {% for m in msg %}
- <div class="alert alert-{{m["type"]}}">
- <a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
- {{m["msg"]}}
- </div>
- {% endfor %}
-
- <!--
-
- THE AVERAGES OF THE SAMPLES RELATIVE INTENSITIES
-
- -->
-
- {% if averages %}
- <h4>Peaks Average: </h4>
- <canvas id="averages" width="600" height="400"></canvas>
- <script type="text/javascript">
- var ctxA = document.getElementById("averages");
- var data = {
- labels: [
- {% for peak, average in averages|dictsort %}
- {{peak}},
- {% endfor %}
- ],
- datasets: [
- {
- label: "My First dataset",
- fillColor: "rgba(220,220,220,0.5)",
- strokeColor: "rgba(220,220,220,0.8)",
- highlightFill: "rgba(220,220,220,0.75)",
- highlightStroke: "rgba(220,220,220,1)",
- data: [
- {% for peak, average in averages|dictsort %}
- {{average}},
- {% endfor %}
- ]
- }]} ;
- var chartA = new Chart(ctxA.getContext("2d")).Line(data, {bezierCurve: false});
-
- </script>
-
- <table class="table table-striped">
- <tr><th>Peak</th><th>Intensity</th></tr>
- {% for peak, average in averages|dictsort %}
- <tr><td>{{peak}}</td><td>{{average}}</td>
- {% endfor %}
- </table>
-
- {% endif %}
-
- <!--
-
- THE STDDEVS OF THE SAMPLES RELATIVE INTENSITIES
-
- -->
- {% if stdDevs %}
- <h4>Peaks Standard Dev: </h4>
-
- <canvas id="stdDev" width="600" height="400"></canvas>
- <script type="text/javascript">
-
- var ctxSD = document.getElementById("stdDev");
- var data = {
- labels: [
- {% for peak, stddev in stdDevs|dictsort %}
- {{peak}},
- {% endfor %}
- ],
- datasets: [
- {
- label: "My First dataset",
- fillColor: "rgba(220,220,220,0.5)",
- strokeColor: "rgba(220,220,220,0.8)",
- highlightFill: "rgba(220,220,220,0.75)",
- highlightStroke: "rgba(220,220,220,1)",
- data: [
- {% for peak, stddev in stdDevs|dictsort %}
- {{stddev}},
- {% endfor %}
- ]
- }]} ;
- var chartSD = new Chart(ctxSD.getContext("2d")).Line(data, {bezierCurve: false});
-
- </script>
-
- <table class="table table-striped">
- <tr><th>Peak</th><th>Intensity</th></tr>
- {% for peak, stddev in stdDevs|dictsort %}
- <tr><td>{{peak}}</td><td>{{stddev}}</td>
- {% endfor %}
- </table>
-
- {% endif %}
-
- <!--
-
- THE SEMS OF THE SAMPLES RELATIVE INTENSITIES
-
- -->
-
- {% if sems %}
- <h4>Peaks SEM: </h4>
- <canvas id="sems" width="600" height="400"></canvas>
- <script type="text/javascript">
-
- var ctxSEM = document.getElementById("sems");
- var data = {
- labels: [
- {% for peak, sem in sems|dictsort %}
- {{peak}},
- {% endfor %}
- ],
- datasets: [
- {
- label: "My First dataset",
- fillColor: "rgba(220,220,220,0.5)",
- strokeColor: "rgba(220,220,220,0.8)",
- highlightFill: "rgba(220,220,220,0.75)",
- highlightStroke: "rgba(220,220,220,1)",
- data: [
- {% for peak, sem in sems|dictsort %}
- {{sem}},
- {% endfor %}
- ]
- }]} ;
- var chartSEM = new Chart(ctxSEM.getContext("2d")).Line(data, {bezierCurve: false});
- </script>
-
- <table class="table table-striped">
- <tr><th>Peak</th><th>Intensity</th></tr>
- {% for peak, sem in sems|dictsort %}
- <tr><td>{{peak}}</td><td>{{sem}}</td>
- {% endfor %}
- </table>
- {% endif %}
-
- <h3>Samples:</h3>
- <div class="panel-group" id="accordion">
-
- {% if samples %}
- {% for sample in samples %}
- <div class="panel panel-default" id="panelOut{{sample['sid']}}">
- <div class="panel-heading">
- <h4 class="panel-title">
- <a data-toggle="collapse" data-parent="#accordion" href="#collapse{{sample['sid']}}">{{sample['name']}}</a>
- </h4>
- </div>
- <div id="collapse{{sample['sid']}}" class="panel-collapse collapse">
- <div class="panel-body">
-
- <h4>Experiment Relative Intensity</h4>
- {% if sample['rel_ints'] %}
-
- <canvas id="graphS{{sample['sid']}}" width="600" height="400"></canvas>
- <script type="text/javascript">
-
- $(document).ready(function(){
- $('#panelOut{{sample['sid']}}').on('shown.bs.collapse', function () {
- var ctxOut{{sample['sid']}} = document.getElementById("graphS{{sample['sid']}}");
- var data = {
- labels: [
- {% for peak, relint in sample['rel_ints']|dictsort %}
- {{peak}},
- {% endfor %}
- ],
- datasets: [
- {
- label: "My First dataset",
- fillColor: "rgba(220,220,220,0.5)",
- strokeColor: "rgba(220,220,220,0.8)",
- highlightFill: "rgba(220,220,220,0.75)",
- highlightStroke: "rgba(220,220,220,1)",
- data: [
- {% for peak, relint in sample['rel_ints']|dictsort %}
- {{relint}},
- {% endfor %}
- ]
- }]} ;
- var chartOut{{sample['sid']}} = new Chart(ctxOut{{sample['sid']}}.getContext("2d")).Line(data, {bezierCurve: false});
- chartOut{{sample['sid']}}.destroy();
- chartOut{{sample['sid']}} = new Chart(ctxOut{{sample['sid']}}.getContext("2d")).Line(data, {bezierCurve: false});
-
- });
- }) ;
- </script>
-
- <table class="table table-striped">
- <tr><th>Peak</th><th>Intensity</th></tr>
- {% for peak, relint in sample['rel_ints']|dictsort %}
- <tr><td>{{peak}}</td><td>{{relint}}</td>
- {% endfor %}
- </table>
- {% endif %}
-
- <h4>Peaks:</h4>
- <div class="panel-group" id="accordion2">
- {% if sample['peaks'] %}
- {% for peak in sample['peaks'] %}
- <div class="panel panel-default" id="panelIn{{peak['pid']}}">
- <div class="panel-heading">
- <h4 class="panel-title">
- <a data-toggle="collapse" data-parent="#accordion2" href="#collapsep{{peak['pid']}}">{{peak['peak']}}</a>
- </h4>
- </div>
- <div id="collapsep{{peak['pid']}}" class="panel-collapse collapse">
- <div class="panel-body">
- {% if peak['intensities'] %}
- <canvas id="graph{{peak['pid']}}" width="600" height="400"></canvas>
- <script type="text/javascript">
-
- $(document).ready(function(){
- $('#panelIn{{peak['pid']}}').on('shown.bs.collapse', function () {
- var ctxIn{{peak['pid']}} = document.getElementById("graph{{peak['pid']}}");
- var data = {
- labels: [
- {% for pi in peak['intensities'] %}
- {{pi['peak']}},
- {% endfor %}
- ],
- datasets: [
- {
- label: "My First dataset",
- fillColor: "rgba(220,220,220,0.5)",
- strokeColor: "rgba(220,220,220,0.8)",
- highlightFill: "rgba(220,220,220,0.75)",
- highlightStroke: "rgba(220,220,220,1)",
- data: [
- {% for pi in peak['intensities'] %}
- {{pi['intensity']}},
- {% endfor %}
- ]
- }]} ;
- var chartIn{{peak['pid']}} = new Chart(ctxIn{{peak['pid']}}.getContext("2d")).Line(data, {bezierCurve: false});
- chartIn{{peak['pid']}}.destroy();
- chartIn{{peak['pid']}} = new Chart(ctxIn{{peak['pid']}}.getContext("2d")).Line(data, {bezierCurve: false});
-
- });
- }) ;
-
-
- </script>
- <table class="table table-striped">
- <tr><th>Peak</th><th>Intensity</th></tr>
- {% for pi in peak['intensities'] %}
- <tr><td>{{pi['peak']}}</td><td>{{pi['intensity']}}</td>
- {% endfor %}
- </table>
- {% endif %}
- </div>
- </div>
- </div>
- {% endfor %}
- {% endif %}
- </div>
- </div>
- </div>
- </div>
- {% endfor %}
- {% endif %}
-
- </div>
-
- <form action="/upload"
- class="dropzone"
- id="maldidropzone"
- >
- <input type="hidden" name="eid" value="{{eid}}">
- </form>
-
- <script type="text/javascript">
- Dropzone.options.maldidropzone = {
- init: function() {
- thisDropzone = this;
- this.on("success", function(file, responseText) {
- console.log(responseText);
- setTimeout(function(){location = location ;}, 2000);
- });
- }
- };
-
- </script>
-
- </div> <!-- /container -->
-
- </body>
-
- {% endblock %}
-
|