-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Discover] Add support for log overview tab to Discover log profile #186680
Merged
davismcphee
merged 11 commits into
elastic:main
from
davismcphee:one-discover-log-profile-doc-viewer
Jul 15, 2024
Merged
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7308ec3
Add support log overview tab to Discover log profile
davismcphee 97ba3c1
Remove logs_shared dependency from logs_explorer and get AI assistant…
davismcphee e4fa82d
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine 791205e
Fix functional tests
davismcphee facdf85
Move getDocViewer to accessors folder
davismcphee 4ce922c
Add log overview tab jest test
davismcphee 42aecff
Add doc viewer log overview functional tests
davismcphee 0251167
Fix broken tests and add serverless tests
davismcphee 4b82c4f
Remove unused type
davismcphee 4ee16cc
Merge branch 'main' into one-discover-log-profile-doc-viewer
davismcphee 5c3f59d
Merge branch 'main' into one-discover-log-profile-doc-viewer
davismcphee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
33 changes: 33 additions & 0 deletions
33
...lic/context_awareness/profile_providers/log_document_profile/accessors/get_doc_viewer.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,33 @@ | ||
/* | ||
* 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 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
import { UnifiedDocViewerLogsOverview } from '@kbn/unified-doc-viewer-plugin/public'; | ||
import React from 'react'; | ||
import type { DocumentProfileProvider } from '../../../profiles'; | ||
|
||
export const getDocViewer: DocumentProfileProvider['profile']['getDocViewer'] = | ||
(prev) => (params) => { | ||
const prevDocViewer = prev(params); | ||
|
||
return { | ||
...prevDocViewer, | ||
docViewsRegistry: (registry) => { | ||
registry.add({ | ||
id: 'doc_view_logs_overview', | ||
title: i18n.translate('discover.docViews.logsOverview.title', { | ||
defaultMessage: 'Log overview', | ||
}), | ||
order: 0, | ||
component: (props) => <UnifiedDocViewerLogsOverview {...props} />, | ||
}); | ||
|
||
return prevDocViewer.docViewsRegistry(registry); | ||
}, | ||
}; | ||
}; |
9 changes: 9 additions & 0 deletions
9
...scover/public/context_awareness/profile_providers/log_document_profile/accessors/index.ts
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 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
export { getDocViewer } from './get_doc_viewer'; |
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
24 changes: 0 additions & 24 deletions
24
...fied_doc_viewer/public/components/doc_viewer_logs_overview/logs_overview_ai_assistant.tsx
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
src/plugins/unified_doc_viewer/public/components/lazy_doc_viewer_logs_overview.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,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 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { EuiDelayRender, EuiSkeletonText } from '@elastic/eui'; | ||
import { dynamic } from '@kbn/shared-ux-utility'; | ||
|
||
export const UnifiedDocViewerLogsOverview = dynamic(() => import('./doc_viewer_logs_overview'), { | ||
fallback: ( | ||
<EuiDelayRender delay={300}> | ||
<EuiSkeletonText /> | ||
</EuiDelayRender> | ||
), | ||
}); |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tip
This file could be removed right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it can, removed here: 97ba3c1.