Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding dashboard add view #4344

Merged

Conversation

michellethomas
Copy link
Contributor

I've been using the flask app builder apis to programmatically create slices and dashboards, but when posting to sliceaddview/api/create or dashboardmodelview/api/create the result doesn't include fields that are useful. They both don't include the id of the dashboard or slice created (which makes it difficult to keep track of).

show_columns is the field that determines what data gets returned after a request, so I'm adding additional fields to show_columns.

SliceAddView already exists and is being used to get all slices for a user, so because I don't want to introduce any future issues I'm adding tests for sliceaddview.

@john-bodley

@@ -507,6 +507,7 @@ class SliceAddView(SliceModelView): # noqa
list_columns = [
'id', 'slice_name', 'slice_link', 'viz_type',
'datasource_link', 'owners', 'modified', 'changed_on']
show_columns = SliceModelView.edit_columns + list_columns
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems prone to have duplicated columns, is this not an issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It didn't cause an issue for me, but I agree it would be a good idea to dedupe. Fixed.

@graceguo-supercat graceguo-supercat merged commit 19a0827 into apache:master Feb 6, 2018
timifasubaa pushed a commit to timifasubaa/incubator-superset that referenced this pull request Feb 6, 2018
* Adding DashboardAddView and setting show_columns on SLiceAddView

* Adding tests for sliceaddview read api

* Dedupe show_columns
michellethomas added a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
* Adding DashboardAddView and setting show_columns on SLiceAddView

* Adding tests for sliceaddview read api

* Dedupe show_columns
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* Adding DashboardAddView and setting show_columns on SLiceAddView

* Adding tests for sliceaddview read api

* Dedupe show_columns
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.23.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.23.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants