[Time to Visualize] Copy Panel to Dashboard#90856
[Time to Visualize] Copy Panel to Dashboard#90856ThomThomson merged 13 commits intoelastic:masterfrom
Conversation
8462b13 to
178f426
Compare
178f426 to
a617c8d
Compare
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
| } | ||
|
|
||
| .dshCopyToParagraph { | ||
| max-width: 400px; |
There was a problem hiding this comment.
I still need to run this locally, but I've led you astray here. There is a maxWidth prop on EuiModal that can be used for this case.
There was a problem hiding this comment.
Ah, it turns out this setting was actually missing from the core service I was using to show the modal. I've added the option and it works correctly
…reate dashboard. Shortened copy
b74961d to
5de7f4f
Compare
poffdeluxe
left a comment
There was a problem hiding this comment.
Lgtm! Code looks good and works as expected
src/plugins/dashboard/public/application/actions/copy_to_dashboard_modal.tsx
Show resolved
Hide resolved
| data-test-subj="add-to-new-dashboard-option" | ||
| id="new-dashboard-option" | ||
| name="dashboard-option" | ||
| disabled={!dashboardId} |
There was a problem hiding this comment.
This is disabled because you cannot copy from an unsaved dashboard. Am I reading that right?
There was a problem hiding this comment.
Close! You can't copy from an unsaved dashboard, to another unsaved dashboard. This is because the URLs are the same, it would just append a copy of the panel.
src/plugins/dashboard/public/application/actions/copy_to_dashboard_modal.tsx
Show resolved
Hide resolved
ryankeairns
left a comment
There was a problem hiding this comment.
Thanks for the edits, nice addition!
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
* Added copy to dashboard action
Summary
Closes #69423
Adds the ability to copy a panel from one dashboard to another. On submit the application redirects to the destination dashboard in edit mode, and adds the new panel to the bottom. This change will not be saved to the dashboard until the user chooses to save it.
The panel is always appended, even when a panel with the same id exists already.
Note: This does not include the ability to automatically make the panel 'by value', this can be added in a followup if necessary. For now, By Value panels remain by value, and by reference panels remain by reference.
Edit: The copy has been enhanced to the following:
Checklist
Delete any items that are not applicable to this PR.
For maintainers