Web: Job details, avoid error when job data not yet loaded
This commit is contained in:
parent
27fb9d05db
commit
2bbe1148b7
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<h2 class="column-title">Job Details</h2>
|
<h2 class="column-title">Job Details</h2>
|
||||||
<div class="job-details">
|
<div v-if="hasJobData" class="job-details">
|
||||||
<table class="details">
|
<table class="details">
|
||||||
<tr class="field-id">
|
<tr class="field-id">
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
@ -55,6 +55,9 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div v-else class="no-job-selected">
|
||||||
|
<p>No job selected, pick one from the list on the left.</p>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="js">
|
<script lang="js">
|
||||||
@ -91,6 +94,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
hasJobData() {
|
||||||
|
return !!this.jobData && !!this.jobData.id;
|
||||||
|
},
|
||||||
hasMetadata() {
|
hasMetadata() {
|
||||||
return this.jobData && !objectEmpty(this.jobData.metadata);
|
return this.jobData && !objectEmpty(this.jobData.metadata);
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user