Skip to content

Commit

Permalink
Fix template registration import error (#21)
Browse files Browse the repository at this point in the history
* fix import error

Signed-off-by: Hailong Cui <ihailong@amazon.com>

* fix osd bootstrap failure

Signed-off-by: Hailong Cui <ihailong@amazon.com>

---------

Signed-off-by: Hailong Cui <ihailong@amazon.com>
  • Loading branch information
Hailong-am authored and SuZhou-Joe committed Jul 19, 2023
1 parent ef718c5 commit 9cc2dee
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/core/public/chrome/chrome_service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import { notificationServiceMock } from '../notifications/notifications_service.
import { uiSettingsServiceMock } from '../ui_settings/ui_settings_service.mock';
import { ChromeService } from './chrome_service';
import { getAppInfo } from '../application/utils';
import { workspacesServiceMock } from '../fatal_errors/fatal_errors_service.mock';

class FakeApp implements App {
public title = `${this.id} App`;
Expand All @@ -67,6 +68,7 @@ function defaultStartDeps(availableApps?: App[]) {
injectedMetadata: injectedMetadataServiceMock.createStartContract(),
notifications: notificationServiceMock.createStartContract(),
uiSettings: uiSettingsServiceMock.createStartContract(),
workspaces: workspacesServiceMock.createStartContract(),
};

if (availableApps) {
Expand Down
2 changes: 2 additions & 0 deletions src/core/public/chrome/ui/header/collapsible_nav.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { ChromeNavLink, DEFAULT_APP_CATEGORIES } from '../../..';
import { httpServiceMock } from '../../../http/http_service.mock';
import { ChromeRecentlyAccessedHistoryItem } from '../../recently_accessed';
import { CollapsibleNav } from './collapsible_nav';
import { workspacesServiceMock } from '../../../fatal_errors/fatal_errors_service.mock';

jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => ({
htmlIdGenerator: () => () => 'mockId',
Expand Down Expand Up @@ -80,6 +81,7 @@ function mockProps() {
navigateToApp: () => Promise.resolve(),
navigateToUrl: () => Promise.resolve(),
customNavLink$: new BehaviorSubject(undefined),
currentWorkspace$: workspacesServiceMock.createStartContract().client.currentWorkspace$,
branding: {
darkMode: false,
mark: {
Expand Down
2 changes: 2 additions & 0 deletions src/core/public/chrome/ui/header/header.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { httpServiceMock } from '../../../http/http_service.mock';
import { applicationServiceMock } from '../../../mocks';
import { Header } from './header';
import { StubBrowserStorage } from 'test_utils/stub_browser_storage';
import { workspacesServiceMock } from '../../../fatal_errors/fatal_errors_service.mock';

jest.mock('@elastic/eui/lib/services/accessibility/html_id_generator', () => ({
htmlIdGenerator: () => () => 'mockId',
Expand Down Expand Up @@ -76,6 +77,7 @@ function mockProps() {
applicationTitle: 'OpenSearch Dashboards',
},
survey: '/',
currentWorkspace$: workspacesServiceMock.createStartContract().client.currentWorkspace$,
};
}

Expand Down
3 changes: 1 addition & 2 deletions src/plugins/discover/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import {
AppUpdater,
CoreSetup,
CoreStart,
DEFAULT_WORKSPACE_TEMPLATES,
Plugin,
PluginInitializerContext,
} from 'opensearch-dashboards/public';
Expand All @@ -60,7 +59,7 @@ import rison from 'rison-node';
import { DataPublicPluginStart, DataPublicPluginSetup, opensearchFilters } from '../../data/public';
import { SavedObjectLoader } from '../../saved_objects/public';
import { createOsdUrlTracker, url } from '../../opensearch_dashboards_utils/public';
import { DEFAULT_APP_CATEGORIES } from '../../../core/public';
import { DEFAULT_APP_CATEGORIES, DEFAULT_WORKSPACE_TEMPLATES } from '../../../core/public';
import { UrlGeneratorState } from '../../share/public';
import { DocViewInput, DocViewInputFn } from './application/doc_views/doc_views_types';
import { DocViewLink } from './application/doc_views_links/doc_views_links_types';
Expand Down
4 changes: 1 addition & 3 deletions src/plugins/visualize/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,10 @@ import {
AppUpdater,
CoreSetup,
CoreStart,
DEFAULT_WORKSPACE_TEMPLATES,
Plugin,
PluginInitializerContext,
ScopedHistory,
} from 'opensearch-dashboards/public';

import {
Storage,
createOsdUrlTracker,
Expand All @@ -57,7 +55,7 @@ import { VisualizationsStart } from '../../visualizations/public';
import { VisualizeConstants } from './application/visualize_constants';
import { FeatureCatalogueCategory, HomePublicPluginSetup } from '../../home/public';
import { VisualizeServices } from './application/types';
import { DEFAULT_APP_CATEGORIES } from '../../../core/public';
import { DEFAULT_APP_CATEGORIES, DEFAULT_WORKSPACE_TEMPLATES } from '../../../core/public';
import { SavedObjectsStart } from '../../saved_objects/public';
import { EmbeddableStart } from '../../embeddable/public';
import { DashboardStart } from '../../dashboard/public';
Expand Down

0 comments on commit 9cc2dee

Please sign in to comment.