summaryrefslogtreecommitdiff
path: root/views/model.haml
diff options
context:
space:
mode:
Diffstat (limited to 'views/model.haml')
-rw-r--r--views/model.haml67
1 files changed, 67 insertions, 0 deletions
diff --git a/views/model.haml b/views/model.haml
new file mode 100644
index 0000000..d34079d
--- /dev/null
+++ b/views/model.haml
@@ -0,0 +1,67 @@
+- uri = url_for("/model/#{model.id}", :full)
+- js = "$('#delete_#{model.id}').deleteModel('DELETE', {elem: '#model_#{model.id}'});\n " + "$('#show_model_#{model.id}_warnings').toggleWarnings('#{model.id}');"
+:javascript
+ $(function() {
+ #{js}
+ });
+
+%div{:id => "model_#{model.id}"}
+ %h2
+ = model.name
+ .model
+ %dl
+ %dt Status:
+ %dd
+ %span{:id => "model_#{model.id}_status", :class => model.status}
+ = haml :model_status, :locals=>{:model=>model}, :layout => false
+ (
+ %a{:href => url_for("/model/#{model.id}"), :id => "delete_#{model.id}", :class => 'delete'} delete
+ )
+ %dt Started:
+ %dd= model.created_at.strftime("%m/%d/%Y - %I:%M:%S%p")
+ - if model.nr_compounds
+ %dt Training compounds:
+ %dd= model.nr_compounds
+ - if model.error_messages
+ %dt Errors:
+ %dd= model.error_messages
+ - if model.warnings
+ %dt Warnings:
+ %a{:href => "#", :id => "show_model_#{model.id}_warnings"} show
+ %dd{:id => "model_#{model.id}_warnings", :style => "display: none;"}= model.warnings
+ %dt Algorithm:
+ %dd= toggle_link("#lazar_description","lazar")
+ - if model.type
+ %dt Type:
+ %dd= toggle_link("##{model.type}","#{model.type}")
+ %dt Descriptors:
+ %dd
+ %a{:href => 'http://www.maunz.de/libfminer2-bbrc-doc/'} Fminer backbone refinement classes
+ - if model.training_dataset
+ %dt Training dataset:
+ %dd
+ %a{:href => "#{model.training_dataset}.xls"} Excel sheet
+ ,
+ -#%a{:href => "#{model.training_dataset}.rdf"} RDF/XML
+ -#%em (experts) ,
+ %a{:href => "#{model.training_dataset}.yaml"} YAML
+ %em (experts)
+ - if model.feature_dataset
+ %dt Feature dataset:
+ %dd
+ -#%a{:href => "#{model.feature_dataset}.rdf"} RDF/XML
+ -#,
+ %a{:href => "#{model.feature_dataset}.xls"} Excel sheet
+ ,
+ %a{:href => "#{model.feature_dataset}.yaml"} YAML
+ %em (experts)
+ - if model.uri
+ %dt Model:
+ %dd
+ -#%a{:href => "#{model.uri}.rdf"} RDF/XML
+ -#,
+ - if model.validation_qmrf_uri
+ %a{:href => File.join(model.validation_qmrf_uri,"editor")} QMRF Editor,
+ %a{:href => "#{model.uri}.yaml"} YAML
+ %em (experts, models cannot be represented in Excel)
+ = haml :validation, :locals=>{:model=>model}, :layout => false