From e8d5076f6cf369973db54c618bf76f2546dc7039 Mon Sep 17 00:00:00 2001 From: Mateusz Borowczyk Date: Tue, 23 Apr 2024 09:45:24 +0200 Subject: [PATCH] Resolve bug in resource details filtering, where removing log filters would send invalid request. (Issue #5697, PR #5698) # Description * Short description here * closes #5697 # Self Check: Strike through any lines that are not applicable (`~~line~~`) then check the box - [x] Attached issue to pull request - [ ] Changelog entry - [ ] Code is clear and sufficiently documented - [ ] Sufficient test cases (reproduces the bug/tests the requested feature) - [ ] Correct, in line with design - [ ] End user documentation is included or an issue is created for end-user documentation (add ref to issue here: ) https://github.com/inmanta/web-console/assets/113331659/79a5ee17-afd9-4252-a5aa-259a63a549da --- .../unreleased/5697-resouce-details-filtering-bug.yml | 6 ++++++ .../UI/Tabs/LogTab/Controls/LogLevelFilter.tsx | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelogs/unreleased/5697-resouce-details-filtering-bug.yml diff --git a/changelogs/unreleased/5697-resouce-details-filtering-bug.yml b/changelogs/unreleased/5697-resouce-details-filtering-bug.yml new file mode 100644 index 000000000..fa4f43540 --- /dev/null +++ b/changelogs/unreleased/5697-resouce-details-filtering-bug.yml @@ -0,0 +1,6 @@ +description: "Resolve bug in resource details filtering, where removing log filters would send invalid request." +issue-nr: 5697 +change-type: patch +destination-branches: [master, iso7] +sections: + bugfix: "{{description}}" diff --git a/src/Slices/ResourceDetails/UI/Tabs/LogTab/Controls/LogLevelFilter.tsx b/src/Slices/ResourceDetails/UI/Tabs/LogTab/Controls/LogLevelFilter.tsx index a74df1903..b53af8794 100644 --- a/src/Slices/ResourceDetails/UI/Tabs/LogTab/Controls/LogLevelFilter.tsx +++ b/src/Slices/ResourceDetails/UI/Tabs/LogTab/Controls/LogLevelFilter.tsx @@ -21,7 +21,7 @@ export const LogLevelFilter: React.FC = ({ filter, setFilter }) => { }); const onSelect = (selection) => { - update(selection === null ? undefined : selection); + update(selection === null || selection === "" ? undefined : selection); }; const deleteChip = () =>