diff options
author | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-04 13:59:19 +0200 |
---|---|---|
committer | Dylan Griffith <dyl.griffith@gmail.com> | 2018-05-07 08:54:08 +0200 |
commit | 4ec95dc404291c975b10ddfca1be6ae423886b03 (patch) | |
tree | 2f06bec5bff5856ff00bbba06dd837fbdd3ef4f3 /app/views/shared/runners | |
parent | bb7597ef7dd7885814e5589992a32876a60c5e80 (diff) | |
download | gitlab-ce-4ec95dc404291c975b10ddfca1be6ae423886b03.tar.gz |
Share _form and show for project, instance and group runners
Diffstat (limited to 'app/views/shared/runners')
-rw-r--r-- | app/views/shared/runners/_form.html.haml | 56 | ||||
-rw-r--r-- | app/views/shared/runners/show.html.haml | 71 |
2 files changed, 127 insertions, 0 deletions
diff --git a/app/views/shared/runners/_form.html.haml b/app/views/shared/runners/_form.html.haml new file mode 100644 index 00000000000..a995c355bd8 --- /dev/null +++ b/app/views/shared/runners/_form.html.haml @@ -0,0 +1,56 @@ += form_for runner, url: runner_form_url, html: { class: 'form-horizontal' } do |f| + = form_errors(runner) + .form-group + = label :active, "Active", class: 'control-label' + .col-sm-10 + .checkbox + = f.check_box :active + %span.light Paused Runners don't accept new jobs + .form-group + = label :protected, "Protected", class: 'control-label' + .col-sm-10 + .checkbox + = f.check_box :access_level, {}, 'ref_protected', 'not_protected' + %span.light This runner will only run on pipelines triggered on protected branches + .form-group + = label :run_untagged, 'Run untagged jobs', class: 'control-label' + .col-sm-10 + .checkbox + = f.check_box :run_untagged + %span.light Indicates whether this runner can pick jobs without tags + - unless runner.group_type? + .form-group + = label :locked, 'Lock to current projects', class: 'control-label' + .col-sm-10 + .checkbox + = f.check_box :locked + %span.light When a runner is locked, it cannot be assigned to other projects + .form-group + = label_tag :token, class: 'control-label' do + Token + .col-sm-10 + = f.text_field :token, class: 'form-control', readonly: true + .form-group + = label_tag :ip_address, class: 'control-label' do + IP Address + .col-sm-10 + = f.text_field :ip_address, class: 'form-control', readonly: true + .form-group + = label_tag :description, class: 'control-label' do + Description + .col-sm-10 + = f.text_field :description, class: 'form-control' + .form-group + = label_tag :maximum_timeout_human_readable, class: 'control-label' do + Maximum job timeout + .col-sm-10 + = f.text_field :maximum_timeout_human_readable, class: 'form-control' + .help-block This timeout will take precedence when lower than Project-defined timeout + .form-group + = label_tag :tag_list, class: 'control-label' do + Tags + .col-sm-10 + = f.text_field :tag_list, value: runner.tag_list.sort.join(', '), class: 'form-control' + .help-block You can setup jobs to only use Runners with specific tags. Separate tags with commas. + .form-actions + = f.submit 'Save changes', class: 'btn btn-save' diff --git a/app/views/shared/runners/show.html.haml b/app/views/shared/runners/show.html.haml new file mode 100644 index 00000000000..1265305608c --- /dev/null +++ b/app/views/shared/runners/show.html.haml @@ -0,0 +1,71 @@ +- page_title "#{@runner.description} ##{@runner.id}", "Runners" + +%h3.page-title + Runner ##{@runner.id} + .pull-right + - if @runner.shared? + %span.runner-state.runner-state-shared + Shared + - elsif @runner.group_type? + %span.runner-state.runner-state-shared + Group + - else + %span.runner-state.runner-state-specific + Specific + +.table-holder + %table.table + %thead + %tr + %th Property Name + %th Value + %tr + %td Active + %td= @runner.active? ? 'Yes' : 'No' + %tr + %td Protected + %td= @runner.ref_protected? ? 'Yes' : 'No' + %tr + %td Can run untagged jobs + %td= @runner.run_untagged? ? 'Yes' : 'No' + - unless @runner.group_type? + %tr + %td Locked to this project + %td= @runner.locked? ? 'Yes' : 'No' + %tr + %td Tags + %td + - @runner.tag_list.sort.each do |tag| + %span.label.label-primary + = tag + %tr + %td Name + %td= @runner.name + %tr + %td Version + %td= @runner.version + %tr + %td IP Address + %td= @runner.ip_address + %tr + %td Revision + %td= @runner.revision + %tr + %td Platform + %td= @runner.platform + %tr + %td Architecture + %td= @runner.architecture + %tr + %td Description + %td= @runner.description + %tr + %td Maximum job timeout + %td= @runner.maximum_timeout_human_readable + %tr + %td Last contact + %td + - if @runner.contacted_at + #{time_ago_in_words(@runner.contacted_at)} ago + - else + Never |