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
)

Signed-off-by: SuZhou-Joe <suzhou@amazon.com>
  • Loading branch information
SuZhou-Joe committed Jul 30, 2024
1 parent b521e37 commit 8744214
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 8744214

Please sign in to comment.