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

Fix monitor parse and alerts table #645

Merged
merged 1 commit into from
Jul 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion public/pages/MonitorDetails/containers/MonitorDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,9 @@ export default class MonitorDetails extends Component {
) : null}
{this.state.tabContent}
</div>
) : null}
) : (
this.renderAlertsTable()
)}

{isJsonModalOpen && (
<EuiOverlayMask>
Expand Down
2 changes: 1 addition & 1 deletion public/utils/contextMenu/monitors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const getMonitors = async (params) => {

const parseMonitor = (monitor) => {
const state = monitor.monitor.enabled ? 'enabled' : 'disabled';
const latestAlert = monitor.latestAlert === "--" ? undefined : monitor.latestAlert;
Copy link
Member

Choose a reason for hiding this comment

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

is there tests for parseMonitor? At least should be one added for this scenario

Copy link
Member Author

Choose a reason for hiding this comment

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

Will follow up on tests and will create a tracking issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

const latestAlert = monitor.lastNotificationTime === "--" ? undefined : monitor.lastNotificationTime;
return {
name: monitor.name,
state: state,
Expand Down
Loading