Skip to content

Commit 68347cf

Browse files
Merge pull request #45 from longquanzheng/eventType
Add eventType filtering
2 parents bcf4582 + 10b9944 commit 68347cf

File tree

2 files changed

+40
-3
lines changed

2 files changed

+40
-3
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
node_modules/
22
npm-debug.log
33
dist/
4-
.vscode
4+
.vscode
5+
.idea
6+
package-lock.json

client/routes/execution/history.vue

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,15 @@
2323
<table v-if="format === 'grid' && showTable" :class="{ compact: compactDetails }">
2424
<thead ref="thead">
2525
<th>ID</th>
26-
<th>Type</th>
26+
<th>Type <v-select
27+
class="eventType"
28+
value="All"
29+
:options="eventTypes"
30+
:on-change="setEventType"
31+
:searchable="false"
32+
/>
33+
34+
</th>
2735
<th>
2836
<a class="elapsed" :href="tsFormat === 'elapsed' ? null : '#'" @click.prevent="setTsFormat('elapsed')">Elapsed</a> /
2937
<a class="ts" :href="tsFormat === 'elapsed' ? '#' : null" @click.prevent="setTsFormat('ts')">Time</a>
@@ -35,7 +43,7 @@
3543
</thead>
3644
<div class="spacer"></div>
3745
<tbody>
38-
<tr v-for="(he, i) in $parent.results"
46+
<tr v-for="(he, i) in filteredEvents"
3947
:key="he.eventId"
4048
:data-event-type="he.eventType"
4149
:data-event-id="he.eventId"
@@ -100,6 +108,16 @@ export default {
100108
tsFormat: localStorage.getItem(`${this.$route.params.domain}:history-ts-col-format`) || 'elapsed',
101109
compactDetails: localStorage.getItem(`${this.$route.params.domain}:history-compact-details`) === 'true',
102110
splitEnabled: false,
111+
eventType: "",
112+
eventTypes: [
113+
{ value: 'All', label: 'All' },
114+
{ value: 'Decision', label: 'Decision' },
115+
{ value: 'Activity', label: 'Activity' },
116+
{ value: 'Signal', label: 'Signal' },
117+
{ value: 'Timer', label: 'Timer' },
118+
{ value: 'ChildWorkflow', label: 'ChildWorkflow' },
119+
{ value: 'Workflow', label: 'Workflow' },
120+
],
103121
splitSizes: [20, 80]
104122
}
105123
},
@@ -155,9 +173,22 @@ export default {
155173
},
156174
exportFilename() {
157175
return `${this.$route.params.workflowId.replace(/[\\~#%&*{}\/:<>?|\"-]/g, ' ')} - ${this.$route.params.runId}.json`
176+
},
177+
filteredEvents() {
178+
if (this && this.eventType && this.eventType != "All") {
179+
var et = this.eventType
180+
return this.$parent.results.filter(function (u) {
181+
return u.eventType.includes(et)
182+
})
183+
} else {
184+
return this.$parent.results
185+
}
158186
}
159187
},
160188
methods: {
189+
setEventType(et){
190+
this.eventType = et.value
191+
},
161192
setFormat(format) {
162193
this.$router.replace({
163194
query: Object.assign({}, this.$route.query, { format })
@@ -307,6 +338,10 @@ section.history
307338
z-index 2
308339
th
309340
display inline-block
341+
& > .v-select.eventType
342+
margin-left 10px
343+
display: inline-block
344+
width: 150px
310345
& + .spacer
311346
width 100%
312347
height 38px

0 commit comments

Comments
 (0)