Add UI support for per-runner job timeout
This commit is contained in:
parent
834f473821
commit
b6d26f979c
6 changed files with 18 additions and 1 deletions
|
@ -8,7 +8,7 @@ module Ci
|
||||||
ONLINE_CONTACT_TIMEOUT = 1.hour
|
ONLINE_CONTACT_TIMEOUT = 1.hour
|
||||||
UPDATE_DB_RUNNER_INFO_EVERY = 40.minutes
|
UPDATE_DB_RUNNER_INFO_EVERY = 40.minutes
|
||||||
AVAILABLE_SCOPES = %w[specific shared active paused online].freeze
|
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 :builds
|
||||||
has_many :runner_projects, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
|
has_many :runner_projects, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
|
||||||
|
|
|
@ -18,6 +18,11 @@
|
||||||
= runner.version
|
= runner.version
|
||||||
%td
|
%td
|
||||||
= runner.ip_address
|
= runner.ip_address
|
||||||
|
%td
|
||||||
|
- if runner.defines_job_upper_timeout?
|
||||||
|
= runner.job_upper_timeout
|
||||||
|
- else
|
||||||
|
n/a
|
||||||
%td
|
%td
|
||||||
- if runner.shared?
|
- if runner.shared?
|
||||||
n/a
|
n/a
|
||||||
|
|
|
@ -61,6 +61,7 @@
|
||||||
%th Description
|
%th Description
|
||||||
%th Version
|
%th Version
|
||||||
%th IP Address
|
%th IP Address
|
||||||
|
%th Timeout
|
||||||
%th Projects
|
%th Projects
|
||||||
%th Jobs
|
%th Jobs
|
||||||
%th Tags
|
%th Tags
|
||||||
|
|
|
@ -39,6 +39,12 @@
|
||||||
Description
|
Description
|
||||||
.col-sm-10
|
.col-sm-10
|
||||||
= f.text_field :description, class: 'form-control'
|
= 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
|
.form-group
|
||||||
= label_tag :tag_list, class: 'control-label' do
|
= label_tag :tag_list, class: 'control-label' do
|
||||||
Tags
|
Tags
|
||||||
|
|
|
@ -36,6 +36,8 @@
|
||||||
- if runner.description.present?
|
- if runner.description.present?
|
||||||
%p.runner-description
|
%p.runner-description
|
||||||
= runner.description
|
= runner.description
|
||||||
|
- if runner.defines_job_upper_timeout?
|
||||||
|
%p Job upper timeout: #{runner.job_upper_timeout}
|
||||||
- if runner.tag_list.present?
|
- if runner.tag_list.present?
|
||||||
%p
|
%p
|
||||||
- runner.tag_list.sort.each do |tag|
|
- runner.tag_list.sort.each do |tag|
|
||||||
|
|
|
@ -55,6 +55,9 @@
|
||||||
%tr
|
%tr
|
||||||
%td Description
|
%td Description
|
||||||
%td= @runner.description
|
%td= @runner.description
|
||||||
|
%tr
|
||||||
|
%td Job upper timeout
|
||||||
|
%td= @runner.job_upper_timeout
|
||||||
%tr
|
%tr
|
||||||
%td Last contact
|
%td Last contact
|
||||||
%td
|
%td
|
||||||
|
|
Loading…
Reference in a new issue