-
Notifications
You must be signed in to change notification settings - Fork 917
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Shivam Dhar <[email protected]>
- Loading branch information
1 parent
1e34c06
commit 87294cb
Showing
7 changed files
with
78 additions
and
52 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import { | ||
PluginInitializerContext, | ||
CoreSetup, | ||
CoreStart, | ||
Plugin, | ||
Logger, | ||
} from 'opensearch-dashboards/server'; | ||
|
||
import { OpenSearchService } from './services'; | ||
import { registerGeospatialRoutes } from '../server/routes'; | ||
import { getUiSettings } from './ui_settings'; | ||
import { RegionMapPluginSetup, RegionMapPluginStart } from './types'; | ||
|
||
export class RegionMapPlugin implements Plugin<RegionMapPluginSetup, RegionMapPluginStart> { | ||
private readonly logger: Logger; | ||
|
||
constructor(initializerContext: PluginInitializerContext) { | ||
this.logger = initializerContext.logger.get(); | ||
} | ||
|
||
public setup(core: CoreSetup) { | ||
this.logger.debug('RegionMap: Setup'); | ||
const opensearchClient = core.opensearch.legacy.createClient('opensearch'); | ||
const opensearchService = new OpenSearchService(opensearchClient); | ||
const router = core.http.createRouter(); | ||
core.uiSettings.register(getUiSettings()); | ||
registerGeospatialRoutes(opensearchService, router); | ||
return {}; | ||
} | ||
|
||
public start(_core: CoreStart) { | ||
this.logger.debug('RegionMap: Started'); | ||
return {}; | ||
} | ||
|
||
public stop() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
export { OpenSearchService } from './opensearch_service'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters