Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import React from 'react';

import { EuiLoadingSpinner } from '@elastic/eui';
import { EuiPanel } from '@elastic/eui';

import { withSuspense } from '@kbn/shared-ux-utility';

Expand All @@ -20,5 +20,5 @@ export const LazyDataViewIllustration = React.lazy(() =>

export const DataViewIllustration = withSuspense(
LazyDataViewIllustration,
<EuiLoadingSpinner size="xl" />
<EuiPanel color="subdued" style={{ width: 226, height: 206 }} />
);
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import React from 'react';
import { mountWithIntl } from '@kbn/test-jest-helpers';
import { EuiButton, EuiPanel } from '@elastic/eui';
import { EuiButton, EuiEmptyPrompt } from '@elastic/eui';
import { NoDataViews } from './no_data_views.component';
import { DocumentationLink } from './documentation_link';

Expand All @@ -21,7 +21,7 @@ describe('<NoDataViewsComponent />', () => {
dataViewsDocLink={'dummy'}
/>
);
expect(component.find(EuiPanel).length).toBe(1);
expect(component.find(EuiEmptyPrompt).length).toBe(1);
expect(component.find(EuiButton).length).toBe(1);
expect(component.find(DocumentationLink).length).toBe(1);
});
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import React, { FunctionComponent } from 'react';
import { i18n } from '@kbn/i18n';
import { EuiTextColor } from '@elastic/eui';
import { EuiImage, EuiTextColor } from '@elastic/eui';
import { ElasticAgentCardProps } from './types';
import { NoDataCard } from './no_data_card';
import ElasticAgentCardIllustration from './assets/elastic_agent_card.svg';
Expand Down Expand Up @@ -64,5 +64,19 @@ export const ElasticAgentCardComponent: FunctionComponent<ElasticAgentCardCompon
isDisabled: true,
};

return <NoDataCard image={ElasticAgentCardIllustration} {...props} {...cardRest} />;
const image = (
<EuiImage
size="fullWidth"
style={{
width: 'max(100%, 360px)',
height: 240,
objectFit: 'cover',
background: 'aliceblue',
}}
url={ElasticAgentCardIllustration}
alt=""
/>
);

return <NoDataCard image={image} {...props} {...cardRest} />;
};

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import React, { FunctionComponent } from 'react';
import { i18n } from '@kbn/i18n';
import { CoreStart } from '@kbn/core/public';
import { EuiButton, EuiCard, EuiTextColor, EuiScreenReaderOnly } from '@elastic/eui';
import { EuiButton, EuiCard, EuiTextColor, EuiScreenReaderOnly, EuiImage } from '@elastic/eui';
import { useKibana } from '../../../context';
import { NoDataPageActions, NO_DATA_RECOMMENDED } from '../no_data_page';
import { RedirectAppLinks } from '../../../app_links';
Expand All @@ -35,10 +35,24 @@ export const ElasticAgentCard: FunctionComponent<ElasticAgentCardProps> = ({
services: { http, application },
} = useKibana<CoreStart>();
const addBasePath = http.basePath.prepend;
const image = addBasePath(`/plugins/kibanaReact/assets/elastic_agent_card.svg`);
const imageUrl = addBasePath(`/plugins/kibanaReact/assets/elastic_agent_card.svg`);
const canAccessFleet = application.capabilities.navLinks.integrations;
const hasCategory = category ? `/${category}` : '';

const image = (
<EuiImage
size="fullWidth"
style={{
width: 'max(100%, 360px)',
height: 240,
objectFit: 'cover',
background: 'aliceblue',
}}
url={imageUrl}
alt=""
/>
);

if (!canAccessFleet) {
return (
<EuiCard
Expand Down