Make Krona plots viewable in data portal #1729
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #1707
Changes
Backend
A new API endpoint has been added to allow a client to obtain the URL for specific types of data objects. This is necessary because the existing endpoint is only accessible to authenticated (i.e. logged in) users. The Krona plot's HTML needs to be accessible for all users. Being logged in should not be required to view these data objects.
This endpoint accepts a
data_object_id
and returns the URL for the HTML for that data object only if the data object has a specificfile_type
. If this endpoint is used to try and obtain the download URL for a non-Krona plot data object, it return a400
. Tests have been added for this endpoint.Frontend
Krona plots are now viewable on the data portal without the need to log in or click the download button. They are accessible by clicking the magnifying glass icon in the corresponding row:

Clicking will bring up a modal (implemented with a

v-dialog
component) containing an iframe.