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

Add alert page for indexing and seeing details about alerts #154

Merged
merged 20 commits into from Dec 28, 2023

Conversation

jaggederest
Copy link
Contributor

@jaggederest jaggederest commented Dec 13, 2023

The goal is to generate a page that shows what alerts have been created and what their current status is i.e. alarmed or OK, with a small historical view of alert failures/successes recently

  • Testing alertHistory changes
  • Testing alert API changes
  • One of
    • Making the disable button work
    • Omitting disable button for now
  • Ensuring that alertHistory and alert queries are indexed - ticket filed in lieu
  • converting dashboard/logview/alerthistory queries to single $in query for performance - ticket filed in lieu
  • Add explanatory text about how to create alerts (on another page!)
  • Comment out AppNav link for now

Copy link

changeset-bot bot commented Dec 13, 2023

⚠️ No Changeset found

Latest commit: cb56756

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@wrn14897
Copy link
Contributor

wrn14897 commented Dec 14, 2023

Since the backend API work is minimal (mongo queries only), I'd imagine we also want to throw some design / frontend components there (so we know what to fetch)

@wrn14897 wrn14897 marked this pull request as ready for review December 20, 2023 18:28
@jaggederest jaggederest changed the title Add alert route for indexing and seeing details about alerts Add alert page for indexing and seeing details about alerts Dec 21, 2023
@jaggederest
Copy link
Contributor Author

Screenshot 2023-12-21 at 08 48 10

@jaggederest
Copy link
Contributor Author

OK I think this is ready for final review 👍

history,
...alert.toObject(),
};
} else {
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 its better to check the source here as well and throw at the end if necessary

const logView = await getLogView(alert, teamId.toString());
// had to rename because logView is an ObjectID
return {
logViewObj: logView,
Copy link
Contributor

Choose a reason for hiding this comment

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

I assume logView is the redundant info. why don't we overwrite logView with object here ?

@@ -89,7 +89,7 @@ const AlertSchema = new Schema<IAlert>(
// Log alerts
logView: {
type: mongoose.Schema.Types.ObjectId,
ref: 'Alert',
ref: 'LogView',
Copy link
Contributor

Choose a reason for hiding this comment

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

Found this bug...that explains why logView couldn't be populated

@kodiakhq kodiakhq bot merged commit 8e44260 into main Dec 28, 2023
4 checks passed
@kodiakhq kodiakhq bot deleted the jag/alert_page branch December 28, 2023 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants