Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion .buildkite/ftr_search_serverless_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ disabled:
defaultQueue: 'n2-4-spot'
enabled:
- x-pack/solutions/search/test/serverless/api_integration/configs/config.ts
- x-pack/solutions/search/test/serverless/api_integration/configs/config.feature_flags.ts
- x-pack/solutions/search/test/serverless/functional/configs/config.ts
- x-pack/solutions/search/test/serverless/functional/configs/config.search_features.ts
- x-pack/solutions/search/test/serverless/functional/configs/config.feature_flags.ts
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ pageLoadAssetSize:
searchHomepage: 9005
searchIndices: 9991
searchInferenceEndpoints: 9400
searchNavigation: 8308
searchNavigation: 8900
searchNotebooks: 18826
searchPlayground: 12122
searchprofiler: 6509
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ export const applicationUsageSchema = {
searchSynonyms: commonSchema,
searchQueryRules: commonSchema,
elasticConsole: commonSchema,
elasticsearchIndices: commonSchema,
elasticsearchIndexManagement: commonSchema,
enterpriseSearchAnalytics: commonSchema,
enterpriseSearchApplications: commonSchema,
Expand Down
131 changes: 0 additions & 131 deletions src/platform/plugins/shared/telemetry/schema/oss_platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -2884,137 +2884,6 @@
}
}
},
"elasticsearchIndices": {
"properties": {
"appId": {
"type": "keyword",
"_meta": {
"description": "The application being tracked"
}
},
"viewId": {
"type": "keyword",
"_meta": {
"description": "Always `main`"
}
},
"clicks_total": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application since we started counting them"
}
},
"clicks_7_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 7 days"
}
},
"clicks_30_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 30 days"
}
},
"clicks_90_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 90 days"
}
},
"minutes_on_screen_total": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen since we started counting them."
}
},
"minutes_on_screen_7_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 7 days"
}
},
"minutes_on_screen_30_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 30 days"
}
},
"minutes_on_screen_90_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 90 days"
}
},
"views": {
"type": "array",
"items": {
"properties": {
"appId": {
"type": "keyword",
"_meta": {
"description": "The application being tracked"
}
},
"viewId": {
"type": "keyword",
"_meta": {
"description": "The application view being tracked"
}
},
"clicks_total": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application sub view since we started counting them"
}
},
"clicks_7_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 7 days"
}
},
"clicks_30_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 30 days"
}
},
"clicks_90_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 90 days"
}
},
"minutes_on_screen_total": {
"type": "float",
"_meta": {
"description": "Minutes the application sub view is active and on-screen since we started counting them."
}
},
"minutes_on_screen_7_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 7 days"
}
},
"minutes_on_screen_30_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 30 days"
}
},
"minutes_on_screen_90_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 90 days"
}
}
}
}
}
}
},
"elasticsearchIndexManagement": {
"properties": {
"appId": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ export interface IndexBadge {
filterExpression?: string;
color: EuiBadgeProps['color'];
}
export interface IndexDetailsPageRoute {
renderRoute: (indexName: string, detailsTabId?: string) => string;
}

export interface EmptyListContent {
renderContent: (args: {
Expand Down Expand Up @@ -69,6 +66,4 @@ export interface ExtensionsSetup {
addIndexDetailsTab(tab: IndexDetailsTab): void;
// sets content to render instead of the code block on the overview tab of the index page
setIndexOverviewContent(content: IndexContent): void;
// sets index details page route
setIndexDetailsPageRoute(route: IndexDetailsPageRoute, detailsTabId?: string): void;
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ export type IndexManagementLocatorParams = SerializableRecord &
page: 'create_component_template';
componentTemplate: string;
}
| {
page: 'index_details';
indexName: string;
tab?: string;
}
);

export type IndexManagementLocator = LocatorPublic<IndexManagementLocatorParams>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31293,8 +31293,6 @@
"xpack.searchIndices.connectionDetails.endpointTitle": "Elasticsearch-URL",
"xpack.searchIndices.createIndex.docTitle": "Index erstellen",
"xpack.searchIndices.documentsTabLabel": "Daten",
"xpack.searchIndices.elasticsearchIndices.createIndexTitle": "Index erstellen",
"xpack.searchIndices.elasticsearchIndices.startAppTitle": "Elasticsearch-Indizes",
"xpack.searchIndices.guideSelectors.selectGuideTitle": "Wählen Sie einen Workflow-Leitfaden aus",
"xpack.searchIndices.indexAction.ApiReferenceButtonLabel": "API-Referenz",
"xpack.searchIndices.indexAction.useInPlaygroundButtonLabel": "Im Playground suchen",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31628,8 +31628,6 @@
"xpack.searchIndices.connectionDetails.endpointTitle": "URL Elasticsearch",
"xpack.searchIndices.createIndex.docTitle": "Créer un index",
"xpack.searchIndices.documentsTabLabel": "Données",
"xpack.searchIndices.elasticsearchIndices.createIndexTitle": "Créer un index",
"xpack.searchIndices.elasticsearchIndices.startAppTitle": "Index Elasticsearch",
"xpack.searchIndices.guideSelectors.selectGuideTitle": "Sélectionner un guide de workflow",
"xpack.searchIndices.indexAction.ApiReferenceButtonLabel": "Référence d'API",
"xpack.searchIndices.indexAction.useInPlaygroundButtonLabel": "Rechercher dans Playground",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31686,8 +31686,6 @@
"xpack.searchIndices.connectionDetails.endpointTitle": "Elasticsearch URL",
"xpack.searchIndices.createIndex.docTitle": "インデックスの作成",
"xpack.searchIndices.documentsTabLabel": "データ",
"xpack.searchIndices.elasticsearchIndices.createIndexTitle": "インデックスの作成",
"xpack.searchIndices.elasticsearchIndices.startAppTitle": "Elasticsearchインデックス",
"xpack.searchIndices.guideSelectors.selectGuideTitle": "ワークフローガイドを選択",
"xpack.searchIndices.indexAction.ApiReferenceButtonLabel": "API参照",
"xpack.searchIndices.indexAction.useInPlaygroundButtonLabel": "Playgroundで検索",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31666,8 +31666,6 @@
"xpack.searchIndices.connectionDetails.endpointTitle": "Elasticsearch URL",
"xpack.searchIndices.createIndex.docTitle": "创建索引",
"xpack.searchIndices.documentsTabLabel": "数据",
"xpack.searchIndices.elasticsearchIndices.createIndexTitle": "创建索引",
"xpack.searchIndices.elasticsearchIndices.startAppTitle": "Elasticsearch 索引",
"xpack.searchIndices.guideSelectors.selectGuideTitle": "选择工作流指南",
"xpack.searchIndices.indexAction.ApiReferenceButtonLabel": "API 参考",
"xpack.searchIndices.indexAction.useInPlaygroundButtonLabel": "在 Playground 中搜索",
Expand Down
2 changes: 0 additions & 2 deletions x-pack/platform/plugins/shared/index_management/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ export interface EmptyListContent {
}) => ReturnType<FunctionComponent>;
}
```
- `setIndexDetailsPageRoute`: registers a new route for index details page in indices list table. For example, for serverless search users, navigating to an index on the indices list page will lead to the Search Indices detail page.


#### Extensions to the indices list and the index details page
- `addAction(action: any)`: adds an option to the "manage index" menu, for example to add an ILM policy to the index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
import React from 'react';
import { screen, fireEvent, waitFor } from '@testing-library/react';
import { applicationServiceMock, httpServiceMock } from '@kbn/core/public/mocks';
import { httpServiceMock } from '@kbn/core/public/mocks';

import type { Index } from '../../../common';
import { API_BASE_PATH, INTERNAL_API_BASE_PATH } from '../../../common';
Expand Down Expand Up @@ -121,21 +121,15 @@ describe('<IndexManagementHome />', () => {
createNonDataStreamIndex(indexName)
);

const application = applicationServiceMock.createStartContract();
await renderHome(httpSetup, {
appServicesContext: {
core: { application },
},
});
await renderHome(httpSetup);

await screen.findByTestId('indexTable');

const tableActions = createIndexTableActions();
await tableActions.clickIndexNameAt(0);

expect(application.navigateToUrl).toHaveBeenCalledWith(
'/app/management/data/index_management/indices/index_details?indexName=testIndex&includeHiddenIndices=true'
);
await screen.findByTestId('indexDetailsHeader');
expect(screen.getByTestId('indexDetailsHeader')).toBeInTheDocument();
});

it('index page works with % character in index name', async () => {
Expand All @@ -146,20 +140,18 @@ describe('<IndexManagementHome />', () => {
createNonDataStreamIndex(indexName)
);

const application = applicationServiceMock.createStartContract();
await renderHome(httpSetup, {
appServicesContext: {
core: { application },
},
});
await renderHome(httpSetup);

await screen.findByTestId('indexTable');

const tableActions = createIndexTableActions();
await tableActions.clickIndexNameAt(0);

expect(application.navigateToUrl).toHaveBeenCalledWith(
'/app/management/data/index_management/indices/index_details?indexName=test%25&includeHiddenIndices=true'
await screen.findByTestId('indexDetailsHeader');
expect(screen.getByTestId('indexDetailsHeader')).toBeInTheDocument();
expect(httpSetup.get).toHaveBeenCalledWith(
`${INTERNAL_API_BASE_PATH}/indices/${encodeURIComponent(indexName)}`,
expect.anything()
);
});

Expand Down Expand Up @@ -588,42 +580,6 @@ describe('<IndexManagementHome />', () => {
expect(screen.getByText('ILM managed')).toBeInTheDocument();
});

it('renders to search_indices index details page', async () => {
const indexName = 'search-index';
httpRequestsMockHelpers.setLoadIndicesResponse([createNonDataStreamIndex(indexName)]);
httpRequestsMockHelpers.setLoadIndexDetailsResponse(
indexName,
createNonDataStreamIndex(indexName)
);

const navigateToUrl = jest.fn();
const url = `/app/elasticsearch/indices/index_details/${indexName}`;
await renderHome(httpSetup, {
appServicesContext: {
core: {
application: { navigateToUrl },
},
services: {
extensionsService: {
_indexDetailsPageRoute: {
renderRoute: () => {
return url;
},
},
},
},
},
});

await screen.findByTestId('indexTable');

const tableActions = createIndexTableActions();
await tableActions.clickIndexNameAt(0);

expect(navigateToUrl).toHaveBeenCalledTimes(1);
expect(navigateToUrl).toHaveBeenCalledWith(url);
});

it('applies enricher updates to indices via alias when applyToAliases is true', async () => {
const indexName = 'concrete-index';
const aliasName = 'my-alias';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ import { FormattedMessage } from '@kbn/i18n-react';
import type { SharePluginStart } from '@kbn/share-plugin/public';
import { EuiButton } from '@elastic/eui';

import useObservable from 'react-use/lib/useObservable';
import { CreateIndexModal } from './create_index_modal';
import { useAppContext } from '../../../../app_context';

export interface CreateIndexButtonProps {
loadIndices: () => void;
Expand All @@ -21,18 +19,7 @@ export interface CreateIndexButtonProps {
}

export const CreateIndexButton = ({ loadIndices, share, dataTestSubj }: CreateIndexButtonProps) => {
const {
core: { chrome },
} = useAppContext();
const [createIndexModalOpen, setCreateIndexModalOpen] = useState<boolean>(false);
const createIndexUrl = share?.url.locators.get('SEARCH_CREATE_INDEX')?.useUrl({});

const activeSolutionId = useObservable(chrome.getActiveSolutionNavId$());

const actionProp =
createIndexUrl && activeSolutionId === 'es'
? { href: createIndexUrl }
: { onClick: () => setCreateIndexModalOpen(true) };

return (
<>
Expand All @@ -42,7 +29,7 @@ export const CreateIndexButton = ({ loadIndices, share, dataTestSubj }: CreateIn
key="createIndexButton"
data-test-subj={dataTestSubj || 'createIndexButton'}
data-telemetry-id="idxMgmt-indexList-createIndexButton"
{...actionProp}
onClick={() => setCreateIndexModalOpen(true)}
>
<FormattedMessage
id="xpack.idxMgmt.indexTable.createIndexButton"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export const CreateIndexModal = ({ closeModal, loadIndices }: CreateIndexModalPr
</EuiFlexGroup>
</EuiFlexGroup>
{showApi && (
<EuiCodeBlock language="json" isCopyable>
<EuiCodeBlock language="json" isCopyable data-test-subj="createIndexApiCodeBlock">
{apiCode}
</EuiCodeBlock>
)}
Expand Down
Loading
Loading