[dashboard] New, list view (react) (#8845)

* adds dashboard listview component

* use new api

* use json over rison

* lint

* adds seperate dashboard list view

* edit and delete actions

* fix lint ignore

* fix common_bootstrap_payload is now a function

* fix license

* fix pylint

* isort

* fix tests

* lint

* lint ts

* fix js tests

* fix double import from bad rebase

* fix indent error

* lookup permissions

* generic permission lookup

* get tslint to pass

* adds js specs

* lint

* fix rebase

* lint

* lint again

* fix type errors preventing build

* adds more specs

* fix tslint error

* fix null check

* remove unecessary code

* use translations provided by api

* more translations

* linting

* fix spec

* i18n

* fix register order
This commit is contained in:
ʈᵃᵢ
2020-01-15 21:48:55 -08:00
committed by Maxime Beauchemin
parent 7e6719050b
commit 7b97764dbc
27 changed files with 1979 additions and 494 deletions

View File

@@ -308,7 +308,7 @@ class DashboardTests(SupersetTestCase):
resp = self.get_resp("/chart/list/")
self.assertNotIn("birth_names</a>", resp)
resp = self.get_resp("/dashboard/list/")
resp = self.get_resp("/api/v1/dashboard/")
self.assertNotIn("/superset/dashboard/births/", resp)
self.grant_public_access_to_table(table)
@@ -316,7 +316,7 @@ class DashboardTests(SupersetTestCase):
# Try access after adding appropriate permissions.
self.assertIn("birth_names", self.get_resp("/chart/list/"))
resp = self.get_resp("/dashboard/list/")
resp = self.get_resp("/api/v1/dashboard/")
self.assertIn("/superset/dashboard/births/", resp)
self.assertIn("Births", self.get_resp("/superset/dashboard/births/"))
@@ -325,7 +325,7 @@ class DashboardTests(SupersetTestCase):
resp = self.get_resp("/chart/list/")
self.assertNotIn("wb_health_population</a>", resp)
resp = self.get_resp("/dashboard/list/")
resp = self.get_resp("/api/v1/dashboard/")
self.assertNotIn("/superset/dashboard/world_health/", resp)
def test_dashboard_with_created_by_can_be_accessed_by_public_users(self):
@@ -374,7 +374,7 @@ class DashboardTests(SupersetTestCase):
gamma_user = security_manager.find_user("gamma")
self.login(gamma_user.username)
resp = self.get_resp("/dashboard/list/")
resp = self.get_resp("/api/v1/dashboard/")
self.assertNotIn("/superset/dashboard/empty_dashboard/", resp)
def test_users_can_view_published_dashboard(self):
@@ -404,7 +404,7 @@ class DashboardTests(SupersetTestCase):
db.session.merge(hidden_dash)
db.session.commit()
resp = self.get_resp("/dashboard/list/")
resp = self.get_resp("/api/v1/dashboard/")
self.assertNotIn(f"/superset/dashboard/{hidden_dash_slug}/", resp)
self.assertIn(f"/superset/dashboard/{published_dash_slug}/", resp)
@@ -432,7 +432,7 @@ class DashboardTests(SupersetTestCase):
self.login(user.username)
resp = self.get_resp("/dashboard/list/")
resp = self.get_resp("/api/v1/dashboard/")
self.assertIn(f"/superset/dashboard/{my_dash_slug}/", resp)
self.assertNotIn(f"/superset/dashboard/{not_my_dash_slug}/", resp)
@@ -465,7 +465,7 @@ class DashboardTests(SupersetTestCase):
self.login(user.username)
resp = self.get_resp("/dashboard/list/")
resp = self.get_resp("/api/v1/dashboard/")
self.assertIn(f"/superset/dashboard/{fav_dash_slug}/", resp)
def test_user_can_not_view_unpublished_dash(self):
@@ -485,7 +485,7 @@ class DashboardTests(SupersetTestCase):
# list dashboards as a gamma user
self.login(gamma_user.username)
resp = self.get_resp("/dashboard/list/")
resp = self.get_resp("/api/v1/dashboard/")
self.assertNotIn(f"/superset/dashboard/{slug}/", resp)