@@ -18,14 +18,16 @@ import {
18
18
EuiPageContent ,
19
19
EuiPageContentBody ,
20
20
} from '@elastic/eui' ;
21
- import React , { useState , useEffect } from 'react' ;
21
+ import React , { useEffect , useState } from 'react' ;
22
+ import { NotificationsStart , SavedObjectsStart } from '../../../../../../src/core/public' ;
23
+ import { DataSourceManagementPluginSetup } from '../../../../../../src/plugins/data_source_management/public' ;
22
24
import { Color } from '../../../../common/constants/integrations' ;
25
+ import { CONSOLE_PROXY , INTEGRATIONS_BASE } from '../../../../common/constants/shared' ;
26
+ import { IntegrationConnectionType } from '../../../../common/types/integrations' ;
23
27
import { coreRefs } from '../../../framework/core_refs' ;
24
28
import { addIntegrationRequest } from './create_integration_helpers' ;
25
29
import { SetupIntegrationFormInputs } from './setup_integration_inputs' ;
26
- import { CONSOLE_PROXY , INTEGRATIONS_BASE } from '../../../../common/constants/shared' ;
27
30
import { SetupIntegrationInputsForSecurityLake } from './setup_integration_inputs_security_lake' ;
28
- import { IntegrationConnectionType } from '../../../../common/types/integrations' ;
29
31
30
32
export interface IntegrationSetupInputs {
31
33
displayName : string ;
@@ -44,6 +46,10 @@ export interface IntegrationConfigProps {
44
46
integration : IntegrationConfig ;
45
47
setupCallout : SetupCallout ;
46
48
lockConnectionType ?: boolean ;
49
+ notifications : NotificationsStart ;
50
+ dataSourceEnabled : boolean ;
51
+ dataSourceManagement : DataSourceManagementPluginSetup ;
52
+ savedObjectsMDSClient : SavedObjectsStart ;
47
53
}
48
54
49
55
type SetupCallout = { show : true ; title : string ; color ?: Color ; text ?: string } | { show : false } ;
@@ -338,6 +344,10 @@ export function SetupIntegrationForm({
338
344
renderType = 'page' ,
339
345
unsetIntegration,
340
346
forceConnection,
347
+ notifications,
348
+ dataSourceEnabled,
349
+ dataSourceManagement,
350
+ savedObjectsMDSClient,
341
351
setIsInstalling,
342
352
} : {
343
353
integration : string ;
@@ -347,6 +357,10 @@ export function SetupIntegrationForm({
347
357
name : string ;
348
358
type : IntegrationConnectionType ;
349
359
} ;
360
+ notifications : NotificationsStart ;
361
+ dataSourceEnabled : boolean ;
362
+ dataSourceManagement : DataSourceManagementPluginSetup ;
363
+ savedObjectsMDSClient : SavedObjectsStart ;
350
364
setIsInstalling ?: ( isInstalling : boolean , success ?: boolean ) => void ;
351
365
} ) {
352
366
const [ integConfig , setConfig ] = useState ( {
@@ -387,7 +401,6 @@ export function SetupIntegrationForm({
387
401
forceConnection ?. type === 'securityLake' || integConfig . connectionType === 'securityLake'
388
402
? SetupIntegrationInputsForSecurityLake
389
403
: SetupIntegrationFormInputs ;
390
-
391
404
const content = (
392
405
< >
393
406
{ showLoading ? (
@@ -399,6 +412,10 @@ export function SetupIntegrationForm({
399
412
integration = { template }
400
413
setupCallout = { setupCallout }
401
414
lockConnectionType = { forceConnection !== undefined }
415
+ dataSourceManagement = { dataSourceManagement }
416
+ notifications = { notifications }
417
+ dataSourceEnabled = { dataSourceEnabled }
418
+ savedObjectsMDSClient = { savedObjectsMDSClient }
402
419
/>
403
420
) }
404
421
</ >
@@ -440,9 +457,17 @@ export function SetupIntegrationForm({
440
457
export function SetupIntegrationPage ( {
441
458
integration,
442
459
unsetIntegration,
460
+ notifications,
461
+ dataSourceEnabled,
462
+ dataSourceManagement,
463
+ savedObjectsMDSClient,
443
464
} : {
444
465
integration : string ;
445
466
unsetIntegration ?: ( ) => void ;
467
+ notifications : NotificationsStart ;
468
+ dataSourceEnabled : boolean ;
469
+ dataSourceManagement : DataSourceManagementPluginSetup ;
470
+ savedObjectsMDSClient : SavedObjectsStart ;
446
471
} ) {
447
472
return (
448
473
< EuiPage >
@@ -451,6 +476,10 @@ export function SetupIntegrationPage({
451
476
integration = { integration }
452
477
unsetIntegration = { unsetIntegration }
453
478
renderType = "page"
479
+ dataSourceManagement = { dataSourceManagement }
480
+ notifications = { notifications }
481
+ dataSourceEnabled = { dataSourceEnabled }
482
+ savedObjectsMDSClient = { savedObjectsMDSClient }
454
483
/>
455
484
</ EuiPageBody >
456
485
</ EuiPage >
0 commit comments