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 2019/05/03 23:42:32 UTC
[GitHub] [incubator-superset] rjurney opened a new pull request #7448: Adds
'superset export_dashboards --dashboard-id/-i --dashboard-title/-t' options
to CLI
rjurney opened a new pull request #7448: Adds 'superset export_dashboards --dashboard-id/-i --dashboard-title/-t' options to CLI
URL: https://github.com/apache/incubator-superset/pull/7448
Added a couple of options to the CLI for convenience for exporting a single dashboard at a time by ID or title.
See #7444.
### CATEGORY
Choose one
- [ ] Bug Fix
- [x] Enhancement (new features, refinement)
- [ ] Refactor
- [ ] Add tests
- [ ] Build / Development Environment
- [ ] Documentation
### SUMMARY
Added `--dashboard-id/-i` and `--dashboard-title/-t` options to `superset export_dashboards` CLI command.
Added these as optional parameters to `superset.utils.dashboard_import_export.export_dashboards` to:
```python
export_dashboards(session, dashboard_id=None, dashboard_title=None)
```
which is only called by the CLI.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before help UI:
```bash
rjurney$ superset export_dashboards --help
Usage: superset export_dashboards [OPTIONS]
Export dashboards to JSON
Options:
-f, --dashboard-file TEXT Specify the the file to export to
-p, --print_stdout Print JSON to stdout
--help Show this message and exit.
```
After help UI:
```bash
rjurney$ superset export_dashboards --help
Usage: superset export_dashboards [OPTIONS]
Export dashboards to JSON
Options:
-f, --dashboard-file TEXT Specify the the file to export to
-p, --print_stdout Print JSON to stdout
-i, --dashboard-id INTEGER Specify dashboard id to export
-t, --dashboard-title TEXT Specify dashboard title to export
--help Show this message and exit.
```
### TEST PLAN
* `tox -e py36 tests/import_export_tests.py` passes
* manual testing works
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [x] Has associated issue: Fixes #7444
- [x] Changes UI (CLI)
- [ ] Requires DB Migration.
- [ ] Confirm DB Migration upgrade and downgrade tested.
- [x] Introduces new feature or API
- [ ] Removes existing feature or API
### REVIEWERS
@mistercrunch
----------------------------------------------------------------
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