Skip to content

UD integration #2

@lewisjared

Description

@lewisjared

Description

We need a way to integrate the Unified Dashboard into the REF website. This issue is a discussion to figure out how we can best achieve that.

The metric bundles used by the UD will be generated via the API. The query parameters to this endpoint are still up for debate, but assume that a metric bundle can be created via a GET request. The URL for this query should be static and publicly accessible. The dimensions that are included in this bundle are still being finalised and may be different for different pages (for example each realm might have a page and a portrait plot).

Since we have built a JSON schema for our metric bundles they will be strongly typed which makes it significantly easier to reason about.

Integration

Static JS + HTML

The REF website is a typescript, react application rather than static JS + HTML which is how the UD has been created in the past. There are many approaches to mixing the two. We could serve the JS + HTML as a custom page within the REF, but that might add some complexity and lead to inconsistent styling and layouts.

IFrame

We could use an Iframe to embed a UD inside a portal page. This would ensure consistent layout, but we would

React Component

Alternatively, we could create a React component to encapsulate the UD. This would enable the deepest integration into the portal, as additional parameters could be passed to the UD.

Ideally, the component would pass the information in a metric bundle that decouples the component from the fetching of the bundle from the display. The portal already includes an autogenerated SDK which makes it easier to query the API. That would create a reusable component.

In a perfect world we would publish this component to npm, but that might be out of scope for the next few months.

Inset HTML

Currently when you click on a cell in the portrait plot it takes you to a different URL. @minxu74 Can you describe how you currently do that? Is that using an output bundle?

In our case we might need to redirect to an absolute URL, but those can be generated via the API and included where needed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions