Permalink
Browse files

Coverage iFrame

  • Loading branch information...
1 parent 4815fd3 commit e82a79f06ab40787bea4ddbe4e98e649c07eff24 @iain committed Jan 15, 2012
@@ -1,3 +1,6 @@
+.container
+ width: 1230px
+
#main
margin-top: 60px
@@ -6,7 +9,7 @@ table.projects
iframe
width: 100%
- height: 800px
+ height: 700px
.simple_form input.string
- @extend .span7
+ @extend .span12
@@ -0,0 +1,7 @@
+class CoverageController < ApplicationController
+
+ def show
+ @project = Project.find(params[:project_id])
+ end
+
+end
@@ -0,0 +1,13 @@
+= render "projects/header", :project => @project, :tab => "coverage"
+
+- if @project.coverage_url?
+ %iframe#coverage-frame{:src => @project.coverage_url}
+- else
+
+ .alert-message.warning.fade.in{data("alert")}
+ = link_to "×", "#", :class => "close"
+ %p You haven't specified a Coverage URL yet
+
+ = simple_form_for @project, :wrapper => :inline do |f|
+ = f.input :coverage_url, :required => true
+ = render "shared/actions", :f => f
@@ -9,7 +9,7 @@
%li{active_when(tab == "overview")}= link_to "Overview", project
%li{active_when(tab == "rspec")}= link_to "RSpec", project_rspec_path(project)
%li{active_when(tab == "cucumber")}= link_to "Cucumber", project_cucumber_path(project)
- %li{active_when(tab == "coverage")}= link_to "Coverage", project
+ %li{active_when(tab == "coverage")}= link_to "Coverage", project_coverage_path(project)
%li{active_when(tab == "commits")}= link_to "Commits", project
%li{active_when(tab == "errors")}= link_to "Errors", project
%li{active_when(tab == "builds")}= link_to "Builds", project
@@ -6,9 +6,10 @@
= f.input :name
%fieldset
- %legend Integrations
+ %legend iFrames Galore!
= f.input :rspec_url
= f.input :cucumber_url
+ = f.input :coverage_url
= render "shared/actions", :f => f
@@ -0,0 +1,11 @@
+en:
+ simple_form:
+ labels:
+ project:
+ coverage_url: Coverage URL
+ placeholders:
+ project:
+ coverage_url: "https://..."
+ hints:
+ project:
+ coverage_url: "Probably: https://www.intranet.finalist.com/hudson/job/JOB_NAME/lastSuccessfulBuild/artifact/coverage/index.html"
View
@@ -6,6 +6,7 @@
get "rspec" => "rspec#show"
get "cucumber" => "cucumber#show"
+ get "coverage" => "coverage#show"
end
@@ -0,0 +1,6 @@
+class AddCoverageUrlToProjects < ActiveRecord::Migration
+ def change
+ add_column :projects, :coverage_url, :string
+
+ end
+end
View
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20120115181329) do
+ActiveRecord::Schema.define(:version => 20120115230959) do
create_table "projects", :force => true do |t|
t.string "project"
@@ -21,6 +21,7 @@
t.datetime "updated_at", :null => false
t.string "rspec_url"
t.string "cucumber_url"
+ t.string "coverage_url"
end
add_index "projects", ["slug"], :name => "index_projects_on_slug"
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe CoverageController do
+
+end

0 comments on commit e82a79f

Please sign in to comment.