Commit 729ac897 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch '20817-please-add-coordinator-url-to-admin-area-runner-page' into 'master'

Add coordinator url to admin area runner page

Closes #20817

See merge request !11603
parents e59c1f79 2b8c46fe
......@@ -2,26 +2,6 @@
= render "admin/dashboard/head"
%div{ class: container_class }
%p.prepend-top-default
%span
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.
%br
Registration token is
%code#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.
.prepend-top-10
= button_to "Reset runners registration token", reset_runners_token_admin_application_settings_path,
method: :put, class: 'btn btn-default',
data: { confirm: 'Are you sure you want to reset registration token?' }
.bs-callout
%p
A 'Runner' is a process which runs a job.
......@@ -46,6 +26,19 @@
%span.label.label-danger paused
\- Runner will not receive any new jobs
.bs-callout.clearfix
.pull-left
%p
You can reset runners registration token by pressing a button below.
.prepend-top-10
= button_to _("Reset runners registration token"), reset_runners_token_admin_application_settings_path,
method: :put, class: 'btn btn-default',
data: { confirm: _("Are you sure you want to reset registration token?") }
= render partial: 'ci/runner/how_to_setup_runner',
locals: { registration_token: current_application_settings.runners_registration_token,
type: 'shared' }
.append-bottom-20.clearfix
.pull-left
= form_tag admin_runners_path, id: 'runners-search', class: 'form-inline', method: :get do
......
- link = link_to _("GitLab Runner section"), 'https://about.gitlab.com/gitlab-ci/#gitlab-runner', target: '_blank'
.bs-callout.help-callout
%h4= _("How to setup a #{type} Runner for a new project")
%ol
%li
= _("Install a Runner compatible with GitLab CI")
= (_("(checkout the %{link} for information on how to install it).") % { link: link }).html_safe
%li
= _("Specify the following URL during the Runner setup:")
%code= root_url(only_path: false)
%li
= _("Use the following registration token during setup:")
%code#registration_token= registration_token
%li
= _("Start the Runner!")
%h3 Specific Runners
.bs-callout.help-callout
%h4 How to setup a specific Runner for a new project
%ol
%li
Install a Runner compatible with GitLab CI
(checkout the #{link_to 'GitLab Runner section', 'https://about.gitlab.com/gitlab-ci/#gitlab-runner', target: '_blank'} for information on how to install it).
%li
Specify the following URL during the Runner setup:
%code= root_url(only_path: false)
%li
Use the following registration token during setup:
%code= @project.runners_token
%li
Start the Runner!
= render partial: 'ci/runner/how_to_setup_runner',
locals: { registration_token: @project.runners_token,
type: 'specific' }
- if @project_runners.any?
%h4.underlined-title Runners activated for this project
......
---
title: Add coordinator url to admin area runner page
merge_request: 11603
author:
......@@ -19,7 +19,7 @@ describe "Admin Runners" do
end
it 'has all necessary texts' do
expect(page).to have_text "To register a new Runner"
expect(page).to have_text "How to setup"
expect(page).to have_text "Runners with last contact more than a minute ago: 1"
end
......@@ -54,7 +54,7 @@ describe "Admin Runners" do
end
it 'has all necessary texts including no runner message' do
expect(page).to have_text "To register a new Runner"
expect(page).to have_text "How to setup"
expect(page).to have_text "Runners with last contact more than a minute ago: 0"
expect(page).to have_text 'No runners found'
end
......@@ -163,12 +163,11 @@ describe "Admin Runners" do
end
it 'has a registration token' do
expect(page).to have_content("Registration token is #{token}")
expect(page).to have_selector('#runners-token', text: token)
expect(page.find('#registration_token')).to have_content(token)
end
describe 'reload registration token' do
let(:page_token) { find('#runners-token').text }
let(:page_token) { find('#registration_token').text }
before do
click_button 'Reset runners registration token'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment