Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Snapshot and Restore] Server side snapshots pagination #110266

Merged
merged 38 commits into from
Oct 18, 2021
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
2c2065f
[Snapshot % Restore] Added server side pagination and sorting to get …
yuliacech Aug 26, 2021
6b565fe
Merge branch 'master' into snapshots_sorting
kibanamachine Aug 30, 2021
25c14d0
[Snapshot & Restore] Added server side sorting by shards and failed s…
yuliacech Aug 30, 2021
e899c1e
[Snapshot & Restore] Fixed i18n errors
yuliacech Aug 30, 2021
a76a350
Merge branch 'master' into snapshots_sorting
kibanamachine Sep 3, 2021
fbc1073
Merge branch 'master' into snapshots_sorting
kibanamachine Sep 13, 2021
fcf9420
[Snapshot & Restore] Added server side sorting by repository
yuliacech Sep 14, 2021
5546ee3
Merge branch 'master' into snapshots_sorting
kibanamachine Sep 15, 2021
a8418f3
[Snapshot & Restore] Implemented server side search request for snaps…
yuliacech Sep 21, 2021
989dbf9
Merge branch 'master' into snapshots_sorting
kibanamachine Sep 21, 2021
6fab678
[Snapshot & Restore] Fixed eslint errors
yuliacech Sep 21, 2021
85d6b5f
[Snapshot & Restore] Removed uncommented code
yuliacech Sep 21, 2021
f84dfd5
[Snapshot & Restore] Fixed pagination/search bug
yuliacech Sep 21, 2021
02ea7c1
[Snapshot & Restore] Fixed pagination/search bug
yuliacech Sep 21, 2021
16891ce
[Snapshot & Restore] Fixed text truncate bug
yuliacech Sep 21, 2021
1334f40
[Snapshot & Restore] Fixed non existent repository search error
yuliacech Sep 21, 2021
7b0d517
Merge branch 'master' into snapshots_sorting
kibanamachine Sep 23, 2021
35e1acf
Merge branch 'master' into snapshots_sorting
kibanamachine Sep 27, 2021
38cc772
Merge branch 'master' into snapshots_sorting
kibanamachine Sep 29, 2021
9ca9a08
Update x-pack/plugins/snapshot_restore/public/application/sections/ho…
yuliacech Sep 29, 2021
5db21ad
Update x-pack/plugins/snapshot_restore/public/application/sections/ho…
yuliacech Sep 29, 2021
b1aa490
Merge branch 'master' into snapshots_sorting
kibanamachine Oct 4, 2021
56be367
[Snapshot & Restore] Fixed missing i18n and no snapshots callout
yuliacech Oct 4, 2021
c9467f7
[Snapshot & Restore] Moved "getSnapshotSearchWildcard" to a separate …
yuliacech Oct 4, 2021
5e84030
[Snapshot & Restore] Added api integration tests for "get snapshots" …
yuliacech Oct 4, 2021
d2d6a56
Merge branch 'master' into snapshots_sorting
kibanamachine Oct 5, 2021
e920e51
[Snapshot & Restore] Renamed SnapshotSearchOptions/SnapshotTableOptio…
yuliacech Oct 5, 2021
1feb0c1
Merge branch 'master' into snapshots_sorting
kibanamachine Oct 7, 2021
cb22230
Merge branch 'master' into snapshots_sorting
kibanamachine Oct 7, 2021
5d86bd7
Merge branch 'master' into snapshots_sorting
kibanamachine Oct 11, 2021
c0c8096
Merge branch 'master' into snapshots_sorting
kibanamachine Oct 12, 2021
347f0e4
[Snapshot & Restore] Fixed search wildcard to also match string in th…
yuliacech Oct 12, 2021
cfd5f04
Merge branch 'master' into snapshots_sorting
kibanamachine Oct 14, 2021
61d21d4
[Snapshot & Restore] Added incremental search back to snapshots list …
yuliacech Oct 14, 2021
467f47c
[Snapshot & Restore] Updated snapshot search debounce value and extra…
yuliacech Oct 15, 2021
9ac27d3
Merge branch 'master' into snapshots_sorting
kibanamachine Oct 18, 2021
e139f95
[Snapshot & Restore] Renamed debounceValue to cachedListParams and ad…
yuliacech Oct 18, 2021
2d08704
Merge branch 'master' into snapshots_sorting
kibanamachine Oct 18, 2021
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 @@ -6,6 +6,7 @@
*/

import React, { useState } from 'react';
import useDebounce from 'react-use/lib/useDebounce';

import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
Expand Down Expand Up @@ -56,6 +57,15 @@ export const SnapshotSearchBar: React.FunctionComponent<Props> = ({
onSnapshotDeleted,
repositories,
}) => {
const [debouncedValue, setDebouncedValue] = useState<SnapshotListParams>(listParams);
useDebounce(
() => {
setListParams(debouncedValue);
},
500,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we reduce this to 200? Feels a bit sluggish to me at 500.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, 500ms debounce might be too long!

[debouncedValue]
);

const deleteButton = selectedItems.length ? (
<SnapshotDeleteProvider>
{(
Expand Down Expand Up @@ -126,7 +136,7 @@ export const SnapshotSearchBar: React.FunctionComponent<Props> = ({
if (changedQuery.ast.clauses.length > 1) {
setError({ name: onlyOneClauseMessage, message: onlyOneClauseMessage });
} else {
setListParams(getListParams(listParams, changedQuery));
setDebouncedValue(getListParams(listParams, changedQuery));
}
}
};
Expand All @@ -139,7 +149,7 @@ export const SnapshotSearchBar: React.FunctionComponent<Props> = ({
onChange={onSearchBarChange}
toolsLeft={deleteButton}
toolsRight={reloadButton}
box={{ schema: searchSchema }}
box={{ schema: searchSchema, incremental: true }}
/>
<EuiSpacer />
{error ? (
Expand Down