The-Spooky-Frogs / LenelS2Dashboard

Repo for LenelS2 Dashboard Senior Project
3 stars 0 forks source link

[Story] POC for Grafana and frontend integration #21

Open peber7 opened 1 year ago

peber7 commented 1 year ago

As a developer, I want create a proof of concept for integrating Grafana into a react/vue frontend, so that the we determine if Grafana is what we want to use.

Associated Epic:

Definition of Done

Acceptance Criteria

Solution Tasks

peber7 commented 1 year ago

For this POC, the goal was to test the Grafana's embedded iframe option within a React project.

I had to change a few config settings for this to work. I needed to set allow_embedding = true and set anonymous access to enabled = true. For our main application/protype in the future, we will want to have the Single Pane of Glass authenticate with Grafana, so no random user can access the data.

Here is an example Graph with data from a database that is no longer used.

Image

After updating one of the player's damage dealt, the data updates immediately when the graph is next requested. The graph in the react app needs to be refreshed to see the changes.

Image

The last thing to show is that if the data source is unavailable, there is no data retention mechanism provided by Grafana. And this is what the graph will look like in the React app...

Image

Example Iframe:

<iframe 
            title="table1"
            src="http://localhost:3000/d-solo/ac92f0d6-fa94-4789-928c-4bcee28fad82/new-dashboard?orgId=1&panelId=3" 
            width="1050" 
            height="200" 
            frameBorder="0">
</iframe>

Key Findings