diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-02-21 04:03:12 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2018-03-28 13:56:55 +0200 |
commit | 78a4189ece4f8d125eefbfdf6619d3452820bb8e (patch) | |
tree | 45f950c72b9a9c452610bbcd75d2d8d23f67898f /app/serializers | |
parent | d633bc8134fe472137fb668c1eb78de45dc9bb57 (diff) | |
download | gitlab-ce-78a4189ece4f8d125eefbfdf6619d3452820bb8e.tar.gz |
Show timeout information on job's page
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/build_details_entity.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/serializers/build_details_entity.rb b/app/serializers/build_details_entity.rb index 69d46f5ec14..d1a4a9561d2 100644 --- a/app/serializers/build_details_entity.rb +++ b/app/serializers/build_details_entity.rb @@ -5,6 +5,11 @@ class BuildDetailsEntity < JobEntity expose :runner, using: RunnerEntity expose :pipeline, using: PipelineEntity + expose :timeout, if: -> (*) { !build.used_timeout.nil? } do |build| + { value: build.used_timeout_user_readable, + source: build.timeout_source } + end + expose :erased_by, if: -> (*) { build.erased? }, using: UserEntity expose :erase_path, if: -> (*) { build.erasable? && can?(current_user, :erase_build, build) } do |build| erase_project_job_path(project, build) |