-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
search_indices: scaffold empty plugin
- Loading branch information
1 parent
a0474ae
commit d823150
Showing
21 changed files
with
243 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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 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 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 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,3 @@ | ||
# Search Indices | ||
|
||
The Search Indices plugin is a shared set of pages for elasticsearch users across stack and serverless search solutions. |
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,9 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
export const PLUGIN_ID = 'searchIndices'; | ||
export const PLUGIN_NAME = 'searchIndices'; |
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,15 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
module.exports = { | ||
preset: '@kbn/test', | ||
rootDir: '../../..', | ||
roots: ['<rootDir>/x-pack/plugins/search_indices'], | ||
coverageDirectory: '<rootDir>/target/kibana-coverage/jest/x-pack/plugins/search_indices', | ||
coverageReporters: ['text', 'html'], | ||
collectCoverageFrom: ['<rootDir>/x-pack/plugins/search_indices/{public,server}/**/*.{ts,tsx}'], | ||
}; |
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,23 @@ | ||
{ | ||
"type": "plugin", | ||
"id": "@kbn/search-indices", | ||
"owner": "@elastic/search-kibana", | ||
"plugin": { | ||
"id": "searchIndices", | ||
"server": true, | ||
"browser": true, | ||
"configPath": [ | ||
"xpack", | ||
"searchIndices" | ||
], | ||
"requiredPlugins": [ | ||
"share", | ||
], | ||
"optionalPlugins": [ | ||
"cloud", | ||
"console", | ||
"usageCollection", | ||
], | ||
"requiredBundles": [] | ||
} | ||
} |
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,15 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { SearchIndicesPlugin } from './plugin'; | ||
|
||
// This exports static code and TypeScript types, | ||
// as well as, Kibana Platform `plugin()` initializer. | ||
export function plugin() { | ||
return new SearchIndicesPlugin(); | ||
} | ||
export type { SearchIndicesPluginSetup, SearchIndicesPluginStart } from './types'; |
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,23 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import type { CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; | ||
import type { SearchIndicesPluginSetup, SearchIndicesPluginStart } from './types'; | ||
|
||
export class SearchIndicesPlugin | ||
implements Plugin<SearchIndicesPluginSetup, SearchIndicesPluginStart> | ||
{ | ||
public setup(core: CoreSetup): SearchIndicesPluginSetup { | ||
return {}; | ||
} | ||
|
||
public start(core: CoreStart): SearchIndicesPluginStart { | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import type { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface SearchIndicesPluginSetup {} | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface SearchIndicesPluginStart {} | ||
|
||
export interface AppPluginStartDependencies { | ||
navigation: NavigationPublicPluginStart; | ||
} |
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,19 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { schema, TypeOf } from '@kbn/config-schema'; | ||
import { PluginConfigDescriptor } from '@kbn/core/server'; | ||
|
||
const configSchema = schema.object({ | ||
enabled: schema.boolean({ defaultValue: false }), | ||
}); | ||
|
||
export type SearchIndicesConfig = TypeOf<typeof configSchema>; | ||
|
||
export const config: PluginConfigDescriptor<SearchIndicesConfig> = { | ||
schema: configSchema, | ||
}; |
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,17 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import type { PluginInitializerContext } from '@kbn/core/server'; | ||
|
||
export { config } from './config'; | ||
|
||
export async function plugin(initializerContext: PluginInitializerContext) { | ||
const { SearchIndicesPlugin } = await import('./plugin'); | ||
return new SearchIndicesPlugin(initializerContext); | ||
} | ||
|
||
export type { SearchIndicesPluginSetup, SearchIndicesPluginStart } from './types'; |
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,45 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import type { | ||
PluginInitializerContext, | ||
CoreSetup, | ||
CoreStart, | ||
Plugin, | ||
Logger, | ||
} from '@kbn/core/server'; | ||
|
||
import type { SearchIndicesPluginSetup, SearchIndicesPluginStart } from './types'; | ||
import { defineRoutes } from './routes'; | ||
|
||
export class SearchIndicesPlugin | ||
implements Plugin<SearchIndicesPluginSetup, SearchIndicesPluginStart> | ||
{ | ||
private readonly logger: Logger; | ||
|
||
constructor(initializerContext: PluginInitializerContext) { | ||
this.logger = initializerContext.logger.get(); | ||
} | ||
|
||
public setup(core: CoreSetup) { | ||
this.logger.debug('searchIndices: Setup'); | ||
this.logger.info('searchIndices test'); | ||
const router = core.http.createRouter(); | ||
|
||
// Register server side APIs | ||
defineRoutes(router); | ||
|
||
return {}; | ||
} | ||
|
||
public start(core: CoreStart) { | ||
this.logger.debug('searchIndices: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import type { IRouter } from '@kbn/core/server'; | ||
|
||
export function defineRoutes(router: IRouter) {} |
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,11 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface SearchIndicesPluginSetup {} | ||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface SearchIndicesPluginStart {} |
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,21 @@ | ||
{ | ||
"extends": "../../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"outDir": "target/types" | ||
}, | ||
"include": [ | ||
"__mocks__/**/*", | ||
"common/**/*", | ||
"public/**/*", | ||
"server/**/*", | ||
"../../../typings/**/*" | ||
], | ||
"kbn_references": [ | ||
"@kbn/core", | ||
"@kbn/navigation-plugin", | ||
"@kbn/config-schema", | ||
], | ||
"exclude": [ | ||
"target/**/*", | ||
] | ||
} |
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