Skip to content

Commit

Permalink
fix: two "Overview"s under library section (#94)
Browse files Browse the repository at this point in the history
* rename the second overview in library category to all library objects

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

* change id from objects_overview to objects_all

Signed-off-by: yuye-aws <yuyezhu@amazon.com>

---------

Signed-off-by: yuye-aws <yuyezhu@amazon.com>
  • Loading branch information
yuye-aws authored and ruanyl committed Sep 15, 2023
1 parent 3fde67a commit a7fbb39
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
16 changes: 13 additions & 3 deletions src/plugins/saved_objects_management/public/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,19 @@

import { i18n } from '@osd/i18n';

export const LIBRARY_OVERVIEW_WORDINGS = i18n.translate('savedObjectsManagement.libraryOverview', {
defaultMessage: 'Overview',
});
export const ALL_LIBRARY_OBJECTS_WORDINGS = i18n.translate(
'savedObjectsManagement.allLibraryObjects',
{
defaultMessage: 'All library objects',
}
);

export const ALL_LIBRARY_OBJECTS_TITLE_WORDINGS = i18n.translate(
'savedObjectsManagement.objectsTable.header.allLibraryObjectsTitle',
{
defaultMessage: 'Library objects in Analytics',
}
);

export const SAVED_OBJECT_MANAGEMENT_TITLE_WORDINGS = i18n.translate(
'savedObjectsManagement.objectsTable.header.savedObjectsTitle',
Expand Down
9 changes: 5 additions & 4 deletions src/plugins/saved_objects_management/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ import { registerServices } from './register_services';
import { bootstrap } from './ui_actions_bootstrap';
import { DEFAULT_APP_CATEGORIES } from '../../../core/public';
import {
LIBRARY_OVERVIEW_WORDINGS,
ALL_LIBRARY_OBJECTS_TITLE_WORDINGS,
ALL_LIBRARY_OBJECTS_WORDINGS,
SAVED_OBJECT_MANAGEMENT_TITLE_WORDINGS,
SAVED_QUERIES_WORDINGS,
SAVED_SEARCHES_WORDINGS,
Expand Down Expand Up @@ -132,14 +133,14 @@ export class SavedObjectsManagementPlugin
* Register saved objects overview & saved search & saved query here
*/
core.application.register({
id: 'objects_overview',
id: 'objects_all',
appRoute: '/app/objects',
exactRoute: true,
title: LIBRARY_OVERVIEW_WORDINGS,
title: ALL_LIBRARY_OBJECTS_WORDINGS,
order: 10000,
category: DEFAULT_APP_CATEGORIES.opensearchDashboards,
mount: mountWrapper({
title: SAVED_OBJECT_MANAGEMENT_TITLE_WORDINGS,
title: ALL_LIBRARY_OBJECTS_TITLE_WORDINGS,
}),
});

Expand Down

0 comments on commit a7fbb39

Please sign in to comment.