diff options
author | gebele <gebele@in-silico.ch> | 2015-09-23 12:29:46 +0200 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2015-09-23 12:29:46 +0200 |
commit | 06a2f447ac99a37a60c71bb1c7b988beaa213e56 (patch) | |
tree | 3ff32e29aaa6a287ba4e7df28167e91c71639e1a /views | |
parent | 205a34e25b280fe2cffc2223730fffd2637661bf (diff) |
enable csv download
Diffstat (limited to 'views')
-rw-r--r-- | views/batch.haml | 12 | ||||
-rw-r--r-- | views/error.haml | 4 | ||||
-rw-r--r-- | views/layout.haml | 2 | ||||
-rw-r--r-- | views/predict.haml | 74 | ||||
-rw-r--r-- | views/prediction.haml | 5 |
5 files changed, 40 insertions, 57 deletions
diff --git a/views/batch.haml b/views/batch.haml index 7cf1d77..44d22f1 100644 --- a/views/batch.haml +++ b/views/batch.haml @@ -1,13 +1,19 @@ %div.well - %a.btn.btn-warning{:href => to('/predict')} Make New Prediction + %a.btn.btn-warning{:href => to('/predict')} + %span.glyphicon.glyphicon-menu-left{:aria=>{:hidden=>"true"}} + Make New Prediction / displays all prediction result in first table %div.table-responsive %table.table.table-bordered{:id=>"batch", :style=>"background-color:white;"} %thead %tr - %h3.col-md-4 Batch Prediction Results: + %h3.col-md-4{:style=>"padding-left:0;"} Batch Prediction Results: %h3.col-md-8= @filename - + %tr + %span.btn.btn-default + %a{:href=>"#{to("/predict/#{@filename}")}", :title=>"download"} + %span.glyphicon.glyphicon-download-alt{:aria=>{:hidden=>"true"}} + CSV %tbody / key = compound, values = array of arrays with model, prediction - @batch.each do |key, values| diff --git a/views/error.haml b/views/error.haml index c1c1f16..555982b 100644 --- a/views/error.haml +++ b/views/error.haml @@ -1,5 +1,7 @@ %div.well - %a.btn.btn-warning{:href => to('/predict')} Back + %a.btn.btn-warning{:href => to('/predict')} + %i.glyphicon.glyphicon-menu-left + Back %hr %div.well{:style=>"width:100%;margin-bottom:2em;"} = @error_report diff --git a/views/layout.haml b/views/layout.haml index 94a24e9..60f2bb3 100644 --- a/views/layout.haml +++ b/views/layout.haml @@ -24,7 +24,7 @@ %div.row %div.col-md-2 %a{:href=> to("/predict")} - %img.media-object{:src=>"/images/ist_logo.png", :alt=>"logo", :style=>"margin:0 3em 1em 2em;"} + %img.media-object{:src=>"/images/ist_logo.png", :alt=>"logo", :style=>"margin:0 3em 0 2em;"} %div.col-md-8 %h1.media-heading{:style=>"margin: 0 0 0 1em;"} Lazar Toxicity Predictions diff --git a/views/predict.haml b/views/predict.haml index 273e567..de92c15 100644 --- a/views/predict.haml +++ b/views/predict.haml @@ -103,53 +103,24 @@ // whole site content needs to be in one form. Input and checkboxes are proofed by js functions. %form{:name => "form", :action => to('/predict'), :method => "post", :enctype => "multipart/form-data", :onsubmit => "return !!(showcircle())" } %fieldset#top.well - %div.row - %h2.col-md-6 1. Draw a chemical structure - %h2.col-md-6 Select csv file - %div.row - %div.col-md-6 - #insert - %label - #appletContainer - %br - %label{:for => 'identifier'} - or enter the - %a{:href => "http://en.wikipedia.org/wiki/Simplified_molecular_input_line_entry_specification", :rel => "external"} SMILES - string: - %br - %input{:type => 'text', :name => 'identifier', :id => 'identifier', :size => '60'} - %div.col-md-6{:style=>"padding-top:3em;"} - #batch - Browse file (csv) for batch prediction: - %br - %span.btn.btn-default.btn-file - %input{:type=>"file", :name=> "fileselect", :id=>"fileselect", :accept=>".csv"} - %p - Example structure: - %table.table.table-bordered{:style=>"border-bottom:0;"} - %thead - %tr - %th - SMILES - %th - notes - %tbody - %tr - %td - compound - %td - %tr - %td - compound - %td - %tr - %td - compound - %td - %tr - %td{:style=>"border-bottom:0;"} - = "...." - %td{:style=>"border-bottom:0;"} + %h2 1. Draw a chemical structure + #insert + %label + #appletContainer + %br + %label{:for => 'identifier'} + or enter the + %a{:href => "http://en.wikipedia.org/wiki/Simplified_molecular_input_line_entry_specification", :rel => "external"} SMILES + string: + %br + %input{:type => 'text', :name => 'identifier', :id => 'identifier', :size => '60'} + %p + %label{:for=>"fileselect"} + or upload a CSV file for batch predictions + %br + %span.btn.btn-default.btn-file + -#%input{:type=>"file", :name=> "fileselect", :id=>"fileselect", :accept=>".csv", :disabled=>"disabled"} + %input{:type=>"file", :name=> "fileselect", :id=>"fileselect", :accept=>"text/csv"} %fieldset#middle.well %h2 2. Select one or more endpoints @@ -168,7 +139,10 @@ Details | Validation %div.panel-collapse.collapse{:id=>"details#{model.id}", :style=>"margin-left:1em;"} %b Model: - = model.id + %br + Source: + %a{:href=>model.source, :rel=>"external"} + = model.source %br = "Algorithm:\tLAZAR" %br @@ -259,8 +233,8 @@ %td =cv.confusion_matrix[0][1]+cv.confusion_matrix[1][1] %td - -#= "Confusion Matrix:\t" - -#= cv.confusion_matrix + -#= "Confusion Matrix:\t" + -#= cv.confusion_matrix - if model.regression? %br = "Root mean squared error:\t" diff --git a/views/prediction.haml b/views/prediction.haml index 87f8511..a03b509 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -6,8 +6,9 @@ }); }); %div.well - %a.btn.btn-warning{:href => to('/predict')} Make New Prediction - + %a.btn.btn-warning{:href => to('/predict')} + %i.glyphicon.glyphicon-menu-left + Make New Prediction / displays all prediction result in first table %div.table-responsive %table.table.table-bordered{:id=>"overview", :style=>"background-color:white;"} |