Skip to content

Commit 2227ee7

Browse files
committed
ui: clean up workflow history page
1 parent b200255 commit 2227ee7

File tree

1 file changed

+52
-39
lines changed

1 file changed

+52
-39
lines changed

ui/src/views/CollectionWorkflow.vue

Lines changed: 52 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -9,49 +9,32 @@
99
<div class="container-fluid">
1010
<a class="reload" href="#" v-on:click="reload()">Reload</a>
1111
<dl>
12+
1213
<dt>Status</dt>
1314
<dd><b-badge>{{ history.status }}</b-badge></dd>
15+
1416
<dt>Activity summary</dt>
1517
<dd>
16-
<table class="table table-bordered table-hover table-sm">
17-
<thead class="thead">
18-
<tr>
19-
<th scope="col">Name</th>
20-
<th scope="col">Started</th>
21-
<th scope="col">Duration (seconds)</th>
22-
<th scope="col">Status</th>
23-
</tr>
24-
</thead>
25-
<tbody>
26-
<tr v-for="(item, index) in activities" v-bind:key="index">
27-
<td scope="row">{{ item.name }}</td>
28-
<td>{{ item.started | formatEpoch }}</td>
29-
<td>{{ item.duration }}</td>
30-
<td><en-collection-status-badge :status="item.status"/></td>
31-
</tr>
32-
</tbody>
33-
</table>
18+
<b-list-group id="activity-summary">
19+
<b-list-group-item v-for="(item, index) in activities" v-bind:key="index">
20+
<en-collection-status-badge class="float-right" :status="item.status"/>
21+
<strong>{{ item.name }}</strong><br />
22+
<span class="date">{{ item.started | formatEpoch }}</span>
23+
<span class="float-right duration">{{ item.duration }}s</span>
24+
</b-list-group-item>
25+
</b-list-group>
3426
</dd>
27+
3528
<dt>History</dt>
3629
<dd>
37-
<table class="table table-bordered table-hover table-sm">
38-
<thead class="thead">
39-
<tr>
40-
<th scope="col">ID</th>
41-
<th scope="col">Type</th>
42-
<th scope="col">Timestamp</th>
43-
<th scope="col">Details</th>
44-
</tr>
45-
</thead>
46-
<tbody>
47-
<tr v-for="item in history.history.slice().reverse()" v-bind:key="item.id">
48-
<td scope="row">{{ item.id }}</td>
49-
<td>{{ item.type }}</td>
50-
<td>{{ item.details.timestamp | formatEpoch }}</td>
51-
<td>{{ renderDetails(item) }}</td>
52-
</tr>
53-
</tbody>
54-
</table>
30+
<b-list-group id="activity-summary">
31+
<b-list-group-item v-for="item in history.history.slice().reverse()" v-bind:key="item.id">
32+
<span class="float-right identifier">#{{ item.id }}</span>
33+
<strong>{{ item.type }}</strong><br />
34+
<span class="date">{{ item.details.timestamp | formatEpoch }}</span>
35+
<div v-html="renderDetails(item)"></div>
36+
</b-list-group-item>
37+
</b-list-group>
5538
</dd>
5639
</dl>
5740
</div>
@@ -171,16 +154,46 @@ export default class CollectionWorkflow extends Vue {
171154
ret = 'Attempts: ' + attempt;
172155
}
173156
157+
if (ret.length) {
158+
ret = '<pre>' + ret + '</pre>';
159+
}
160+
174161
return ret;
175162
}
176163
177164
}
178165
</script>
179166

180-
<style scoped lang="scss">
167+
<style lang="scss">
168+
169+
.collection-detail {
170+
171+
.reload {
172+
float: right;
173+
}
174+
175+
dd {
176+
margin-bottom: 1.5rem;
177+
}
178+
179+
#activity-summary {
180+
font-size: .8rem;
181+
.list-group-item {
182+
padding: 0.50rem 0.75rem;
183+
}
184+
.date, .duration {
185+
color: #999;
186+
}
187+
.identifier {
188+
color: #999;
189+
}
190+
}
191+
192+
pre {
193+
margin: 3px 0 0 0 !important;
194+
overflow: auto !important;
195+
}
181196
182-
.reload {
183-
float: right;
184197
}
185198
186199
</style>

0 commit comments

Comments
 (0)