Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
2da3cf31
Commit
2da3cf31
authored
Dec 11, 2015
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add CI runners registration token reset button
parent
e2e43a11
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
app/controllers/admin/application_settings_controller.rb
app/controllers/admin/application_settings_controller.rb
+6
-0
app/views/ci/admin/runners/index.html.haml
app/views/ci/admin/runners/index.html.haml
+12
-1
config/routes.rb
config/routes.rb
+1
-0
No files found.
app/controllers/admin/application_settings_controller.rb
View file @
2da3cf31
...
@@ -13,6 +13,12 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
...
@@ -13,6 +13,12 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
end
end
end
end
def
reset_runners_token
@application_setting
.
reset_runners_registration_token!
flash
[
:notice
]
=
'New runners registration token has been generated!'
redirect_to
ci_admin_runners_path
end
private
private
def
set_application_setting
def
set_application_setting
...
...
app/views/ci/admin/runners/index.html.haml
View file @
2da3cf31
...
@@ -3,7 +3,18 @@
...
@@ -3,7 +3,18 @@
To register a new runner you should enter the following registration token.
To register a new runner you should enter the following registration token.
With this token the runner will request a unique runner token and use that for future communication.
With this token the runner will request a unique runner token and use that for future communication.
Registration token is
Registration token is
%code
#{
current_application_settings
.
runners_registration_token
}
%code
{
id:
'runners-token'
}
#{
current_application_settings
.
runners_registration_token
}
.bs-callout.clearfix
.pull-left
%p
You can reset runners registration token by pressing a button below.
%p
=
button_to
reset_runners_token_admin_application_settings_path
,
method: :put
,
class:
'btn btn-default'
,
data:
{
confirm:
'Are you sure you want to reset registration token?'
}
do
=
icon
(
'refresh'
)
Reset runners registration token
.bs-callout
.bs-callout
%p
%p
...
...
config/routes.rb
View file @
2da3cf31
...
@@ -276,6 +276,7 @@ Rails.application.routes.draw do
...
@@ -276,6 +276,7 @@ Rails.application.routes.draw do
resource
:application_settings
,
only:
[
:show
,
:update
]
do
resource
:application_settings
,
only:
[
:show
,
:update
]
do
resources
:services
resources
:services
put
:reset_runners_token
end
end
resources
:labels
resources
:labels
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment