-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 test/162593/kbn-es-serverless-ftr
- Loading branch information
Showing
28 changed files
with
516 additions
and
214 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,13 +5,13 @@ | |
# on the main branch only in a verification step. | ||
# This is only to prevent accidental creation of the tag on other branches and cannot be used to prevent malicious creation of the tag. | ||
|
||
name: create-deploy-tag | ||
name: Initiate Serverless Deploy | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
commit: | ||
description: "The commit to tag (default: latest commit on main)" | ||
description: "The commit to deploy (default: latest commit on main)" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
|
@@ -30,10 +30,10 @@ jobs: | |
run: | | ||
commit="${{ github.event.inputs.commit || github.sha }}" | ||
echo "COMMIT=${commit}" >> "${GITHUB_ENV}" | ||
- name: Verify selected commit isn't already tagged | ||
- name: Verify selected or newer commit isn't already tagged | ||
run: | | ||
git tag --contains ${COMMIT} | grep -P "^deploy@\d+$" && { | ||
echo "Tag already exists on selected commit" | ||
echo "A deploy-tag already exists on the selected or newer commit!" | ||
exit 1 | ||
} || true | ||
- name: Verify branch | ||
|
@@ -51,10 +51,10 @@ jobs: | |
git tag ${TAG_NAME} ${COMMIT} | ||
git push origin "refs/tags/${TAG_NAME}" | ||
- if: always() | ||
uses: elastic/apm-pipeline-library/.github/actions/notify-build-status@current | ||
id: slack | ||
uses: slackapi/[email protected] | ||
with: | ||
message: ${{ job.status == 'success' && format('Created tag `{0}` for commit `{1}`', env.TAG_NAME, env.COMMIT) || 'Creating a deploy tag failed' }} | ||
vaultUrl: ${{ secrets.VAULT_ADDR }} | ||
vaultRoleId: ${{ secrets.VAULT_ROLE_ID }} | ||
vaultSecretId: ${{ secrets.VAULT_SECRET_ID }} | ||
slackChannel: "#kibana-mission-control" | ||
channel-id: kibana-mission-control | ||
slack-message: ${{ job.status == 'success' && format('Created tag `{0}` for commit `{1}`', env.TAG_NAME, env.COMMIT) || 'Creating a deploy tag failed. See https://github.com/elastic/kibana/actions/workflows/create-deploy-tag.yml' }} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} |
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
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
102 changes: 102 additions & 0 deletions
102
x-pack/plugins/infra/public/components/asset_details/components/metadata_explanation.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,102 @@ | ||
/* | ||
* 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 { EuiText, EuiLink } from '@elastic/eui'; | ||
import { FormattedDate, FormattedMessage, FormattedTime } from '@kbn/i18n-react'; | ||
import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner } from '@elastic/eui'; | ||
import { Popover } from '../tabs/common/popover'; | ||
import { useMetadataStateProviderContext } from '../hooks/use_metadata_state'; | ||
|
||
const HOSTNAME_DOCS_LINK = | ||
'https://www.elastic.co/guide/en/ecs/current/ecs-host.html#field-host-name'; | ||
|
||
const MetadataExplanationTooltipContent = React.memo(() => { | ||
const onClick = (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => { | ||
e.stopPropagation(); | ||
}; | ||
|
||
return ( | ||
<EuiText size="s" onClick={onClick} style={{ width: 200 }}> | ||
<FormattedMessage | ||
id="xpack.infra.assetDetails.metadata.tooltip.documentationLabel" | ||
defaultMessage="{metadata} is populated from the last event detected for this {hostName} for the selected date period." | ||
values={{ | ||
metadata: ( | ||
<i> | ||
<FormattedMessage | ||
id="xpack.infra.assetDetails.metadata.tooltip.metadata" | ||
defaultMessage="Metadata" | ||
/> | ||
</i> | ||
), | ||
hostName: ( | ||
<EuiLink | ||
data-test-subj="infraAssetDetailsTooltipDocumentationLink" | ||
href={HOSTNAME_DOCS_LINK} | ||
target="_blank" | ||
> | ||
<FormattedMessage | ||
id="xpack.infra.assetDetails.metadata.tooltip.documentationLink" | ||
defaultMessage="host.name" | ||
/> | ||
</EuiLink> | ||
), | ||
}} | ||
/> | ||
</EuiText> | ||
); | ||
}); | ||
|
||
export const MetadataExplanationMessage = () => { | ||
const { metadata, loading } = useMetadataStateProviderContext(); | ||
|
||
return loading ? ( | ||
<EuiLoadingSpinner /> | ||
) : metadata?.info?.timestamp ? ( | ||
<EuiFlexGroup gutterSize="xs" alignItems="baseline"> | ||
<EuiFlexItem grow={false}> | ||
<EuiText size="xs" color="subdued"> | ||
<FormattedMessage | ||
id="xpack.infra.assetDetails.metadata.tooltip.metadataSectionTitle" | ||
defaultMessage="Showing metadata collected on {date} @ {time}" | ||
values={{ | ||
date: ( | ||
<FormattedDate | ||
value={new Date(metadata?.info?.timestamp)} | ||
month="short" | ||
day="numeric" | ||
year="numeric" | ||
/> | ||
), | ||
time: ( | ||
<FormattedTime | ||
value={new Date(metadata?.info?.timestamp)} | ||
hour12={false} | ||
hour="2-digit" | ||
minute="2-digit" | ||
second="2-digit" | ||
/> | ||
), | ||
}} | ||
/> | ||
</EuiText> | ||
</EuiFlexItem> | ||
<EuiFlexItem grow={false}> | ||
<Popover | ||
iconSize="s" | ||
iconColor="subdued" | ||
icon="iInCircle" | ||
panelPaddingSize="m" | ||
data-test-subj="infraAssetDetailsMetadataPopoverButton" | ||
> | ||
<MetadataExplanationTooltipContent /> | ||
</Popover> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
) : null; | ||
}; |
111 changes: 111 additions & 0 deletions
111
x-pack/plugins/infra/public/components/asset_details/components/processes_explanation.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,111 @@ | ||
/* | ||
* 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 { EuiText, EuiLink } from '@elastic/eui'; | ||
import { FormattedDate, FormattedMessage, FormattedTime } from '@kbn/i18n-react'; | ||
import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; | ||
import { useDateRangeProviderContext } from '../hooks/use_date_range'; | ||
import { Popover } from '../tabs/common/popover'; | ||
|
||
const DOCUMENTATION_LINK = | ||
'https://www.elastic.co/guide/en/observability/current/view-infrastructure-metrics.html'; | ||
const SYSTEM_INTEGRATION_DOCS_LINK = 'https://docs.elastic.co/en/integrations/system'; | ||
|
||
const ProcessesExplanationTooltipContent = React.memo(() => { | ||
const onClick = (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => { | ||
e.stopPropagation(); | ||
}; | ||
|
||
return ( | ||
<EuiText size="s" onClick={onClick} style={{ width: 300 }}> | ||
<p> | ||
<FormattedMessage | ||
id="xpack.infra.assetDetails.processes.tooltip.explanationLabel" | ||
defaultMessage="The processes listed are based on an aggregation of the top CPU and the top memory consuming processes for the 1 minute preceding the end date of the selected time period. The number of top processes is configurable in the {systemIntegration}." | ||
values={{ | ||
systemIntegration: ( | ||
<EuiLink | ||
data-test-subj="infraAssetDetailsTooltipSystemIntegrationDocumentationLink" | ||
href={SYSTEM_INTEGRATION_DOCS_LINK} | ||
target="_blank" | ||
> | ||
<FormattedMessage | ||
id="xpack.infra.assetDetails.processes.tooltip.systemIntegrationDocumentationLink" | ||
defaultMessage="System Integration" | ||
/> | ||
</EuiLink> | ||
), | ||
}} | ||
/> | ||
</p> | ||
<p> | ||
<FormattedMessage | ||
id="xpack.infra.assetDetails.processes.tooltip.documentationLabel" | ||
defaultMessage="Please see the following {documentation} for more details on processes." | ||
values={{ | ||
documentation: ( | ||
<EuiLink | ||
data-test-subj="infraAssetDetailsTooltipDocumentationLink" | ||
href={DOCUMENTATION_LINK} | ||
target="_blank" | ||
> | ||
<FormattedMessage | ||
id="xpack.infra.assetDetails.processes.tooltip.documentationLink" | ||
defaultMessage="documentation" | ||
/> | ||
</EuiLink> | ||
), | ||
}} | ||
/> | ||
</p> | ||
</EuiText> | ||
); | ||
}); | ||
|
||
export const ProcessesExplanationMessage = () => { | ||
const { getDateRangeInTimestamp } = useDateRangeProviderContext(); | ||
const dateFromRange = new Date(getDateRangeInTimestamp().to); | ||
|
||
return ( | ||
<EuiFlexGroup gutterSize="xs" alignItems="baseline"> | ||
<EuiFlexItem grow={false}> | ||
<EuiText size="xs" color="subdued"> | ||
<FormattedMessage | ||
id="xpack.infra.assetDetails.overview.processesSectionTitle" | ||
defaultMessage="Showing process data collected for the 1 minute preceding {date} @ {time}" | ||
values={{ | ||
date: ( | ||
<FormattedDate value={dateFromRange} month="short" day="numeric" year="numeric" /> | ||
), | ||
time: ( | ||
<FormattedTime | ||
value={dateFromRange} | ||
hour12={false} | ||
hour="2-digit" | ||
minute="2-digit" | ||
second="2-digit" | ||
/> | ||
), | ||
}} | ||
/> | ||
</EuiText> | ||
</EuiFlexItem> | ||
<EuiFlexItem grow={false}> | ||
<Popover | ||
iconSize="s" | ||
iconColor="subdued" | ||
icon="iInCircle" | ||
panelPaddingSize="m" | ||
data-test-subj="infraAssetDetailsProcessesPopoverButton" | ||
> | ||
<ProcessesExplanationTooltipContent /> | ||
</Popover> | ||
</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
Oops, something went wrong.