You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/02/21 22:47:15 UTC
[GitHub] [incubator-superset] graceguo-supercat opened a new pull request
#9188: [dashboard] fix filter_scopes when copy dashboard with
duplicate_slices
graceguo-supercat opened a new pull request #9188: [dashboard] fix filter_scopes when copy dashboard with duplicate_slices
URL: https://github.com/apache/incubator-superset/pull/9188
### CATEGORY
Choose one
- [x] Bug Fix
- [ ] Enhancement (new features, refinement)
- [ ] Refactor
- [ ] Add tests
- [ ] Build / Development Environment
- [ ] Documentation
### SUMMARY
When user copy dashboard with `also copy (duplicate) charts`, dashboard duplicates each slices in the old dash and use new slice_id in the new dash. We should update filter_scopes with new slice ids.
### TEST PLAN
CI and manual test
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [x] Has associated issue: #9109 #9146
- [ ] Changes UI
- [ ] Requires DB Migration.
- [ ] Confirm DB Migration upgrade and downgrade tested.
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
### REVIEWERS
@serenajiang @john-bodley
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] codecov-io commented on issue #9188:
[dashboard] fix filter_scopes when copy dashboard with duplicate_slices
Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #9188: [dashboard] fix filter_scopes when copy dashboard with duplicate_slices
URL: https://github.com/apache/incubator-superset/pull/9188#issuecomment-589893034
# [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9188?src=pr&el=h1) Report
> Merging [#9188](https://codecov.io/gh/apache/incubator-superset/pull/9188?src=pr&el=desc) into [master](https://codecov.io/gh/apache/incubator-superset/commit/c1750af54aa5088184abec09d4490b47d5dc4f8c?src=pr&el=desc) will **decrease** coverage by `0.03%`.
> The diff coverage is `n/a`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-superset/pull/9188/graphs/tree.svg?width=650&token=KsB0fHcx6l&height=150&src=pr)](https://codecov.io/gh/apache/incubator-superset/pull/9188?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #9188 +/- ##
==========================================
- Coverage 59.16% 59.13% -0.04%
==========================================
Files 372 372
Lines 11935 11938 +3
Branches 2927 2925 -2
==========================================
- Hits 7061 7059 -2
- Misses 4694 4699 +5
Partials 180 180
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-superset/pull/9188?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...ontend/src/components/ListView/TableCollection.tsx](https://codecov.io/gh/apache/incubator-superset/pull/9188/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXcvVGFibGVDb2xsZWN0aW9uLnRzeA==) | `88.88% <0%> (-3.71%)` | :arrow_down: |
| [...frontend/src/views/dashboardList/DashboardList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/9188/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL2Rhc2hib2FyZExpc3QvRGFzaGJvYXJkTGlzdC50c3g=) | `69.72% <0%> (-3.43%)` | :arrow_down: |
| [...uperset-frontend/src/views/chartList/ChartList.tsx](https://codecov.io/gh/apache/incubator-superset/pull/9188/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL2NoYXJ0TGlzdC9DaGFydExpc3QudHN4) | `74.48% <0%> (-0.26%)` | :arrow_down: |
| [...et-frontend/src/components/ConfirmStatusChange.tsx](https://codecov.io/gh/apache/incubator-superset/pull/9188/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvQ29uZmlybVN0YXR1c0NoYW5nZS50c3g=) | `100% <0%> (ø)` | :arrow_up: |
| [...rset-frontend/src/components/ListView/ListView.tsx](https://codecov.io/gh/apache/incubator-superset/pull/9188/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvTGlzdFZpZXcvTGlzdFZpZXcudHN4) | `92.4% <0%> (+0.19%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9188?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-superset/pull/9188?src=pr&el=footer). Last update [c1750af...eb04f8a](https://codecov.io/gh/apache/incubator-superset/pull/9188?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] graceguo-supercat merged pull request #9188:
[dashboard] fix filter_scopes when copy dashboard with duplicate_slices
Posted by GitBox <gi...@apache.org>.
graceguo-supercat merged pull request #9188: [dashboard] fix filter_scopes when copy dashboard with duplicate_slices
URL: https://github.com/apache/incubator-superset/pull/9188
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] serenajiang commented on a change in pull
request #9188: [dashboard] fix filter_scopes when copy dashboard with
duplicate_slices
Posted by GitBox <gi...@apache.org>.
serenajiang commented on a change in pull request #9188: [dashboard] fix filter_scopes when copy dashboard with duplicate_slices
URL: https://github.com/apache/incubator-superset/pull/9188#discussion_r382867663
##########
File path: superset/views/core.py
##########
@@ -1195,6 +1195,20 @@ def copy_dash(self, dashboard_id):
old_id = "{}".format(value.get("meta").get("chartId"))
new_id = int(old_to_new_sliceids[old_id])
value["meta"]["chartId"] = new_id
+
+ if "filter_scopes" in data:
Review comment:
This looks pretty similar to the chunk of code [here](https://github.com/apache/incubator-superset/blob/3efdfc53456aa702d01fee90c17b79ba9531c9b8/superset/models/dashboard.py#L341). Can we pull this out into a function?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [incubator-superset] graceguo-supercat commented on a change in
pull request #9188: [dashboard] fix filter_scopes when copy dashboard with
duplicate_slices
Posted by GitBox <gi...@apache.org>.
graceguo-supercat commented on a change in pull request #9188: [dashboard] fix filter_scopes when copy dashboard with duplicate_slices
URL: https://github.com/apache/incubator-superset/pull/9188#discussion_r382933304
##########
File path: superset/views/core.py
##########
@@ -1195,6 +1195,20 @@ def copy_dash(self, dashboard_id):
old_id = "{}".format(value.get("meta").get("chartId"))
new_id = int(old_to_new_sliceids[old_id])
value["meta"]["chartId"] = new_id
+
+ if "filter_scopes" in data:
Review comment:
added a util function to clean up.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org