Skip to content
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
24ceaa6
partial progress
mattkime Dec 13, 2025
9d73092
ccr progress
mattkime Dec 16, 2025
e23108b
ccr progress
mattkime Dec 16, 2025
0afaa99
Merge branch 'main' into index_mgmt_faster_list_loading
mattkime Dec 28, 2025
8f3bcc2
partial progress
mattkime Jan 14, 2026
d2edb8c
partial progress
mattkime Jan 14, 2026
c8fe180
Merge branch 'main' into index_mgmt_faster_list_loading
mattkime Jan 14, 2026
b17a31a
revert unneeded changes
mattkime Jan 14, 2026
151949f
simplify browser side index data enhancement api
mattkime Jan 15, 2026
b1b8151
loading data via multiple requests and merging
mattkime Jan 17, 2026
728bc2c
comment cleanup
mattkime Jan 17, 2026
e21c1a8
largely working
mattkime Jan 18, 2026
8015500
remove console.log
mattkime Jan 18, 2026
8699d81
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Jan 21, 2026
f0793a4
cleanup
mattkime Jan 21, 2026
341e80d
localize errors
mattkime Jan 21, 2026
7dbbc4f
comment cleanup
mattkime Jan 21, 2026
9728011
Changes from node scripts/lint_ts_projects --fix
kibanamachine Jan 21, 2026
91e3bd5
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine Jan 21, 2026
becc695
type fixes
mattkime Jan 21, 2026
52887c7
Merge branch 'index_mgmt_faster_list_loading' of github.com:elastic/k…
mattkime Jan 21, 2026
fbebc86
type fix and remove console.log statements
mattkime Jan 21, 2026
3d34bd8
swap formatter as to address bundle size problem
mattkime Jan 21, 2026
c163174
swap formatter as to address bundle size problem
mattkime Jan 21, 2026
a46c7e6
cleanup
mattkime Jan 22, 2026
11f1fab
i18n fixes
mattkime Jan 22, 2026
ace72c4
test fixes
mattkime Jan 22, 2026
ee9a91b
show loading errors
mattkime Jan 25, 2026
029b1d8
add tests for displaying errors
mattkime Jan 25, 2026
f269013
remove unused var
mattkime Jan 25, 2026
875417e
cleanup
mattkime Jan 26, 2026
4acd459
address alias use case for rollups
mattkime Jan 26, 2026
fdb6282
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine Jan 26, 2026
b7600ef
remove comment
mattkime Jan 26, 2026
a0bc8ad
Merge branch 'index_mgmt_faster_list_loading' of github.com:elastic/k…
mattkime Jan 26, 2026
8a7cf51
fix rollup enricher
mattkime Jan 27, 2026
2fae497
Merge branch 'main' into index_mgmt_faster_list_loading
mattkime Jan 27, 2026
7afdddd
start get indices request before enricher requests
mattkime Jan 28, 2026
688e1e0
Merge branch 'index_mgmt_faster_list_loading' of github.com:elastic/k…
mattkime Jan 28, 2026
8fca925
cancel requests on reload, centalized catching of errors
mattkime Jan 28, 2026
5e1bebe
update indices tab test
mattkime Jan 28, 2026
9c75013
redue index stats response
mattkime Jan 28, 2026
631d247
address abortError for main index fetch
mattkime Jan 28, 2026
1773baf
move abort signal up one level
mattkime Jan 28, 2026
815dd60
move abort signal up one level
mattkime Jan 28, 2026
3f6400c
switch back to js
mattkime Jan 28, 2026
d57acc7
fix sorting on size
mattkime Jan 29, 2026
471dc0d
type fix
mattkime Jan 29, 2026
fdb5b7e
Merge branch 'main' into index_mgmt_faster_list_loading
mattkime Jan 29, 2026
4c1b97c
type fixes
mattkime Jan 29, 2026
cdc5cff
Merge branch 'index_mgmt_faster_list_loading' of github.com:elastic/k…
mattkime Jan 29, 2026
37b8d1c
test fix?
mattkime Jan 29, 2026
f743327
fix formatting
mattkime Jan 29, 2026
d71c71d
functional test fixes
mattkime Jan 29, 2026
fb195a4
centralize formatter
mattkime Jan 30, 2026
4dc24cb
Changes from node scripts/lint_ts_projects --fix
kibanamachine Jan 30, 2026
939b61b
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine Jan 30, 2026
dec6095
centralize formatter
mattkime Jan 30, 2026
8d04a1c
Merge branch 'index_mgmt_faster_list_loading' of github.com:elastic/k…
mattkime Jan 30, 2026
6e8b099
import fix
mattkime Jan 30, 2026
db62978
import fix
mattkime Jan 30, 2026
14300c8
type changes
mattkime Jan 30, 2026
a4752e7
minor cleanup
mattkime Jan 30, 2026
0327c36
format document count
mattkime Jan 30, 2026
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 @@ -22,6 +22,7 @@ dependsOn:
- '@kbn/utility-types'
- '@kbn/share-plugin'
- '@kbn/management-plugin'
- '@kbn/core'
tags:
- shared-common
- package
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,24 @@ import type { ScopedHistory } from '@kbn/core-application-browser';
import type { SerializableRecord } from '@kbn/utility-types';
import type { LocatorPublic } from '@kbn/share-plugin/public';
import type { ManagementAppMountParams } from '@kbn/management-plugin/public';
import type { HttpSetup } from '@kbn/core/public';
import type { ExtensionsSetup } from './services/extensions_service';
import type { PublicApiServiceSetup } from './services/public_api_service';

export interface EnricherResponse {
source: string;
indices?: Index[];
error?: boolean;
/**
* Apply this enricher's updates to any index aliases
*/
applyToAliases?: boolean;
}
export interface Enricher {
name: string;
fn: (client: HttpSetup, signal: AbortSignal) => Promise<EnricherResponse>;
}

export type IndexManagementLocatorParams = SerializableRecord &
(
| {
Expand Down Expand Up @@ -82,6 +97,9 @@ export interface IndexManagementPluginSetup {
extensionsService: ExtensionsSetup;
renderIndexManagementApp: (params: IndexManagementAppMountParams) => Promise<() => void>;
locator?: IndexManagementLocator;
indexDataEnricher: {
add: (enricher: Enricher) => void;
};
}

export interface IndexManagementPluginStart {
Expand All @@ -104,13 +122,15 @@ export interface IndexManagementPluginStart {
}) => React.FC<DatastreamFlyoutProps>;
}

export interface Index {
export interface Index extends IndexAttributes {
name: string;
}
export interface IndexAttributes {
primary?: number | string;
replica?: number | string;
isFrozen: boolean;
hidden: boolean;
aliases: string | string[];
isFrozen?: boolean;
hidden?: boolean;
aliases?: string | string[];
data_stream?: string;
mode?: string;

Expand All @@ -125,8 +145,8 @@ export interface Index {
status?: IndicesStatsIndexMetadataState;
uuid?: Uuid;
documents?: number;
size?: string;
primary_size?: string;
size?: number;
primary_size?: number;
documents_deleted?: number;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@kbn/core-application-browser",
"@kbn/utility-types",
"@kbn/share-plugin",
"@kbn/management-plugin"
"@kbn/management-plugin",
"@kbn/core"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ dependsOn:
- '@kbn/react-kibana-context-render'
- '@kbn/licensing-types'
- '@kbn/data-views-plugin'
- '@kbn/index-management-shared-types'
tags:
- plugin
- prod
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import type { HttpSetup } from '@kbn/core/public';
import type { CcrFollowInfoResponse } from '@elastic/elasticsearch/lib/api/types';
import type { EnricherResponse } from '@kbn/index-management-shared-types';
import { i18n } from '@kbn/i18n';
const SOURCE = i18n.translate('xpack.crossClusterReplication.ccrDataEnricher.source', {
defaultMessage: 'cross cluster replication',
});

export const ccrDataEnricher = {
name: SOURCE,
fn: async (client: HttpSetup, signal: AbortSignal): Promise<EnricherResponse> =>
client
.get<CcrFollowInfoResponse>('/api/cross_cluster_replication/follower_info', { signal })
.then((response) => {
return {
indices: response.follower_indices.map((followerIndex) => ({
name: followerIndex.follower_index,
isFollowerIndex: true,
})),
source: SOURCE,
};
}),
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import { PLUGIN, MANAGEMENT_ID } from '../common/constants';
import { init as initUiMetric } from './app/services/track_ui_metric';
import { init as initNotification } from './app/services/notifications';
import type { PluginDependencies, ClientConfigType } from './types';
import { ccrDataEnricher } from './ccr_data_enricher';

// @ts-ignore;
import { setHttpClient } from './app/services/api';

export class CrossClusterReplicationPlugin implements Plugin {
Expand Down Expand Up @@ -105,6 +105,7 @@ export class CrossClusterReplicationPlugin implements Plugin {
};

indexManagement.extensionsService.addBadge(followerBadgeExtension);
indexManagement.indexDataEnricher.add(ccrDataEnricher);
}
} else {
ccrApp.disable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { registerPauseRoute } from './register_pause_route';
import { registerResumeRoute } from './register_resume_route';
import { registerUnfollowRoute } from './register_unfollow_route';
import { registerUpdateRoute } from './register_update_route';
import { registerGetFollowerInfoRoute } from './register_get_follower_info';

export function registerFollowerIndexRoutes(dependencies: RouteDependencies) {
registerCreateRoute(dependencies);
Expand All @@ -22,4 +23,5 @@ export function registerFollowerIndexRoutes(dependencies: RouteDependencies) {
registerResumeRoute(dependencies);
registerUnfollowRoute(dependencies);
registerUpdateRoute(dependencies);
registerGetFollowerInfoRoute(dependencies);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { addBasePath } from '../../../services';
import type { RouteDependencies } from '../../../types';

export const registerGetFollowerInfoRoute = ({
router,
license,
lib: { handleEsError },
}: RouteDependencies) => {
router.get(
{
path: addBasePath('/follower_info'),
security: {
authz: {
enabled: false,
reason: 'Relies on es client for authorization',
},
},
validate: {},
},
license.guardApiRoute(async (context, request, response) => {
const { client } = (await context.core).elasticsearch;

try {
const body = await client.asCurrentUser.ccr.followInfo({
index: '_all',
});

return response.ok({
body,
});
} catch (error) {
return handleEsError({ error, response });
}
})
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@kbn/react-kibana-context-render",
"@kbn/licensing-types",
"@kbn/data-views-plugin",
"@kbn/index-management-shared-types",
],
"exclude": [
"target/**/*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { useEuiTheme } from '@elastic/eui';
import { screen, waitFor } from '@testing-library/react';
import { renderWithI18n } from '@kbn/test-jest-helpers';
import { usageCollectionPluginMock } from '@kbn/usage-collection-plugin/public/mocks';
import type { Index } from '@kbn/index-management-plugin/common';
import type { Index } from '../common/types';

import { init } from '../integration_tests/helpers/http_requests';
import {
Expand Down Expand Up @@ -66,8 +66,8 @@ const indexWithoutLifecyclePolicy: Index = {
replica: 1,
documents: 1,
documents_deleted: 0,
size: '3.4kb',
primary_size: '3.4kb',
size: 3480,
primary_size: 3480,
aliases: 'none',
isFrozen: false,
hidden: false,
Expand All @@ -86,8 +86,8 @@ const indexWithLifecyclePolicy: Index = {
replica: 1,
documents: 2,
documents_deleted: 0,
size: '6.5kb',
primary_size: '6.5kb',
size: 6656,
primary_size: 6656,
aliases: 'none',
isFrozen: false,
hidden: false,
Expand Down Expand Up @@ -115,8 +115,8 @@ const indexWithLifecycleError: Index = {
replica: 1,
documents: 2,
documents_deleted: 0,
size: '6.5kb',
primary_size: '6.5kb',
size: 6656,
primary_size: 6656,
aliases: 'none',
isFrozen: false,
hidden: false,
Expand Down Expand Up @@ -148,8 +148,8 @@ const indexWithLifecyclePhaseDefinition: Index = {
replica: 1,
documents: 2,
documents_deleted: 0,
size: '6.5kb',
primary_size: '6.5kb',
size: 6656,
primary_size: 6656,
aliases: 'none',
isFrozen: false,
hidden: false,
Expand Down Expand Up @@ -182,8 +182,8 @@ const indexWithLifecycleWaitingStep: Index = {
replica: 1,
documents: 2,
documents_deleted: 0,
size: '6.5kb',
primary_size: '6.5kb',
size: 6656,
primary_size: 6656,
aliases: 'none',
isFrozen: false,
hidden: false,
Expand Down Expand Up @@ -216,8 +216,8 @@ const indexWithNonExistentPolicyError: Index = {
replica: 1,
documents: 2,
documents_deleted: 0,
size: '6.5kb',
primary_size: '6.5kb',
size: 6656,
primary_size: 6656,
aliases: 'none',
isFrozen: false,
hidden: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export type * from './api';

export * from '@kbn/index-lifecycle-management-common-shared';

export type { Index } from '@kbn/index-management-plugin/common';

/**
* These roles reflect how nodes are stratified into different data tiers.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
htmlIdGenerator,
} from '@elastic/eui';

import type { Index } from '@kbn/index-management-plugin/common';
import type { Index } from '../../../common/types';
import { loadPolicies, addLifecyclePolicyToIndex } from '../../application/services/api';
import { showApiError } from '../../application/services/api_errors';
import { toasts } from '../../application/services/notification';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ import {
} from '@elastic/eui';

import type { ApplicationStart } from '@kbn/core/public';
import type { Index, IndexDetailsTab } from '@kbn/index-management-shared-types';
import type { IndexDetailsTab } from '@kbn/index-management-shared-types';
import type { IlmExplainLifecycleLifecycleExplainManaged } from '@elastic/elasticsearch/lib/api/types';
import type { Index } from '../../../common/types';
import type { Phase } from '../../../common/types';
import { getPolicyEditPath } from '../../application/services/navigation';
import { usePhaseColors } from '../../application/lib';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import { i18n } from '@kbn/i18n';
import { EuiSearchBar } from '@elastic/eui';
import type { ApplicationStart } from '@kbn/core/public';

import type { Index, IndexManagementPluginSetup } from '@kbn/index-management-plugin/public';
import type { IndexManagementPluginSetup } from '@kbn/index-management-plugin/public';
import type { Index } from '../../common/types';

import { retryLifecycleForIndex } from '../application/services/api';
import { indexLifecycleTab } from './components/index_lifecycle_summary';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import type { IlmExplainLifecycleResponse } from '@elastic/elasticsearch/lib/api/types';
import type { HttpSetup } from '@kbn/core/public';
import type { EnricherResponse } from '@kbn/index-management-shared-types';
import { i18n } from '@kbn/i18n';
const SOURCE = i18n.translate('xpack.indexLifecycleMgmt.indexLifecycleDataEnricher.source', {
defaultMessage: 'index lifecycle',
});

export const indexLifecycleDataEnricher = {
name: SOURCE,
fn: async (client: HttpSetup, signal: AbortSignal): Promise<EnricherResponse> =>
client
.get<IlmExplainLifecycleResponse>('/api/index_lifecycle_management/explain', { signal })
.then((response) => {
return {
indices: Object.keys(response.indices).map((index) => ({
name: index,
ilm: response.indices[index],
})),
source: SOURCE,
};
}),
};
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import type {
StartDependencies,
} from './types';
import { IlmLocatorDefinition } from './locator';
import { indexLifecycleDataEnricher } from './index_lifecycle_data_enricher';
import { PublicApiService } from './services';

export class IndexLifecycleManagementPlugin
Expand Down Expand Up @@ -115,6 +116,7 @@ export class IndexLifecycleManagementPlugin

if (indexManagement) {
addAllExtensions(indexManagement.extensionsService);
indexManagement.indexDataEnricher.add(indexLifecycleDataEnricher);
}

plugins.share.url.locators.create(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ import type { RouteDependencies } from '../../../types';
import { registerFetchRoute } from './register_fetch_route';
import { registerCreateRoute } from './register_create_route';
import { registerDeleteRoute } from './register_delete_route';
import { registerExplainRoute } from './register_explain_route';

export function registerPoliciesRoutes(dependencies: RouteDependencies) {
registerFetchRoute(dependencies);
registerCreateRoute(dependencies);
registerDeleteRoute(dependencies);
registerExplainRoute(dependencies);
}
Loading
Loading