Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Filter block rows in bucket UI according to searched block ID #5102

Merged
merged 3 commits into from
Feb 13, 2022
Merged

Fix: Filter block rows in bucket UI according to searched block ID #5102

merged 3 commits into from
Feb 13, 2022

Conversation

tend2infinity
Copy link
Contributor

@tend2infinity tend2infinity commented Jan 25, 2022

Issue: #5044

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

  • Added a function to filter block rows with respect to searched ULID
  • Shows only the row which contains the searched block ID
  • Added an edge case to show "No blocks found" if no block matches with the searched block

Verification

  • Tested locally with 4 different block labels.

UI preview

Attached a short video file that demonstrates my implementation.

Screencast.from.25-01-22.08.29.35.PM.IST.mp4

Signed-off-by: soumya <somu12.ss@gmail.com>
Signed-off-by: soumya <somu12.ss@gmail.com>
Copy link
Member

@GiedriusS GiedriusS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to do make assets && add an item to the CHANGELOG (:

@@ -146,3 +146,21 @@ export const getBlocksByCompactionLevel = (blocks: Block[], compactionLevel: num
const blockResult = blocks.filter((block) => block.compaction.level === compactionLevel);
return blockResult;
};

export const getFilteredBlockPools = (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could add a unit test or two for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah for sure, I can add one

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @GiedriusS you can review now

yeya24
yeya24 previously approved these changes Feb 1, 2022
Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Signed-off-by: soumya <somu12.ss@gmail.com>
@tend2infinity
Copy link
Contributor Author

@yeya24 @GiedriusS can anyone run CI for this PR

Copy link
Contributor

@yeya24 yeya24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yeya24 yeya24 merged commit 2898724 into thanos-io:main Feb 13, 2022
Nicholaswang pushed a commit to Nicholaswang/thanos that referenced this pull request Mar 6, 2022
…hanos-io#5102)

* added helper function to filter block rows

Signed-off-by: soumya <somu12.ss@gmail.com>

* updated store UI to show filtered block rows

Signed-off-by: soumya <somu12.ss@gmail.com>

* added unit tests for getFilteredBlockPools function

Signed-off-by: soumya <somu12.ss@gmail.com>
Signed-off-by: Nicholaswang <wzhever@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants