-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[7.17] Add Elasticsearch Serverless Forwarder to integrations UI (#13…
…0085) (#133477) * Add Elasticsearch Serverless Forwarder to integrations UI (#130085) (cherry picked from commit 34e51a6) # Conflicts: # test/api_integration/apis/custom_integration/integrations.ts * fix import CoreSetup Co-authored-by: Mario Castro <mariocaster@gmail.com>
- Loading branch information
Showing
7 changed files
with
188 additions
and
12 deletions.
There are no files selected for viewing
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
84 changes: 84 additions & 0 deletions
84
src/plugins/custom_integrations/public/assets/placeholders/logo_esf.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
74 changes: 74 additions & 0 deletions
74
src/plugins/custom_integrations/server/external_integration/index.ts
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,74 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
import { CoreSetup } from 'kibana/server'; | ||
import { CustomIntegrationRegistry } from '../custom_integration_registry'; | ||
import { CustomIntegrationIcon, IntegrationCategory, PLUGIN_ID } from '../../common'; | ||
|
||
interface ExternalIntegration { | ||
id: string; | ||
title: string; | ||
icon?: string; | ||
euiIconName?: string; | ||
description: string; | ||
docUrlTemplate: string; | ||
categories: IntegrationCategory[]; | ||
} | ||
|
||
export const integrations: ExternalIntegration[] = [ | ||
{ | ||
id: 'esf', | ||
title: i18n.translate('customIntegrations.placeholders.EsfTitle', { | ||
defaultMessage: 'AWS Serverless Application Repository', | ||
}), | ||
icon: 'logo_esf.svg', | ||
description: i18n.translate('customIntegrations.placeholders.EsfDescription', { | ||
defaultMessage: | ||
'Collect logs using AWS Lambda application available in AWS Serverless Application Repository.', | ||
}), | ||
docUrlTemplate: `https://serverlessrepo.aws.amazon.com/applications/eu-central-1/267093732750/elastic-serverless-forwarder`, | ||
categories: ['aws', 'custom'], | ||
}, | ||
]; | ||
|
||
export function registerExternalIntegrations( | ||
core: CoreSetup, | ||
registry: CustomIntegrationRegistry, | ||
branch: string | ||
) { | ||
integrations.forEach((integration: ExternalIntegration) => { | ||
const icons: CustomIntegrationIcon[] = []; | ||
if (integration.euiIconName) { | ||
icons.push({ | ||
type: 'eui', | ||
src: integration.euiIconName, | ||
}); | ||
} else if (integration.icon) { | ||
icons.push({ | ||
type: 'svg', | ||
src: core.http.basePath.prepend( | ||
`/plugins/${PLUGIN_ID}/assets/placeholders/${integration.icon}` | ||
), | ||
}); | ||
} | ||
|
||
registry.registerCustomIntegration({ | ||
uiInternalPath: '', | ||
id: `placeholder.${integration.id}`, | ||
title: integration.title, | ||
description: integration.description, | ||
type: 'ui_link', | ||
shipper: 'placeholders', | ||
uiExternalLink: integration.docUrlTemplate, | ||
isBeta: false, | ||
icons, | ||
categories: integration.categories, | ||
}); | ||
}); | ||
} |
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
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