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

Charts Without Grafana #2049

Merged
merged 74 commits into from
Dec 22, 2023
Merged

Charts Without Grafana #2049

merged 74 commits into from
Dec 22, 2023

Conversation

CDimonaco
Copy link
Member

@CDimonaco CDimonaco commented Nov 30, 2023

Description

Replace Grafana charts using a bespoke implementation with Chart.js.
Grafana is completely removed, the backend will expose chart data through a dedicated endpoint.

The chart data is retrieved through prometheus.

Recording 2023-12-21 at 17 07 21

How was this tested?

Automated tests

@CDimonaco CDimonaco added enhancement New feature or request javascript Pull requests that update Javascript code labels Nov 30, 2023
@CDimonaco CDimonaco self-assigned this Nov 30, 2023
@CDimonaco CDimonaco force-pushed the charts_without_grafana branch 2 times, most recently from 532f165 to 73f0065 Compare December 21, 2023 11:18
@CDimonaco CDimonaco marked this pull request as ready for review December 21, 2023 11:34
@CDimonaco CDimonaco requested review from jamie-suse, dottorblaster, rtorrero and EMaksy and removed request for jamie-suse December 21, 2023 11:37
Copy link
Contributor

@dottorblaster dottorblaster left a comment

Choose a reason for hiding this comment

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

LGTM

I saw a couple improvements but we can implement those in subsequent PRs

],
}));

console.log('zoom level', chartJsInstance.getZoomLevel());
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can use actions for these instead of console logging

Copy link
Contributor

@rtorrero rtorrero left a comment

Choose a reason for hiding this comment

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

LGTM, I basically looked at at the structure and it looks good, I will take some time the following weeks to play with it locally and review it in deeper detail 👍

Left some very pedantic nitpicks if you want to address them 😅

lib/trento_web/controllers/v1/chart_controller.ex Outdated Show resolved Hide resolved
lib/trento/charts/hosts/host_cpu_chart.ex Show resolved Hide resolved
lib/trento_web/controllers/v1/chart_controller.ex Outdated Show resolved Hide resolved
@CDimonaco CDimonaco added the elixir Pull requests that update Elixir code label Dec 21, 2023
@CDimonaco CDimonaco merged commit 9a3fdc7 into main Dec 22, 2023
26 checks passed
@CDimonaco CDimonaco deleted the charts_without_grafana branch December 22, 2023 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
elixir Pull requests that update Elixir code enhancement New feature or request javascript Pull requests that update Javascript code
Development

Successfully merging this pull request may close these issues.

None yet

4 participants