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

plugin: Init prometheus plugin #14

Merged
merged 5 commits into from
Nov 3, 2023
Merged

plugin: Init prometheus plugin #14

merged 5 commits into from
Nov 3, 2023

Conversation

yolossn
Copy link
Contributor

@yolossn yolossn commented Oct 9, 2023

Tasks:

  • Add charts
  • Add a skeleton (placeholder chart + text informing the user about how to get the chart working)
  • Add a chart visibility toggle button
  • Remember user settings (what chart was enabled last time + whether it's visible or not)
  • Review colors

@yolossn yolossn force-pushed the prom_metrics_plugin branch 3 times, most recently from 9c2eee2 to 428f5f7 Compare October 9, 2023 11:56
prometheus/src/chart.tsx Outdated Show resolved Hide resolved
prometheus/src/chart.tsx Outdated Show resolved Hide resolved
prometheus/src/chart.tsx Outdated Show resolved Hide resolved
prometheus/src/chart.tsx Outdated Show resolved Hide resolved
prometheus/src/chart.tsx Outdated Show resolved Hide resolved
prometheus/src/common.tsx Outdated Show resolved Hide resolved
prometheus/src/index.tsx Outdated Show resolved Hide resolved
prometheus/src/index.tsx Outdated Show resolved Hide resolved
prometheus/src/index.tsx Outdated Show resolved Hide resolved
prometheus/src/request.tsx Outdated Show resolved Hide resolved
@yolossn yolossn force-pushed the prom_metrics_plugin branch 4 times, most recently from 9b12216 to 43b80e9 Compare October 10, 2023 16:47
Copy link
Contributor

@joaquimrocha joaquimrocha left a comment

Choose a reason for hiding this comment

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

Thanks. Here is the review with a few things we had discussed in the call.

prometheus/src/chart.tsx Outdated Show resolved Hide resolved
prometheus/src/chart.tsx Show resolved Hide resolved
prometheus/src/chart.tsx Show resolved Hide resolved
prometheus/src/chart.tsx Outdated Show resolved Hide resolved
prometheus/src/chart.tsx Outdated Show resolved Hide resolved
prometheus/src/common.tsx Outdated Show resolved Hide resolved
prometheus/src/common.tsx Outdated Show resolved Hide resolved
prometheus/src/common.tsx Outdated Show resolved Hide resolved
prometheus/src/request.tsx Outdated Show resolved Hide resolved
@yolossn yolossn force-pushed the prom_metrics_plugin branch 2 times, most recently from c810b79 to 3989b3f Compare October 12, 2023 03:32
prometheus/src/chart.tsx Outdated Show resolved Hide resolved
prometheus/src/chart.tsx Outdated Show resolved Hide resolved
prometheus/src/chart.tsx Outdated Show resolved Hide resolved
@joaquimrocha joaquimrocha force-pushed the prom_metrics_plugin branch 2 times, most recently from 0bc4145 to 428f5f7 Compare October 13, 2023 17:55
@yolossn yolossn force-pushed the prom_metrics_plugin branch 5 times, most recently from b294b12 to e30f9ad Compare October 23, 2023 08:45
prometheus/src/chart.tsx Outdated Show resolved Hide resolved
prometheus/src/chart.tsx Outdated Show resolved Hide resolved
prometheus/src/chart.tsx Outdated Show resolved Hide resolved
@ashu8912 ashu8912 force-pushed the prom_metrics_plugin branch 3 times, most recently from a2b6375 to 5289523 Compare October 29, 2023 13:06
prometheus/job.yaml Outdated Show resolved Hide resolved
prometheus/src/common.tsx Outdated Show resolved Hide resolved
yolossn and others added 4 commits November 2, 2023 14:58
We have gotten the design indication that there should be a chart
skeleton to incite users to enable prometheus, as well as a toggle
button to hide/show the chart.

Signed-off-by: Joaquim Rocha <[email protected]>
So far it's just whether it's visible or not.
Also refactors the code a bit so we don't have a lot of things mixed
up.

Signed-off-by: Joaquim Rocha <[email protected]>
This makes it easy for the test suites to pass in a custom mock
function

Signed-off-by: ashu8192 <[email protected]>
Signed-off-by: ashu8192 <[email protected]>
prometheus/src/chart.stories.tsx Outdated Show resolved Hide resolved
prometheus/src/chart.stories.tsx Outdated Show resolved Hide resolved
plots: Array<{
query: string;
name: string;
fillColor: string;
strokeColor: string;
dataProcessor: (data: any) => any[];
}>;
fetchMetrics: (query: object) => Promise<any>;
Copy link
Contributor

Choose a reason for hiding this comment

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

We should avoid having any types unless we really accept/expect anything.

Copy link
Member

Choose a reason for hiding this comment

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

it is the type of request function return which is itself any

Copy link
Contributor

Choose a reason for hiding this comment

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

That's... not really what we should expect but let's take it just so we can move on.

@joaquimrocha joaquimrocha merged commit 282dd8a into main Nov 3, 2023
2 checks passed
@joaquimrocha joaquimrocha deleted the prom_metrics_plugin branch November 3, 2023 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants