Skip to content

Commit b21a8fd

Browse files
committed
added status based session filter
1 parent 7d89b28 commit b21a8fd

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

src/views/playground/Sessions.vue

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,27 @@ h5 span {
161161
<th class="sticky-header">Session Id</th>
162162
<th class="sticky-header">User Id (Hash)</th>
163163
<th class="sticky-header">Steps</th>
164-
<th class="sticky-header">Status</th>
164+
<th class="sticky-header" style="position: relative;">
165+
Status
166+
<b-dropdown
167+
size="sm"
168+
variant="light"
169+
toggle-class="p-1 ml-2"
170+
menu-class="dropDownPopup"
171+
no-caret
172+
right
173+
>
174+
<template #button-content>
175+
<i class="fa fa-filter text-muted"></i>
176+
</template>
177+
178+
<b-dropdown-item @click="handleSessionFilter('')">All</b-dropdown-item>
179+
<b-dropdown-item @click="handleSessionFilter('Pending')">In Progress</b-dropdown-item>
180+
<b-dropdown-item @click="handleSessionFilter('Success')">Completed</b-dropdown-item>
181+
<b-dropdown-item @click="handleSessionFilter('Expired')">Expired</b-dropdown-item>
182+
<b-dropdown-item @click="handleSessionFilter('Failed')">Failed</b-dropdown-item>
183+
</b-dropdown>
184+
</th>
165185
</tr>
166186
</thead>
167187
<tbody>
@@ -360,7 +380,16 @@ export default {
360380
this.notifyErr(e)
361381
}
362382
},
363-
383+
async handleSessionFilter(status){
384+
try{
385+
this.isLoading = true
386+
await this.fetchAppsUsersSessions({ appId: "", status: status })
387+
this.isLoading = false
388+
} catch (e) {
389+
this.isLoading = false
390+
this.notifyErr(e)
391+
}
392+
},
364393
async filterSessions(filterText) {
365394
try {
366395
if (filterText) {

0 commit comments

Comments
 (0)