Skip to content

Commit

Permalink
[Logs Explorer] Add AI assistant to Logs Explorer (elastic#174079)
Browse files Browse the repository at this point in the history
Resolves elastic#172158

## Summary

- Adds AI assistant buttons to Logs Explorer header
- Adds separators to group related buttons

## Screenshots

### Classic

<img width="1341" alt="Screenshot 2023-12-20 at 17 45 15"
src="https://github.com/elastic/kibana/assets/190132/bc9dfd09-ee32-4306-8629-39cb6b70e6ed">

### Serverless

<img width="1338" alt="Screenshot 2023-12-20 at 17 36 22"
src="https://github.com/elastic/kibana/assets/190132/a6c164ef-c9f3-490d-8c84-7d1d1bb80cb3">

---------

Co-authored-by: kibanamachine <[email protected]>
  • Loading branch information
thomheymann and kibanamachine authored Jan 3, 2024
1 parent e1601be commit 37ca617
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
7 changes: 5 additions & 2 deletions x-pack/plugins/observability_log_explorer/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"discover",
"logExplorer",
"logsShared",
"observabilityAIAssistant",
"observabilityShared",
"share",
"kibanaUtils",
Expand All @@ -24,9 +25,11 @@
"optionalPlugins": [
"serverless"
],
"requiredBundles": ["kibanaReact"],
"requiredBundles": [
"kibanaReact"
],
"extraPublicDirs": [
"common",
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const LogExplorerTopNavMenu = () => {

const ServerlessTopNav = () => {
const { services } = useKibanaContextForPlugin();
const { ObservabilityAIAssistantActionMenuItem } = services.observabilityAIAssistant;

return (
<EuiHeader data-test-subj="logExplorerHeaderMenu" css={{ boxShadow: 'none' }}>
Expand All @@ -63,9 +64,13 @@ const ServerlessTopNav = () => {
<EuiHeaderSectionItem>
<EuiHeaderLinks gutterSize="xs">
<ConnectedDiscoverLink />
<VerticalRule />
<FeedbackLink />
<VerticalRule />
{ObservabilityAIAssistantActionMenuItem ? (
<ObservabilityAIAssistantActionMenuItem />
) : null}
</EuiHeaderLinks>
<VerticalRule />
</EuiHeaderSectionItem>
<EuiHeaderSectionItem>
<ConnectedOnboardingLink />
Expand All @@ -79,6 +84,7 @@ const StatefulTopNav = () => {
const {
services: {
appParams: { setHeaderActionMenu },
observabilityAIAssistant: { ObservabilityAIAssistantActionMenuItem },
chrome,
i18n,
theme,
Expand Down Expand Up @@ -136,6 +142,10 @@ const StatefulTopNav = () => {
<EuiHeaderSectionItem>
<EuiHeaderLinks gutterSize="xs">
<ConnectedDiscoverLink />
<VerticalRule />
{ObservabilityAIAssistantActionMenuItem ? (
<ObservabilityAIAssistantActionMenuItem />
) : null}
<ConnectedOnboardingLink />
</EuiHeaderLinks>
</EuiHeaderSectionItem>
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/observability_log_explorer/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { SharePluginSetup, SharePluginStart } from '@kbn/share-plugin/public';
import { AppMountParameters, ScopedHistory } from '@kbn/core/public';
import { LogsSharedClientStartExports } from '@kbn/logs-shared-plugin/public';
import { DatasetQualityPluginStart } from '@kbn/dataset-quality-plugin/public';
import { ObservabilityAIAssistantPluginStart } from '@kbn/observability-ai-assistant-plugin/public';
import {
ObservabilityLogExplorerLocators,
ObservabilityLogExplorerLocationState,
Expand All @@ -37,6 +38,7 @@ export interface ObservabilityLogExplorerStartDeps {
discover: DiscoverStart;
logExplorer: LogExplorerPluginStart;
logsShared: LogsSharedClientStartExports;
observabilityAIAssistant: ObservabilityAIAssistantPluginStart;
observabilityShared: ObservabilitySharedPluginStart;
serverless?: ServerlessPluginStart;
share: SharePluginStart;
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/observability_log_explorer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@kbn/ui-theme",
"@kbn/xstate-utils",
"@kbn/router-utils",
"@kbn/observability-ai-assistant-plugin",
],
"exclude": [
"target/**/*"
Expand Down

0 comments on commit 37ca617

Please sign in to comment.