BigW Consortium Gitlab

Replace user_readable with human_readable

parent 4ce376c0
......@@ -91,7 +91,7 @@ module Ci
after_commit :update_project_statistics_after_save, on: [:create, :update]
after_commit :update_project_statistics, on: :destroy
chronic_duration_attr_reader :used_timeout_user_readable, :used_timeout
chronic_duration_attr_reader :used_timeout_human_readable, :used_timeout
class << self
# This is needed for url_for to work,
......
......@@ -9,7 +9,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 maximum_job_timeout_user_readable].freeze
FORM_EDITABLE = %i[description tag_list active run_untagged locked access_level maximum_job_timeout_human_readable].freeze
has_many :builds
has_many :runner_projects, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
......@@ -52,7 +52,7 @@ module Ci
cached_attr_reader :version, :revision, :platform, :architecture, :contacted_at, :ip_address
chronic_duration_attr :maximum_job_timeout_user_readable, :maximum_job_timeout
chronic_duration_attr :maximum_job_timeout_human_readable, :maximum_job_timeout
# Searches for runners matching the given query.
#
......
......@@ -6,7 +6,7 @@ class BuildDetailsEntity < JobEntity
expose :pipeline, using: PipelineEntity
expose :timeout, if: -> (*) { !build.used_timeout.nil? } do |build|
{ value: build.used_timeout_user_readable,
{ value: build.used_timeout_human_readable,
source: build.timeout_source }
end
......
......@@ -20,7 +20,7 @@
= runner.ip_address
%td
- if runner.defines_maximum_job_timeout?
= runner.maximum_job_timeout_user_readable
= runner.maximum_job_timeout_human_readable
- else
n/a
%td
......
......@@ -40,10 +40,10 @@
.col-sm-10
= f.text_field :description, class: 'form-control'
.form-group
= label_tag :maximum_job_timeout_user_readable, class: 'control-label' do
= label_tag :maximum_job_timeout_human_readable, class: 'control-label' do
Maximum job timeout
.col-sm-10
= f.text_field :maximum_job_timeout_user_readable, class: 'form-control'
= f.text_field :maximum_job_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
......
......@@ -37,7 +37,7 @@
%p.runner-description
= runner.description
- if runner.defines_maximum_job_timeout?
%p Maximum job timeout: #{runner.maximum_job_timeout_user_readable}
%p Maximum job timeout: #{runner.maximum_job_timeout_human_readable}
- if runner.tag_list.present?
%p
- runner.tag_list.sort.each do |tag|
......
......@@ -57,7 +57,7 @@
%td= @runner.description
%tr
%td Maximum job timeout
%td= @runner.maximum_job_timeout_user_readable
%td= @runner.maximum_job_timeout_human_readable
%tr
%td Last contact
%td
......
......@@ -26,7 +26,7 @@ end
describe 'ChronicDurationAttribute' do
let(:source_field) {:maximum_job_timeout}
let(:virtual_field) {:maximum_job_timeout_user_readable}
let(:virtual_field) {:maximum_job_timeout_human_readable}
subject {Ci::Runner.new}
it_behaves_like 'ChronicDurationAttribute reader'
......@@ -35,7 +35,7 @@ end
describe 'ChronicDurationAttribute - reader' do
let(:source_field) {:used_timeout}
let(:virtual_field) {:used_timeout_user_readable}
let(:virtual_field) {:used_timeout_human_readable}
subject {Ci::Build.new}
it "doesn't contain dynamically created writer method" do
......
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