From c87f5e8c681988539fc3f682173dd6d6d121d800 Mon Sep 17 00:00:00 2001 From: gebele Date: Thu, 6 Nov 2014 11:09:53 +0100 Subject: check models exist; fixed stylesheet path --- application.rb | 2 +- views/details.haml | 2 +- views/info.haml | 2 ++ views/significant_fragments.haml | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 views/info.haml diff --git a/application.rb b/application.rb index 22900f6..2cb16bb 100644 --- a/application.rb +++ b/application.rb @@ -23,7 +23,7 @@ get '/predict/?' do $size = 0 @models = @@models.sort!{|a, b| a.type.select{|e| e =~ /endpoint/i} <=> b.type.select{|e| e =~ /endpoint/i}} @cv = @@cv.collect{|cv| cv.metadata.select{|x| x =~ /predictionFeature/}} - haml :predict + @models.size <= 0 ? (haml :info) : (haml :predict) end get '/jme_help/?' do diff --git a/views/details.haml b/views/details.haml index 154d631..8ef0ffd 100644 --- a/views/details.haml +++ b/views/details.haml @@ -1,4 +1,4 @@ -%link{ :href=>"/stylesheets/screen.css", :media=>"screen, projection", :rel=>"stylesheet", :type=>"text/css"} +%link{ :href=>"/style.css", :media=>"screen, projection", :rel=>"stylesheet", :type=>"text/css"} .content{:style=>"margin-top:0;"} .details{:style=>"padding:0.5em;height:100%;"} diff --git a/views/info.haml b/views/info.haml new file mode 100644 index 0000000..92022ea --- /dev/null +++ b/views/info.haml @@ -0,0 +1,2 @@ +.info + currently no models available diff --git a/views/significant_fragments.haml b/views/significant_fragments.haml index 5dbf9b1..0eec2c2 100644 --- a/views/significant_fragments.haml +++ b/views/significant_fragments.haml @@ -1,4 +1,4 @@ -%link{ :href=>"/stylesheets/screen.css", :media=>"screen, projection", :rel=>"stylesheet", :type=>"text/css"} +%link{ :href=>"/style.css", :media=>"screen, projection", :rel=>"stylesheet", :type=>"text/css"} /TODO put smiles in div if compound image is not available, prevent overlay to table .content{:style=>"margin-top:0;"} - if @type =~ /classification/i -- cgit v1.2.3