mirror of
https://github.com/elastic/kibana.git
synced 2025-04-19 15:35:00 -04:00
[Synthetics] Fixed test run logs per page (#218458)
This commit is contained in:
parent
16f6ecf9c2
commit
e96f0566ce
1 changed files with 10 additions and 2 deletions
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
import {
|
||||
CriteriaWithPagination,
|
||||
EuiBasicTableColumn,
|
||||
EuiButtonEmpty,
|
||||
EuiCallOut,
|
||||
|
@ -17,7 +18,7 @@ import {
|
|||
EuiTitle,
|
||||
formatDate,
|
||||
} from '@elastic/eui';
|
||||
import React from 'react';
|
||||
import React, { useState } from 'react';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
|
||||
import { EuiInMemoryTable } from '@elastic/eui';
|
||||
|
@ -71,6 +72,12 @@ export const StdErrorLogs = ({
|
|||
|
||||
const { items, loading } = useStdErrorLogs({ checkGroup });
|
||||
|
||||
const [pagination, setPagination] = useState({ pageIndex: 0, pageSize });
|
||||
|
||||
const onTableChange = ({ page }: CriteriaWithPagination<(typeof items)[number]>) => {
|
||||
setPagination({ pageIndex: page.index, pageSize: page.size });
|
||||
};
|
||||
|
||||
const { discover, exploratoryView } = useKibana<ClientPluginsStart>().services;
|
||||
|
||||
const { data: discoverLink } = useFetcher(async () => {
|
||||
|
@ -139,9 +146,10 @@ export const StdErrorLogs = ({
|
|||
defaultFields: ['@timestamp', 'synthetics.payload.message'],
|
||||
}}
|
||||
pagination={{
|
||||
pageSize,
|
||||
...pagination,
|
||||
pageSizeOptions: [2, 5, 10, 20, 50],
|
||||
}}
|
||||
onTableChange={onTableChange}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue