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

[ML] Transforms: Improves transform list reloading behavior. #164296

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
3919a8b
migrate transform list to use react-query
walterra Aug 21, 2023
ec2bd1c
refactor inline useQuery to custom hook. cleanup useApi.
walterra Aug 21, 2023
04ae3c0
migrate wizard to use react-query
walterra Aug 22, 2023
2daa660
fix i18n
walterra Aug 22, 2023
c23dc68
migrate cloning to use react-query
walterra Aug 22, 2023
a8ee0ea
remove getTransformStats from useApi
walterra Aug 22, 2023
a2978b2
migrate update to use react-query
walterra Aug 22, 2023
1f55030
migrate preview to use react-query
walterra Aug 22, 2023
7d5107b
migrate reauthorize to use react-query
walterra Aug 22, 2023
e7d1c0e
migrate reset to use react-query
walterra Aug 22, 2023
9c47fe6
migrate stop to use react-query
walterra Aug 22, 2023
cb904c0
migrate schedule now to use react-query
walterra Aug 22, 2023
1526d62
migrate more to react-query
walterra Aug 22, 2023
8cade10
migrate rest of useApi to react-query
walterra Aug 22, 2023
0614d00
remove unnecessary type guards
walterra Aug 22, 2023
5f04ab7
remove unnecessary type guards
walterra Aug 22, 2023
c4b4d53
cleanup
walterra Aug 22, 2023
be3e0fc
cleanup
walterra Aug 22, 2023
3080150
refactor IndexService into custom hooks using react-query
walterra Aug 22, 2023
d302856
fix tests
walterra Aug 23, 2023
5fbaec2
remove success toasts
walterra Aug 23, 2023
b986a42
fix i18n
walterra Aug 23, 2023
32c12eb
refactor AuthorizationProvider into useAuthorization hook.
walterra Aug 24, 2023
27233be
fix react-query caching
walterra Aug 24, 2023
6a00eef
cleanup
walterra Aug 24, 2023
4802a9a
fix authorization hooks
walterra Aug 24, 2023
9acea75
cleanup
walterra Aug 24, 2023
c135c95
cleanup
walterra Aug 24, 2023
70a8d63
return mutate only instead of whole mutation from custom hooks
walterra Aug 24, 2023
61b300a
cleanup
walterra Aug 24, 2023
bfbb3dc
migrate enzyme-snapshots to react-testing-lib
walterra Aug 24, 2023
a6a7c70
client side code no longer relies on privileges
walterra Aug 25, 2023
9d44654
fix jest tests
walterra Aug 25, 2023
6beaef4
fix i18n
walterra Aug 25, 2023
b4da48b
error modal
walterra Aug 25, 2023
06042c7
migrate to updated toMountPoint
walterra Aug 25, 2023
c4d1811
linting
walterra Aug 25, 2023
ed56944
tweak react-query default settings
walterra Aug 25, 2023
cc7426d
move useRefreshTransformList to hooks folder
walterra Aug 25, 2023
95ff5c0
remove ununused code. tweak empty list state
walterra Aug 25, 2023
1c4c3c2
adds retry button to warning callout for no transform nodes.
walterra Aug 25, 2023
4ce9526
fix jest test
walterra Aug 25, 2023
9319b13
Merge branch 'main' into ml-transform-fix-transform-list-reload
walterra Aug 28, 2023
04aa299
Merge branch 'main' into ml-transform-fix-transform-list-reload
walterra Aug 28, 2023
07212e8
Merge branch 'main' into ml-transform-fix-transform-list-reload
walterra Aug 30, 2023
d7db6af
Merge branch 'main' into ml-transform-fix-transform-list-reload
walterra Aug 31, 2023
f25ea75
add null checks
walterra Aug 31, 2023
c6b72a6
cleanup types
walterra Aug 31, 2023
ee46ca2
fix passing on populated fields
walterra Aug 31, 2023
1fa7a2e
refactor useCreateTransform for consistency
walterra Aug 31, 2023
493f52d
move fetching transform nodes to its own hook
walterra Aug 31, 2023
9b02239
refactor EuiPageContent_Deprecated
walterra Aug 31, 2023
a47947c
revert space after preview text
walterra Aug 31, 2023
4efc4bd
tweak capabilities checks
walterra Aug 31, 2023
0a26daf
fix i18n
walterra Aug 31, 2023
279e526
fix handling options default
walterra Aug 31, 2023
534ac1f
Merge branch 'main' into ml-transform-fix-transform-list-reload
walterra Aug 31, 2023
28aeedd
Merge branch 'main' into ml-transform-fix-transform-list-reload
walterra Sep 1, 2023
f0e555f
fix populated fields cleanup
walterra Sep 1, 2023
0a73faa
Merge branch 'main' into ml-transform-fix-transform-list-reload
walterra Sep 1, 2023
6144781
Merge branch 'main' into ml-transform-fix-transform-list-reload
walterra Sep 1, 2023
2091a57
Merge branch 'main' into ml-transform-fix-transform-list-reload
walterra Sep 1, 2023
d10bdb9
Merge branch 'main' into ml-transform-fix-transform-list-reload
walterra Sep 1, 2023
ecedbad
Merge branch 'main' into ml-transform-fix-transform-list-reload
walterra Sep 1, 2023
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 @@ -5,7 +5,7 @@
* 2.0.
*/

import { schema, TypeOf } from '@kbn/config-schema';
import { schema, type TypeOf } from '@kbn/config-schema';

import type { ES_FIELD_TYPES } from '@kbn/field-types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { getTransformsRequestSchema } from './transforms';

export const getTransformsStatsRequestSchema = getTransformsRequestSchema;

export type GetTransformsRequestSchema = TypeOf<typeof getTransformsStatsRequestSchema>;
export type GetTransformsStatsRequestSchema = TypeOf<typeof getTransformsStatsRequestSchema>;

export interface GetTransformsStatsResponseSchema {
node_failures?: object;
Expand Down
147 changes: 0 additions & 147 deletions x-pack/plugins/transform/common/api_schemas/type_guards.ts

This file was deleted.

31 changes: 15 additions & 16 deletions x-pack/plugins/transform/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@ const EXTERNAL_API_BASE_PATH = '/api/transform/';
export const addInternalBasePath = (uri: string): string => `${INTERNAL_API_BASE_PATH}${uri}`;
export const addExternalBasePath = (uri: string): string => `${EXTERNAL_API_BASE_PATH}${uri}`;

export const TRANSFORM_REACT_QUERY_KEYS = {
DATA_SEARCH: 'transform.data_search',
DATA_VIEW_EXISTS: 'transform.data_view_exists',
GET_DATA_VIEW_TITLES: 'transform.get_data_view_titles',
GET_ES_INDICES: 'transform.get_es_indices',
GET_ES_INGEST_PIPELINES: 'transform.get_es_ingest_pipelines',
GET_HISTOGRAMS_FOR_FIELDS: 'transform.get_histograms_for_fields',
GET_TRANSFORM: 'transform.get_transform',
GET_TRANSFORM_NODES: 'transform.get_transform_nodes',
GET_TRANSFORM_AUDIT_MESSAGES: 'transform.get_transform_audit_messages',
GET_TRANSFORM_STATS: 'transform.get_transform_stats',
GET_TRANSFORMS: 'transform.get_transforms',
GET_TRANSFORMS_PREVIEW: 'transform.get_transforms_preview',
} as const;

// In order to create a transform, the API requires the following privileges:
// - transform_admin (builtin)
// - cluster privileges: manage_transform
Expand Down Expand Up @@ -71,22 +86,6 @@ export const APP_CLUSTER_PRIVILEGES = [
// Minimum privileges required to return transform node count
export const NODES_INFO_PRIVILEGES = ['cluster:monitor/transform/get'];

// Equivalent of capabilities.canGetTransform
export const APP_GET_TRANSFORM_CLUSTER_PRIVILEGES = [
'cluster.cluster:monitor/transform/get',
'cluster.cluster:monitor/transform/stats/get',
];

// Equivalent of capabilities.canCreateTransform
export const APP_CREATE_TRANSFORM_CLUSTER_PRIVILEGES = [
'cluster.cluster:monitor/transform/get',
'cluster.cluster:monitor/transform/stats/get',
'cluster.cluster:admin/transform/preview',
'cluster.cluster:admin/transform/put',
'cluster.cluster:admin/transform/start',
'cluster.cluster:admin/transform/start_task',
];

export const APP_INDEX_PRIVILEGES = ['monitor'];

// reflects https://github.com/elastic/elasticsearch/blob/master/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/transforms/TransformStats.java#L214
Expand Down
Loading
Loading