diff options
| author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-12 17:32:58 +0200 |
|---|---|---|
| committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2016-04-12 17:32:58 +0200 |
| commit | ea787165b3a9604aa86304e29778066bb014824e (patch) | |
| tree | acaf9cf04c004b43bb87001ddda17a1542fc68bf /app/controllers | |
| parent | 97f4ffff1e7b5da94e18edc20c009ffb46784187 (diff) | |
| download | gitlab-ce-ea787165b3a9604aa86304e29778066bb014824e.tar.gz | |
Move 'clear checks' button to applicatoin settings
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/admin/application_settings_controller.rb | 14 | ||||
| -rw-r--r-- | app/controllers/admin/projects_controller.rb | 12 |
2 files changed, 14 insertions, 12 deletions
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index f010436bd36..993a70e63bc 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -19,6 +19,19 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController redirect_to admin_runners_path end + def clear_repository_check_states + Project.update_all( + last_repository_check_failed: false, + last_repository_check_at: nil + ) + + redirect_to( + admin_application_settings_path, + notice: 'All repository check states were cleared' + ) + end + + private def set_application_setting @@ -82,6 +95,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController :akismet_enabled, :akismet_api_key, :email_author_in_body, + :repository_checks_enabled, restricted_visibility_levels: [], import_sources: [] ) diff --git a/app/controllers/admin/projects_controller.rb b/app/controllers/admin/projects_controller.rb index 01257a68616..d7cd9520cc6 100644 --- a/app/controllers/admin/projects_controller.rb +++ b/app/controllers/admin/projects_controller.rb @@ -40,18 +40,6 @@ class Admin::ProjectsController < Admin::ApplicationController ) end - def clear_repository_check_states - Project.update_all( - last_repository_check_failed: false, - last_repository_check_at: nil - ) - - redirect_to( - admin_namespaces_projects_path, - notice: 'All project states were cleared' - ) - end - protected def project |
