summaryrefslogtreecommitdiff
path: root/app/controllers/projects_controller.rb
diff options
context:
space:
mode:
authorJeroen Nijhof <jeroen@jeroennijhof.nl>2015-11-19 15:16:54 +0100
committerJeroen Nijhof <jeroen@jeroennijhof.nl>2015-11-19 15:16:54 +0100
commit839aae0e473e85042f76391b44eaeb099235a813 (patch)
treec01e81d58b26b574b1a325933af8158cfdd7cdc4 /app/controllers/projects_controller.rb
parent4f0a38f1a833cab8c83e77a6c5d323057883188d (diff)
downloadgitlab-ce-839aae0e473e85042f76391b44eaeb099235a813.tar.gz
Added housekeeping status and moved path check to gitlab-shell
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r--app/controllers/projects_controller.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index c3efdffe563..27b723fae6a 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -8,7 +8,7 @@ class ProjectsController < ApplicationController
before_action :assign_ref_vars, :tree, only: [:show], if: :repo_exists?
# Authorize
- before_action :authorize_admin_project!, only: [:edit, :update]
+ before_action :authorize_admin_project!, only: [:edit, :update, :housekeeping]
before_action :event_filter, only: [:show, :activity]
layout :determine_layout
@@ -172,9 +172,14 @@ class ProjectsController < ApplicationController
end
def housekeeping
- ::Projects::HousekeepingService.new(@project).execute
+ status = ::Projects::HousekeepingService.new(@project).execute
respond_to do |format|
+ if status
+ flash[:notice] = "Housekeeping finished successfully."
+ else
+ flash[:alert] = "Housekeeping failed."
+ end
format.html { redirect_to project_path(@project) }
end
end