-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Logs] Replace log stream component #219425
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
Merged
achyutjhunjhunwala
merged 54 commits into
elastic:main
from
achyutjhunjhunwala:replace-log-stream-component
Jun 19, 2025
Merged
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
6b3a426
Replace log stream component on transaction details page
achyutjhunjhunwala 6158dbf
Merge branch 'main' into replace-log-stream-component
achyutjhunjhunwala 5193c6b
Merge branch 'main' into replace-log-stream-component
achyutjhunjhunwala d197478
Merge branch 'main' into replace-log-stream-component
achyutjhunjhunwala 0059886
Merge branch 'main' into replace-log-stream-component
achyutjhunjhunwala a9660b2
Fix passing long Discover locator inside execution context which was …
achyutjhunjhunwala 635e477
Enable Flyout for all new Logs Saved Search Embeddables
achyutjhunjhunwala 2eaaec5
Replace Log stream component from Host List page
achyutjhunjhunwala 0e09b27
replace log stream in hosts detail view which in addition also impact…
achyutjhunjhunwala 69fc87d
Merge branch 'main' into replace-log-stream-component
achyutjhunjhunwala 145ac87
Fix the locator passing error
achyutjhunjhunwala e6586c2
Merge branch 'main' into replace-log-stream-component
achyutjhunjhunwala 7d89fbc
[CI] Auto-commit changed files from 'node scripts/styled_components_m…
kibanamachine 1cb50a2
Add new profile for handling Fleet Logs
achyutjhunjhunwala 08439cf
[CI] Auto-commit changed files from 'ts-node .buildkite/pipeline-reso…
kibanamachine a4210d3
Fix quick check issues
achyutjhunjhunwala 6e34237
Replace the newly added fleet profile with custom column logic
achyutjhunjhunwala 1ceac5c
Add logic to merge all controls which open flyout under 1 flag and up…
achyutjhunjhunwala fbb66e3
Merge branch 'main' into replace-log-stream-component
achyutjhunjhunwala bbc425d
Fix Unit test for agent_logs
achyutjhunjhunwala fe79cb6
Fix initialize edit unit tests
achyutjhunjhunwala ecf91e7
Fix execution context browser ftr tests
achyutjhunjhunwala 8ee9245
Revert Fix execution context browser ftr tests as the issue was with …
achyutjhunjhunwala e0f72a1
Fix initial state bug
achyutjhunjhunwala 161e432
Fix Unit test case with fixed edit url logic
achyutjhunjhunwala 923a74f
Fix profile test as the new condition to display leading columns has …
achyutjhunjhunwala ca3cc6e
Fix checktype issue
achyutjhunjhunwala 6e841ce
[CI] Auto-commit changed files from 'node scripts/notice'
kibanamachine 09455f8
Merge branch 'main' into replace-log-stream-component
achyutjhunjhunwala a214ce1
Fix infra FTR tests
achyutjhunjhunwala a5d5d51
Merge branch 'main' into replace-log-stream-component
achyutjhunjhunwala 8f3e0ee
Merge branch 'main' into replace-log-stream-component
achyutjhunjhunwala 4b36b7a
Fix a minor change
achyutjhunjhunwala 736115f
Merge branch 'main' into replace-log-stream-component
achyutjhunjhunwala 7e4ad3b
Fix review comments
achyutjhunjhunwala 5e027c9
Merge branch 'main' into replace-log-stream-component
achyutjhunjhunwala 002e550
Fix variable renaming
achyutjhunjhunwala 39b702d
Merge branch 'main' into replace-log-stream-component
achyutjhunjhunwala ad5fe62
Fix a stupid merge issue which removed a comma
achyutjhunjhunwala 812f748
Add Open in Discover links for pages missing them
achyutjhunjhunwala 64627df
Fix checktype issues
achyutjhunjhunwala abd3cf1
Fix a missing linting issue
achyutjhunjhunwala 195ef4b
Merge branch 'main' into replace-log-stream-component
achyutjhunjhunwala 9634678
Fix fleet columns
achyutjhunjhunwala 58094fb
Add logic to handle log stream dashboards from older versions to load…
achyutjhunjhunwala afd4f42
Merge branch 'main' into replace-log-stream-component
achyutjhunjhunwala 466188d
Add logic to new legacy embeddable to handle the Logs Stream embeddab…
achyutjhunjhunwala 9f1eaa1
Merge branch 'main' into replace-log-stream-component
achyutjhunjhunwala 5b78f6c
Enable search bar in Service Logs tab
achyutjhunjhunwala 8956519
Enable search bar in Service Logs tab for Mobile Services
achyutjhunjhunwala 77a0656
Fix height for logs tab in infra
achyutjhunjhunwala c076e74
Revert enabling the search bar in APM
achyutjhunjhunwala 7dbc569
Add missing search bar on Hosts page which was deleted by mistake
achyutjhunjhunwala d73255b
Merge branch 'main' into replace-log-stream-component
achyutjhunjhunwala 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
65 changes: 65 additions & 0 deletions
65
...orm/plugins/shared/discover/public/embeddable/get_legacy_log_stream_embeddable_factory.ts
This file contains hidden or 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,65 @@ | ||
| /* | ||
| * 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public | ||
| * License v3.0 only", or the "Server Side Public License, v 1". | ||
| */ | ||
|
|
||
| import type { SavedSearch } from '@kbn/saved-search-plugin/public'; | ||
| import type { DataView } from '@kbn/data-views-plugin/common'; | ||
| import { getAllLogsDataViewSpec } from '@kbn/discover-utils/src'; | ||
| import { toSavedSearchAttributes } from '@kbn/saved-search-plugin/common'; | ||
| import { getSearchEmbeddableFactory } from './get_search_embeddable_factory'; | ||
| import { LEGACY_LOG_STREAM_EMBEDDABLE } from './constants'; | ||
|
|
||
| export const getLegacyLogStreamEmbeddableFactory = ( | ||
| ...[{ startServices, discoverServices }]: Parameters<typeof getSearchEmbeddableFactory> | ||
| ) => { | ||
| const searchEmbeddableFactory = getSearchEmbeddableFactory({ startServices, discoverServices }); | ||
| const logStreamEmbeddableFactory: ReturnType<typeof getSearchEmbeddableFactory> = { | ||
| type: LEGACY_LOG_STREAM_EMBEDDABLE, | ||
| buildEmbeddable: async ({ initialState, ...restParams }) => { | ||
| const searchSource = await discoverServices.data.search.searchSource.create(); | ||
| let fallbackPattern = 'logs-*-*'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good idea with the fallback to ensure we always have an index pattern available 👍 |
||
| // Given that the logDataAccess service is an optional dependency with discover, we need to check if it exists | ||
| if (discoverServices.logsDataAccess) { | ||
| fallbackPattern = | ||
| await discoverServices.logsDataAccess.services.logSourcesService.getFlattenedLogSources(); | ||
| } | ||
|
|
||
| const spec = getAllLogsDataViewSpec({ allLogsIndexPattern: fallbackPattern }); | ||
| const dataView: DataView = await discoverServices.data.dataViews.create(spec); | ||
|
|
||
| // Finally assign the data view to the search source | ||
| searchSource.setField('index', dataView); | ||
|
|
||
| const savedSearch: SavedSearch = { | ||
| title: initialState.rawState.title, | ||
| description: initialState.rawState.description, | ||
| timeRange: initialState.rawState.timeRange, | ||
| sort: initialState.rawState.sort ?? [], | ||
| columns: initialState.rawState.columns ?? [], | ||
| searchSource, | ||
| managed: false, | ||
| }; | ||
| const { searchSourceJSON, references } = searchSource.serialize(); | ||
|
|
||
| initialState = { | ||
| ...initialState, | ||
| rawState: { | ||
| ...initialState.rawState, | ||
| attributes: { | ||
| ...toSavedSearchAttributes(savedSearch, searchSourceJSON), | ||
| references, | ||
| }, | ||
| }, | ||
| }; | ||
|
|
||
| return searchEmbeddableFactory.buildEmbeddable({ initialState, ...restParams }); | ||
| }, | ||
| }; | ||
|
|
||
| return logStreamEmbeddableFactory; | ||
| }; | ||
This file contains hidden or 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.
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.
This was the area I meant in my original comment.