diff --git a/app/views/shared/_node_manager_sidebar.html.haml b/app/views/shared/_node_manager_sidebar.html.haml index da94e007f..a5abfcb53 100644 --- a/app/views/shared/_node_manager_sidebar.html.haml +++ b/app/views/shared/_node_manager_sidebar.html.haml @@ -1,11 +1,12 @@ - add_body_class 'with-sidebar' .group.delayed-job - %h3= link_to "Background Tasks", "/delayed_job_failures" + - failures_node = {:controller => "delayed_job_failures", :action => "index"} + %h3= link_to "Background Tasks", failures_node - if DelayedJobFailure.unread.count > 0 %p.failure - = link_to "#{ pluralize DelayedJobFailure.unread.count, 'new failed task' }", "/delayed_job_failures" + = link_to "#{ pluralize DelayedJobFailure.unread.count, 'new failed task' }", failures_node - if Delayed::Job.count > 0 %p.warning %em= "#{ pluralize Delayed::Job.count, 'pending task' }" @@ -50,7 +51,7 @@ .footer.actionbar #radiator - = link_to "Radiator View", '/radiator' + = link_to "Radiator View", {:controller => "radiator", :action => "index"} - unless SETTINGS.enable_read_only_mode || session['ACCESS_CONTROL_ROLE'] == 'READ_ONLY' = link_to "Add node", new_node_path, :class => 'button' diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index c46386bd8..3e9f84995 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -629,11 +629,11 @@ body { background-position: 0% 50%; margin-bottom: .5em; } body .delayed-job p.ok em { - background: transparent url(/images/icons/delayed-job-ok.png) no-repeat 0% 50%; } + background: transparent url(../images/icons/delayed-job-ok.png) no-repeat 0% 50%; } body .delayed-job p.failure a { - background-image: url(/images/icons/delayed-job-failure.png); } + background-image: url(../images/icons/delayed-job-failure.png); } body .delayed-job p.warning em { - background-image: url(/images/icons/delayed-job-warning.png); } + background-image: url(../images/icons/delayed-job-warning.png); } a.autorefresh_link { color: #aaa; } diff --git a/public/stylesheets/sass/application.scss b/public/stylesheets/sass/application.scss index 9b79292d9..dfa06fbdf 100644 --- a/public/stylesheets/sass/application.scss +++ b/public/stylesheets/sass/application.scss @@ -808,17 +808,17 @@ body { } &.ok { em { - background : transparent url( /images/icons/delayed-job-ok.png ) no-repeat 0% 50%; + background : transparent url( ../images/icons/delayed-job-ok.png ) no-repeat 0% 50%; } } &.failure { a { - background-image : url( /images/icons/delayed-job-failure.png ); + background-image : url( ../images/icons/delayed-job-failure.png ); } } &.warning { em { - background-image : url( /images/icons/delayed-job-warning.png ); + background-image : url( ../images/icons/delayed-job-warning.png ); } } } diff --git a/public/stylesheets/tables.css b/public/stylesheets/tables.css index ee8285ea2..eeda6a602 100644 --- a/public/stylesheets/tables.css +++ b/public/stylesheets/tables.css @@ -137,17 +137,17 @@ table td.empty { display: none; } .expandable-list .expandable-link.collapsed-link:before { - content: url('../../images/icons/bullet_toggle_plus.png'); + content: url('../images/icons/bullet_toggle_plus.png'); } .expandable-list .expandable-link:before { - content: url('../../images/icons/bullet_toggle_minus.png'); + content: url('../images/icons/bullet_toggle_minus.png'); } .expandable-list .non-expandable-bullet:before { - content: url('../../images/icons/bullet_green.png'); + content: url('../images/icons/bullet_green.png'); } .inspect-report .expandable-list .non-expandable-bullet:before { - content: url('../../images/icons/bullet_red.png'); + content: url('../images/icons/bullet_red.png'); } .expandable-list .expandable-link, .expandable-list .non-expandable-bullet { diff --git a/spec/views/pages/home.html.haml_spec.rb b/spec/views/pages/home.html.haml_spec.rb new file mode 100644 index 000000000..89d34262c --- /dev/null +++ b/spec/views/pages/home.html.haml_spec.rb @@ -0,0 +1,30 @@ +require File.expand_path(File.join(File.dirname(__FILE__), *%w[.. .. spec_helper])) + +describe '/pages/home.html.haml' do + describe "successful render" do + before :each do + assigns[:all_nodes] = @all_nodes = [Node.generate!] + assigns[:unreported_nodes] = [] + assigns[:unresponsive_nodes] = [] + assigns[:failed_nodes] = [] + assigns[:pending_nodes] = [] + assigns[:changed_nodes] = [] + assigns[:unchanged_nodes] = [] + end + + specify do + render + response.should be_success + end + + it "should have a correct delayed_job_failures link" do + render + should have_tag('a[href="/delayed_job_failures"]', 'Background Tasks') + end + + it "should have a correct radiator link" do + render + should have_tag('a[href="/radiator"]', 'Radiator View') + end + end +end