@@ -32,7 +32,6 @@ import { DetectorDefinitionFormikValues } from '../../models/interfaces';
32
32
import { ModelConfigurationFormikValues } from '../../../ConfigureModel/models/interfaces' ;
33
33
import { INITIAL_MODEL_CONFIGURATION_VALUES } from '../../../ConfigureModel/utils/constants' ;
34
34
import { FILTER_TYPES } from '../../../../models/interfaces' ;
35
- import { getNotifications , getSavedObjectsClient } from '../../../../services' ;
36
35
37
36
interface DataSourceProps {
38
37
formikProps : FormikProps < DetectorDefinitionFormikValues > ;
@@ -45,13 +44,6 @@ interface DataSourceProps {
45
44
}
46
45
47
46
export function DataSource ( props : DataSourceProps ) {
48
- const [ selectedDataSource , setSelectedDataSource ] = useState < string > ( ) ;
49
-
50
- const onSelectedDataSource = ( e ) => {
51
- const dataConnectionId = e [ 0 ] ? e [ 0 ] . id : undefined ;
52
- setSelectedDataSource ( dataConnectionId ) ;
53
- console . log ( dataConnectionId ) ;
54
- }
55
47
const dispatch = useDispatch ( ) ;
56
48
const [ indexName , setIndexName ] = useState < string > (
57
49
props . formikProps . values . index [ 0 ] ?. label
@@ -103,7 +95,6 @@ export function DataSource(props: DataSourceProps) {
103
95
104
96
return (
105
97
< ContentPanel title = "Data Source" titleSize = "s" >
106
-
107
98
{ props . isEdit && isDifferentIndex ( ) ? (
108
99
< div >
109
100
< EuiCallOut
@@ -115,11 +106,9 @@ export function DataSource(props: DataSourceProps) {
115
106
< EuiSpacer />
116
107
</ div >
117
108
) : null }
118
-
119
109
< Field name = "index" validate = { validateIndex } >
120
110
{ ( { field, form } : FieldProps ) => {
121
111
return (
122
-
123
112
< FormattedFormRow
124
113
title = "Index"
125
114
hint = "Choose an index or index pattern as the data source."
@@ -178,4 +167,4 @@ export function DataSource(props: DataSourceProps) {
178
167
/>
179
168
</ ContentPanel >
180
169
) ;
181
- }
170
+ }
0 commit comments