-
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] Allow to store the configured ES|QL visualization v3 #175227
Changes from all commits
38d4298
d3aaeeb
6f6f78b
cc0ca64
631b174
599653c
d982b33
97656ac
ddb6b15
6347d35
aa9946d
d0b3d85
96dc0b8
1caa803
538e422
6796374
f323642
266f99c
772a701
482121d
cb8e18e
e49a423
08f30be
a1643b4
2033a6d
c9dbaba
c6ee408
55e3641
98b3c9d
70455f0
cf130cf
34d01f4
494fde5
c4eb455
b882203
14c224d
f835ad3
a5b59aa
56ca482
9996c5d
1dc7474
5de6c05
73d5819
1871a4e
f28d4bd
ac9d3fe
9ece3ce
fc2ec95
38c69af
4181550
0328095
6d23632
1b2fb11
db9a48d
c0eda01
ee25770
525e7c3
bad165d
7e53323
c6b124c
ae17bcf
3a211b2
5b382b9
031343e
895a08e
c8f837c
30f9df0
60e217d
1e5c502
7e9dd06
825aa71
04a3430
09960ce
189a182
98923df
d7be568
1fce17f
9940078
a5c1281
ab9593b
9bd096c
7ff9e21
6c11f14
f2fc2ce
b555cd5
7f8cb6b
cf5666c
c2c15b2
9e49be3
f25029a
9898d6c
f1d3994
96c3f13
7f85d86
fbc0181
9602ee2
2035802
e24d977
d41009a
de8347a
b2de107
e0b14a8
ad4aabd
d66451b
1f9e86b
48ebc37
db28b3d
998ba35
2707333
133afb3
bc5b78c
35d193a
1c2fd84
14e4f6f
2ac30f8
6c03da3
3931132
b604434
5f68c09
01be3f9
d4b53ee
9b64a66
8e0ee34
a599413
03eb966
a0bc190
a9229a1
d1ebe77
ef97fd7
3150a5e
f356277
ac87b1a
1a74c67
b6b5ac5
bd3adb3
d0daf77
990c623
8fb8e8e
d97c3f6
a8f6e5b
d064930
47b28db
55b5cf7
64a0056
d5c1b5d
a4755a6
e658447
f3d92d2
a9e0d9a
3400b7e
6151f7d
46330ea
53139df
12b4b1c
90448a0
051bd82
4406b0e
531c7a7
b6637ba
e52a57b
7088f98
280323d
d49f1e3
3f1330e
0d9235f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,13 @@ export const getTopNavBadges = ({ | |
if (hasUnsavedChanges && !defaultBadges?.unsavedChangesBadge?.disabled) { | ||
entries.push({ | ||
data: getTopNavUnsavedChangesBadge({ | ||
onRevert: stateContainer.actions.undoSavedSearchChanges, | ||
onRevert: async () => { | ||
const lensEditFlyoutCancelButton = document.getElementById('lnsCancelEditOnFlyFlyout'); | ||
if (lensEditFlyoutCancelButton) { | ||
lensEditFlyoutCancelButton.click?.(); | ||
} | ||
Comment on lines
+49
to
+52
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. It would be great to clean this up and avoid interacting with the DOM like this, but I get it would be tricky. If we don't address it in this PR, I think it would be good to add as a cleanup item in a followup issue. 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. I don't have ideas yet how to implement it cleaner. 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. Neither do I 😅 But I think it's worth tracking as a cleanup item since I'm sure we can find a nicer way to approach it later, but it's good for now. |
||
await stateContainer.actions.undoSavedSearchChanges(); | ||
}, | ||
onSave: | ||
services.capabilities.discover.save && !isManaged | ||
? async () => { | ||
|
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.
I wonder if
null
could be used for clearing the saved search value instead? Just thinking it might be clearer than an empty object, but not a big concern really.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.
@davismcphee I tried with
null
initially but it was skipped completely during saving the SO.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.
Oh that's surprising, I was under the impression it was only
undefined
that gets skipped since I usednull
for clearing values recently in saved query SOs. In any case it's a minor concern and doesn't impact the functionality, so no big deal.