summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2011-03-31 14:27:55 +0200
committerChristoph Helma <helma@in-silico.ch>2011-03-31 14:27:55 +0200
commit1ff90a50733e96f1fefd93adcdeef07a8f93b432 (patch)
treeebdd684546d4da54c71c36b13e0b8c163d64ab95
parentf57103720c82700f7e43d54707e9381668f0fb67 (diff)
parent7dbcfb7b0df30c55d79574d5133f9ba9cf135a9f (diff)
Merge branch 'development' into feature/ambit-datasets
-rw-r--r--application.rb30
-rw-r--r--model.rb12
-rw-r--r--public/external.gifbin0 -> 212 bytes
-rwxr-xr-xpublic/javascripts/toxcreate.js66
-rw-r--r--public/progressbar/progressbar.css23
-rw-r--r--views/create.haml2
-rw-r--r--views/feature_table.haml4
-rw-r--r--views/help.haml8
-rw-r--r--views/layout.haml6
-rw-r--r--views/lazar.haml8
-rw-r--r--views/lazar_algorithm.haml4
-rw-r--r--views/lazar_description.haml4
-rw-r--r--views/login.haml12
-rw-r--r--views/model.haml10
-rw-r--r--views/model_name.haml2
-rw-r--r--views/model_name_edit.haml7
-rw-r--r--views/models.haml8
-rw-r--r--views/regression_validation.haml6
-rw-r--r--views/significant_fragments.haml2
-rw-r--r--views/style.sass3
-rw-r--r--views/unit.haml2
21 files changed, 116 insertions, 103 deletions
diff --git a/application.rb b/application.rb
index 9583411..c5190ea 100644
--- a/application.rb
+++ b/application.rb
@@ -245,22 +245,25 @@ post '/models' do # create a new model
end
@model.update :type => type, :feature_dataset => lazar.metadata[OT.featureDataset], :uri => lazar.uri
- unless url_for("",:full).match(/localhost/)
+ if url_for("",:full).match(/localhost/)
+ @model.update(:status => "Completed") #, :warnings => @model.warnings + "\nValidation service cannot be accessed from localhost.")
+ task.progress(100)
+ else
@model.update :status => "Validating model"
begin
- validation = OpenTox::Crossvalidation.create(
- {:algorithm_uri => lazar.metadata[OT.algorithm],
- :dataset_uri => lazar.parameter("dataset_uri"),
- :subjectid => subjectid,
- :prediction_feature => lazar.parameter("prediction_feature"),
- :algorithm_params => "feature_generation_uri=#{lazar.parameter("feature_generation_uri")}"},
- nil, OpenTox::SubTask.new(task,25,80))
+ validation = OpenTox::Crossvalidation.create( {
+ :algorithm_uri => lazar.metadata[OT.algorithm],
+ :dataset_uri => lazar.parameter("dataset_uri"),
+ :subjectid => subjectid,
+ :prediction_feature => lazar.parameter("prediction_feature"),
+ :algorithm_params => "feature_generation_uri=#{lazar.parameter("feature_generation_uri")}" },
+ nil, OpenTox::SubTask.new(task,25,80))
+
@model.update(:validation_uri => validation.uri)
LOGGER.debug "Validation URI: #{@model.validation_uri}"
# create summary
validation.summary(subjectid).each do |k,v|
- #LOGGER.debug "mr ::: k: #{k.inspect} - v: #{v.inspect}"
begin
eval "@model.update :#{k.to_s} => v" if v
rescue
@@ -281,16 +284,9 @@ post '/models' do # create a new model
end
end
-
-
- #@model.warnings += "<p>Incorrect Smiles structures (ignored):</p>" + parser.smiles_errors.join("<br/>") unless parser.smiles_errors.empty?
- #@model.warnings += "<p>Irregular activities (ignored):</p>" + parser.activity_errors.join("<br/>") unless parser.activity_errors.empty?
- #duplicate_warnings = ''
- #parser.duplicates.each {|inchi,lines| duplicate_warnings += "<p>#{lines.join('<br/>')}</p>" if lines.size > 1 }
- #@model.warnings += "<p>Duplicated structures (all structures/activities used for model building, please make sure, that the results were obtained from <em>independent</em> experiments):</p>" + duplicate_warnings unless duplicate_warnings.empty?
lazar.uri
end
- @model.update(:task_uri => task.uri)
+ @model.update :task_uri => task.uri
flash[:notice] = "Model creation and validation started - this may last up to several hours depending on the number and size of the training compounds."
redirect url_for('/models')
diff --git a/model.rb b/model.rb
index 5332629..5b1f4f5 100644
--- a/model.rb
+++ b/model.rb
@@ -1,13 +1,18 @@
require 'ohm'
+require 'ohm/contrib'
class ToxCreateModel < Ohm::Model
+ include Ohm::Callbacks
+ include Ohm::Typecast
+ include Ohm::Timestamping
+
attribute :name
attribute :warnings
attribute :error_messages
attribute :type
attribute :status
- attribute :created_at
+ attribute :created_at, Date
attribute :task_uri
attribute :uri
@@ -42,7 +47,7 @@ class ToxCreateModel < Ohm::Model
attr_accessor :subjectid
@subjectid = nil
- #after :save, :check_policy
+ after :save, :check_policy
def validation_status
begin
@@ -73,5 +78,4 @@ class ToxCreateModel < Ohm::Model
OpenTox::Authorization.check_policy(web_uri, subjectid)
end
-end
-
+end \ No newline at end of file
diff --git a/public/external.gif b/public/external.gif
new file mode 100644
index 0000000..6114959
--- /dev/null
+++ b/public/external.gif
Binary files differ
diff --git a/public/javascripts/toxcreate.js b/public/javascripts/toxcreate.js
index 94d944d..d9946c4 100755
--- a/public/javascripts/toxcreate.js
+++ b/public/javascripts/toxcreate.js
@@ -86,8 +86,6 @@ $(function() {
});
return id;
};
-
-
loadModel = function(id, view) {
if(id == "") return -1;
@@ -111,30 +109,9 @@ $(function() {
return false;
};
- checkValidation = function() {
- var reload_id = "";
- $("input.model_validation_report").each(function(){
- if(!$(this).val().match(/Completed|Error/)) {
- reload_id = this.id.replace("model_validation_report_","");
- if(/^\d+$/.test(reload_id)) loadModel(reload_id, 'validation');
- };
- });
-//<<<<<<< HEAD
- //var validationCheck = setTimeout('checkValidation()',15000);
- //var validationCheck = setTimeout('checkValidation()',5000);
-//=======
- $("input.model_validation_qmrf").each(function(){
- if(!$(this).val().match(/Completed|Error/)) {
- reload_id = this.id.replace("model_validation_qmrf_","");
- if(/^\d+$/.test(reload_id)) loadModel(reload_id, 'model');
- };
- });
- var validationCheck = setTimeout('checkValidation()',15000);
-//>>>>>>> d1ad229730f6e6043fe6e7a150e05ffa41e3cec2
- }
});
-jQuery.fn.editModel = function(type, options) {
+jQuery.fn.editModel = function(options) {
var defaults = {
method: 'get',
action: this.attr('href'),
@@ -161,7 +138,34 @@ jQuery.fn.editModel = function(type, options) {
});
};
-jQuery.fn.saveModel = function(type, options) {
+jQuery.fn.cancelEdit = function(options) {
+ var defaults = {
+ method: 'get',
+ action: 'model/' + options.id + '/name?mode=show',
+ trigger_on: 'click'
+ };
+ var opts = $.extend(defaults, options);
+
+ this.bind(opts.trigger_on, function() {
+ $.ajax({
+ type: opts.method,
+ url: opts.action,
+ dataType: 'html',
+ data: {
+ '_method': 'get'
+ },
+ success: function(data) {
+ $("div#model_" + opts.id + "_name").html(data);
+ },
+ error: function(data) {
+ alert("model cancel error!");
+ }
+ });
+ return false;
+ });
+};
+
+jQuery.fn.saveModel = function(options) {
var defaults = {
method: 'put',
action: 'model/' + options.id,
@@ -222,3 +226,15 @@ jQuery.fn.deleteModel = function(type, options) {
return false;
});
};
+
+$(document).ready(function() {
+ $('A[rel="external"]').each(function() {
+ $(this).attr('alt', 'Link opens in new window.');
+ $(this).attr('title', 'Link opens in new window.');
+ });
+ $('A[rel="external"]').click(function() {
+ window.open($(this).attr('href'));
+ return false;
+ });
+});
+
diff --git a/public/progressbar/progressbar.css b/public/progressbar/progressbar.css
index f3b4131..d19839d 100644
--- a/public/progressbar/progressbar.css
+++ b/public/progressbar/progressbar.css
@@ -11,9 +11,7 @@
/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
-/*
-.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
-*/
+.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px, 1px, 1px, 1px); clip: rect(1px,1px,1px,1px); }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-helper-clearfix { display: inline-block; }
@@ -21,9 +19,8 @@
* html .ui-helper-clearfix { height:1%; }
.ui-helper-clearfix { display:block; }
/* end clearfix */
-/*
-.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
-*/
+
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; }
/* Interaction Cues
----------------------------------*/
@@ -84,10 +81,8 @@
.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
-/*
-.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
-.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
-*/
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { background-image: none; }
/* Icons
----------------------------------*/
@@ -283,6 +278,10 @@
/* Misc visuals
----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; }
+.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;}/*
/* Corner radius */
/*
.ui-corner-tl { -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; border-top-left-radius: 5px; }
@@ -300,11 +299,7 @@
/*
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
-*/
-.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; }
-.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; }
-/*
* jQuery UI Progressbar 1.8.9
*
* Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
diff --git a/views/create.haml b/views/create.haml
index 82f48d0..2149f3d 100644
--- a/views/create.haml
+++ b/views/create.haml
@@ -45,5 +45,5 @@
and your models can be modified or deleted by other guests. Please
= link_to "log in", "/login"
with your
- %a{:href => "www.opentox.org"} OpenTox
+ %a{:href => "http://www.opentox.org", :rel => "external"} OpenTox
account to control your model permissions.
diff --git a/views/feature_table.haml b/views/feature_table.haml
index 4fa927c..a8a153f 100644
--- a/views/feature_table.haml
+++ b/views/feature_table.haml
@@ -4,7 +4,7 @@
%th
activating
(
- %a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html"} SMARTS
+ %a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html", :rel => "external"} SMARTS
)
%th p value
- if features[:activating]
@@ -17,7 +17,7 @@
%th
deactivating
(
- %a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html"} SMARTS
+ %a{:href => "http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html", :rel => "external"} SMARTS
)
%th p value
- if features[:deactivating]
diff --git a/views/help.haml b/views/help.haml
index da6495e..3d39641 100644
--- a/views/help.haml
+++ b/views/help.haml
@@ -1,7 +1,7 @@
= link_to "Back to model creation", '/create'
%p
Input files have two columns. Enter in the first column the chemical structure in
- %a{:href => "http://en.wikipedia.org/wiki/Simplified_molecular_input_line_entry_specification"} SMILES
+ %a{:href => "http://en.wikipedia.org/wiki/Simplified_molecular_input_line_entry_specification", :rel => "external"} SMILES
format, in the second column the toxic activity. The first line contains a description of the columns and is ignored.
%dl
%dt Classification datasets
@@ -12,15 +12,15 @@
%ul
%li
use
- %a{:href => "http://en.wikipedia.org/wiki/Molar_(concentration)"} molar
+ %a{:href => "http://en.wikipedia.org/wiki/Molar_(concentration)", :rel => "external"} molar
units
%li enter non-logarithmic values (logarithms are taken internally)
%li avoid 0 activities (will be ignored)
%p
Input files are accepted in
- %a{:href => "http://en.wikipedia.org/wiki/Microsoft_Excel"} Excel
+ %a{:href => "http://en.wikipedia.org/wiki/Microsoft_Excel", :rel => "external"} Excel
and
- %a{:href => "http://en.wikipedia.org/wiki/Comma-separated_values"} CSV
+ %a{:href => "http://en.wikipedia.org/wiki/Comma-separated_values", :rel => "external"} CSV
formats.
%h3 Excel example
diff --git a/views/layout.haml b/views/layout.haml
index cdabe43..c849dec 100644
--- a/views/layout.haml
+++ b/views/layout.haml
@@ -37,7 +37,7 @@
- if `hostname`.match(/ot-test/)
.notice
This service is for testing purposes only - once a week all models will be deleted. Please send bug reports and feature requests to our
- %a{:href => 'http://github.com/opentox/toxcreate/issues'} issue tracker.
+ %a{:href => 'http://github.com/opentox/toxcreate/issues', :rel => "external"} issue tracker.
- if flash[:notice]
%p
@@ -48,6 +48,6 @@
.footer
&copy;
- %a{:href => 'http://www.in-silico.ch'} in silico toxicology
+ %a{:href => 'http://www.in-silico.ch', :rel => "external"} in silico toxicology
2009-2010, powered by
- %a{:href => 'http://www.opentox.org'} <span style="color:#5D308A;font-family:arial,sans-serif,helvetica;letter-spacing:-1px;">Open</span><span style="color:#000;font-family:arial,sans-serif,helvetica;font-weight:bold;letter-spacing:-1px;position:relative;">Tox</span>
+ %a{:href => 'http://www.opentox.org', :rel => "external"} <span style="color:#5D308A;font-family:arial,sans-serif,helvetica;letter-spacing:-1px;">Open</span><span style="color:#000;font-family:arial,sans-serif,helvetica;font-weight:bold;letter-spacing:-1px;">Tox</span>
diff --git a/views/lazar.haml b/views/lazar.haml
index 3de7400..deb0c18 100644
--- a/views/lazar.haml
+++ b/views/lazar.haml
@@ -36,12 +36,12 @@
%li= toggle_link("#fragments","Significant fragments")
-# This does not work, ask nina/vedrin
-# %li
- %a{:href => "http://ambit.uni-plovdiv.bg:8080/ambit2/query/structure/?search=#{@compound.smiles}"} Ambit data
+ %a{:href => "http://ambit.uni-plovdiv.bg:8080/ambit2/query/structure/?search=#{@compound.smiles}", :rel => "external"} Ambit data
-# %li
- %a{:href => "http://www.ncbi.nlm.nih.gov/sites/entrez?cmd=PureSearch&db=pccompound&term=#{URI.encode('"'+@compound.inchi+'"[InChI]')}"} PubChem data
- (external)
+ %a{:href => "http://www.ncbi.nlm.nih.gov/sites/entrez?cmd=PureSearch&db=pccompound&term=#{URI.encode('"'+@compound.inchi+'"[InChI]')}", :rel => "external"} PubChem data
+ (external)
-# %li
- %a{:href => "http://chem.sis.nlm.nih.gov/chemidplus/direct.jsp?result=advanced&inchi=#{URI.encode @compound.inchi}"} ToxNet data
+ %a{:href => "http://chem.sis.nlm.nih.gov/chemidplus/direct.jsp?result=advanced&inchi=#{URI.encode @compound.inchi}", :rel => "external"} ToxNet data
-#http://chem.sis.nlm.nih.gov/chemidplus/direct.jsp?result=advanced&regno=000143157
%tr#names{ :style => "display: none;" }
diff --git a/views/lazar_algorithm.haml b/views/lazar_algorithm.haml
index b83de6b..85823b5 100644
--- a/views/lazar_algorithm.haml
+++ b/views/lazar_algorithm.haml
@@ -20,13 +20,13 @@
a majority vote (weighted by compound similarity) for
%em classification
(
- %a{:href => "http://www.in-silico.de/articles/modi020905.pdf"} original publication
+ %a{:href => "http://www.in-silico.de/articles/modi020905.pdf", :rel => "external"} original publication
)
%li
a local QSAR model based on neighbors for
%em regression
(
- %a{:href => "http://www.in-silico.de/articles/mh_tf.pdf"} original publication
+ %a{:href => "http://www.in-silico.de/articles/mh_tf.pdf", :rel => "external"} original publication
)
%p
diff --git a/views/lazar_description.haml b/views/lazar_description.haml
index d8e995d..3eee850 100644
--- a/views/lazar_description.haml
+++ b/views/lazar_description.haml
@@ -18,11 +18,11 @@
a majority vote (weighted by compound similarity) for
%em= toggle_link("#classification","classification")
(
- %a{:href => "http://www.in-silico.de/articles/modi020905.pdf"} original publication
+ %a{:href => "http://www.in-silico.de/articles/modi020905.pdf", :rel => "external"} original publication
)
%li
a local QSAR model based on neighbors for
%em= toggle_link("#regression","regression")
(
- %a{:href => "http://www.in-silico.de/articles/mh_tf.pdf"} original publication
+ %a{:href => "http://www.in-silico.de/articles/mh_tf.pdf", :rel => "external"} original publication
)
diff --git a/views/login.haml b/views/login.haml
index 6d15bb7..1a74f12 100644
--- a/views/login.haml
+++ b/views/login.haml
@@ -7,15 +7,15 @@
and your models can be modified or deleted by other guests.
To control models permissions you can
log in with your
- %a{:href => "http://www.opentox.org"} OpenTox
- username/password below. If have no
- %a{:href => "http://www.opentox.org"} OpenTox
- account yet you can
- %a{:href => "http://www.opentox.org/join_form"} register here.
+ %a{:href => "http://www.opentox.org", :rel => "external"} OpenTox
+ username/password below. If you don't have an
+ %a{:href => "http://www.opentox.org", :rel => "external"} OpenTox
+ account yet you could
+ %a{:href => "http://www.opentox.org/join_form", :rel => "external"} register here.
- else
%p
Change
- %a{:href => "http://www.opentox.org"} OpenTox
+ %a{:href => "http://www.opentox.org", :rel => "external"} OpenTox
account:
-# if !logged_in()
diff --git a/views/model.haml b/views/model.haml
index 91d7016..4933cdb 100644
--- a/views/model.haml
+++ b/views/model.haml
@@ -18,7 +18,7 @@
- if (task = OpenTox::Task.exist?(model.task_uri))
%input{:type => 'hidden', :id => "model_#{model.id}_task", :value => "#{model.task_uri}"}
- percentage_completed = task.metadata[OT.percentageCompleted].to_i
- - js = "$('#model_#{model.id}_progress').progressbar({ value: #{percentage_completed} })";
+ - js = "$('#model_#{model.id}_progress').progressbar({ value: #{percentage_completed} });"
:javascript
$(function() {
#{js}
@@ -28,15 +28,15 @@
//= haml :model_progress, :locals=>{:percentage_completed=>percentage_completed}, :layout => false
- if is_authorized(model.web_uri, "DELETE")
%a{:href => url_for("/model/#{model.id}"), :id => "delete_#{model.id}", :class => 'delete_link'}
- - if model.status == "Completed"
+ - if model.status =~ /Completed|Error|Cancelled/
(delete)
- else
(stop)
%span
%br
- -#%dt Started:
- -#%dd= model.created_at.strftime("%m/%d/%Y - %I:%M:%S%p")
+ %dt Started:
+ %dd= Time.parse(model.created_at.to_s).strftime("%m/%d/%Y - %I:%M:%S%p") if model.created_at
- if model.nr_compounds
%dt Training compounds:
%dd= model.nr_compounds
@@ -54,7 +54,7 @@
%dd= toggle_link("##{model.type}","#{model.type}")
%dt Descriptors:
%dd
- %a{:href => 'http://www.maunz.de/libfminer2-bbrc-doc/'} Fminer backbone refinement classes
+ %a{:href => 'http://www.maunz.de/libfminer2-bbrc-doc/', :rel => "external"} Fminer backbone refinement classes
- if model.training_dataset
%dt Training dataset:
%dd
diff --git a/views/model_name.haml b/views/model_name.haml
index b1f6f10..91516ce 100644
--- a/views/model_name.haml
+++ b/views/model_name.haml
@@ -1,4 +1,4 @@
-- js = "$('#edit_#{model.id}').editModel('PUT', {id: '#{model.id}', mode: 'edit'});\n "
+- js = "$('#edit_#{model.id}').editModel({id: '#{model.id}', mode: 'edit'});\n "
:javascript
$(function() {
#{js}
diff --git a/views/model_name_edit.haml b/views/model_name_edit.haml
index aec59fc..d92c68a 100644
--- a/views/model_name_edit.haml
+++ b/views/model_name_edit.haml
@@ -1,5 +1,5 @@
-- js = "$('#cancel_#{model.id}').editModel('GET', {id: '#{model.id}', mode: 'show'});\n "
-- js = "$('#save_#{model.id}').saveModel('POST', {id: '#{model.id}', mode: 'show'});\n "
+- js = "$('#cancel_#{model.id}').cancelEdit({id: '#{model.id}', mode: 'show'});\n "
+- js += "$('#save_#{model.id}').saveModel({id: '#{model.id}', mode: 'show'});\n "
:javascript
$(function() {
#{js}
@@ -10,5 +10,4 @@
%input{:type => 'hidden', :name => 'subjectid', :id => 'subjectid', :value => session[:subjectid]}
%input{ :type => "submit", :value => "Save", :id => "save_#{model.id}", :class => "edit_button"}
%span{:class => "edit_button"}
- %a{:href => url_for("/model/#{model.id}/name?mode=show"), :id => "cancel_#{model.id}"} Cancel
-
+ %a{:href => "#", :id => "cancel_#{model.id}"} Cancel
diff --git a/views/models.haml b/views/models.haml
index 67c061c..6724807 100644
--- a/views/models.haml
+++ b/views/models.haml
@@ -6,18 +6,18 @@
setTimeout('checkStati("#{stati_to_check}", "#{subjectstring}")',5000);
}
var reload_validation = true;
- //if(reload_validation) setTimeout('checkValidation()',15000);
});
-# %p Get an overview about ToxCreate models. This page is refreshed every 15 seconds to update the model status.
%p Get an overview about ToxCreate models. Parts of this page are refreshed every 5 seconds to update the model status.
-# explanations
-= haml :lazar_description, :layout => false
= haml :classification, :layout => false
+= haml :lazar_description, :layout => false
= haml :regression, :layout => false
= haml :similarity, :layout => false
= haml :significant_fragments, :layout => false
-- @models.each do |model|
- = haml :model, :locals=>{:model=>model,:subjectstring=>subjectstring}, :layout => false
+- if @models
+ - @models.each do |model|
+ = haml :model, :locals=>{:model=>model,:subjectstring=>subjectstring}, :layout => false
diff --git a/views/regression_validation.haml b/views/regression_validation.haml
index 00267a9..4dd4f6d 100644
--- a/views/regression_validation.haml
+++ b/views/regression_validation.haml
@@ -1,9 +1,9 @@
%dt
- %a{:href => "http://en.wikipedia.org/wiki/R-squared"} R-squared
+ %a{:href => "http://en.wikipedia.org/wiki/R-squared", :rel => "external"} R-squared
%dd= sprintf '%.03g', model.r_square
%dt
- %a{:href => "http://en.wikipedia.org/wiki/Root_mean_square_deviation"} Root Mean Square Error
+ %a{:href => "http://en.wikipedia.org/wiki/Root_mean_square_deviation", :rel => "external"} Root Mean Square Error
%dd= sprintf '%.03g', model.root_mean_squared_error
%dt
- %a{:href => "http://en.wikipedia.org/wiki/Mean_absolute_error"} Mean Absolute Error
+ %a{:href => "http://en.wikipedia.org/wiki/Mean_absolute_error", :rel => "external"} Mean Absolute Error
%dd= sprintf '%.03g', model.mean_absolute_error
diff --git a/views/significant_fragments.haml b/views/significant_fragments.haml
index 87cb113..bd39826 100644
--- a/views/significant_fragments.haml
+++ b/views/significant_fragments.haml
@@ -6,5 +6,5 @@
)
%dd
Substructures that occur (statistically significant) more frequently in active or inactive compounds. Substuctures can take any shape (without cycles) and are determined with the
- %a{:href => "http://www.maunz.de/libfminer2-bbrc-doc/"} fminer
+ %a{:href => "http://www.maunz.de/libfminer2-bbrc-doc/", :rel => "external"} fminer
algorithm.
diff --git a/views/style.sass b/views/style.sass
index db1f1bf..0588444 100644
--- a/views/style.sass
+++ b/views/style.sass
@@ -18,6 +18,9 @@ body
color: $ot_purple
a:hover
color: black
+ a[rel="external"]
+ background: transparent url('../external.gif') center right no-repeat
+ padding-right: 15px
.headline
.logo
diff --git a/views/unit.haml b/views/unit.haml
index a352599..88433b5 100644
--- a/views/unit.haml
+++ b/views/unit.haml
@@ -6,5 +6,5 @@
)
%dd
Unit of measurement, e.g. mmol or mmol/kg-bodyweight. For optimal performance you should use
- %a{:href => "http://en.wikipedia.org/wiki/Molar_(concentration)"} molar
+ %a{:href => "http://en.wikipedia.org/wiki/Molar_(concentration)", :rel => "external"} molar
units.