Skip to content

Commit 3fc06a8

Browse files
[9.0] [Synthetics] Fixed test run logs per page (elastic#218458) (elastic#218526)
# Backport This will backport the following commits from `main` to `9.0`: - [[Synthetics] Fixed test run logs per page (elastic#218458)](elastic#218458) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Francesco Fagnani","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-04-17T05:34:38Z","message":"[Synthetics] Fixed test run logs per page (elastic#218458)","sha":"e96f0566ce37c478e35c31e5a01419938062758d","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:obs-ux-management","backport:version","v9.1.0","v8.19.0","v8.18.1","v9.0.1","v8.17.6"],"title":"[Synthetics] Fixed test run logs per page","number":218458,"url":"https://github.com/elastic/kibana/pull/218458","mergeCommit":{"message":"[Synthetics] Fixed test run logs per page (elastic#218458)","sha":"e96f0566ce37c478e35c31e5a01419938062758d"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","8.18","9.0","8.17"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/218458","number":218458,"mergeCommit":{"message":"[Synthetics] Fixed test run logs per page (elastic#218458)","sha":"e96f0566ce37c478e35c31e5a01419938062758d"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.17","label":"v8.17.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Francesco Fagnani <[email protected]>
1 parent fa0eecb commit 3fc06a8

File tree

1 file changed

+10
-2
lines changed
  • x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/common/components

1 file changed

+10
-2
lines changed

x-pack/solutions/observability/plugins/synthetics/public/apps/synthetics/components/common/components/stderr_logs.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
import {
9+
CriteriaWithPagination,
910
EuiBasicTableColumn,
1011
EuiButtonEmpty,
1112
EuiCallOut,
@@ -17,7 +18,7 @@ import {
1718
EuiTitle,
1819
formatDate,
1920
} from '@elastic/eui';
20-
import React from 'react';
21+
import React, { useState } from 'react';
2122
import { i18n } from '@kbn/i18n';
2223

2324
import { EuiInMemoryTable } from '@elastic/eui';
@@ -71,6 +72,12 @@ export const StdErrorLogs = ({
7172

7273
const { items, loading } = useStdErrorLogs({ checkGroup });
7374

75+
const [pagination, setPagination] = useState({ pageIndex: 0, pageSize });
76+
77+
const onTableChange = ({ page }: CriteriaWithPagination<(typeof items)[number]>) => {
78+
setPagination({ pageIndex: page.index, pageSize: page.size });
79+
};
80+
7481
const { discover, exploratoryView } = useKibana<ClientPluginsStart>().services;
7582

7683
const { data: discoverLink } = useFetcher(async () => {
@@ -139,9 +146,10 @@ export const StdErrorLogs = ({
139146
defaultFields: ['@timestamp', 'synthetics.payload.message'],
140147
}}
141148
pagination={{
142-
pageSize,
149+
...pagination,
143150
pageSizeOptions: [2, 5, 10, 20, 50],
144151
}}
152+
onTableChange={onTableChange}
145153
/>
146154
</>
147155
);

0 commit comments

Comments
 (0)