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

create download button to download metadata in blocks #3259

Merged

Conversation

Oghenebrume50
Copy link
Contributor

@Oghenebrume50 Oghenebrume50 commented Sep 30, 2020

Fixes #3222

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

Changes

  • I created a hyperlink tag in the Blockdetails component to act as a download button
  • I created a helper that returns the URL from the block metadata

Verification

The below screenshots show how it works
See download button and click on it
download1
Receive the prompt to download file
dowload2
view file after downloading
metapic

Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>
Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>
Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>
Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>
Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>
Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>
Copy link
Contributor

@OGKevin OGKevin left a comment

Choose a reason for hiding this comment

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

Minor changes to the CHANGELOG.MD

CHANGELOG.md Outdated
@@ -912,3 +912,4 @@ Initial version to have a stable reference before [gossip protocol removal](/doc
- Bucket commands.
- Downsampling support for UI.
- Grafana dashboards for Thanos components.
- [#3259](https://github.com/thanos-io/thanos/pull/3259) Thanos BlockViewer.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you be a little more descriptive for the end user on what this PR adds? You can take inspiration from the PR title.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also this needs to be added at the top of the file under the "Unreleased" block.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, I made the corrections

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM 😊

Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>
Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>
Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>
Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>
@Oghenebrume50
Copy link
Contributor Author

@prmsrswt I need help with the markdown link check? I do not understand why it is failing

@yeya24
Copy link
Contributor

yeya24 commented Oct 7, 2020

@Oghenebrume50 Sorry, please ignore this error first. I opened a pr to fix it in #3282.

@Oghenebrume50
Copy link
Contributor Author

Oghenebrume50 commented Oct 7, 2020

@Oghenebrume50 Sorry, please ignore this error first. I opened a pr to fix it in #3282.

Hi thank you, there seems to be other test failing now though, and I do not think they are related to the markdown links, I also have no idea how to fix them.

@Oghenebrume50
Copy link
Contributor Author

Everything works fine now once I merged the new changes from master into the branch, I also updated the screenshot of how the json file looks when viewed. @prmsrswt @yeya24

Copy link
Member

@onprem onprem left a comment

Choose a reason for hiding this comment

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

Just some small nits, LGTM after this.

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@squat squat left a comment

Choose a reason for hiding this comment

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

Lgtm :))

Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>
@squat squat merged commit 57ced35 into thanos-io:master Oct 15, 2020
OGKevin pushed a commit to OGKevin/thanos that referenced this pull request Oct 15, 2020
* create download button for download metadata file in blocks

Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>

* add URL.createObjectURl to global jest config

Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>

* adding changelog for this PR

Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>

* adding changelog for this PR

Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>

* fixing react linting issue

Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>

* fix file not downloading but probable broke the linter

Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>

* updated the changelog content and made it more descriptive

Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>

* fix the issue with the jest not recognizing url createObject

Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>

* modify code corrected typo and used reactstrap

Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>

* fix linting issue

Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>

* update page based on review given

Signed-off-by: Oghenebrume50 <raphlbrume@gmail.com>

* add full stop at the end of changelog sentence

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

Successfully merging this pull request may close these issues.

Block Viewer: Allow downloading meta.json of a block
5 participants