forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into remove-inventory-dependency-from-observabili…
…ty-plugin
- Loading branch information
Showing
13 changed files
with
548 additions
and
80 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
54 changes: 54 additions & 0 deletions
54
...vability_onboarding/public/application/quickstart_flows/firehose/auto_refresh_callout.tsx
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,54 @@ | ||
/* | ||
* 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; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { | ||
EuiFlexGroup, | ||
EuiFlexItem, | ||
EuiIcon, | ||
EuiText, | ||
useEuiTheme, | ||
useGeneratedHtmlId, | ||
} from '@elastic/eui'; | ||
import { css } from '@emotion/react'; | ||
import { HAS_DATA_FETCH_INTERVAL } from './utils'; | ||
|
||
export function AutoRefreshCallout() { | ||
const { euiTheme } = useEuiTheme(); | ||
const messageId = useGeneratedHtmlId(); | ||
|
||
return ( | ||
<EuiFlexGroup> | ||
<EuiFlexItem | ||
role="status" | ||
aria-labelledby={messageId} | ||
grow={false} | ||
css={css` | ||
background-color: ${euiTheme.colors.lightestShade}; | ||
padding: ${euiTheme.size.m} ${euiTheme.size.base}; | ||
border-radius: ${euiTheme.border.radius.medium}; | ||
`} | ||
> | ||
<EuiFlexGroup gutterSize="s" alignItems="center"> | ||
<EuiIcon type="timeRefresh" size="m" /> | ||
<EuiText size="s"> | ||
<p id={messageId}> | ||
{i18n.translate( | ||
'xpack.observability_onboarding.firehosePanel.autorefreshCalloutLabel', | ||
{ | ||
defaultMessage: 'Auto-refreshing every {intervalSeconds} s', | ||
values: { intervalSeconds: Math.round(HAS_DATA_FETCH_INTERVAL / 1000) }, | ||
} | ||
)} | ||
</p> | ||
</EuiText> | ||
</EuiFlexGroup> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
); | ||
} |
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
73 changes: 73 additions & 0 deletions
73
...y_onboarding/public/application/quickstart_flows/firehose/create_stack_in_aws_console.tsx
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,73 @@ | ||
/* | ||
* 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; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { EuiButton, EuiSpacer, EuiText } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { FormattedMessage } from '@kbn/i18n-react'; | ||
import React from 'react'; | ||
import { | ||
FIREHOSE_CLOUDFORMATION_STACK_NAME, | ||
FIREHOSE_LOGS_STREAM_NAME, | ||
FIREHOSE_METRICS_STREAM_NAME, | ||
} from '../../../../common/aws_firehose'; | ||
import { DownloadTemplateCallout } from './download_template_callout'; | ||
import { buildCreateStackAWSConsoleURL } from './utils'; | ||
|
||
interface Props { | ||
encodedApiKey: string; | ||
elasticsearchUrl: string; | ||
templateUrl: string; | ||
isPrimaryAction: boolean; | ||
} | ||
|
||
export function CreateStackInAWSConsole({ | ||
encodedApiKey, | ||
elasticsearchUrl, | ||
templateUrl, | ||
isPrimaryAction, | ||
}: Props) { | ||
const awsConsoleURL = buildCreateStackAWSConsoleURL({ | ||
templateUrl, | ||
stackName: FIREHOSE_CLOUDFORMATION_STACK_NAME, | ||
logsStreamName: FIREHOSE_LOGS_STREAM_NAME, | ||
metricsStreamName: FIREHOSE_METRICS_STREAM_NAME, | ||
elasticsearchUrl, | ||
encodedApiKey, | ||
}); | ||
|
||
return ( | ||
<> | ||
<EuiText> | ||
<p> | ||
<FormattedMessage | ||
id="xpack.observability_onboarding.firehosePanel.createFirehoseStreamInAWSConsoleDescription" | ||
defaultMessage="Click the button below to create a CloudFormation stack from our template. The stack will include a Firehose delivery stream, backup S3 bucket, CloudWatch subscription filter, metrics stream, and necessary IAM roles. Keep this page open, and return once you've submitted the form in AWS Console" | ||
/> | ||
</p> | ||
<p> | ||
<DownloadTemplateCallout /> | ||
</p> | ||
</EuiText> | ||
|
||
<EuiSpacer size="m" /> | ||
|
||
<EuiButton | ||
data-test-subj="observabilityOnboardingCreateStackInAWSConsoleButton" | ||
href={awsConsoleURL} | ||
target="_blank" | ||
iconSide="right" | ||
iconType="popout" | ||
fill={isPrimaryAction} | ||
> | ||
{i18n.translate( | ||
'xpack.observability_onboarding.createStackInAWSConsole.createFirehoseStreamInAWSConsoleButtonLabel', | ||
{ defaultMessage: 'Create Firehose Stream in AWS' } | ||
)} | ||
</EuiButton> | ||
</> | ||
); | ||
} |
35 changes: 35 additions & 0 deletions
35
...ity_onboarding/public/application/quickstart_flows/firehose/download_template_callout.tsx
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,35 @@ | ||
/* | ||
* 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; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { EuiLink } from '@elastic/eui'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { FormattedMessage } from '@kbn/i18n-react'; | ||
import { FIREHOSE_CLOUDFORMATION_TEMPLATE_URL } from '../../../../common/aws_firehose'; | ||
|
||
export function DownloadTemplateCallout() { | ||
return ( | ||
<FormattedMessage | ||
id="xpack.observability_onboarding.firehosePanel.downloadTemplateDescription" | ||
defaultMessage="If needed, you can {downloadLink} to use it as part of an existing IaC setup." | ||
values={{ | ||
downloadLink: ( | ||
<EuiLink | ||
data-test-subj="observabilityOnboardingFirehosePanelDownloadCloudFormationTemplateLink" | ||
href={FIREHOSE_CLOUDFORMATION_TEMPLATE_URL} | ||
download={true} | ||
> | ||
{i18n.translate( | ||
'xpack.observability_onboarding.firehosePanel.downloadCloudFormationTemplateButtonLabel', | ||
{ defaultMessage: 'download and modify the CloudFormation template' } | ||
)} | ||
</EuiLink> | ||
), | ||
}} | ||
/> | ||
); | ||
} |
Oops, something went wrong.