summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2013-04-09 16:50:56 +0200
committergebele <gebele@in-silico.ch>2013-04-09 16:50:56 +0200
commitc74da4b41e6413d126ae8d6aa62874627cb14fca (patch)
tree96e8d75a655704d0a63ab3a51c46ab173c4d37dd
parentb983a694fca22d53054a90ddb894f33be365e5a8 (diff)
adjusted for services update
-rw-r--r--application.rb21
-rw-r--r--public/stylesheets/screen.css2
-rw-r--r--public/stylesheets/screen.sass9
-rw-r--r--views/details.haml3
-rw-r--r--views/layout.haml27
-rw-r--r--views/neighbours.haml12
-rw-r--r--views/predict.haml2
-rw-r--r--views/prediction.haml11
8 files changed, 59 insertions, 28 deletions
diff --git a/application.rb b/application.rb
index 6dfc9b7..c04476d 100644
--- a/application.rb
+++ b/application.rb
@@ -27,14 +27,14 @@ end
get '/prediction/:neighbour/details/?' do
@compound_uri = OpenTox::Compound.new params[:neighbour]
@smiles = @compound_uri.smiles
- task = OpenTox::Task.create($task[:uri], @subjectid, RDF::DC.description => "look for names.") do
+ task = OpenTox::Task.run("look for names.") do
names = @compound_uri.names
end
- sleep 1
- task.get
+ task.wait
+ $logger.debug "names task uri: #{task.uri}"
case task[RDF::OT.hasStatus]
when "Error"
- @names = "There are no names for this compound available."
+ @names = ""
when "Completed"
@names = @compound_uri.names.join(",")
end
@@ -44,19 +44,16 @@ end
post '/predict/?' do
# validate identifier input
- task = OpenTox::Task.create($task[:uri], @subjectid, RDF::DC.description => "#{params[:identifier] ? params[:identifier] : "no valid SMILES string."}: Validate SMILES string.") do
+ task = OpenTox::Task.run("Validate SMILES string.") do
# transfered input
@identifier = params[:identifier]
# get compound from SMILES
- @compound = OpenTox::Compound.from_smiles $compound[:uri], @identifier.to_s
+ @compound = OpenTox::Compound.from_smiles @identifier.to_s
# validate SMILES by converting to INCHI
inchi = @compound.inchi
end
# necessary to wait for task
- sleep 1
- task.get
- $logger.debug "task uri: #{task.uri}"
- $logger.debug "task status: #{task[RDF::OT.hasStatus]}"
+ task.wait
# case task fails return message smiles invalid
# case task completed go ahead
case task[RDF::OT.hasStatus]
@@ -65,7 +62,7 @@ post '/predict/?' do
haml :error
when "Completed"
@identifier = params[:identifier]
- @compound = OpenTox::Compound.from_smiles $compound[:uri], @identifier.to_s
+ @compound = OpenTox::Compound.from_smiles @identifier.to_s
# init
@@prediction_models = []
@@predictions = []
@@ -76,7 +73,7 @@ post '/predict/?' do
@mselected = model[0]
@mall = OpenTox::Model.all $model[:uri]
@mall.each do |m|
- m.get
+ #m.get
@@prediction_models << m if m.title =~ /#{@mselected}/
end
$logger.debug "@prediction_models: #{@@prediction_models.inspect}"
diff --git a/public/stylesheets/screen.css b/public/stylesheets/screen.css
index 91bd649..b437053 100644
--- a/public/stylesheets/screen.css
+++ b/public/stylesheets/screen.css
@@ -1 +1 @@
-body{background-image:url("/images/gray_jean.png");background-color:#ccf;overflow:scroll;font-family:sans-serif;min-width:800px;min-heigth:600px}body a{text-decoration:none;font-weight:bold;color:#000}.logo img{float:left;display:inline;margin-right:1em}.content{background-image:url("/images/gray_jean.png")}.content h1{margin:0.3em;text-shadow:#fff 1px 1px 0;font-size:x-large;font-family:Verdana;display:inline}.content h2{text-shadow:#fff 1px 1px 0;font-size:x-large;color:#f55}.content .arrow{margin:5px 0px 5px 20px}.content .back{display:inline}.content .close{text-align:right}.content fieldset#top{border:0;padding:10px;background-color:#dbc87b;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}.content fieldset#top draw{display:block}.content fieldset#middle{border:0;padding:10px;background-color:#dbc87b;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}.content fieldset#middle #model a{font-weight:normal}.content fieldset#bottom{border:0;background-color:#dbc87b;padding:10px;margin-bottom:5em;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content fieldset#bottom input#predict{margin-left:1em}.content .predictions{background-color:#dbc87b;padding:10px;text-align:justify;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content .overview{background-image:url("/images/gray_jean.png");padding:12px;margin-top:1em;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content .overview caption{text-align:left}.content .overview #overview tr td{background-color:#fff;border:1px solid #dad9c7;padding-left:1em}.content .overview #overview tr td#compound{width:150px}.content .overview #overview tr td.true{text-align:center;background-color:#f80000;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}.content .overview #overview tr td.false{text-align:center;background-color:#52ce00;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}.content .error{background-color:#dbc87b;padding:10px;text-align:justify;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content .error error{border:2px solid #f55;background-color:#fff;color:#f55}.details{margin-bottom:2em;height:400px;scroll:auto;background-image:url("/images/gray_jean.png");-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.results{background-image:url("/images/gray_jean.png");overflow:auto;margin-top:2em;margin-bottom:2em;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}.results .tablesorter{width:100%}.results .tablesorter thead{background-color:#fcfaf3}.results .tablesorter thead tr th.header{background-image:url("/images/bg.gif");background-repeat:no-repeat;background-position:center left;cursor:pointer;padding-left:20px;border:1px solid #dad9c7;margin-left:-1px}.results .tablesorter thead tr th.headerSortDown{background-image:url("/images/desc.gif");background-color:#e2d397}.results .tablesorter thead tr th.headerSortUp{background-image:url("/images/asc.gif");background-color:#e2d397}.results .tablesorter tbody tr td.false{text-align:center;background-color:#52ce00;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}.results .tablesorter tbody tr td.true{text-align:center;background-color:#f80000;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}input#predict{border:0px;background-color:#dbc87b;margin:0;padding:0}.footer{margin:20px 0 20px 0}
+body{background-image:url("/images/gray_jean.png");background-color:#ccf;overflow:scroll;font-family:sans-serif;min-width:800px;min-heigth:600px}body a{text-decoration:none;font-weight:bold;color:#000}.logo img{float:left;display:inline;margin-right:1em}.content{background-image:url("/images/gray_jean.png")}.content h1{margin:0.3em;text-shadow:#fff 1px 1px 0;font-size:x-large;font-family:Verdana;display:inline}.content h2{text-shadow:#fff 1px 1px 0;font-size:x-large;color:#f55}.content .arrow{margin:5px 0px 5px 20px}.content .back{display:inline}.content .close{text-align:right}.content #back-top{z-index:4;position:fixed;bottom:60px;margin-left:165px}.content #back-top a:hover{color:#bbb}.content fieldset#top{border:0;padding:10px;background-color:#dbc87b;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}.content fieldset#top draw{display:block}.content fieldset#middle{border:0;padding:10px;background-color:#dbc87b;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}.content fieldset#middle #model a{font-weight:normal}.content fieldset#bottom{border:0;background-color:#dbc87b;padding:10px;margin-bottom:5em;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content fieldset#bottom input#predict{margin-left:1em}.content .predictions{background-color:#dbc87b;padding:10px;text-align:justify;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content .overview{background-image:url("/images/gray_jean.png");padding:12px;margin-top:1em;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content .overview caption{text-align:left}.content .overview #overview tr td{background-color:#fff;border:1px solid #dad9c7;padding-left:1em}.content .overview #overview tr td#compound{width:150px}.content .overview #overview tr td.true{text-align:center;background-color:#f80000;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}.content .overview #overview tr td.false{text-align:center;background-color:#52ce00;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}.content .error{background-color:#dbc87b;padding:10px;text-align:justify;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-border-radius-topleft:25px;-webkit-border-top-left-radius:25px;border-top-left-radius:25px;-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-topright:25px;-webkit-border-top-right-radius:25px;border-top-right-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.content .error error{border:2px solid #f55;background-color:#fff;color:#f55}.details{margin-bottom:2em;height:400px;scroll:auto;background-image:url("/images/gray_jean.png");-moz-border-radius-bottomleft:25px;-webkit-border-bottom-left-radius:25px;border-bottom-left-radius:25px;-moz-border-radius-bottomright:25px;-webkit-border-bottom-right-radius:25px;border-bottom-right-radius:25px;-webkit-background-clip:border;-moz-background-clip:border;background-clip:border-box}.results{background-image:url("/images/gray_jean.png");overflow:auto;margin-top:2em;margin-bottom:2em;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}.results .tablesorter{width:100%}.results .tablesorter thead{background-color:#fcfaf3}.results .tablesorter thead tr th.header{background-image:url("/images/bg.gif");background-repeat:no-repeat;background-position:center left;cursor:pointer;padding-left:20px;border:1px solid #dad9c7;margin-left:-1px}.results .tablesorter thead tr th.headerSortDown{background-image:url("/images/desc.gif");background-color:#e2d397}.results .tablesorter thead tr th.headerSortUp{background-image:url("/images/asc.gif");background-color:#e2d397}.results .tablesorter tbody tr td.false{text-align:center;background-color:#52ce00;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}.results .tablesorter tbody tr td.true{text-align:center;background-color:#f80000;-webkit-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;-moz-box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset;box-shadow:1px 1px 1px #fff inset,-1px -1px 5px rgba(0,0,0,0.3) inset}input#predict{border:0px;background-color:#dbc87b;margin:0;padding:0}.footer{margin:20px 0 20px 0}
diff --git a/public/stylesheets/screen.sass b/public/stylesheets/screen.sass
index cc8878d..882749b 100644
--- a/public/stylesheets/screen.sass
+++ b/public/stylesheets/screen.sass
@@ -56,6 +56,15 @@ body
.close
text-align: right
+ #back-top
+ z-index: 4
+ position: fixed
+ bottom: 60px
+ margin-left: 165px
+
+ a:hover
+ color: #bbb
+
fieldset#top
border: 0
//margin-top: 5em
diff --git a/views/details.haml b/views/details.haml
index 48d28bc..ff77783 100644
--- a/views/details.haml
+++ b/views/details.haml
@@ -4,14 +4,13 @@
.details
%h2
Details:
- %img{:src=>"#{@compound_uri.uri}/image", :alt=>@compound_uri.uri, :width=>"100px"}
+ %img{:src=>"#{@compound_uri.uri}/image", :alt=>"", :width=>"100px"}
%br
%b
SMILES:
%p= @smiles
%br
%b
- // TODO handle OpenTox::ResourceNotFoundError
Names:
%p= @names
%br
diff --git a/views/layout.haml b/views/layout.haml
index 7c05190..b6606a1 100644
--- a/views/layout.haml
+++ b/views/layout.haml
@@ -20,7 +20,32 @@
%h1 Lazar Toxicity Predictions
%hr
- .content
+ .content
+ :javascript
+ $(document).ready(function(){
+ // hide #back-top first
+ $("#back-top").hide();
+ // fade in #back-top
+ $(function () {
+ $(window).scroll(function () {
+ if ($(this).scrollTop() > 400) {
+ $('#back-top').fadeIn();
+ } else {
+ $('#back-top').fadeOut();
+ }
+ });
+ // scroll body to 0px on click
+ $('#back-top a').click(function () {
+ $('body,html').animate({
+ scrollTop: 0
+ }, 500);
+ return false;
+ });
+ });
+ });
+ #back-top
+ %a{:href => ""}^ top ^
+
= yield
.footer
diff --git a/views/neighbours.haml b/views/neighbours.haml
index a593e7b..7d99288 100644
--- a/views/neighbours.haml
+++ b/views/neighbours.haml
@@ -29,7 +29,7 @@
#results{:id=>"#{count_rs}"}
- pa.each do |p|
/ get prediction OpenTox::Dataset
- - p.get
+ -# p.get
/ prepare dataset for neighbours table ;
/ delete first array which contains input compound prediction ;
/ keep the following arrays they are the neighbour predictions ;
@@ -64,12 +64,12 @@
- p.compounds.each do |neighbour_compound|
%tr
%td
- %img{:src=>"#{neighbour_compound.uri}/image", :alt=>neighbour_compound.uri, :width=>"100px"}
- %td{:class => p.data_entries[count][0]}
- = p.data_entries[count][0]
- %td{:class => p.data_entries[count][0]}
+ %img{:src=>"#{neighbour_compound.uri}/image", :alt=>"", :width=>"100px"}
+ %td{:class => p.data_entries[count][2]}
+ = p.data_entries[count][2]
+ %td{:class => p.data_entries[count][2]}
= p.data_entries[count][3].round(3)
- %td{:class => p.data_entries[count][0]}
+ %td{:class => p.data_entries[count][2]}
%a{:href => to("/prediction/#{CGI.escape(neighbour_compound.uri)}/details"), :id=>"link#{count_rs}#{count}", :target=>"details"}
%img{:src=>"/images/arrow_right_float.png", :alt=>"arrow"}
:javascript
diff --git a/views/predict.haml b/views/predict.haml
index b53acb6..82f7bbc 100644
--- a/views/predict.haml
+++ b/views/predict.haml
@@ -1,4 +1,5 @@
:javascript
+
function getsmiles() {
if (document.JME.smiles() != '') {
document.form.identifier.value = document.JME.smiles() ;
@@ -71,7 +72,6 @@
%p Please observe validation report for details.
%br
- @models.each do |model|
- - model.get
#model
%input{:type => "checkbox", :name => "selection[#{model.title}]", :id => "selection[#{model.title}]", :value => true, :disabled => false}
%label{:for => "selection[#{model.title}]"}
diff --git a/views/prediction.haml b/views/prediction.haml
index dd90847..02b3ab1 100644
--- a/views/prediction.haml
+++ b/views/prediction.haml
@@ -14,21 +14,22 @@
%tbody
%tr
%td{:id=>"compound"}
- %img{:src=>"#{@compound.uri}/image", :alt=>@compound.uri, :width=>"100"}
+ %img{:src=>"#{@compound.uri}/image", :alt=>"image not available", :width=>"100"}
- count=0
- @@predictions.each do |pa|
- pa.each do |p|
- - p.get
- %td{:class => p.data_entries[0][1]}
+ -# p.get
+ %td{:class => p.data_entries[0][0]}
%b{:class => "title"}
= @@prediction_models[count].title
%br
+ - $logger.debug "p.data_entries: #{p.data_entries}"
%br
= "Result:\n"
- %b= p.data_entries[0][1]
+ %b= p.data_entries[0][0]
%br
= "Confidence:\n"
- = p.data_entries[0][2].round(3)
+ = p.data_entries[0][1].round(3)
%br
%a{:href=> "#tabs", :id=>"link#{count}"}
%img{:src=>"/images/arrow_down_float.png", :alt=>"arrow"}