mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 23:30:10 +00:00
feat: Add checkbox lists for browser type and screen type in SyntheticMonitor
This commit adds checkbox lists for selecting the browser type and screen type in the SyntheticMonitor step of the MonitorStep component. This allows users to choose the desired browser and screen type for running the test in SyntheticMonitor.
This commit is contained in:
parent
d23c62d30a
commit
a2033b94dd
7
Common/Types/BrowserType.ts
Normal file
7
Common/Types/BrowserType.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export enum BrowserType {
|
||||
Chrome = 'Chrome',
|
||||
Firefox = 'Firefox',
|
||||
Safari = 'Safari',
|
||||
}
|
||||
|
||||
export default BrowserType;
|
3
Common/Types/Monitor/SyntheticMonitors/BrowserType.ts
Normal file
3
Common/Types/Monitor/SyntheticMonitors/BrowserType.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import BrowserType from "../../BrowserType";
|
||||
|
||||
export default BrowserType;
|
3
Common/Types/Monitor/SyntheticMonitors/ScreenSizeType.ts
Normal file
3
Common/Types/Monitor/SyntheticMonitors/ScreenSizeType.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import ScreenSizeType from "../../ScreenSizeType";
|
||||
|
||||
export default ScreenSizeType;
|
7
Common/Types/ScreenSizeType.ts
Normal file
7
Common/Types/ScreenSizeType.ts
Normal file
@ -0,0 +1,7 @@
|
||||
enum ScreenSizeType {
|
||||
Mobile = 'Mobile',
|
||||
Tablet = 'Tablet',
|
||||
Desktop = 'Desktop'
|
||||
}
|
||||
|
||||
export default ScreenSizeType;
|
@ -27,6 +27,7 @@ import HorizontalRule from 'CommonUI/src/Components/HorizontalRule/HorizontalRul
|
||||
import Exception from 'Common/Types/Exception/Exception';
|
||||
import Hostname from 'Common/Types/API/Hostname';
|
||||
import Port from 'Common/Types/Port';
|
||||
import CheckBoxList from 'CommonUI/src/Components/CategoryCheckbox/CheckboxList';
|
||||
|
||||
export interface ComponentProps {
|
||||
monitorStatusDropdownOptions: Array<DropdownOption>;
|
||||
@ -407,6 +408,42 @@ const MonitorStepElement: FunctionComponent<ComponentProps> = (
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
{props.monitorType === MonitorType.SyntheticMonitor && (
|
||||
<div className="mt-5">
|
||||
<FieldLabelElement
|
||||
title={
|
||||
'Browser Type'
|
||||
}
|
||||
description={
|
||||
'Select the browser type.'
|
||||
}
|
||||
required={true}
|
||||
/>
|
||||
<div className="mt-1">
|
||||
<CheckBoxList />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
{props.monitorType === MonitorType.SyntheticMonitor && (
|
||||
<div className="mt-5">
|
||||
<FieldLabelElement
|
||||
title={
|
||||
'Screen Type'
|
||||
}
|
||||
description={
|
||||
'Which screen type should we use to run this test?'
|
||||
}
|
||||
required={true}
|
||||
/>
|
||||
<div className="mt-1">
|
||||
<CheckBoxList />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="mt-5">
|
||||
{props.monitorType !== MonitorType.IncomingRequest && (
|
||||
<FieldLabelElement
|
||||
|
Loading…
Reference in New Issue
Block a user