-
Notifications
You must be signed in to change notification settings - Fork 224
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
Dashboard/src/Components/Monitor/SummaryView/CustomCodeMonitorSummaryView.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import CustomCodeMonitorResponse from "Common/Types/Monitor/CustomCodeMonitor/CustomCodeMonitorResponse"; | ||
import ProbeMonitorResponse from "Common/Types/Probe/ProbeMonitorResponse"; | ||
import ErrorMessage from "Common/UI/Components/ErrorMessage/ErrorMessage"; | ||
import React, { FunctionComponent, ReactElement } from "react"; | ||
import CustomMonitorSummaryView from "./CustomMonitorSummaryView"; | ||
|
||
export interface ComponentProps { | ||
probeMonitorResponse: ProbeMonitorResponse; | ||
moreDetailElement?: ReactElement | undefined; | ||
} | ||
|
||
const CustomCodeMonitorSummaryView: FunctionComponent<ComponentProps> = ( | ||
props: ComponentProps, | ||
): ReactElement => { | ||
if (!props.probeMonitorResponse.customCodeMonitorResponse) { | ||
return ( | ||
<ErrorMessage error="No summary available for the selected probe. Should be few minutes for summary to show up. " /> | ||
); | ||
} | ||
|
||
const customCodeMonitorResponse: CustomCodeMonitorResponse = | ||
props.probeMonitorResponse.customCodeMonitorResponse; | ||
|
||
return ( | ||
<CustomMonitorSummaryView | ||
customCodeMonitorResponse={customCodeMonitorResponse} | ||
moreDetailElement={props.moreDetailElement} | ||
monitoredAt={props.probeMonitorResponse.monitoredAt} | ||
/> | ||
); | ||
}; | ||
|
||
export default CustomCodeMonitorSummaryView; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters