summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Sizov <vsv2711@gmail.com>2015-04-08 15:51:52 +0300
committerValery Sizov <vsv2711@gmail.com>2015-04-08 15:51:52 +0300
commitcfe4d30740535fbbfc1e88c5868853302e396ee2 (patch)
tree847a3dde9e4f99b6db0d9e261b1e88b86d2ded1c
parent54ae654d7c05b4de009185ac75a89813afc35a6c (diff)
downloadgitlab-ci-cfe4d30740535fbbfc1e88c5868853302e396ee2.tar.gz
remove admin show page
-rw-r--r--app/controllers/admin/projects_controller.rb4
-rw-r--r--app/views/admin/projects/_project.html.haml2
-rw-r--r--app/views/admin/projects/show.html.haml87
-rw-r--r--spec/features/admin/projects_spec.rb9
4 files changed, 1 insertions, 101 deletions
diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb
index 3b4e9ba..6892776 100644
--- a/app/controllers/admin/projects_controller.rb
+++ b/app/controllers/admin/projects_controller.rb
@@ -3,10 +3,6 @@ class Admin::ProjectsController < Admin::ApplicationController
@projects = Project.ordered_by_last_commit_date.page(params[:page]).per(30)
end
- def show
- project
- end
-
def destroy
project.destroy
diff --git a/app/views/admin/projects/_project.html.haml b/app/views/admin/projects/_project.html.haml
index 4952b60..8da5e0a 100644
--- a/app/views/admin/projects/_project.html.haml
+++ b/app/views/admin/projects/_project.html.haml
@@ -3,7 +3,7 @@
%td
= project.id
%td
- = link_to [:admin, project] do
+ = link_to project do
%strong= project.name
%td
- if last_commit
diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml
deleted file mode 100644
index 2551afa..0000000
--- a/app/views/admin/projects/show.html.haml
+++ /dev/null
@@ -1,87 +0,0 @@
-= content_for :title do
- %h3.project-title
- Project: #{@project.name}
- - if current_user.can_manage_project?(@project.gitlab_id)
- .pull-right
- = link_to project_jobs_path(@project), class: "btn btn-default btn-small" do
- %i.icon-edit.icon-white
- Edit Job
-
-%p
- = link_to admin_projects_path do
- &larr; Back to projects list
-%hr
-.row
- .col-md-6
- %fieldset
- %legend Project info
- %p
- ID:
- %strong= @project.id
- %p
- Name:
- %strong= @project.name
- %p
- Build timeout:
- %strong= @project.timeout
- %p
- GitLab ID:
- %strong= @project.gitlab_id
- %p
- Created at:
- %strong= @project.created_at
- %p
- Token:
- %strong= @project.token
- %p
- Public:
- %strong= @project.public
- %p
- Last build:
- - if @project.last_commit_date
- = time_ago_in_words @project.last_commit_date
- %br
- %fieldset
- %legend Email notification
- %p
- Repicients:
- %strong= @project.email_recipients
- %p
- Send mail to commiter:
- %strong= @project.email_add_pusher
- %p
- Send on all broken builds:
- %strong= @project.email_only_broken_builds
-
- .col-md-6
- - @project.jobs.active.each do |job|
- %fieldset
- %legend
- Build script for #{job.name}
- = preserve do
- %pre
- = job.commands
-
- %br
- %fieldset
- %legend Builds stats
- %p
- Total:
- %strong= pluralize @project.builds.count(:all), 'build'
- %p
- Successful:
- %strong= pluralize @project.builds.success.count(:all), 'build'
- %p
- Failed:
- %strong= pluralize @project.builds.failed.count(:all), 'build'
-
- %p
- Success ratio:
- %strong
- #{success_ratio(@project.builds.success, @project.builds.failed)}%
-
- %p
- Commits covered:
- %strong
- = @project.commits.count
-
diff --git a/spec/features/admin/projects_spec.rb b/spec/features/admin/projects_spec.rb
index 0c8168a..a6adae2 100644
--- a/spec/features/admin/projects_spec.rb
+++ b/spec/features/admin/projects_spec.rb
@@ -16,13 +16,4 @@ describe "Admin Projects" do
it { page.should have_content "Manage Projects" }
end
-
- describe "GET /admin/projects/:id" do
- before do
- visit admin_project_path(project)
- end
-
- it { page.should have_content "Project info" }
- it { page.should have_content project.name }
- end
end