summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2018-03-06 16:25:13 +0100
committerTomasz Maczukin <tomasz@maczukin.pl>2018-03-28 13:58:16 +0200
commitd58d3098f159a17fbcf1ae27165c249722990988 (patch)
treecb1a8732227282cbfe85ded3e1d7dcc5ab5308ce /app
parentf5e602ee0f8d95617adf6fb9b5a1a132a471fb12 (diff)
downloadgitlab-ce-d58d3098f159a17fbcf1ae27165c249722990988.tar.gz
Rename used_timeout to timeout
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/jobs/components/sidebar_details_block.vue4
-rw-r--r--app/models/ci/build.rb2
-rw-r--r--app/models/ci/build_metadata.rb4
-rw-r--r--app/serializers/build_metadata_entity.rb4
4 files changed, 7 insertions, 7 deletions
diff --git a/app/assets/javascripts/jobs/components/sidebar_details_block.vue b/app/assets/javascripts/jobs/components/sidebar_details_block.vue
index 15584922d1f..6ff3fa6e099 100644
--- a/app/assets/javascripts/jobs/components/sidebar_details_block.vue
+++ b/app/assets/javascripts/jobs/components/sidebar_details_block.vue
@@ -45,7 +45,7 @@
return `#${this.job.runner.id}`;
},
timeout() {
- let t = `${this.job.metadata.used_timeout_human_readable}`;
+ let t = `${this.job.metadata.timeout_human_readable}`;
if (this.job.metadata.timeout_source != null) {
t += ` (from ${this.job.metadata.timeout_source})`;
@@ -130,7 +130,7 @@
/>
<detail-row
class="js-job-timeout"
- v-if="job.metadata.used_timeout_human_readable"
+ v-if="job.metadata.timeout_human_readable"
title="Timeout"
:help-url="runnerHelpUrl"
:value="timeout"
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 7a12d7a3deb..405c89d0103 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -242,7 +242,7 @@ module Ci
end
def timeout
- metadata.used_timeout
+ metadata.timeout
end
def triggered_by?(current_user)
diff --git a/app/models/ci/build_metadata.rb b/app/models/ci/build_metadata.rb
index 89fee37b1b6..335209e8ec2 100644
--- a/app/models/ci/build_metadata.rb
+++ b/app/models/ci/build_metadata.rb
@@ -10,7 +10,7 @@ module Ci
belongs_to :build, class_name: 'Ci::Build'
- chronic_duration_attr_reader :used_timeout_human_readable, :used_timeout
+ chronic_duration_attr_reader :timeout_human_readable, :timeout
enum timeout_source: {
unknown_timeout_source: 1,
@@ -22,7 +22,7 @@ module Ci
project_timeout = build.project&.build_timeout
timeout = [project_timeout, build.runner&.maximum_timeout].compact.min
- self.used_timeout = timeout
+ self.timeout = timeout
self.timeout_source = timeout < project_timeout ? :runner_timeout_source : :project_timeout_source
save!
diff --git a/app/serializers/build_metadata_entity.rb b/app/serializers/build_metadata_entity.rb
index 4b6a538665d..39f429aa6c3 100644
--- a/app/serializers/build_metadata_entity.rb
+++ b/app/serializers/build_metadata_entity.rb
@@ -1,6 +1,6 @@
class BuildMetadataEntity < Grape::Entity
- expose :used_timeout_human_readable do |metadata|
- metadata.used_timeout_human_readable unless metadata.used_timeout.nil?
+ expose :timeout_human_readable do |metadata|
+ metadata.timeout_human_readable unless metadata.timeout.nil?
end
expose :timeout_source do |metadata|