Skip to content
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][bugfix][save as] re-direct to copied dashboard upon saveas #6189

Merged
merged 4 commits into from
Oct 25, 2018

Conversation

williaster
Copy link
Contributor

🐛 Fixes #6188 where you are not re-directed upon copying a dashboard. Introduced by this line in the SupersetClient refactor 🙄

after fix
save-as-dashboard

@graceguo-supercat @kristw @michellethomas

t('Could not fetch all saved charts'),
.catch(errorResponse =>
getClientErrorObject(errorResponse).then(({ error }) =>
Promise.all([
Copy link
Contributor

@kristw kristw Oct 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Promise.all seems unnecessary.
Is anybody expecting the result from the dispatches?
Might be better to return the errorObject, or don't care about return value at all.

.catch(errorResponse => 
  getClientErrorObject(errorResponse).then(({ error }) => {
    dispatch(...);
    dispatch(...);
  });
.catch(errorResponse => {
  const errorObjectPromise = getClientErrorObject(errorResponse);
  errorObject.then(({ error }) => {
    dispatch(...);
    dispatch(...);
  });
  return errorObjectPromise;
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return is necessary over here. redirecting is depends on new dash id in the response.

@codecov-io
Copy link

codecov-io commented Oct 25, 2018

Codecov Report

Merging #6189 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6189   +/-   ##
=======================================
  Coverage   76.93%   76.93%           
=======================================
  Files          47       47           
  Lines        9386     9386           
=======================================
  Hits         7221     7221           
  Misses       2165     2165

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef8429c...9bf0c51. Read the comment docs.

@williaster williaster merged commit e7e8e9d into apache:master Oct 25, 2018
@williaster williaster deleted the chris--dashboard-saveas branch October 25, 2018 18:54
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request Oct 25, 2018
apache#6189)

* [dashboard][bugfix][save as] re-direct to copied dashboard upon saveas

* [dashboard][save modal] safer destructuring

* [dashboard][save as] simplify Promise resolution

* [dashboard] simply fetch slices error

(cherry picked from commit e7e8e9d)
bipinsoniguavus pushed a commit to ThalesGroup/incubator-superset that referenced this pull request Dec 26, 2018
apache#6189)

* [dashboard][bugfix][save as] re-direct to copied dashboard upon saveas

* [dashboard][save modal] safer destructuring

* [dashboard][save as] simplify Promise resolution

* [dashboard] simply fetch slices error
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.34.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dashboard] Dashboard save as doesn't re-direct to the copied dashboard
5 participants