Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into kbn-xxx-translation…
Browse files Browse the repository at this point in the history
…s-files-in-cdn
  • Loading branch information
pgayvallet committed Apr 25, 2024
2 parents 1c6213f + 8bcf01b commit c3ce0b2
Show file tree
Hide file tree
Showing 34 changed files with 1,857 additions and 2,790 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ export const connectorTypes: string[] = [
'.servicenow-sir',
'.servicenow-itom',
'.jira',
'.resilient',
'.teams',
'.torq',
'.opsgenie',
'.tines',
'.gen-ai',
'.bedrock',
'.d3security',
'.resilient',
'.sentinelone',
'.cases',
'.observability-ai-assistant',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const Footer: FunctionComponent = () => {
];

return (
<EuiFlexGroup>
<EuiFlexGroup justifyContent="center" gutterSize="xl">
{sections.map((section, index) => (
<EuiFlexItem key={index}>
<EuiAvatar size="l" name="" imageUrl={section.iconUrl} color="subdued" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,13 @@
*/
import { i18n } from '@kbn/i18n';

import { EuiFlexGroup, EuiFlexItem, EuiSpacer, EuiText, EuiTitle } from '@elastic/eui';
import React from 'react';
import {
EuiText,
EuiTitle,
EuiSpacer,
EuiTextColor,
EuiFlexGroup,
EuiFlexItem,
EuiSkeletonTitle,
} from '@elastic/eui';
import { useKibana } from '@kbn/kibana-react-plugin/public';
import useAsync from 'react-use/lib/useAsync';
import { CoreStart } from '@kbn/core/public';

export const Header = () => {
const { services } = useKibana<CoreStart>();

const currentUser = useAsync(services.security.authc.getCurrentUser);

return (
<EuiFlexGroup>
<EuiFlexItem>
<EuiSkeletonTitle
size="xs"
isLoading={currentUser.loading}
announceLoadingStatus={false}
announceLoadedStatus={false}
>
{currentUser.value && (
<EuiTitle size="xs">
<strong>
<EuiTextColor color="subdued">
{i18n.translate(
'xpack.observability_onboarding.experimentalOnboardingFlow.h1.hiJohnLabel',
{
defaultMessage: 'Hi {username}!',
values: {
username: currentUser.value.full_name ?? currentUser.value.username,
},
}
)}
</EuiTextColor>
</strong>
</EuiTitle>
)}
</EuiSkeletonTitle>
<EuiSpacer size="m" />
<EuiTitle size="l">
<h1>
{i18n.translate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ export const OnboardingFlowForm: FunctionComponent = () => {
id: 'logs',
label: i18n.translate(
'xpack.observability_onboarding.experimentalOnboardingFlow.euiCheckableCard.collectAndAnalyzeMyLabel',
{ defaultMessage: 'Collect and analyze my logs' }
{ defaultMessage: 'Collect and analyze logs' }
),
description: i18n.translate(
'xpack.observability_onboarding.onboardingFlowForm.detectPatternsAndOutliersLabel',
{
defaultMessage: 'Detect patterns, troubleshoot in real time, gain insights from logs.',
defaultMessage:
'Detect patterns, gain insights from logs, get alerted when surpassing error thresholds',
}
),
},
Expand All @@ -57,21 +58,22 @@ export const OnboardingFlowForm: FunctionComponent = () => {
description: i18n.translate(
'xpack.observability_onboarding.onboardingFlowForm.captureAndAnalyzeDistributedLabel',
{
defaultMessage: 'Collect distributed traces and catch application performance problems.',
defaultMessage:
'Catch application problems, get alerted on performance issues or SLO breaches, expedite root cause analysis and remediation',
}
),
},
{
id: 'infra',
label: i18n.translate(
'xpack.observability_onboarding.experimentalOnboardingFlow.euiCheckableCard.monitorMyInfrastructureLabel',
{ defaultMessage: 'Monitor my infrastructure' }
{ defaultMessage: 'Monitor infrastructure' }
),
description: i18n.translate(
'xpack.observability_onboarding.onboardingFlowForm.builtOnPowerfulElasticsearchLabel',
{
defaultMessage:
'Stream infrastructure metrics and accelerate root cause detection by breaking down silos.',
'Check my system’s health, get alerted on performance issues or SLO breaches, expedite root cause analysis and remediation',
}
),
},
Expand Down Expand Up @@ -126,7 +128,7 @@ export const OnboardingFlowForm: FunctionComponent = () => {
new Promise((r) => setTimeout(r, 10)).then(() =>
packageListRef.current?.scrollIntoView({
behavior: 'smooth',
block: 'center',
block: 'start',
})
);
}
Expand All @@ -140,7 +142,7 @@ export const OnboardingFlowForm: FunctionComponent = () => {
);

return (
<EuiPanel hasBorder>
<EuiPanel hasBorder paddingSize="xl">
<TitleWithIcon
iconType="indexRollupApp"
title={i18n.translate(
Expand All @@ -152,11 +154,12 @@ export const OnboardingFlowForm: FunctionComponent = () => {
)}
/>
<EuiSpacer size="m" />
<EuiFlexGroup css={customMargin} gutterSize="m" direction="column">
<EuiFlexGroup css={{ ...customMargin, maxWidth: '560px' }} gutterSize="l" direction="column">
{options.map((option) => (
<EuiFlexItem key={option.id}>
<EuiCheckableCard
id={`${radioGroupId}_${option.id}`}
data-test-subj={`observabilityOnboardingUseCaseCard-${option.id}`}
name={radioGroupId}
label={
<>
Expand All @@ -168,7 +171,10 @@ export const OnboardingFlowForm: FunctionComponent = () => {
</>
}
checked={option.id === searchParams.get('category')}
onChange={() => setSearchParams({ category: option.id }, { replace: true })}
onChange={() => {
setIntegrationSearch('');
setSearchParams({ category: option.id }, { replace: true });
}}
/>
</EuiFlexItem>
))}
Expand All @@ -185,7 +191,7 @@ export const OnboardingFlowForm: FunctionComponent = () => {
}
)}
/>
<EuiSpacer size="m" />
<EuiSpacer size="s" />

{Array.isArray(customCards) && (
<OnboardingFlowPackageList
Expand Down Expand Up @@ -230,10 +236,25 @@ interface TitleWithIconProps {
const TitleWithIcon: FunctionComponent<TitleWithIconProps> = ({ title, iconType }) => (
<EuiFlexGroup responsive={false} gutterSize="m" alignItems="center">
<EuiFlexItem grow={false}>
<EuiAvatar size="l" name={title} iconType={iconType} color="subdued" />
<EuiAvatar
size="l"
name={title}
iconType={iconType}
iconSize="l"
color="subdued"
css={{
/**
* Nudges the icon a bit to the
* right because it's not symmetrical and
* look off-center by default. This makes
* it visually centered.
*/
padding: '24px 22px 24px 26px',
}}
/>
</EuiFlexItem>
<EuiFlexItem>
<EuiTitle size="xs">
<EuiTitle size="s">
<strong>{title}</strong>
</EuiTitle>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export function useCustomCardsForCategory(
id: 'system-logs',
type: 'virtual',
title: 'Stream host system logs',
description: 'The quickest path to onboard log data from your own machine or server',
description: 'Collect system logs from your machine or server',
name: 'system-logs-virtual',
categories: ['observability'],
icons: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const PackageListGridWrapper = ({
}: WrapperProps) => {
const customMargin = useCustomMargin();
const { filteredCards, isLoading } = useAvailablePackages({
prereleaseIntegrationsEnabled: false,
prereleaseIntegrationsEnabled: true,
});

const list: IntegrationCardItem[] = useIntegrationCardList(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@

import { IntegrationCardItem } from '@kbn/fleet-plugin/public';

export const QUICKSTART_FLOWS = ['system-logs-virtual', 'custom-logs-virtual'];
export const QUICKSTART_FLOWS = ['system-logs-virtual'];

export const toCustomCard = (card: IntegrationCardItem) => ({
...card,
isQuickstart: QUICKSTART_FLOWS.includes(card.name),
showCardLabels: false,
});

export const isQuickstart = (cardName: string) => QUICKSTART_FLOWS.includes(cardName);
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
import { i18n } from '@kbn/i18n';

import { FormattedMessage } from '@kbn/i18n-react';
import { css } from '@emotion/react';
import { RetrievalDocsFlyout } from './retrieval_docs_flyout';
import type { AIMessage as AIMessageType } from '../../types';

Expand All @@ -31,6 +32,10 @@ type AssistantMessageProps = Pick<
'content' | 'createdAt' | 'citations' | 'retrievalDocs'
>;

const AIMessageCSS = css`
white-space: break-spaces;
`;

export const AssistantMessage: React.FC<AssistantMessageProps> = ({
content,
createdAt,
Expand Down Expand Up @@ -121,7 +126,7 @@ export const AssistantMessage: React.FC<AssistantMessageProps> = ({
</EuiTitle>
</EuiFlexGroup>
<EuiSpacer size="m" />
<EuiText size="s">
<EuiText size="s" css={AIMessageCSS}>
<p>{content}</p>
</EuiText>
{!!citations?.length && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ import { EuiComment, EuiText } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import { UserAvatar } from '@kbn/user-profile-components';

import { css } from '@emotion/react';
import { useUserProfile } from '../../hooks/use_user_profile';
import type { Message as MessageType } from '../../types';

import { CopyActionButton } from './copy_action_button';

type UserMessageProps = Pick<MessageType, 'content' | 'createdAt'>;

const UserMessageCSS = css`
white-space: break-spaces;
`;

export const UserMessage: React.FC<UserMessageProps> = ({ content, createdAt }) => {
const currentUserProfile = useUserProfile();

Expand Down Expand Up @@ -53,7 +58,7 @@ export const UserMessage: React.FC<UserMessageProps> = ({ content, createdAt })
/>
}
>
<EuiText size="s">
<EuiText size="s" css={UserMessageCSS}>
<p>{content}</p>
</EuiText>
</EuiComment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,6 @@ ${JSON.stringify(

fleetServer = await startFleetServer({
kbnClient,
// TODO TC: https://github.com/elastic/kibana/pull/180879 - there was an issue with 8.14.0, this should be removed when it's fixed
version: '8.13.0-SNAPSHOT',
logger: log,
port:
fleetServerPort ?? config.has('servers.fleetserver.port')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export const navigationTree: NavigationTreeDefinition = {
{
type: 'navItem',
title: i18n.translate('xpack.serverlessObservability.nav.getStarted', {
defaultMessage: 'Get started',
defaultMessage: 'Add data',
}),
link: 'observabilityOnboarding',
icon: 'launch',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import { PluginSetupContract as ActionsPluginSetupContract } from '@kbn/actions-

import { getConnectorType as getCasesWebhookConnectorType } from './cases_webhook';
import { getConnectorType as getJiraConnectorType } from './jira';
import { getConnectorType as getResilientConnectorType } from './resilient';
import { getServiceNowITSMConnectorType } from './servicenow_itsm';
import { getServiceNowSIRConnectorType } from './servicenow_sir';
import { getServiceNowITOMConnectorType } from './servicenow_itom';
import { getTinesConnectorType } from './tines';
import { getResilientConnectorType } from './resilient';
import { getActionType as getTorqConnectorType } from './torq';
import { getConnectorType as getEmailConnectorType } from './email';
import { getConnectorType as getIndexConnectorType } from './es_index';
Expand All @@ -39,8 +39,6 @@ export { ConnectorTypeId as CasesWebhookConnectorTypeId } from './cases_webhook'
export type { ActionParamsType as CasesWebhookActionParams } from './cases_webhook';
export { ConnectorTypeId as JiraConnectorTypeId } from './jira';
export type { ActionParamsType as JiraActionParams } from './jira';
export { ConnectorTypeId as ResilientConnectorTypeId } from './resilient';
export type { ActionParamsType as ResilientActionParams } from './resilient';
export { ServiceNowITSMConnectorTypeId } from './servicenow_itsm';
export { ServiceNowSIRConnectorTypeId } from './servicenow_sir';
export { ConnectorTypeId as EmailConnectorTypeId } from './email';
Expand Down Expand Up @@ -100,7 +98,6 @@ export function registerConnectorTypes({
actions.registerType(getServiceNowSIRConnectorType());
actions.registerType(getServiceNowITOMConnectorType());
actions.registerType(getJiraConnectorType());
actions.registerType(getResilientConnectorType());
actions.registerType(getTeamsConnectorType());
actions.registerType(getTorqConnectorType());

Expand All @@ -109,6 +106,7 @@ export function registerConnectorTypes({
actions.registerSubActionConnectorType(getOpenAIConnectorType());
actions.registerSubActionConnectorType(getBedrockConnectorType());
actions.registerSubActionConnectorType(getD3SecurityConnectorType());
actions.registerSubActionConnectorType(getResilientConnectorType());

if (experimentalFeatures.sentinelOneConnectorOn) {
actions.registerSubActionConnectorType(getSentinelOneConnectorType());
Expand Down
Loading

0 comments on commit c3ce0b2

Please sign in to comment.