diff options
author | Miranda Fluharty <mfluharty@gitlab.com> | 2019-08-02 02:25:13 +0000 |
---|---|---|
committer | Paul Slaughter <pslaughter@gitlab.com> | 2019-08-02 02:25:13 +0000 |
commit | 144268daa87ed2680db2d4c01b121598de91291c (patch) | |
tree | c22d263e51f3b66d1f334f7fd5052894dc46af06 /app | |
parent | 040eb078e992321a35d7870dfe2efeaf51158e36 (diff) | |
download | gitlab-ce-144268daa87ed2680db2d4c01b121598de91291c.tar.gz |
Only render job sidebar block if it has content
Change sidebar's renderBlock() to return true only if
any of the block's <detail-row>s will be rendered
Change block to render only if renderBlock() returns true
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/jobs/components/sidebar.vue | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/app/assets/javascripts/jobs/components/sidebar.vue b/app/assets/javascripts/jobs/components/sidebar.vue index e9704584c9f..06477477aad 100644 --- a/app/assets/javascripts/jobs/components/sidebar.vue +++ b/app/assets/javascripts/jobs/components/sidebar.vue @@ -73,15 +73,14 @@ export default { }, renderBlock() { return ( - this.job.merge_request || this.job.duration || - this.job.finished_data || + this.job.finished_at || this.job.erased_at || this.job.queued || + this.hasTimeout || this.job.runner || this.job.coverage || - this.job.tags.length || - this.job.cancel_path + this.job.tags.length ); }, hasArtifact() { @@ -160,7 +159,7 @@ export default { </gl-link> </div> - <div :class="{ block: renderBlock }"> + <div v-if="renderBlock" class="block"> <detail-row v-if="job.duration" :value="duration" |