11import React , { FunctionComponent , ReactElement , useState } from "react" ;
22import MonitorStepExternalStatusPageMonitor from "Common/Types/Monitor/MonitorStepExternalStatusPageMonitor" ;
3- import ExternalStatusPageProviderType from "Common/Types/Monitor/ExternalStatusPageProviderType" ;
43import Input , { InputType } from "Common/UI/Components/Input/Input" ;
5- import Dropdown , {
6- DropdownOption ,
7- DropdownValue ,
8- } from "Common/UI/Components/Dropdown/Dropdown" ;
94import FieldLabelElement from "Common/UI/Components/Forms/Fields/FieldLabel" ;
105import Button , { ButtonStyleType } from "Common/UI/Components/Button/Button" ;
11- import DropdownUtil from "Common/UI/Utils/Dropdown" ;
126
137export interface ComponentProps {
148 monitorStepExternalStatusPageMonitor : MonitorStepExternalStatusPageMonitor ;
@@ -21,9 +15,6 @@ const ExternalStatusPageMonitorStepForm: FunctionComponent<ComponentProps> = (
2115 const [ showAdvancedOptions , setShowAdvancedOptions ] =
2216 useState < boolean > ( false ) ;
2317
24- const providerOptions : Array < DropdownOption > =
25- DropdownUtil . getDropdownOptionsFromEnum ( ExternalStatusPageProviderType ) ;
26-
2718 return (
2819 < div className = "space-y-5" >
2920 < div >
@@ -46,29 +37,6 @@ const ExternalStatusPageMonitorStepForm: FunctionComponent<ComponentProps> = (
4637 />
4738 </ div >
4839
49- < div >
50- < FieldLabelElement
51- title = "Provider Type"
52- description = "How to fetch status data. Auto will try Atlassian Statuspage JSON API first, then fall back to RSS/Atom."
53- required = { true }
54- />
55- < Dropdown
56- options = { providerOptions }
57- initialValue = { providerOptions . find ( ( option : DropdownOption ) => {
58- return (
59- option . value ===
60- props . monitorStepExternalStatusPageMonitor . provider
61- ) ;
62- } ) }
63- onChange = { ( value : DropdownValue | Array < DropdownValue > | null ) => {
64- props . onChange ( {
65- ...props . monitorStepExternalStatusPageMonitor ,
66- provider : value as ExternalStatusPageProviderType ,
67- } ) ;
68- } }
69- />
70- </ div >
71-
7240 < div >
7341 < FieldLabelElement
7442 title = "Component Name Filter (Optional)"
0 commit comments