feat: Add a remove_filter flag to the jinja filter_values function and add a new get_filters function (see issue 13943 for more details)#14507
Conversation
Codecov Report
@@ Coverage Diff @@
## master #14507 +/- ##
==========================================
+ Coverage 77.14% 77.30% +0.15%
==========================================
Files 958 960 +2
Lines 48241 48775 +534
Branches 5636 6122 +486
==========================================
+ Hits 37217 37707 +490
- Misses 10823 10862 +39
- Partials 201 206 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
9c4990d to
a3c7eb2
Compare
|
Nit: Let's give meaningful titles to PRs so that we can get a sense for the PR from the list of PRs without having to click through to the issue. The PR title also becomes the commit msg in master as we squash and merge. |
|
thank you jc for the contribution! really excited about this new feature. could you add screenshot of ui changes, as well as manual test plan? added |
fc116f4 to
8eaecac
Compare
|
thanks for adding video :) ! @villebro @zhaoyongjie is this gonna partially solve the "jinja filter status not applied on dashboard" problem? |
|
/testenv up |
|
@junlincc Ephemeral environment spinning up at http://34.211.207.26:8080. Credentials are |
@junlincc it does in the sense that you can declare a column which you intend to only use as a filter. You can then handle that filter in your jinja template and mark it as remote_filter=True. To prevent users from picking the column as a |
6c5d4a2 to
fe9df0c
Compare
|
@villebro all tests pass. I think it's ready to be merged. |
|
thank you so much for addressing the comments! @villebro please do help unblock jc 🙏 |
villebro
left a comment
There was a problem hiding this comment.
Code LGTM - Let me give this a test run and approve if all is ok! 👍
villebro
left a comment
There was a problem hiding this comment.
Awesome work JC, really great feature and works really well! Left a few additional comments, with one functional question relating to casting val to str. Let me know what you think.
There was a problem hiding this comment.
I think here we need to assume val can be Optional[Union[Any, List[Any]]]
There was a problem hiding this comment.
are you okay with Union[None, Any, List[Any]]
There was a problem hiding this comment.
I think the return value is List[Any]
Implementation issue 13943
villebro
left a comment
There was a problem hiding this comment.
LGTM, thanks for the hard work on this awesome feature JC!
|
Ephemeral environment shutdown and build artifacts deleted. |
…e#14507) Implementation issue 13943 Co-authored-by: cccs-jc <cccs-jc@cyber.gc.ca>
…e#14507) Implementation issue 13943 Co-authored-by: cccs-jc <cccs-jc@cyber.gc.ca>
…e#14507) Implementation issue 13943 Co-authored-by: cccs-jc <cccs-jc@cyber.gc.ca>
…e#14507) Implementation issue 13943 Co-authored-by: cccs-jc <cccs-jc@cyber.gc.ca>
…e#14507) Implementation issue 13943 Co-authored-by: cccs-jc <cccs-jc@cyber.gc.ca>
…e#14507) Implementation issue 13943 Co-authored-by: cccs-jc <cccs-jc@cyber.gc.ca>
…e#14507) Implementation issue 13943 Co-authored-by: cccs-jc <cccs-jc@cyber.gc.ca>
…e#14507) Implementation issue 13943 Co-authored-by: cccs-jc <cccs-jc@cyber.gc.ca>
SUMMARY
Implementation of issue #13943.
Feature must be enabled with feature flag ENABLE_TEMPLATE_REMOVE_FILTERS.
SCREENSHOT