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
Conversation
|
a36d0db
to
d426106
Compare
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) |
…-badge-line, better config display
… data), refinement
OK I think this is ready for final review 👍 |
history, | ||
...alert.toObject(), | ||
}; | ||
} else { |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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
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
Ensuring that alertHistory and alert queries are indexed- ticket filed in lieuconverting dashboard/logview/alerthistory queries to single $in query for performance- ticket filed in lieu