[Lens] Allow other apps to list their custom visualizations in the Visualize app#43303
[Lens] Allow other apps to list their custom visualizations in the Visualize app#43303chrisdavies wants to merge 4 commits intoelastic:feature/lensfrom
Conversation
enable other apps to list custom visualizations
💔 Build Failed |
|
I was expecting the base branch to be |
|
I agree with @wylieconlon, the change to the vis listing should go into |
| defaultMessage: 'Error deleting visualization', | ||
| }), | ||
| }); | ||
| this.deleteSelectedItems = function deleteSelectedItems(_ids, selectedItems) { |
There was a problem hiding this comment.
I might be missing something, but can't we get rid of the _ids parameter? If not it should be documented.
There was a problem hiding this comment.
It's the current signature, so removing it would require changing all callers. (We're not the only caller, and there may be 3rd party plugins using it, too.) So, I only made backward-compatible changes.
| this.deleteSelectedItems = function deleteSelectedItems(_ids, selectedItems) { | ||
| return Promise.all( | ||
| selectedItems.map(item => { | ||
| return savedObjectClient.delete(item.savedObjectType, item.id); |
There was a problem hiding this comment.
The "old" delete function also called chrome.untrackNavLinksForDeletedSavedObjects in src/legacy/ui/public/saved_objects/saved_object_loader.js line 71, we probably also have to do that, even though I'm not sure what it does.
There was a problem hiding this comment.
Interesting. Good catch. Here's the comment for that function:
Clear last url for deleted saved objects to avoid loading pages with "Could not locate..."
Sounds like something we need.
| ) | ||
| }, | ||
| { | ||
| field: 'canEdit', |
| * under the License. | ||
| */ | ||
|
|
||
| import { findListItems } from './find_list_items'; |
There was a problem hiding this comment.
Awesome to have tests for this 👍
|
OH. Weird. I didn't intend to include any x-pack stuff in this PR. I'll back it out, and re-submit against master and without the x-pack changes. |
|
...OK. Closing this for (hopefully) the real PR which can be found here: |


This PR introduces a mechanism that allows other Kibana apps to register visualizations with the Visualize app. These visualizations have their own saved objects and their own separate editing experiences, but still show up in the Visualize app's visualization list and are added via the Visualize app's add button.