diff options
Diffstat (limited to 'app/views/shared')
-rw-r--r-- | app/views/shared/_mini_pipeline_graph.html.haml | 3 | ||||
-rw-r--r-- | app/views/shared/_remote_mirror_update_button.html.haml | 13 | ||||
-rw-r--r-- | app/views/shared/boards/components/_board.html.haml | 3 | ||||
-rw-r--r-- | app/views/shared/runners/_form.html.haml | 56 | ||||
-rw-r--r-- | app/views/shared/runners/_runner_description.html.haml | 16 | ||||
-rw-r--r-- | app/views/shared/runners/show.html.haml | 71 |
6 files changed, 160 insertions, 2 deletions
diff --git a/app/views/shared/_mini_pipeline_graph.html.haml b/app/views/shared/_mini_pipeline_graph.html.haml index 901a177323b..ac2164a4a71 100644 --- a/app/views/shared/_mini_pipeline_graph.html.haml +++ b/app/views/shared/_mini_pipeline_graph.html.haml @@ -6,12 +6,13 @@ - status_klass = "ci-status-icon ci-status-icon-#{detailed_status.group}" .stage-container.dropdown{ class: klass } - %button.mini-pipeline-graph-dropdown-toggle.has-tooltip.js-builds-dropdown-button{ class: "ci-status-icon-#{detailed_status.group}", type: 'button', data: { toggle: 'dropdown', title: "#{stage.name}: #{detailed_status.label}", placement: 'top', "stage-endpoint" => stage_project_pipeline_path(pipeline.project, pipeline, stage: stage.name) } } + %button.mini-pipeline-graph-dropdown-toggle.has-tooltip.js-builds-dropdown-button{ class: "ci-status-icon-#{detailed_status.group}", type: 'button', data: { toggle: 'dropdown', title: "#{stage.name}: #{detailed_status.label}", placement: 'top', "stage-endpoint" => stage_ajax_project_pipeline_path(pipeline.project, pipeline, stage: stage.name) } } = sprite_icon(icon_status) = icon('caret-down') %ul.dropdown-menu.mini-pipeline-graph-dropdown-menu.js-builds-dropdown-container %li.js-builds-dropdown-list.scrollable-menu + %ul %li.js-builds-dropdown-loading.hidden .text-center diff --git a/app/views/shared/_remote_mirror_update_button.html.haml b/app/views/shared/_remote_mirror_update_button.html.haml new file mode 100644 index 00000000000..34de1c0695f --- /dev/null +++ b/app/views/shared/_remote_mirror_update_button.html.haml @@ -0,0 +1,13 @@ +- if @project.has_remote_mirror? + .append-bottom-default + - if remote_mirror.update_in_progress? + %span.btn.disabled + = icon("refresh spin") + Updating… + - else + = link_to update_now_project_mirror_path(@project, sync_remote: true), method: :post, class: "btn" do + = icon("refresh") + Update Now + - if @remote_mirror.last_successful_update_at + %p.inline.prepend-left-10 + Successfully updated #{time_ago_with_tooltip(@remote_mirror.last_successful_update_at)}. diff --git a/app/views/shared/boards/components/_board.html.haml b/app/views/shared/boards/components/_board.html.haml index 9bde80f4b51..8006bc3222c 100644 --- a/app/views/shared/boards/components/_board.html.haml +++ b/app/views/shared/boards/components/_board.html.haml @@ -15,8 +15,9 @@ ":title" => '(list.label ? list.label.description : "")', data: { container: "body", placement: "bottom" }, class: "badge color-label title board-title-text", - ":style" => "{ backgroundColor: (list.label && list.label.color ? list.label.color : null), color: (list.label && list.label.color ? list.label.text_color : \"#2e2e2e\") }" } + ":style" => "{ backgroundColor: (list.label && list.label.color ? list.label.color : null), color: (list.label && list.label.text_color ? list.label.text_color : \"#2e2e2e\") }" } {{ list.title }} + - if can?(current_user, :admin_list, current_board_parent) %board-delete{ "inline-template" => true, ":list" => "list", diff --git a/app/views/shared/runners/_form.html.haml b/app/views/shared/runners/_form.html.haml new file mode 100644 index 00000000000..e958f760cf3 --- /dev/null +++ b/app/views/shared/runners/_form.html.haml @@ -0,0 +1,56 @@ += form_for runner, url: runner_form_url do |f| + = form_errors(runner) + .form-group.row + = label :active, "Active", class: 'col-form-label col-sm-2' + .col-sm-10 + .form-check + = f.check_box :active + %span.light Paused Runners don't accept new jobs + .form-group.row + = label :protected, "Protected", class: 'col-form-label col-sm-2' + .col-sm-10 + .form-check + = f.check_box :access_level, {}, 'ref_protected', 'not_protected' + %span.light This runner will only run on pipelines triggered on protected branches + .form-group.row + = label :run_untagged, 'Run untagged jobs', class: 'col-form-label col-sm-2' + .col-sm-10 + .form-check + = f.check_box :run_untagged + %span.light Indicates whether this runner can pick jobs without tags + - unless runner.group_type? + .form-group.row + = label :locked, 'Lock to current projects', class: 'col-form-label col-sm-2' + .col-sm-10 + .form-check + = f.check_box :locked + %span.light When a runner is locked, it cannot be assigned to other projects + .form-group.row + = label_tag :token, class: 'col-form-label col-sm-2' do + Token + .col-sm-10 + = f.text_field :token, class: 'form-control', readonly: true + .form-group.row + = label_tag :ip_address, class: 'col-form-label col-sm-2' do + IP Address + .col-sm-10 + = f.text_field :ip_address, class: 'form-control', readonly: true + .form-group.row + = label_tag :description, class: 'col-form-label col-sm-2' do + Description + .col-sm-10 + = f.text_field :description, class: 'form-control' + .form-group.row + = label_tag :maximum_timeout_human_readable, class: 'col-form-label col-sm-2' do + Maximum job timeout + .col-sm-10 + = f.text_field :maximum_timeout_human_readable, class: 'form-control' + .form-text.text-muted This timeout will take precedence when lower than Project-defined timeout + .form-group.row + = label_tag :tag_list, class: 'col-form-label col-sm-2' do + Tags + .col-sm-10 + = f.text_field :tag_list, value: runner.tag_list.sort.join(', '), class: 'form-control' + .form-text.text-muted 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/_runner_description.html.haml b/app/views/shared/runners/_runner_description.html.haml new file mode 100644 index 00000000000..da5c032add5 --- /dev/null +++ b/app/views/shared/runners/_runner_description.html.haml @@ -0,0 +1,16 @@ +.light.prepend-top-default + %p + = _("A 'Runner' is a process which runs a job. You can setup as many Runners as you need.") + %br + = _('Runners can be placed on separate users, servers, and even on your local machine.') + + %p + = _('Each Runner can be in one of the following states:') + %div + %ul + %li + %span.badge.badge-success active + = _('- Runner is active and can process any new jobs') + %li + %span.badge.badge-danger paused + = _('- Runner is paused and will not receive any new jobs') diff --git a/app/views/shared/runners/show.html.haml b/app/views/shared/runners/show.html.haml new file mode 100644 index 00000000000..3f6c5c9adc6 --- /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} + .float-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.badge.badge-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 |