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/02/25 19:03:03 UTC
[GitHub] [superset] lilykuang opened a new pull request #13342: chore: improve modal error handling
lilykuang opened a new pull request #13342:
URL: https://github.com/apache/superset/pull/13342
### SUMMARY
<!--- Describe the change below, including rationale and design decisions -->
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
<!--- Skip this if not applicable -->
### TEST PLAN
<!--- What steps should be taken to 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
- [ ] Requires DB Migration.
- [ ] Confirm DB Migration upgrade and downgrade tested.
- [ ] 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.
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 #13342: chore: improve modal error handling
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on pull request #13342:
URL: https://github.com/apache/superset/pull/13342#issuecomment-799891783
# [Codecov](https://codecov.io/gh/apache/superset/pull/13342?src=pr&el=h1) Report
> Merging [#13342](https://codecov.io/gh/apache/superset/pull/13342?src=pr&el=desc) (551df54) into [master](https://codecov.io/gh/apache/superset/commit/df5fb5a97c46201978d9dc4ef24b08681e1aed4d?el=desc) (df5fb5a) will **decrease** coverage by `4.32%`.
> The diff coverage is `39.39%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/superset/pull/13342/graphs/tree.svg?width=650&height=150&src=pr&token=KsB0fHcx6l)](https://codecov.io/gh/apache/superset/pull/13342?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #13342 +/- ##
==========================================
- Coverage 77.35% 73.03% -4.33%
==========================================
Files 918 608 -310
Lines 46652 21644 -25008
Branches 5723 5640 -83
==========================================
- Hits 36087 15807 -20280
+ Misses 10429 5701 -4728
Partials 136 136
```
| Flag | Coverage Δ | |
|---|---|---|
| cypress | `56.59% <41.17%> (+0.02%)` | :arrow_up: |
| hive | `?` | |
| javascript | `63.04% <27.27%> (-0.01%)` | :arrow_down: |
| mysql | `?` | |
| postgres | `?` | |
| presto | `?` | |
| python | `?` | |
| sqlite | `?` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/superset/pull/13342?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [superset-frontend/src/views/CRUD/types.ts](https://codecov.io/gh/apache/superset/pull/13342/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvdHlwZXMudHM=) | `100.00% <ø> (ø)` | |
| [...nd/src/views/CRUD/data/dataset/AddDatasetModal.tsx](https://codecov.io/gh/apache/superset/pull/13342/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhc2V0L0FkZERhdGFzZXRNb2RhbC50c3g=) | `57.14% <25.00%> (-0.44%)` | :arrow_down: |
| [superset-frontend/src/views/CRUD/hooks.ts](https://codecov.io/gh/apache/superset/pull/13342/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvaG9va3MudHM=) | `58.93% <43.75%> (-1.69%)` | :arrow_down: |
| [superset-frontend/src/views/CRUD/utils.tsx](https://codecov.io/gh/apache/superset/pull/13342/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvdXRpbHMudHN4) | `61.79% <50.00%> (-0.71%)` | :arrow_down: |
| [...end/src/views/CRUD/data/database/DatabaseModal.tsx](https://codecov.io/gh/apache/superset/pull/13342/diff?src=pr&el=tree#diff-c3VwZXJzZXQtZnJvbnRlbmQvc3JjL3ZpZXdzL0NSVUQvZGF0YS9kYXRhYmFzZS9EYXRhYmFzZU1vZGFsLnRzeA==) | `76.97% <66.66%> (+4.58%)` | :arrow_up: |
| [superset/utils/data.py](https://codecov.io/gh/apache/superset/pull/13342/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvZGF0YS5weQ==) | | |
| [superset/reports/commands/delete.py](https://codecov.io/gh/apache/superset/pull/13342/diff?src=pr&el=tree#diff-c3VwZXJzZXQvcmVwb3J0cy9jb21tYW5kcy9kZWxldGUucHk=) | | |
| [superset/utils/cache.py](https://codecov.io/gh/apache/superset/pull/13342/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdXRpbHMvY2FjaGUucHk=) | | |
| [superset/dashboards/dao.py](https://codecov.io/gh/apache/superset/pull/13342/diff?src=pr&el=tree#diff-c3VwZXJzZXQvZGFzaGJvYXJkcy9kYW8ucHk=) | | |
| [superset/tasks/schedules.py](https://codecov.io/gh/apache/superset/pull/13342/diff?src=pr&el=tree#diff-c3VwZXJzZXQvdGFza3Mvc2NoZWR1bGVzLnB5) | | |
| ... and [306 more](https://codecov.io/gh/apache/superset/pull/13342/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/superset/pull/13342?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/superset/pull/13342?src=pr&el=footer). Last update [df5fb5a...551df54](https://codecov.io/gh/apache/superset/pull/13342?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
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] lilykuang merged pull request #13342: chore: improve modal error handling
Posted by GitBox <gi...@apache.org>.
lilykuang merged pull request #13342:
URL: https://github.com/apache/superset/pull/13342
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] nytai commented on a change in pull request #13342: chore: improve modal error handling
Posted by GitBox <gi...@apache.org>.
nytai commented on a change in pull request #13342:
URL: https://github.com/apache/superset/pull/13342#discussion_r594734243
##########
File path: superset-frontend/src/views/CRUD/hooks.ts
##########
@@ -605,3 +610,28 @@ export const copyQueryLink = (
addDangerToast(t('Sorry, your browser does not support copying.'));
});
};
+
+export const testDatabaseConnection = (
+ connection: DatabaseObject,
+ handleErrorMsg: (errorMsg: string) => void,
+ addSuccessToast: (arg0: string) => void,
+) => {
+ SupersetClient.post({
+ endpoint: 'api/v1/database/test_connection',
+ body: JSON.stringify(connection),
+ headers: { 'Content-Type': 'application/json' },
Review comment:
nit: you can use `'postPayload` with a js object, instead of body + json header
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org