Allow events filter to be set in the URL in addition to cookie

This commit is contained in:
Igor Kapkov 2017-08-07 22:56:24 +10:00 committed by Rémy Coutable
parent 4586d77c85
commit 65cf805278
No known key found for this signature in database
GPG Key ID: 98DFFD1C0C62B70B
2 changed files with 6 additions and 0 deletions

View File

@ -275,6 +275,7 @@ class ApplicationController < ActionController::Base
def event_filter
# Split using comma to maintain backward compatibility Ex/ "filter1,filter2"
filters = cookies['event_filter'].split(',')[0] if cookies['event_filter'].present?
filters = params[:event_filter].split(',')[0] if params[:event_filter].present?
@event_filter ||= EventFilter.new(filters)
end

View File

@ -0,0 +1,5 @@
---
title: "Allow events filter to be set in the URL in addition to cookie"
merge_request: 21557
author: Igor @igas
type: added