diff mbox series

REST: Disable control for filtering patches by series in web view

Message ID 20180511170044.6225-1-dja@axtens.net
State Accepted
Headers show
Series REST: Disable control for filtering patches by series in web view | expand

Commit Message

Daniel Axtens May 11, 2018, 5 p.m. UTC
As with the events view, creating and rendering the control for
filtering patches by series creates a massive slowdown. It's a little
sad not to be able to do this in the web UI as filtering patches
by series does make sense, but hopefully people figure out you can
still do it, just not from the web view.

Cc: Stephen Finucane <stephen@that.guru>
Signed-off-by: Daniel Axtens <dja@axtens.net>
---
 patchwork/api/filters.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Stephen Finucane May 11, 2018, 5:02 p.m. UTC | #1
On Sat, 2018-05-12 at 03:00 +1000, Daniel Axtens wrote:
> As with the events view, creating and rendering the control for
> filtering patches by series creates a massive slowdown. It's a little
> sad not to be able to do this in the web UI as filtering patches
> by series does make sense, but hopefully people figure out you can
> still do it, just not from the web view.
> 
> Cc: Stephen Finucane <stephen@that.guru>
> Signed-off-by: Daniel Axtens <dja@axtens.net>

Yup, go for it.

Reviewed-by: Stephen Finucane <stephen@that.guru>
Stephen Finucane May 16, 2018, 1:01 p.m. UTC | #2
On Fri, 2018-05-11 at 18:02 +0100, Stephen Finucane wrote:
> On Sat, 2018-05-12 at 03:00 +1000, Daniel Axtens wrote:
> > As with the events view, creating and rendering the control for
> > filtering patches by series creates a massive slowdown. It's a little
> > sad not to be able to do this in the web UI as filtering patches
> > by series does make sense, but hopefully people figure out you can
> > still do it, just not from the web view.
> > 
> > Cc: Stephen Finucane <stephen@that.guru>
> > Signed-off-by: Daniel Axtens <dja@axtens.net>
> 
> Yup, go for it.
> 
> Reviewed-by: Stephen Finucane <stephen@that.guru>

I extended this to also apply to cover letters (which are basically the
same thing) and applied it. Thanks!

Stephen
diff mbox series

Patch

diff --git a/patchwork/api/filters.py b/patchwork/api/filters.py
index 7e818954639a..12136aeed427 100644
--- a/patchwork/api/filters.py
+++ b/patchwork/api/filters.py
@@ -179,7 +179,9 @@  class CoverLetterFilterSet(TimestampMixin, FilterSet):
 class PatchFilterSet(TimestampMixin, FilterSet):
 
     project = ProjectFilter(queryset=Project.objects.all())
-    series = BaseFilter(queryset=Series.objects.all())
+    # As with events, disable filtering on series.
+    series = BaseFilter(queryset=Series.objects.all(),
+                        widget=MultipleHiddenInput)
     submitter = PersonFilter(queryset=Person.objects.all())
     delegate = UserFilter(queryset=User.objects.all())
     state = StateFilter(queryset=State.objects.all())