add copy dashboard page feature#5274
add copy dashboard page feature#5274gaecoli wants to merge 2 commits intogetredash:masterfrom gaecoli:add-copy-dashboard-page-feature
Conversation
kravets-levko
left a comment
There was a problem hiding this comment.
I'm not sure why you preferred to replace previous PR with this one - they look pretty the same. Anyway, please see my comments
| const dashboardSlug = dashboard.slug; | ||
| Dashboard.copy({ slug: dashboardSlug }).then(({ slug }) => { | ||
| window.open(`dashboard/${slug}`); | ||
| }); |
There was a problem hiding this comment.
Please address this according to my comment in your previous PR: #5232 (comment) There is a link to similar function we use for Fork Query - just implement everything in the same way (I also explained why this is needed).
There was a problem hiding this comment.
Hi, i modefied your comment, but i found that query and dashboard have different structures, so the lack of geturl method makes the current dashboard unable to reposition! So maybe someone can help me to check this problem! Thank you!
| setIsDuplicating(true); | ||
| Dashboard.fork({ slug: dashboard.slug }) | ||
| .then(newDashboard => { | ||
| tab.location = keepCurrentUrlParams(newDashboard.getUrl(true)); |
There was a problem hiding this comment.
This getUrl() should be rewrite!
|
@gaecoli, any updates on this? It would be a nice feature to have available. |
I will update, but the encoding format should not meet the requirements of the redash community. |
What type of PR is this? (check all applicable)
Description
add copy dashboard page feature