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

Dynamic prometheus #1127

Merged
merged 6 commits into from
Sep 22, 2023
Merged

Dynamic prometheus #1127

merged 6 commits into from
Sep 22, 2023

Conversation

bforbis
Copy link
Contributor

@bforbis bforbis commented Sep 21, 2023

Closes #1125

✔️ Checklist

  • Added tests for new functionality and regression tests for bug fixes
  • Added changeset (run yarn changeset in the root)
  • Screenshots of before and after attached (for UI changes)
  • Added or updated documentation (if applicable)

@bforbis bforbis requested a review from a team as a code owner September 21, 2023 14:49
Xantier
Xantier previously approved these changes Sep 21, 2023
Copy link
Contributor

@Xantier Xantier left a comment

Choose a reason for hiding this comment

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

Nice! Thanks

## Using callback with `EntityPrometheusAlertCard`

You can add callbacks that will be executed when the user clicks on a row in the table of the `EntityPrometheusAlertCard` component. This callback is optional, and the rows become clickable only when the callback is supplied. The callback function is also provided with data of type JSON. It contains the information from the row of the table.
The component with callback can look like this:

```typescript
<EntityPrometheusAlertCard onRowClick={callbackFunction} />
```
````
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks like I screwed up the code fence. Will fix this.

Signed-off-by: Brian Forbis <[email protected]>
Step 2: Hijack this path by writing your own proxy middleware extension.
**packages/backend/src/plugins/proxy.ts**

````diff
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
````diff
```diff

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, that was it!

Signed-off-by: Brian Forbis <[email protected]>
Signed-off-by: Brian Forbis <[email protected]>
@bforbis
Copy link
Contributor Author

bforbis commented Sep 21, 2023

CI run seems to not have downloaded Cypress correctly.

@Xantier
Copy link
Contributor

Xantier commented Sep 21, 2023

CI run seems to not have downloaded Cypress correctly.

Yup, GitHub does tht sometimes. I'll kick it off again

@bforbis bforbis requested a review from Xantier September 21, 2023 18:19
@Xantier Xantier merged commit 7a55bb7 into RoadieHQ:main Sep 22, 2023
2 checks passed
@bforbis
Copy link
Contributor Author

bforbis commented Sep 25, 2023

@Xantier thanks for merging :) Just curious, do you have a scheduled date this will be released?

@Xantier
Copy link
Contributor

Xantier commented Sep 25, 2023

Was thinking of releasing it with upgrades to 1.18, but I just shipped this now as a standalone shipment

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.

Dynamic Proxying Support For Prometheus Plugin
2 participants