You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by yj...@apache.org on 2021/01/09 21:32:39 UTC
[superset] branch master updated: fix: explore replace wrong
standalone slice url (#12359)
This is an automated email from the ASF dual-hosted git repository.
yjc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 99de8a4 fix: explore replace wrong standalone slice url (#12359)
99de8a4 is described below
commit 99de8a49b640ada2006b85cf97376c84a0de449a
Author: Duy Nguyen Hoang <nh...@gmail.com>
AuthorDate: Sun Jan 10 04:32:06 2021 +0700
fix: explore replace wrong standalone slice url (#12359)
---
.gitignore | 2 ++
superset-frontend/spec/javascripts/explore/utils_spec.jsx | 10 ++++++++++
.../src/explore/components/ExploreViewContainer.jsx | 6 +++++-
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 175e7e7..e8d8bb2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,6 +22,8 @@
*.swp
__pycache__
+.local
+.cache
.bento*
.cache-loader
.coverage
diff --git a/superset-frontend/spec/javascripts/explore/utils_spec.jsx b/superset-frontend/spec/javascripts/explore/utils_spec.jsx
index 251475a..9214400 100644
--- a/superset-frontend/spec/javascripts/explore/utils_spec.jsx
+++ b/superset-frontend/spec/javascripts/explore/utils_spec.jsx
@@ -199,6 +199,16 @@ describe('exploreUtils', () => {
URI('/superset/explore/').search({ form_data: sFormData }),
);
});
+
+ it('generates url with standalone', () => {
+ compareURI(
+ URI(getExploreLongUrl(formData, 'standalone')),
+ URI('/superset/explore/').search({
+ form_data: sFormData,
+ standalone: 'true',
+ }),
+ );
+ });
});
describe('buildV1ChartDataPayload', () => {
diff --git a/superset-frontend/src/explore/components/ExploreViewContainer.jsx b/superset-frontend/src/explore/components/ExploreViewContainer.jsx
index c539056..2cfe9f8 100644
--- a/superset-frontend/src/explore/components/ExploreViewContainer.jsx
+++ b/superset-frontend/src/explore/components/ExploreViewContainer.jsx
@@ -169,7 +169,11 @@ function ExploreViewContainer(props) {
function addHistory({ isReplace = false, title } = {}) {
const payload = { ...props.form_data };
- const longUrl = getExploreLongUrl(props.form_data, null, false);
+ const longUrl = getExploreLongUrl(
+ props.form_data,
+ props.standalone ? 'standalone' : null,
+ false,
+ );
try {
if (isReplace) {
window.history.replaceState(payload, title, longUrl);