This is an automated email from the ASF dual-hosted git repository.
maximebeauchemin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 2ab8e15 Fix: There was an issue fetching the favorite status of this
dashboard #6824 (#8013)
2ab8e15 is described below
commit 2ab8e15ddf1acf9e7b2b6902ea6b2d07422e79a1
Author: Arthur P <[email protected]>
AuthorDate: Fri Aug 9 15:44:38 2019 -0700
Fix: There was an issue fetching the favorite status of this dashboard
#6824 (#8013)
Issue: When Superset is running behind a reverse proxy and the dashboard
page is requested with HTTPS protocol, the frontend can't retrieve the favorite
status of the dashboard and, instead, displays the following toast message:
'There was an issue fetching the favorite status of this dashboard.'
Cause: While the API exposes the /favestar/Dashboard/{id}/count/ endpoint,
the frontend executes an API call to /favestar/Dashboard/{id}/count, which
leads to a redirect to an endpoint with HTTP protocol
Fix: Call the correct endpoint
---
superset/assets/src/dashboard/actions/dashboardState.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/superset/assets/src/dashboard/actions/dashboardState.js
b/superset/assets/src/dashboard/actions/dashboardState.js
index 3318c33..db4d369 100644
--- a/superset/assets/src/dashboard/actions/dashboardState.js
+++ b/superset/assets/src/dashboard/actions/dashboardState.js
@@ -64,7 +64,7 @@ export const FETCH_FAVE_STAR = 'FETCH_FAVE_STAR';
export function fetchFaveStar(id) {
return function fetchFaveStarThunk(dispatch) {
return SupersetClient.get({
- endpoint: `${FAVESTAR_BASE_URL}/${id}/count`,
+ endpoint: `${FAVESTAR_BASE_URL}/${id}/count/`,
})
.then(({ json }) => {
if (json.count > 0) dispatch(toggleFaveStar(true));