-
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
[Dashboard] Keep managed panels out of unmanaged dashboards #176006
Merged
drewdaemon
merged 18 commits into
elastic:main
from
drewdaemon:172383-unlink-managed-panels-on-clone
Feb 7, 2024
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
4038cd3
inline panels during managed dash clone
drewdaemon a265b7b
custom behavior for adding Lens panels from lib
drewdaemon f0388ec
add logic for each type
drewdaemon 277e7f5
flip some logic
drewdaemon 6fafc8a
Merge branch 'main' of github.com:elastic/kibana into 172383-unlink-m…
drewdaemon 4dbb93e
fix maps and visualize by-value logic
drewdaemon 636ae07
add functional test for unlinking managed panels on clone
drewdaemon 3891309
fix saved search by-ref add
drewdaemon 1f38841
test adding dashboard panels
drewdaemon d84633a
show tooltip for managed items
drewdaemon 72afdf2
fix type
drewdaemon 76d31a5
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine 91e55d0
fix unit test
drewdaemon 7166f52
Merge branch '172383-unlink-managed-panels-on-clone' of github.com:dr…
drewdaemon bf1d8c8
Merge branch 'main' of github.com:elastic/kibana into 172383-unlink-m…
drewdaemon 49d657c
Merge branch 'main' of github.com:elastic/kibana into 172383-unlink-m…
drewdaemon 0ca862b
better typing
drewdaemon e61ea51
integrate registrations with plugin lifecycle
drewdaemon 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
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
22 changes: 22 additions & 0 deletions
22
src/plugins/embeddable/public/registry/saved_object_to_panel_methods.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,22 @@ | ||
/* | ||
* 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 { SavedObjectCommon } from '@kbn/saved-objects-finder-plugin/common'; | ||
|
||
type SavedObjectToPanelMethod<TSavedObjectAttributes, TByValueInput> = ( | ||
savedObject: SavedObjectCommon<TSavedObjectAttributes> | ||
) => { savedObjectId: string } | Partial<TByValueInput>; | ||
|
||
export const savedObjectToPanel: Record<string, SavedObjectToPanelMethod<any, any>> = {}; | ||
|
||
export const registerSavedObjectToPanelMethod = <TSavedObjectAttributes, TByValueAttributes>( | ||
savedObjectType: string, | ||
method: SavedObjectToPanelMethod<TSavedObjectAttributes, TByValueAttributes> | ||
) => { | ||
savedObjectToPanel[savedObjectType] = method; | ||
}; |
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
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.
Nice generics here! Thanks for the suggestion @davismcphee.