summaryrefslogtreecommitdiff
path: root/app/controllers/projects
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2018-09-10 23:57:03 +0200
committerTomasz Maczukin <tomasz@maczukin.pl>2018-10-04 08:37:01 +0200
commit42af229510adfef78772d5ec1cba9b990a645ac3 (patch)
treeb85e1912d72204811cad14936f00949c7d99aa74 /app/controllers/projects
parentdfb9ac3a5f97a4c556bacea78174836fe7d39145 (diff)
downloadgitlab-ce-42af229510adfef78772d5ec1cba9b990a645ac3.tar.gz
Simplify runner registration token resetting
This icommit adds several changes related to the same topic - resetting a Runner registration token: 1. On Project settings page it adds a button for resetting the registration token and it removes the Runner token field that was confusing all GitLab users. 2. On Group settings page it adds the same button for resetting the registration token. 3. On Admin Runners settings page it moves the button to the same place as in Project and Group settings and it changes slightly the page layout to make it more similar to Group and Project setting pages. 4. It refactorizes a little the partial that prints runner registration description. Thanks to this Project, Group and Admin settings of the Runner are re-using the same code to generate the button. 5. Updates the translations of changed text.
Diffstat (limited to 'app/controllers/projects')
-rw-r--r--app/controllers/projects/settings/ci_cd_controller.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/projects/settings/ci_cd_controller.rb b/app/controllers/projects/settings/ci_cd_controller.rb
index a2d1b7866c2..3a1344651df 100644
--- a/app/controllers/projects/settings/ci_cd_controller.rb
+++ b/app/controllers/projects/settings/ci_cd_controller.rb
@@ -36,6 +36,13 @@ module Projects
end
end
+ def reset_registration_token
+ @project.reset_runners_token!
+
+ flash[:notice] = 'New runners registration token has been generated!'
+ redirect_to namespace_project_settings_ci_cd_path
+ end
+
private
def update_params