Skip to content
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 a default "All logs" temporary data view in the Observability Solution view #205991

Merged
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8cd7089
Initial getDefaultAdHocDataViews extension
davismcphee Jan 9, 2025
c146fac
Finish initial implementation
davismcphee Jan 10, 2025
79f0ec0
Fix types
davismcphee Jan 10, 2025
13db01c
Add useDefaultAdHocDataViews hook
davismcphee Jan 10, 2025
deae60b
Move default profile ad hoc data views to internal state
davismcphee Jan 10, 2025
0e8f21c
Fix types and tests
davismcphee Jan 13, 2025
3f9bdba
Fix broken test
davismcphee Jan 17, 2025
255fff2
Fix broken test
davismcphee Jan 18, 2025
7770cc0
Update default o11y logs data view
davismcphee Jan 18, 2025
f79ef92
Fix Jest test
davismcphee Jan 20, 2025
f3d14f0
Remove CCS special handling
davismcphee Jan 20, 2025
dfdbf94
Update implementation and add tests
davismcphee Jan 20, 2025
e45a53a
Fix profile data view fields loading, and clean up resolve_data_view
davismcphee Jan 21, 2025
a411d60
Duplicate default profile data view on saved search change
davismcphee Jan 22, 2025
c3d1bd6
Add Jest test
davismcphee Jan 22, 2025
5ac5cfc
Add more tests
davismcphee Jan 22, 2025
1f372b2
Fix missing fields when changing data view
davismcphee Jan 22, 2025
c430307
Add functional tests
davismcphee Jan 22, 2025
3db6ffb
Fix test skips
davismcphee Jan 22, 2025
c665e5c
Updating comments
davismcphee Jan 22, 2025
76e11f4
Merge branch 'main' into discover-ad-hoc-data-views-extension
davismcphee Jan 23, 2025
c2328cd
Merge branch 'main' into discover-ad-hoc-data-views-extension
davismcphee Jan 23, 2025
0d803a7
Use Discover session title instead of 'copy' for cloned default profi…
davismcphee Jan 23, 2025
ad21e3d
Clean up logic around no data page check
davismcphee Jan 23, 2025
0b7d4ee
Allow overwriting default profile data views with spec in location state
davismcphee Jan 24, 2025
ebd3cb6
Update filter references when saving session with default profiel dat…
davismcphee Jan 24, 2025
c4d8168
Fix type
davismcphee Jan 24, 2025
751f366
Add support for showing managed data views in the data view picker
davismcphee Jan 25, 2025
af6171f
Merge branch 'main' into discover-ad-hoc-data-views-extension
davismcphee Jan 25, 2025
641c013
Fix Jest tests
davismcphee Jan 25, 2025
ed79553
Merge branch 'main' into discover-ad-hoc-data-views-extension
davismcphee Jan 27, 2025
991548e
Allow sidebar URL tracking for default profile data views
davismcphee Jan 27, 2025
7306fc1
Add test for getDefaultAdHocDataViews
davismcphee Jan 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use Discover session title instead of 'copy' for cloned default profi…
…le data views
  • Loading branch information
davismcphee committed Jan 23, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 0d803a7d1939b3d673456064921c6c4406ad79c6
Original file line number Diff line number Diff line change
@@ -193,8 +193,11 @@ export function getSavedSearchContainer({
...dataView.toSpec(),
id: uuidv4(),
name: i18n.translate('discover.savedSearch.defaultProfileDataViewCopyName', {
defaultMessage: '{name} (copy)',
values: { name: dataView.name ?? dataView.getIndexPattern() },
defaultMessage: '{dataViewName} ({discoverSessionTitle})',
values: {
dataViewName: dataView.name ?? dataView.getIndexPattern(),
discoverSessionTitle: nextSavedSearch.title,
},
}),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add managed flag to this data view (and exclude it when saving a session)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean the managed flag we add to integration and system created SOs? If so, it sounds like a good idea (would be nice to show "Managed" in the data view selector too), but it doesn't seem like data views support that currently.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, seems to be fitting here. We could address it separately.

cc @kertal regarding adding "Managed" to data views.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll see what I can do here in the meantime. While supporting managed data views is likely too much for this PR and 9.0 FF timeframe, I may be able to "mark" it some way similar to ES|QL data views so we can at least differentiate them in the data view picker. I agree with your other comment about seeing "Temporary" by default and would like to fix that if we can.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So without fully supporting managed data views, I made it so we can still show specific data views as "Managed" in the picker the same way we handle "Temporary": 751f366. I think this would at least make the UX less confusing for users. WDYT?

I also fixed showing ad hoc data view in the mobile data view picker since it seems that was never supported before.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

});
}
Original file line number Diff line number Diff line change
@@ -55,7 +55,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
it('should create a copy of the profile data view when saving the Discover session', async () => {
await discover.saveSearch('Default profile data view session');
await discover.waitUntilSearchingHasFinished();
expect(await dataViews.getSelectedName()).to.be('Example profile data view (copy)');
expect(await dataViews.getSelectedName()).to.be(
'Example profile data view (Default profile data view session)'
);
expect(await unifiedFieldList.getSidebarSectionFieldNames('available')).to.have.length(7);
expect(
await (await dataGrid.getCellElementByColumnName(0, '@timestamp')).getVisibleText()
Original file line number Diff line number Diff line change
@@ -58,7 +58,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
it('should create a copy of the profile data view when saving the Discover session', async () => {
await discover.saveSearch('Default profile data view session');
await discover.waitUntilSearchingHasFinished();
expect(await dataViews.getSelectedName()).to.be('Example profile data view (copy)');
expect(await dataViews.getSelectedName()).to.be(
'Example profile data view (Default profile data view session)'
);
expect(await unifiedFieldList.getSidebarSectionFieldNames('available')).to.have.length(7);
expect(
await (await dataGrid.getCellElementByColumnName(0, '@timestamp')).getVisibleText()