diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-09-10 23:57:03 +0200 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-10-04 08:37:01 +0200 |
commit | 42af229510adfef78772d5ec1cba9b990a645ac3 (patch) | |
tree | b85e1912d72204811cad14936f00949c7d99aa74 /app/views/ci | |
parent | dfb9ac3a5f97a4c556bacea78174836fe7d39145 (diff) | |
download | gitlab-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/views/ci')
3 files changed, 4 insertions, 29 deletions
diff --git a/app/views/ci/runner/_how_to_setup_runner.html.haml b/app/views/ci/runner/_how_to_setup_runner.html.haml index b1b142460b0..4307060d748 100644 --- a/app/views/ci/runner/_how_to_setup_runner.html.haml +++ b/app/views/ci/runner/_how_to_setup_runner.html.haml @@ -13,5 +13,9 @@ = _("Use the following registration token during setup:") %code#registration_token= registration_token = clipboard_button(target: '#registration_token', title: _("Copy token to clipboard"), class: "btn-transparent btn-clipboard") + .prepend-top-10.append-bottom-10 + = button_to _("Reset runners registration token"), reset_token_url, + method: :put, class: 'btn btn-default', + data: { confirm: _("Are you sure you want to reset registration token?") } %li = _("Start the Runner!") diff --git a/app/views/ci/runner/_how_to_setup_shared_runner.html.haml b/app/views/ci/runner/_how_to_setup_shared_runner.html.haml deleted file mode 100644 index 2a190cb9250..00000000000 --- a/app/views/ci/runner/_how_to_setup_shared_runner.html.haml +++ /dev/null @@ -1,3 +0,0 @@ -.bs-callout.help-callout - = render partial: 'ci/runner/how_to_setup_runner', - locals: { registration_token: registration_token, type: 'shared' } diff --git a/app/views/ci/runner/_how_to_setup_specific_runner.html.haml b/app/views/ci/runner/_how_to_setup_specific_runner.html.haml deleted file mode 100644 index afe57bdfa01..00000000000 --- a/app/views/ci/runner/_how_to_setup_specific_runner.html.haml +++ /dev/null @@ -1,26 +0,0 @@ -.bs-callout.help-callout - .append-bottom-10 - %h4= _('Set up a specific Runner automatically') - - %p - - link_to_help_page = link_to(_('Learn more about Kubernetes'), - help_page_path('user/project/clusters/index'), - target: '_blank', - rel: 'noopener noreferrer') - - = _('You can easily install a Runner on a Kubernetes cluster. %{link_to_help_page}').html_safe % { link_to_help_page: link_to_help_page } - - %ol - %li - = _('Click the button below to begin the install process by navigating to the Kubernetes page') - %li - = _('Select an existing Kubernetes cluster or create a new one') - %li - = _('From the Kubernetes cluster details view, install Runner from the applications list') - - = link_to _('Install Runner on Kubernetes'), - project_clusters_path(@project), - class: 'btn btn-info' - %hr - = render partial: 'ci/runner/how_to_setup_runner', - locals: { registration_token: registration_token, type: 'specific' } |