summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2018-02-26 16:35:08 +0100
committerTomasz Maczukin <tomasz@maczukin.pl>2018-03-28 13:56:55 +0200
commit36753b78c065a54d7501f37f69fb49506f26688c (patch)
tree6d9b2e01e3ce4bb140ecb0d81ee690bd48cae036 /app
parent4ce376c0649faf4dea01857c312379771bdf37b7 (diff)
downloadgitlab-ce-36753b78c065a54d7501f37f69fb49506f26688c.tar.gz
Replace user_readable with human_readable
Diffstat (limited to 'app')
-rw-r--r--app/models/ci/build.rb2
-rw-r--r--app/models/ci/runner.rb4
-rw-r--r--app/serializers/build_details_entity.rb2
-rw-r--r--app/views/admin/runners/_runner.html.haml2
-rw-r--r--app/views/projects/runners/_form.html.haml4
-rw-r--r--app/views/projects/runners/_runner.html.haml2
-rw-r--r--app/views/projects/runners/show.html.haml2
7 files changed, 9 insertions, 9 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 5b9e06ab203..f47cbe0a206 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -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,
diff --git a/app/models/ci/runner.rb b/app/models/ci/runner.rb
index f95afd4c40c..baf57423682 100644
--- a/app/models/ci/runner.rb
+++ b/app/models/ci/runner.rb
@@ -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.
#
diff --git a/app/serializers/build_details_entity.rb b/app/serializers/build_details_entity.rb
index d1a4a9561d2..17769790371 100644
--- a/app/serializers/build_details_entity.rb
+++ b/app/serializers/build_details_entity.rb
@@ -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
diff --git a/app/views/admin/runners/_runner.html.haml b/app/views/admin/runners/_runner.html.haml
index 5f0fb5079d9..fc6ad6dfe95 100644
--- a/app/views/admin/runners/_runner.html.haml
+++ b/app/views/admin/runners/_runner.html.haml
@@ -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
diff --git a/app/views/projects/runners/_form.html.haml b/app/views/projects/runners/_form.html.haml
index 8fb8e6e0ebf..7e9435e0110 100644
--- a/app/views/projects/runners/_form.html.haml
+++ b/app/views/projects/runners/_form.html.haml
@@ -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
diff --git a/app/views/projects/runners/_runner.html.haml b/app/views/projects/runners/_runner.html.haml
index f7c41fe44c0..91d6b172566 100644
--- a/app/views/projects/runners/_runner.html.haml
+++ b/app/views/projects/runners/_runner.html.haml
@@ -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|
diff --git a/app/views/projects/runners/show.html.haml b/app/views/projects/runners/show.html.haml
index 0d39236680c..67084e3d66a 100644
--- a/app/views/projects/runners/show.html.haml
+++ b/app/views/projects/runners/show.html.haml
@@ -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