mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Saved Search Embeddable] Add formatting to saved search embeddable document count (#151989)
[Saved Search Embeddable] Add formatting to saved search embeddable document count Resolves https://github.com/elastic/kibana/issues/151545 ## Screenshot ### Before <img width="1432" alt="Screenshot 2023-02-23 at 13 06 50" src="https://user-images.githubusercontent.com/54555805/220901414-f87eace6-8a94-4459-8a31-1c0914931852.png"> ### After <img width="1429" alt="Screenshot 2023-02-23 at 13 06 07" src="https://user-images.githubusercontent.com/54555805/220901380-deb3c89c-9359-4d08-8809-24313e3dcee8.png"> --- This code was written and reviewed by GitStart Community. Growing future engineers, one PR at a time. --------- Co-authored-by: LuisChiej <54555805+LuisChiej@users.noreply.github.com> Co-authored-by: gitstart_bot <gitstart_bot@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
This commit is contained in:
parent
c339ca8394
commit
49c20b4beb
2 changed files with 7 additions and 3 deletions
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { FormattedMessage } from '@kbn/i18n-react';
|
||||
import { FormattedMessage, FormattedNumber } from '@kbn/i18n-react';
|
||||
import { EuiText } from '@elastic/eui';
|
||||
|
||||
export const TotalDocuments = ({ totalHitCount }: { totalHitCount: number }) => {
|
||||
|
@ -22,7 +22,11 @@ export const TotalDocuments = ({ totalHitCount }: { totalHitCount: number }) =>
|
|||
id="discover.docTable.totalDocuments"
|
||||
defaultMessage="{totalDocuments} documents"
|
||||
values={{
|
||||
totalDocuments: <strong>{totalHitCount}</strong>,
|
||||
totalDocuments: (
|
||||
<strong>
|
||||
<FormattedNumber value={totalHitCount} />
|
||||
</strong>
|
||||
),
|
||||
}}
|
||||
/>
|
||||
</EuiText>
|
||||
|
|
|
@ -138,7 +138,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
});
|
||||
|
||||
it('should display document count for global time range when no timeslice is set', async () => {
|
||||
expect(await discover.getSavedSearchDocumentCount()).to.be('14005 documents');
|
||||
expect(await discover.getSavedSearchDocumentCount()).to.be('14,005 documents');
|
||||
});
|
||||
|
||||
it('should display document count for timeslice when timeslice is selected', async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue