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

feat(backmatter): Support viewing base64 data #751

Merged
merged 3 commits into from
Apr 4, 2023

Conversation

tuckerzp
Copy link
Contributor

@tuckerzp tuckerzp commented Mar 30, 2023

This reworks how we resolve links in backmatter to not always assume data will be in an rlink.

The BackMatterLookup class will make resolving back matter a lot easier in the future.

Testing

http://localhost:3000/system-security-plan/?url=https://raw.githubusercontent.com/EasyDynamics/oscal-demo-content/tuckerzp/base64/system-security-plans/ssp-example.json

The dataflow diagram is in base64

image

closes #671

This reworks how we resolve links in backmatter to not always
assume data will be in an `rlink`.
src/components/OSCALDiagram.js Outdated Show resolved Hide resolved
src/components/oscal-utils/OSCALBackMatterUtils.js Outdated Show resolved Hide resolved
src/components/oscal-utils/OSCALBackMatterUtils.js Outdated Show resolved Hide resolved
src/components/oscal-utils/OSCALBackMatterUtils.js Outdated Show resolved Hide resolved
@tuckerzp tuckerzp marked this pull request as ready for review March 31, 2023 15:14
@easy-dynamics-oscal-automation easy-dynamics-oscal-automation bot requested a review from a team March 31, 2023 15:14
@kylelaker kylelaker marked this pull request as draft March 31, 2023 19:05
@kylelaker
Copy link
Contributor

This is a great start! Thanks for writing tests for this too! Based on a conversation we had earlier, it seems like maybe our current implementation has issues in some browsers, either because of size, corruption in the test data, or corruption as part of the resolution process.

Can you please take a look at seeing if smaller images work or whether re-encoding the document used for testing solves the problem?

I want to keep this in Draft status until we know the implementation actually works, or at least what the specific sharp edges are.

@tuckerzp
Copy link
Contributor Author

Image was corrupted, I have updated it and things work.

@tuckerzp tuckerzp marked this pull request as ready for review March 31, 2023 20:14
Copy link
Contributor

@kylelaker kylelaker left a comment

Choose a reason for hiding this comment

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

Great use of # (though we'll have to refactor it for TS eventually). Good work!

@easy-dynamics-oscal-automation easy-dynamics-oscal-automation bot requested a review from a team March 31, 2023 22:10
Copy link
Contributor

@Bronstrom Bronstrom left a comment

Choose a reason for hiding this comment

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

Very slick implementation! This PR taught me about private class members, which I had no idea existed in JS till now.

@Bronstrom Bronstrom merged commit 7b4ca26 into develop Apr 4, 2023
@Bronstrom Bronstrom deleted the tuckerzp/support-base64 branch April 4, 2023 01:12
@kylelaker kylelaker added the enhancement New feature or request label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support viewing base64-encoded data
3 participants