-
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.
- Loading branch information
1 parent
03e8824
commit 89bd09c
Showing
25 changed files
with
350 additions
and
5 deletions.
There are no files selected for viewing
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,7 @@ | ||
xpack.apm.enabled: false | ||
xpack.uptime.enabled: false | ||
|
||
enterpriseSearch.enabled: true | ||
xpack.serverless.search.enabled: true | ||
|
||
uiSettings.overrides.defaultRoute: /app/enterprise_search/content/search_indices |
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
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,2 @@ | ||
/build | ||
/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# serverlessSearch | ||
|
||
A witty, fitting description to come. |
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 = 'serverlessSearch'; | ||
export const PLUGIN_NAME = 'serverlessSearch'; |
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/serverless-search", | ||
"owner": "@elastic/appex-sharedux", | ||
"description": "Serverless customizations for search.", | ||
"plugin": { | ||
"id": "serverlessSearch", | ||
"server": true, | ||
"browser": true, | ||
"configPath": [ | ||
"xpack", | ||
"serverless", | ||
"search" | ||
], | ||
"requiredPlugins": [ | ||
"serverless", | ||
"enterpriseSearch", | ||
"management" | ||
], | ||
"optionalPlugins": [], | ||
"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,11 @@ | ||
{ | ||
"name": "@kbn/serverless-search", | ||
"version": "1.0.0", | ||
"license": "Elastic License 2.0", | ||
"private": true, | ||
"scripts": { | ||
"build": "yarn plugin-helpers build", | ||
"plugin-helpers": "node ../../../scripts/plugin_helpers", | ||
"kbn": "node ../../../scripts/kbn" | ||
} | ||
} |
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,16 @@ | ||
/* | ||
* 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 { ServerlessSearchPlugin } from './plugin'; | ||
|
||
// This exports static code and TypeScript types, | ||
// as well as, Kibana Platform `plugin()` initializer. | ||
export function plugin() { | ||
return new ServerlessSearchPlugin(); | ||
} | ||
|
||
export type { ServerlessSearchPluginSetup, ServerlessSearchPluginStart } 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,54 @@ | ||
/* | ||
* 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 React from 'react'; | ||
import { EuiCollapsibleNavGroup, EuiListGroup } from '@elastic/eui'; | ||
import { ApplicationStart, HttpSetup } from '@kbn/core/public'; | ||
|
||
export interface ServerlessSearchCollapsibleNavigationProps { | ||
http: HttpSetup; | ||
navigateToUrl: ApplicationStart['navigateToUrl']; | ||
} | ||
|
||
export const ServerlessSearchCollapsibleNavigation = ({ | ||
http, | ||
navigateToUrl, | ||
}: ServerlessSearchCollapsibleNavigationProps) => { | ||
const navigateTo = (url: string) => () => { | ||
navigateToUrl(http.basePath.prepend(url)); | ||
}; | ||
const navItems = [ | ||
{ | ||
label: 'Overview', | ||
onClick: navigateTo('/app/enterprise_search/overview'), | ||
}, | ||
{ | ||
label: 'Indices', | ||
onClick: navigateTo('/app/enterprise_search/content/search_indices'), | ||
}, | ||
{ | ||
label: 'Engines', | ||
onClick: navigateTo('/app/enterprise_search/content/engines'), | ||
}, | ||
{ | ||
label: 'API keys', | ||
onClick: navigateTo('/app/management/security/api_keys'), | ||
}, | ||
{ | ||
label: 'Ingest pipelines', | ||
onClick: navigateTo('/app/management/ingest/ingest_pipelines'), | ||
}, | ||
]; | ||
|
||
return ( | ||
<> | ||
<EuiCollapsibleNavGroup title="Search" iconType="logoEnterpriseSearch" isCollapsible={false}> | ||
<EuiListGroup listItems={navItems} /> | ||
</EuiCollapsibleNavGroup> | ||
</> | ||
); | ||
}; |
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,43 @@ | ||
/* | ||
* 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 React from 'react'; | ||
import { CoreSetup, CoreStart, Plugin } from '@kbn/core/public'; | ||
import { | ||
ServerlessSearchPluginSetup, | ||
ServerlessSearchPluginSetupDependencies, | ||
ServerlessSearchPluginStart, | ||
ServerlessSearchPluginStartDependencies, | ||
} from './types'; | ||
|
||
import { ServerlessSearchCollapsibleNavigation } from './layout/nav'; | ||
|
||
export class ServerlessSearchPlugin | ||
implements Plugin<ServerlessSearchPluginSetup, ServerlessSearchPluginStart> | ||
{ | ||
public setup( | ||
_core: CoreSetup, | ||
_setupDeps: ServerlessSearchPluginSetupDependencies | ||
): ServerlessSearchPluginSetup { | ||
return {}; | ||
} | ||
|
||
public start( | ||
core: CoreStart, | ||
{ serverless }: ServerlessSearchPluginStartDependencies | ||
): ServerlessSearchPluginStart { | ||
serverless.setServerlessNavigation( | ||
<ServerlessSearchCollapsibleNavigation | ||
http={core.http} | ||
navigateToUrl={core.application.navigateToUrl} | ||
/> | ||
); | ||
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,31 @@ | ||
/* | ||
* 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 { ServerlessPluginSetup, ServerlessPluginStart } from '@kbn/serverless/public'; | ||
import { ManagementSetup, ManagementStart } from '@kbn/management-plugin/public'; | ||
import { | ||
EnterpriseSearchPublicSetup, | ||
EnterpriseSearchPublicStart, | ||
} from '@kbn/enterprise-search-plugin/public'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface ServerlessSearchPluginSetup {} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-interface | ||
export interface ServerlessSearchPluginStart {} | ||
|
||
export interface ServerlessSearchPluginSetupDependencies { | ||
enterpriseSearch: EnterpriseSearchPublicSetup; | ||
management: ManagementSetup; | ||
serverless: ServerlessPluginSetup; | ||
} | ||
|
||
export interface ServerlessSearchPluginStartDependencies { | ||
enterpriseSearch: EnterpriseSearchPublicStart; | ||
management: ManagementStart; | ||
serverless: ServerlessPluginStart; | ||
} |
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 { schema, TypeOf } from '@kbn/config-schema'; | ||
import { PluginConfigDescriptor } from '@kbn/core/server'; | ||
|
||
export * from './types'; | ||
|
||
const configSchema = schema.object({ | ||
enabled: schema.boolean({ defaultValue: false }), | ||
}); | ||
|
||
type ConfigType = TypeOf<typeof configSchema>; | ||
|
||
export const config: PluginConfigDescriptor<ConfigType> = { | ||
schema: configSchema, | ||
}; | ||
|
||
export type ServerlessSearchConfig = TypeOf<typeof configSchema>; |
Oops, something went wrong.