Skip to content

Commit

Permalink
feat: make search relevance visible in first level of all use case (#416
Browse files Browse the repository at this point in the history
) (#418)

(cherry picked from commit 8744214)

Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and github-actions[bot] authored Jul 30, 2024
1 parent ab629e0 commit 9de91b1
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions public/plugin_nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* SPDX-License-Identifier: Apache-2.0
*/

import { i18n } from '@osd/i18n';
import { CoreSetup } from '../../../src/core/public';
import { SearchRelevancePluginSetup } from './types';
import { PLUGIN_ID } from '../common';
import { DEFAULT_NAV_GROUPS, DEFAULT_APP_CATEGORIES, AppCategory } from '../../../src/core/public';
import { i18n } from "@osd/i18n";
import { DEFAULT_NAV_GROUPS, AppCategory } from '../../../src/core/public';

const searchRelevance_category: Record<string, AppCategory & { group?: AppCategory }> = {
evaluateSearch: {
Expand All @@ -19,11 +19,20 @@ const searchRelevance_category: Record<string, AppCategory & { group?: AppCatego
},
};

const titleForSearchRelevance = i18n.translate(
'plugins.dashboards_search_relevance.nav.title.label',
{
defaultMessage: 'Compare search results',
}
);

export function registerAllPluginNavGroups(core: CoreSetup<SearchRelevancePluginSetup>) {
core.chrome.navGroup.addNavLinksToGroup(DEFAULT_NAV_GROUPS.search, [
{
id: PLUGIN_ID,
category: searchRelevance_category.evaluateSearch,//change to Evaluate Search
title: titleForSearchRelevance,
showInAllNavGroup: true
},
]);
}

0 comments on commit 9de91b1

Please sign in to comment.