Skip to content

Commit

Permalink
[App Search][Polish] API Logs empty state (#102998)
Browse files Browse the repository at this point in the history
* Re-add noItemsMessage to ApiLogsTable

- Primarily for Engine Overview use - totally forgot about this 🤦

* Tweak API logs empty state copy

- after discussing w/ Davey
  • Loading branch information
Constance committed Jun 22, 2021
1 parent e580d5a commit 0548f98
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import { ApiLogsLogic } from '../index';
import { ApiLog } from '../types';
import { getStatusColor } from '../utils';

import { EmptyState } from './';

import './api_logs_table.scss';

interface Props {
Expand Down Expand Up @@ -108,6 +110,7 @@ export const ApiLogsTable: React.FC<Props> = ({ hasPagination }) => {
items={apiLogs}
responsive
loading={dataLoading}
noItemsMessage={<EmptyState />}
{...paginationProps}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('EmptyState', () => {
.find(EuiEmptyPrompt)
.dive();

expect(wrapper.find('h2').text()).toEqual('Perform your first API call');
expect(wrapper.find('h2').text()).toEqual('No API events in the last 24 hours');
expect(wrapper.find(EuiButton).prop('href')).toEqual(
expect.stringContaining('/api-reference.html')
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ export const EmptyState: React.FC = () => (
title={
<h2>
{i18n.translate('xpack.enterpriseSearch.appSearch.engine.apiLogs.emptyTitle', {
defaultMessage: 'Perform your first API call',
defaultMessage: 'No API events in the last 24 hours',
})}
</h2>
}
body={
<p>
{i18n.translate('xpack.enterpriseSearch.appSearch.engine.apiLogs.emptyDescription', {
defaultMessage: "Check back after you've performed some API calls.",
defaultMessage: 'Logs will update in real-time when an API request occurs.',
})}
</p>
}
Expand Down

0 comments on commit 0548f98

Please sign in to comment.