Skip to content

Commit d2e9acd

Browse files
committed
Merge pull request #102 from FlorianPerucki/master
Allow filtering on queue, task path and exception type using regex from dashboard
2 parents 5d97e68 + b9abd54 commit d2e9acd

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

mrq/dashboard/app.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import time
77
import os
88
import sys
9+
import re
910
from bson import ObjectId
1011
import json
1112
import argparse
@@ -127,7 +128,11 @@ def build_api_datatables_query(req):
127128

128129
for param in ["queue", "path", "exceptiontype"]:
129130
if req.args.get(param):
130-
query[param] = req.args.get(param)
131+
if "*" in req.args.get(param):
132+
query[param] = re.compile("^"+req.args.get(param)+"$")
133+
else:
134+
query[param] = req.args.get(param)
135+
131136
if req.args.get("status"):
132137
statuses = req.args["status"].split("-")
133138
if len(statuses) == 1:

0 commit comments

Comments
 (0)