[EDA-1778] Making the filters works #195
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This it's the last PR of the filter logs features:
This feature allows the user to filter the logs of a match by two options
In this PR I added the filtering itself logic in JavaScript in
static/js/filter_logs.js
file. Which has the following methods:getLogsFiltered
is the main function of filtering. Where the magic happensisNotAll
check if the option it'sall
selectedOption
search the current user selectiondownload
start the downloading of the fileI was forced to refactor the
development/common/match_result_text.py
to adapt to this new functionality for the followings reasons:generate_text( )
function, but all logs were put it together as one big string, and then the user could download them. To filter the logs I need to could access the logs in an array way. So I decided to change this method to return a list instead string and create another methodgenerate_text_str( )
that returned as a string for certain place that needed in that way.generate_text()
too, to adapt them to return a string instead of receiben the string variable as a buffer and modify inside.I add the filters to
development/templates/development/new_match_details.html
, the new logs template. I wrpas the filter inside a bootstrap collapseDemo.mov
I think it would be nice to have filter by turn range too in followings iteration. Also adding a switch to could view all the logs the user is filtering. Sometihin similar to the old template used