Commit 11204398 authored by Tomasz Maczukin's avatar Tomasz Maczukin

Fix sidebar_details_block.vue and simplify build_metadata_entity.rb

parent 964933c9
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
return `#${this.job.runner.id}`; return `#${this.job.runner.id}`;
}, },
hasTimeout() { hasTimeout() {
return this.job.metadata != null && this.job.metadata.timeout_human_readable !== ''; return this.job.metadata != null && this.job.metadata.timeout_human_readable !== null;
}, },
timeout() { timeout() {
if (this.job.metadata == null) { if (this.job.metadata == null) {
......
class BuildMetadataEntity < Grape::Entity class BuildMetadataEntity < Grape::Entity
expose :timeout_human_readable do |metadata| expose :timeout_human_readable
metadata.timeout_human_readable unless metadata.timeout.nil?
end
expose :timeout_source do |metadata| expose :timeout_source do |metadata|
metadata.present.timeout_source metadata.present.timeout_source
end end
......
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