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

[Onboarding] Stack - update index management breadcrumbs #209599

Open
wants to merge 53 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
60b517a
update index management breadcrumb
saarikabhasi Jan 24, 2025
858d4d5
add index name for stack solution nav
saarikabhasi Jan 28, 2025
2ce55e3
fix serverless version breadcrumb
saarikabhasi Jan 31, 2025
e47735c
clean up
saarikabhasi Jan 31, 2025
42e6684
update FTR
saarikabhasi Feb 4, 2025
6cf92e2
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Feb 4, 2025
82b297c
fix ci & clean up
saarikabhasi Feb 4, 2025
2e22912
fix conflicts
saarikabhasi Feb 4, 2025
d61d6ba
revert unintended change
saarikabhasi Feb 4, 2025
4816549
Clean ups
saarikabhasi Feb 4, 2025
950958c
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Feb 4, 2025
fa25cc6
remove indexName
saarikabhasi Feb 4, 2025
59d38f9
Merge branch 'onboarding/update-breadcrumbs-indexmanagement' of githu…
saarikabhasi Feb 4, 2025
c6b44b7
Merge branch 'main' into onboarding/update-breadcrumbs-indexmanagement
saarikabhasi Feb 5, 2025
2c60095
fix ci error
saarikabhasi Feb 5, 2025
c5798f1
Merge branch 'onboarding/update-breadcrumbs-indexmanagement' of githu…
saarikabhasi Feb 5, 2025
0972fc7
address feedback and update FTR tests navigate to details page
saarikabhasi Feb 6, 2025
0d998b6
move index management to separate file & fix ci
saarikabhasi Feb 6, 2025
5e0e326
move index management tests from classic nav to index mgmt file
saarikabhasi Feb 6, 2025
ed10b5b
Merge branch 'main' into onboarding/update-breadcrumbs-indexmanagement
saarikabhasi Feb 6, 2025
7c815fc
add new variable to the setBreadcrumb
saarikabhasi Feb 9, 2025
791100a
Merge branch 'onboarding/update-breadcrumbs-indexmanagement' of githu…
saarikabhasi Feb 10, 2025
50b2744
update i18n_check
saarikabhasi Feb 11, 2025
8732bca
Merge branch 'main' into onboarding/update-breadcrumbs-indexmanagement
saarikabhasi Feb 11, 2025
0f4ea73
update FTR for search_sidenav
saarikabhasi Feb 11, 2025
e5db3a6
Revert "update i18n_check"
saarikabhasi Feb 26, 2025
d02b185
Merge branch 'main' of github.com:elastic/kibana into onboarding/upda…
saarikabhasi Feb 26, 2025
85a0292
initial commit use index management to search_indices
saarikabhasi Feb 21, 2025
331dd2c
add deeplinks, update nav tree, update search_indices plugin
saarikabhasi Feb 23, 2025
914504b
fix breadcrumbs to work for serverless & stack
saarikabhasi Feb 25, 2025
d10e94a
delete unused files, clean up types
saarikabhasi Feb 25, 2025
4b38e69
fix breadcrumbs for serverless search
saarikabhasi Feb 25, 2025
c07063d
fix tests
saarikabhasi Feb 26, 2025
e8cfe17
fix types & eslint
saarikabhasi Feb 27, 2025
d8b1abb
remove unrelated changes
saarikabhasi Feb 27, 2025
0a84fed
[CI] Auto-commit changed files from 'node scripts/notice'
kibanamachine Feb 27, 2025
1d428ca
remove commented lines from solution_nav ftr
saarikabhasi Feb 27, 2025
b5ed052
fix ftrs for failing kibana CI
saarikabhasi Feb 27, 2025
3c08dc0
[CI] Auto-commit changed files from 'node scripts/telemetry_check'
kibanamachine Feb 27, 2025
27e157e
fix FTR search side nav
saarikabhasi Feb 28, 2025
5c959d8
Merge branch 'onboarding/update-breadcrumbs-indexmanagement' of githu…
saarikabhasi Feb 28, 2025
e601ab1
Merge branch 'main' into onboarding/update-breadcrumbs-indexmanagement
saarikabhasi Feb 28, 2025
8c53c2e
fix unmount index management app
saarikabhasi Mar 3, 2025
37fa6a1
Merge branch 'onboarding/update-breadcrumbs-indexmanagement' of githu…
saarikabhasi Mar 3, 2025
bc98ff9
Merge branch 'main' into onboarding/update-breadcrumbs-indexmanagement
saarikabhasi Mar 3, 2025
511b5de
clean up
saarikabhasi Mar 3, 2025
b799e10
FTR: add breadcrumbs check for stack
saarikabhasi Mar 3, 2025
4b12666
Merge branch 'onboarding/update-breadcrumbs-indexmanagement' of githu…
saarikabhasi Mar 3, 2025
d6871b8
Merge branch 'main' into onboarding/update-breadcrumbs-indexmanagement
saarikabhasi Mar 4, 2025
8dd3104
create subset type of ManagementAppMountParams
saarikabhasi Mar 5, 2025
31b8741
Merge branch 'onboarding/update-breadcrumbs-indexmanagement' of githu…
saarikabhasi Mar 5, 2025
0c79895
[CI] Auto-commit changed files from 'node scripts/notice'
kibanamachine Mar 5, 2025
069e381
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Mar 5, 2025
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 @@ -20,6 +20,7 @@ export const ES_SEARCH_SYNONYMS_ID = 'searchSynonyms';
export const SEARCH_HOMEPAGE = 'searchHomepage';
export const SEARCH_INDICES_START = 'elasticsearchStart';
export const SEARCH_INDICES = 'elasticsearchIndices';
export const SEARCH_INDEX_MANAGEMENT = 'elasticsearchIndexManagement';
export const SEARCH_ELASTICSEARCH = 'enterpriseSearchElasticsearch';
export const SEARCH_VECTOR_SEARCH = 'enterpriseSearchVectorSearch';
export const SEARCH_SEMANTIC_SEARCH = 'enterpriseSearchSemanticSearch';
Expand Down
3 changes: 3 additions & 0 deletions src/platform/packages/shared/deeplinks/search/deep_links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
SEARCH_SEMANTIC_SEARCH,
SEARCH_AI_SEARCH,
ES_SEARCH_SYNONYMS_ID,
SEARCH_INDEX_MANAGEMENT,
} from './constants';

export type EnterpriseSearchApp = typeof ENTERPRISE_SEARCH_APP_ID;
Expand All @@ -41,6 +42,7 @@ export type SearchSynonymsId = typeof ES_SEARCH_SYNONYMS_ID;
export type SearchHomepage = typeof SEARCH_HOMEPAGE;
export type SearchStart = typeof SEARCH_INDICES_START;
export type SearchIndices = typeof SEARCH_INDICES;
export type SearchIndexManagement = typeof SEARCH_INDEX_MANAGEMENT;
export type SearchElasticsearch = typeof SEARCH_ELASTICSEARCH;
export type SearchVectorSearch = typeof SEARCH_VECTOR_SEARCH;
export type SearchSemanticSearch = typeof SEARCH_SEMANTIC_SEARCH;
Expand Down Expand Up @@ -74,6 +76,7 @@ export type DeepLinkId =
| `${SearchSynonymsId}:${SynonymsLinkId}`
| SearchStart
| SearchIndices
| SearchIndexManagement
| SearchElasticsearch
| SearchVectorSearch
| SearchSemanticSearch
Expand Down
1 change: 1 addition & 0 deletions src/platform/packages/shared/deeplinks/search/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export {
ES_SEARCH_PLAYGROUND_ID,
SEARCH_INDICES_START,
SEARCH_INDICES,
SEARCH_INDEX_MANAGEMENT,
} from './constants';

export type {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export const applicationUsageSchema = {
searchPlayground: commonSchema,
elasticsearchIndices: commonSchema,
elasticsearchStart: commonSchema,
elasticsearchIndexManagement: commonSchema,
enterpriseSearchAnalytics: commonSchema,
enterpriseSearchApplications: commonSchema,
enterpriseSearchAISearch: commonSchema,
Expand Down
131 changes: 131 additions & 0 deletions src/platform/plugins/shared/telemetry/schema/oss_platform.json
Original file line number Diff line number Diff line change
Expand Up @@ -2622,6 +2622,137 @@
}
}
},
"elasticsearchIndexManagement": {
"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"
}
}
}
}
}
}
},
"enterpriseSearchAnalytics": {
"properties": {
"appId": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
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 { ExtensionsSetup } from './services/extensions_service';
import { PublicApiServiceSetup } from './services/public_api_service';

Expand All @@ -35,9 +36,14 @@ export type IndexManagementLocatorParams = SerializableRecord &

export type IndexManagementLocator = LocatorPublic<IndexManagementLocatorParams>;

export type IndexManagementAppMountParams = Pick<
Copy link
Contributor

Choose a reason for hiding this comment

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

Perfect! I was really confused previously about how in one situation one set of params would work and another one would need a different set of params.

ManagementAppMountParams,
'element' | 'setBreadcrumbs' | 'history'
>;
export interface IndexManagementPluginSetup {
apiService: PublicApiServiceSetup;
extensionsService: ExtensionsSetup;
indexManagementApp: (params: IndexManagementAppMountParams) => Promise<() => void>;
locator?: IndexManagementLocator;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
"@kbn/core-application-browser",
"@kbn/utility-types",
"@kbn/share-plugin",
"@kbn/management-plugin"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import '../index.scss';
import { i18n } from '@kbn/i18n';
import SemVer from 'semver/classes/semver';
import { CoreSetup, CoreStart, ScopedHistory } from '@kbn/core/public';
import { ManagementAppMountParams } from '@kbn/management-plugin/public';
import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public';
import { CloudSetup } from '@kbn/cloud-plugin/public';
import { IndexManagementAppMountParams } from '@kbn/index-management-shared-types';
import { UIM_APP_NAME } from '../../common/constants';
import { PLUGIN } from '../../common/constants/plugin';
import { AppDependencies } from './app_context';
Expand Down Expand Up @@ -129,7 +129,7 @@ export async function mountManagementSection({
}: {
coreSetup: CoreSetup<StartDependencies>;
usageCollection: UsageCollectionSetup;
params: ManagementAppMountParams;
params: IndexManagementAppMountParams;
extensionsService: ExtensionsService;
isFleetEnabled: boolean;
kibanaVersion: SemVer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ import {
IndexManagementPluginSetup,
IndexManagementPluginStart,
} from '@kbn/index-management-shared-types';
import { IndexManagementLocator } from '@kbn/index-management-shared-types';
import {
IndexManagementLocator,
IndexManagementAppMountParams,
} from '@kbn/index-management-shared-types';
import { Subscription } from 'rxjs';
import { setExtensionsService } from './application/store/selectors/extension_service';
import { ExtensionsService } from './services/extensions_service';
Expand Down Expand Up @@ -144,6 +147,20 @@ export class IndexMgmtUIPlugin
return {
apiService: new PublicApiService(coreSetup.http),
extensionsService: this.extensionsService.setup(),
indexManagementApp: async (params: IndexManagementAppMountParams) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

lets call this renderIndexManagementApp

const { mountManagementSection } = await import('./application/mount_management_section');
return mountManagementSection({
coreSetup,
usageCollection,
params,
extensionsService: this.extensionsService,
isFleetEnabled: Boolean(fleet),
kibanaVersion: this.kibanaVersion,
config: this.config,
cloud,
canUseSyntheticSource: this.canUseSyntheticSource,
});
},
locator: this.locator,
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,14 @@ export const getNavigationTreeDefinition = ({
{
children: [
{
breadcrumbStatus:
'hidden' /* management sub-pages set their breadcrumbs themselves */,
getIsActive: ({ pathNameSerialized, prepend }) => {
return (
pathNameSerialized.startsWith(
prepend('/app/management/data/index_management/')
prepend('/app/elasticsearch/index_management/indices')
) || pathNameSerialized.startsWith(prepend('/app/elasticsearch/indices'))
);
},
link: 'management:index_management',
link: 'elasticsearchIndexManagement',
},
{ link: 'enterpriseSearchContent:connectors' },
{ link: 'enterpriseSearchContent:webCrawlers' },
Expand Down
14 changes: 11 additions & 3 deletions x-pack/solutions/search/plugins/search_indices/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@
* 2.0.
*/

import type { SearchIndices, SearchStart } from '@kbn/deeplinks-search/deep_links';
import { SEARCH_INDICES, SEARCH_INDICES_START } from '@kbn/deeplinks-search';
import type {
SearchIndices,
SearchStart,
SearchIndexManagement,
} from '@kbn/deeplinks-search/deep_links';
import {
SEARCH_INDICES,
SEARCH_INDICES_START,
SEARCH_INDEX_MANAGEMENT,
} from '@kbn/deeplinks-search';

export const PLUGIN_ID = 'searchIndices';
export const PLUGIN_NAME = 'searchIndices';
export const START_APP_ID: SearchStart = SEARCH_INDICES_START;
export const INDICES_APP_ID: SearchIndices = SEARCH_INDICES;

export const SEARCH_INDEX_MANAGEMENT_APP_ID: SearchIndexManagement = SEARCH_INDEX_MANAGEMENT;
export type { IndicesStatusResponse, UserStartPrivilegesResponse } from './types';
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const CreateIndex = ({ indicesData }: CreateIndexProps) => {
[usageTracker, formState, setFormState]
);
const onClose = useCallback(() => {
application.navigateToApp('management', { deepLinkId: 'index_management' });
application.navigateToApp('elasticsearchIndexManagement');
}, [application]);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ export const CreateIndexPage = () => {
() => (consolePlugin?.EmbeddableConsole ? <consolePlugin.EmbeddableConsole /> : null),
[consolePlugin]
);
usePageChrome(CreateIndexLabel, [...IndexManagementBreadcrumbs, { text: CreateIndexLabel }]);
usePageChrome(CreateIndexLabel, [
...IndexManagementBreadcrumbs(),
{
text: CreateIndexLabel,
},
]);

return (
<KibanaPageTemplate
Expand Down
Loading