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 2021/07/28 20:43:25 UTC

[GitHub] [superset] AAfghahi opened a new pull request #15934: feat: Delete Report Modal for charts and Dashboards

AAfghahi opened a new pull request #15934:
URL: https://github.com/apache/superset/pull/15934


   ### SUMMARY
   This adds a delete modal in the report dropdown in an individual chart or dashboard. Part of an ongoing feature to allow a user to add a specific report to chart or dashboard. 
   
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <img width="725" alt="Screen Shot 2021-07-28 at 4 38 05 PM" src="https://user-images.githubusercontent.com/48933336/127393090-7394fb69-004d-416e-a142-e0e63d7c3370.png">
   <img width="1021" alt="Screen Shot 2021-07-28 at 4 38 11 PM" src="https://user-images.githubusercontent.com/48933336/127393098-418ae817-82d2-46f5-8131-02c144d3e7f0.png">
   <img width="1014" alt="Screen Shot 2021-07-28 at 4 38 20 PM" src="https://user-images.githubusercontent.com/48933336/127393106-a83c835f-7ff1-4434-8eb8-c4bbe4c5d1a8.png">
   
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] codecov[bot] commented on pull request #15934: feat: Delete Report Modal for charts and Dashboards

Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #15934:
URL: https://github.com/apache/superset/pull/15934#issuecomment-888630106


   # [Codecov](https://codecov.io/gh/apache/superset/pull/15934?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#15934](https://codecov.io/gh/apache/superset/pull/15934?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4efc0a6) into [selfSubscribeReports](https://codecov.io/gh/apache/superset/commit/dcd1f23626bc8b908e825f74ec1970bf263e638a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (dcd1f23) will **decrease** coverage by `0.03%`.
   > The diff coverage is `16.12%`.
   
   > :exclamation: Current head 4efc0a6 differs from pull request most recent head 424f6e2. Consider uploading reports for the commit 424f6e2 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/15934/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/superset/pull/15934?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@                   Coverage Diff                    @@
   ##           selfSubscribeReports   #15934      +/-   ##
   ========================================================
   - Coverage                 76.97%   76.93%   -0.04%     
   ========================================================
     Files                       989      989              
     Lines                     52017    52042      +25     
     Branches                   7102     7107       +5     
   ========================================================
     Hits                      40040    40040              
   - Misses                    11752    11776      +24     
   - Partials                    225      226       +1     
   ```
   
   | Flag | Coverage Δ | |
   |---|---|---|
   | javascript | `71.62% <16.12%> (-0.08%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Impacted Files](https://codecov.io/gh/apache/superset/pull/15934?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...frontend/src/dashboard/components/Header/index.jsx](https://codecov.io/gh/apache/superset/pull/15934/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb21wb25lbnRzL0hlYWRlci9pbmRleC5qc3g=) | `65.47% <ø> (ø)` | |
   | [...ntend/src/dashboard/containers/DashboardHeader.jsx](https://codecov.io/gh/apache/superset/pull/15934/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2Rhc2hib2FyZC9jb250YWluZXJzL0Rhc2hib2FyZEhlYWRlci5qc3g=) | `100.00% <ø> (ø)` | |
   | [...perset-frontend/src/reports/actions/reportState.js](https://codecov.io/gh/apache/superset/pull/15934/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3JlcG9ydHMvYWN0aW9ucy9yZXBvcnRTdGF0ZS5qcw==) | `20.51% <0.00%> (-10.26%)` | :arrow_down: |
   | [.../ReportModal/HeaderReportActionsDropdown/index.tsx](https://codecov.io/gh/apache/superset/pull/15934/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2NvbXBvbmVudHMvUmVwb3J0TW9kYWwvSGVhZGVyUmVwb3J0QWN0aW9uc0Ryb3Bkb3duL2luZGV4LnRzeA==) | `25.80% <23.52%> (-13.09%)` | :arrow_down: |
   | [...tend/src/explore/components/ExploreChartHeader.jsx](https://codecov.io/gh/apache/superset/pull/15934/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL2V4cGxvcmUvY29tcG9uZW50cy9FeHBsb3JlQ2hhcnRIZWFkZXIuanN4) | `59.70% <100.00%> (-0.60%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/15934?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/superset/pull/15934?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [dcd1f23...424f6e2](https://codecov.io/gh/apache/superset/pull/15934?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] AAfghahi commented on a change in pull request #15934: feat: Delete Report Modal for charts and Dashboards

Posted by GitBox <gi...@apache.org>.
AAfghahi commented on a change in pull request #15934:
URL: https://github.com/apache/superset/pull/15934#discussion_r678649731



##########
File path: superset-frontend/src/reports/actions/reportState.js
##########
@@ -112,3 +112,39 @@ export function toggleActive(report, isActive) {
       });
   };
 }
+
+export function deleteActiveReport(report) {
+  return function deleteActiveReportThunk(dispatch, getState) {
+    return SupersetClient.delete({
+      endpoint: encodeURI(`/api/v1/report/${report.id}`),
+    })
+      .then(() => {
+        const state = getState();
+        const { user, dashboardInfo, charts, explore } = state;
+        if (dashboardInfo) {

Review comment:
       just added
   




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] eschutho merged pull request #15934: feat: Delete Report Modal for charts and Dashboards

Posted by GitBox <gi...@apache.org>.
eschutho merged pull request #15934:
URL: https://github.com/apache/superset/pull/15934


   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] eschutho commented on a change in pull request #15934: feat: Delete Report Modal for charts and Dashboards

Posted by GitBox <gi...@apache.org>.
eschutho commented on a change in pull request #15934:
URL: https://github.com/apache/superset/pull/15934#discussion_r678644406



##########
File path: superset-frontend/src/reports/actions/reportState.js
##########
@@ -112,3 +112,39 @@ export function toggleActive(report, isActive) {
       });
   };
 }
+
+export function deleteActiveReport(report) {
+  return function deleteActiveReportThunk(dispatch, getState) {
+    return SupersetClient.delete({
+      endpoint: encodeURI(`/api/v1/report/${report.id}`),
+    })
+      .then(() => {
+        const state = getState();
+        const { user, dashboardInfo, charts, explore } = state;
+        if (dashboardInfo) {

Review comment:
       did you want to move these into finally so that they don't show the report could not be deleted error?




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org