BigW Consortium Gitlab

Add UI support for per-runner job timeout

parent 834f4738
......@@ -8,7 +8,7 @@ module Ci
ONLINE_CONTACT_TIMEOUT = 1.hour
UPDATE_DB_RUNNER_INFO_EVERY = 40.minutes
AVAILABLE_SCOPES = %w[specific shared active paused online].freeze
FORM_EDITABLE = %i[description tag_list active run_untagged locked access_level].freeze
FORM_EDITABLE = %i[description tag_list active run_untagged locked access_level job_upper_timeout].freeze
has_many :builds
has_many :runner_projects, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
......
......@@ -19,6 +19,11 @@
%td
= runner.ip_address
%td
- if runner.defines_job_upper_timeout?
= runner.job_upper_timeout
- else
n/a
%td
- if runner.shared?
n/a
- else
......
......@@ -61,6 +61,7 @@
%th Description
%th Version
%th IP Address
%th Timeout
%th Projects
%th Jobs
%th Tags
......
......@@ -40,6 +40,12 @@
.col-sm-10
= f.text_field :description, class: 'form-control'
.form-group
= label_tag :job_upper_timeout, class: 'control-label' do
Job upper timeout
.col-sm-10
= f.text_field :job_upper_timeout, 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
......
......@@ -36,6 +36,8 @@
- if runner.description.present?
%p.runner-description
= runner.description
- if runner.defines_job_upper_timeout?
%p Job upper timeout: #{runner.job_upper_timeout}
- if runner.tag_list.present?
%p
- runner.tag_list.sort.each do |tag|
......
......@@ -56,6 +56,9 @@
%td Description
%td= @runner.description
%tr
%td Job upper timeout
%td= @runner.job_upper_timeout
%tr
%td Last contact
%td
- if @runner.contacted_at
......
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