[incubator-superset] branch master updated: style: DOCTYPE tag, and related CSS cleanup/refactoring (#10302)

2020-07-29 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new 16459ad  style: DOCTYPE tag, and related CSS cleanup/refactoring 
(#10302)
16459ad is described below

commit 16459ad401d916d0ce7ca6ffa6775fdcb8a37ae8
Author: Evan Rusackas 
AuthorDate: Wed Jul 29 18:49:32 2020 -0700

style: DOCTYPE tag, and related CSS cleanup/refactoring (#10302)
---
 .../integration/explore/AdhocMetrics.test.ts   |  55 ++--
 .../cypress/integration/explore/advanced.test.ts   |  18 ++--
 .../cypress/integration/explore/control.test.ts|  12 +--
 .../cypress/integration/explore/filter_box.test.js |   4 +-
 .../explore/visualizations/line.test.ts|   4 +-
 .../src/components/ListView/ListView.tsx   |   8 ++
 .../explore/components/AdhocMetricEditPopover.jsx  |   8 +-
 .../components/AdhocMetricEditPopoverTitle.jsx |   6 +-
 .../explore/components/ControlPanelsContainer.jsx  |  69 --
 .../src/explore/components/ExploreChartPanel.jsx   |  26 --
 .../explore/components/ExploreViewContainer.jsx| 100 +
 .../src/explore/components/QueryAndSaveBtns.css|  21 -
 .../src/explore/components/QueryAndSaveBtns.jsx|  88 --
 superset-frontend/stylesheets/superset.less|   3 +
 superset/templates/superset/basic.html |   2 +-
 superset/templates/superset/paper-theme.html   |   2 +-
 .../templates/superset/reports/slice_data.html |   1 +
 superset/templates/superset/theme.html |   8 +-
 superset/templates/superset/traceback.html |   7 +-
 19 files changed, 247 insertions(+), 195 deletions(-)

diff --git 
a/superset-frontend/cypress-base/cypress/integration/explore/AdhocMetrics.test.ts
 
b/superset-frontend/cypress-base/cypress/integration/explore/AdhocMetrics.test.ts
index ef7dc9b..59722a0 100644
--- 
a/superset-frontend/cypress-base/cypress/integration/explore/AdhocMetrics.test.ts
+++ 
b/superset-frontend/cypress-base/cypress/integration/explore/AdhocMetrics.test.ts
@@ -26,25 +26,27 @@ describe('AdhocMetrics', () => {
 
   it('Clear metric and set simple adhoc metric', () => {
 const metric = 'sum(sum_girls)';
-const metricName = 'Girl Births';
+const metricName = 'Sum Girls';
 
 cy.visitChartByName('Num Births Trend');
 cy.verifySliceSuccess({ waitAlias: '@postJson' });
 
-cy.get('[data-test=metrics]').within(() => {
-  cy.get('.Select__clear-indicator').click();
-  cy.get('.Select__control input').type('sum_girls');
-  cy.get('.Select__option--is-focused').trigger('mousedown').click();
-});
+cy.get('[data-test=metrics]').find('.Select__clear-indicator').click();
 
-cy.get('#metrics-edit-popover').within(() => {
-  cy.get('.popover-title').within(() => {
-cy.get('span').click();
-cy.get('input').type(metricName);
-  });
-  cy.get('button').contains('Save').click();
-});
-cy.get('.Select__multi-value__label').contains(metricName);
+cy.get('[data-test=metrics]')
+  .find('.Select__control input')
+  .type('sum_girls', { force: true });
+
+cy.get('[data-test=metrics]')
+  .find('.Select__option--is-focused')
+  .trigger('mousedown')
+  .click();
+
+cy.get('[data-test="AdhocMetricEditTitle#trigger"]').click();
+cy.get('[data-test="AdhocMetricEditTitle#input"]').type(metricName);
+cy.get('[data-test="AdhocMetricEdit#save"]').contains('Save').click();
+
+cy.get('.metrics-select .metric-option').contains(metricName);
 
 cy.get('button.query').click();
 cy.verifySliceSuccess({
@@ -59,20 +61,21 @@ describe('AdhocMetrics', () => {
 cy.verifySliceSuccess({ waitAlias: '@postJson' });
 
 // select column "num"
-cy.get('[data-test=metrics]').within(() => {
-  cy.get('.Select__clear-indicator').click();
-  cy.get('.Select__control').click();
-  cy.get('.Select__control input').type('num');
-  cy.get('.option-label').contains(/^num$/).click();
-});
+cy.get('[data-test=metrics]').find('.Select__clear-indicator').click();
+
+cy.get('[data-test=metrics]').find('.Select__control').click();
+
+cy.get('[data-test=metrics]').find('.Select__control input').type('num');
+
+cy.get('[data-test=metrics]').find('.option-label').last().click();
 
 // add custom SQL
-cy.get('#metrics-edit-popover').within(() => {
-  cy.get('#adhoc-metric-edit-tabs-tab-SQL').click();
-  cy.get('.ace_content').click();
-  cy.get('.ace_text-input').type('/COUNT(DISTINCT name)', { force: true });
-  cy.get('button').contains('Save').click();
-});
+cy.get('#adhoc-metric-edit-tabs-tab-SQL').click();
+cy.get('#metrics-edit-popover').find('.ace_content').click();
+ 

[incubator-superset] branch master updated (7f70a24 -> 78cad9a)

2020-07-29 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


from 7f70a24  test: Add jest-enzyme assertion library for better frontend 
tests (#10459)
 add 78cad9a  refactor(listviews): use correct filter endpoints for charts 
and datasets (#10442)

No new revisions were added by this update.

Summary of changes:
 .../components/ListView/ListView_spec.jsx  |  4 ++
 .../views/CRUD/dataset/DatasetList_spec.jsx|  4 +-
 .../src/components/ListView/Filters.tsx| 16 +++--
 .../src/components/ListView/ListView.tsx   |  5 +-
 superset-frontend/src/components/ListView/utils.ts |  1 +
 .../src/views/CRUD/chart/ChartList.tsx | 76 ++--
 .../src/views/CRUD/dataset/AddDatasetModal.tsx |  9 ++-
 .../src/views/CRUD/dataset/DatasetList.tsx | 80 +++--
 superset-frontend/src/views/CRUD/utils.tsx | 16 ++---
 superset/charts/api.py | 41 ---
 superset/charts/dao.py |  5 --
 superset/databases/api.py  | 81 --
 superset/databases/schemas.py  | 10 ---
 superset/views/base_api.py |  1 -
 tests/charts/api_tests.py  | 11 ---
 tests/database_api_tests.py| 44 
 16 files changed, 99 insertions(+), 305 deletions(-)



[incubator-superset] branch master updated (d065633 -> c716f7a)

2020-07-28 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


from d065633  fix: Implement updates to SQL-based email alerts (#10454)
 add c716f7a  fix: change "add new slice" copy to "add new chart" (#10457)

No new revisions were added by this update.

Summary of changes:
 superset/templates/superset/add_slice.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[incubator-superset] branch master updated: style: update +NEW button to use Button component, add dropdownItems prop to Button (#10422)

2020-07-28 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new e89e60d  style: update +NEW button to use Button component, add 
dropdownItems prop to Button (#10422)
e89e60d is described below

commit e89e60df766de19e8effc79e8376ed0682c06ccc
Author: Moriah Kreeger 
AuthorDate: Tue Jul 28 14:29:52 2020 -0700

style: update +NEW button to use Button component, add dropdownItems prop 
to Button (#10422)
---
 superset-frontend/src/components/Button/index.tsx  | 47 ++
 superset-frontend/src/components/Menu/NewMenu.tsx  | 56 +++---
 .../stylesheets/less/cosmo/bootswatch.less |  5 --
 3 files changed, 64 insertions(+), 44 deletions(-)

diff --git a/superset-frontend/src/components/Button/index.tsx 
b/superset-frontend/src/components/Button/index.tsx
index 6861fc5..24028d0 100644
--- a/superset-frontend/src/components/Button/index.tsx
+++ b/superset-frontend/src/components/Button/index.tsx
@@ -22,11 +22,18 @@ import {
   Button as BootstrapButton,
   Tooltip,
   OverlayTrigger,
+  MenuItem,
 } from 'react-bootstrap';
 import styled from '@superset-ui/style';
 
 export type OnClickHandler = React.MouseEventHandler;
 
+export interface DropdownItemProps {
+  label: string;
+  url: string;
+  icon?: string;
+}
+
 export interface ButtonProps {
   className?: string;
   tooltip?: string;
@@ -38,6 +45,7 @@ export interface ButtonProps {
   bsSize?: BootstrapButton.ButtonProps['bsSize'];
   style?: BootstrapButton.ButtonProps['style'];
   children?: React.ReactNode;
+  dropdownItems?: DropdownItemProps[];
 }
 
 const BUTTON_WRAPPER_STYLE = { display: 'inline-block', cursor: 'not-allowed' 
};
@@ -82,23 +90,41 @@ export default function Button(props: ButtonProps) {
   };
   const tooltip = props.tooltip;
   const placement = props.placement;
+  const dropdownItems = props.dropdownItems;
   delete buttonProps.tooltip;
   delete buttonProps.placement;
 
+  if (tooltip && props.disabled) {
+// Working around the fact that tooltips don't get triggered when buttons 
are disabled
+// https://github.com/react-bootstrap/react-bootstrap/issues/1588
+buttonProps.style = { pointerEvents: 'none' };
+  }
+
   let button = (
 {props.children}
   );
+
+  if (dropdownItems) {
+button = (
+  
+
+  {props.children}
+
+
+  {dropdownItems.map(
+(dropdownItem: DropdownItemProps, index1: number) => (
+  
+
+ {dropdownItem.label}
+  
+),
+  )}
+
+  
+);
+  }
+
   if (tooltip) {
-if (props.disabled) {
-  // Working around the fact that tooltips don't get triggered when 
buttons are disabled
-  // https://github.com/react-bootstrap/react-bootstrap/issues/1588
-  buttonProps.style = { pointerEvents: 'none' };
-  button = (
-
-  {props.children}
-
-  );
-}
 return (
   
 );
   }
+
   return button;
 }
diff --git a/superset-frontend/src/components/Menu/NewMenu.tsx 
b/superset-frontend/src/components/Menu/NewMenu.tsx
index 1973652..055ca2e 100644
--- a/superset-frontend/src/components/Menu/NewMenu.tsx
+++ b/superset-frontend/src/components/Menu/NewMenu.tsx
@@ -17,44 +17,42 @@
  * under the License.
  */
 import React from 'react';
+import styled from '@superset-ui/style';
 import { t } from '@superset-ui/translation';
+import Button, { DropdownItemProps } from '../Button';
 
-const buttonStyle = {
-  marginTop: '12px',
-  marginRight: '30px',
-};
+const StyledButton = styled(Button)`
+  margin-top: 12px;
+  margin-right: 30px;
+`;
+
+const dropdownItems: DropdownItemProps[] = [
+  {
+label: t('SQL Query'),
+url: '/superset/sqllab',
+icon: 'fa-fw fa-search',
+  },
+  {
+label: t('Chart'),
+url: '/chart/add',
+icon: 'fa-fw fa-bar-chart',
+  },
+  {
+label: t('Dashboard'),
+url: '/dashboard/new',
+icon: 'fa-fw fa-dashboard',
+  },
+];
 
 export default function NewMenu() {
   return (
 
-  
  New
-  
-  
-
-  
-
-{t('SQL Query')}
-  
-
-
-  
-
-{t('Chart')}
-  
-
-
-  
-
-{t('Dashboard')}
-  
-
-  
+  
 
   );
 }
diff --git a/superset-frontend/stylesheets/less/cosmo/bootswatch.less 
b/superset-frontend/stylesheets/less/cosmo/bootswatch.less
index 057fa7e..f65e95a 100644
--- a/superset-frontend/stylesheets/less/cosmo/bootswatch.less
+++ b/superset-frontend/stylesheets/less/cosmo/bootswatch.less
@@ -70,11 +70,6 @@
   text-transform: uppercase;
 }
 
-.btn-default:hover {
-  color: @gray-dark;
-  background-color: @gray-bg;
-}
-
 .nav-tabs {
 

[incubator-superset] branch master updated (fc28c92 -> 9914ae1)

2020-07-28 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


from fc28c92  feat: support non-numeric columns in pivot table (#10389)
 add 9914ae1  chore: migrate Checkbox to tsx (#10453)

No new revisions were added by this update.

Summary of changes:
 .../src/components/{ChartIcon.jsx => ChartIcon.tsx}|  0
 .../src/components/{Checkbox.jsx => Checkbox.tsx}  | 14 ++
 .../components/{CheckboxIcons.jsx => CheckboxIcons.tsx}|  0
 3 files changed, 6 insertions(+), 8 deletions(-)
 rename superset-frontend/src/components/{ChartIcon.jsx => ChartIcon.tsx} (100%)
 rename superset-frontend/src/components/{Checkbox.jsx => Checkbox.tsx} (82%)
 rename superset-frontend/src/components/{CheckboxIcons.jsx => 
CheckboxIcons.tsx} (100%)



[incubator-superset] branch tai/fix-dataset-filters created (now 009800d)

2020-07-27 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a change to branch tai/fix-dataset-filters
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


  at 009800d  fix(dataset listview): use related endpoint for database 
filter values

No new revisions were added by this update.



[incubator-superset] branch master updated: feat(listviews): SIP-34 filters for charts, dashboards, datasets (#10335)

2020-07-27 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new 6f56cd5  feat(listviews): SIP-34 filters for charts, dashboards, 
datasets (#10335)
6f56cd5 is described below

commit 6f56cd5e9d18ab8c89f282551b349ccf8da99dc1
Author: ʈᵃᵢ 
AuthorDate: Mon Jul 27 10:14:11 2020 -0700

feat(listviews): SIP-34 filters for charts, dashboards, datasets (#10335)
---
 .../components/ListView/ListView_spec.jsx  | 233 ++--
 .../{chartList => CRUD/chart}/ChartList_spec.jsx   |  14 +-
 .../dashboard}/DashboardList_spec.jsx  |  13 +-
 .../dataset}/DatasetList_spec.jsx  |  14 +-
 .../ErrorMessage/TimeoutErrorMessage.tsx   |   2 +-
 .../src/components/ListView/LegacyFilters.tsx  | 204 --
 .../src/components/ListView/ListView.tsx   |  35 +--
 superset-frontend/src/components/ListView/types.ts |  30 +-
 superset-frontend/src/components/ListView/utils.ts |  23 --
 superset-frontend/src/components/Modal.tsx |   2 +-
 superset-frontend/src/featureFlags.ts  |   1 -
 .../views/{chartList => CRUD/chart}/ChartList.tsx  | 303 +++--
 .../dashboard}/DashboardList.tsx   | 271 ++
 .../dataset}/AddDatasetModal.tsx   |  12 +-
 .../views/{datasetList => CRUD/dataset}/Button.tsx |   0
 .../{datasetList => CRUD/dataset}/DatasetList.tsx  | 302 +++-
 superset-frontend/src/views/CRUD/utils.tsx |  61 +
 superset-frontend/src/welcome/App.tsx  |   6 +-
 superset/config.py |   1 -
 superset/databases/api.py  |  90 +-
 superset/databases/schemas.py  |  10 +
 tests/database_api_tests.py|  39 +++
 22 files changed, 678 insertions(+), 988 deletions(-)

diff --git 
a/superset-frontend/spec/javascripts/components/ListView/ListView_spec.jsx 
b/superset-frontend/spec/javascripts/components/ListView/ListView_spec.jsx
index de0d179..cd1f823 100644
--- a/superset-frontend/spec/javascripts/components/ListView/ListView_spec.jsx
+++ b/superset-frontend/spec/javascripts/components/ListView/ListView_spec.jsx
@@ -19,7 +19,6 @@
 import React from 'react';
 import { mount, shallow } from 'enzyme';
 import { act } from 'react-dom/test-utils';
-import { MenuItem } from 'react-bootstrap';
 import { QueryParamProvider } from 'use-query-params';
 import { supersetTheme, ThemeProvider } from '@superset-ui/style';
 
@@ -42,6 +41,7 @@ function makeMockLocation(query) {
   };
 }
 
+const fetchSelectsMock = jest.fn(() => []);
 const mockedProps = {
   title: 'Data Table',
   columns: [
@@ -61,9 +61,25 @@ const mockedProps = {
   ],
   filters: [
 {
+  Header: 'ID',
+  id: 'id',
+  input: 'select',
+  selects: [{ label: 'foo', value: 'bar' }],
+  operator: 'eq',
+},
+{
   Header: 'Name',
   id: 'name',
-  operators: [{ label: 'Starts With', value: 'sw' }],
+  input: 'search',
+  operator: 'ct',
+},
+{
+  Header: 'Age',
+  id: 'age',
+  input: 'select',
+  fetchSelects: fetchSelectsMock,
+  paginate: true,
+  operator: 'eq',
 },
   ],
   data: [
@@ -145,59 +161,6 @@ describe('ListView', () => {
 `);
   });
 
-  it('calls fetchData on filter', () => {
-act(() => {
-  wrapper
-.find('.dropdown-toggle')
-.children('button')
-.at(0)
-.props()
-.onClick();
-
-  wrapper
-.find(MenuItem)
-.at(0)
-.props()
-.onSelect({ id: 'name', Header: 'name' });
-});
-wrapper.update();
-
-act(() => {
-  wrapper.find('.filter-inputs input[type="text"]').prop('onChange')({
-persist() {},
-currentTarget: { value: 'foo' },
-  });
-});
-wrapper.update();
-
-act(() => {
-  wrapper.find('[data-test="apply-filters"]').last().prop('onClick')();
-});
-wrapper.update();
-
-expect(mockedProps.fetchData.mock.calls[0]).toMatchInlineSnapshot(`
-Array [
-  Object {
-"filters": Array [
-  Object {
-"id": "name",
-"operator": "sw",
-"value": "foo",
-  },
-],
-"pageIndex": 0,
-"pageSize": 1,
-"sortBy": Array [
-  Object {
-"desc": false,
-"id": "id",
-  },
-],
-  },
-]
-`);
-  });
-
   it('renders pagination controls', () => {
 expect(wrapper.find(Pagination).exists()).toBe(true);
 expect(wrapper.find(Pagination.Prev).exists()).toBe(true);
@@ -212,26 +175,20 @@ Array [
 wrapper.upda

[incubator-superset] branch master updated: fix: allow creating table option and remove schema requirement in dataset add modal (#10369)

2020-07-24 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new 09dfbab  fix: allow creating table option and remove schema 
requirement in dataset add modal (#10369)
09dfbab is described below

commit 09dfbab7ed7cdb518109fa3fb093ce20d52fa8af
Author: ʈᵃᵢ 
AuthorDate: Fri Jul 24 13:17:44 2020 -0700

fix: allow creating table option and remove schema requirement in dataset 
add modal (#10369)
---
 superset-frontend/src/components/TableSelector.jsx | 70 ++
 .../src/views/datasetList/AddDatasetModal.tsx  |  4 +-
 2 files changed, 46 insertions(+), 28 deletions(-)

diff --git a/superset-frontend/src/components/TableSelector.jsx 
b/superset-frontend/src/components/TableSelector.jsx
index 33d43d8..634ac38 100644
--- a/superset-frontend/src/components/TableSelector.jsx
+++ b/superset-frontend/src/components/TableSelector.jsx
@@ -20,7 +20,7 @@ import React from 'react';
 import styled from '@superset-ui/style';
 import PropTypes from 'prop-types';
 import rison from 'rison';
-import { Select, AsyncSelect } from 'src/components/Select';
+import { AsyncSelect, CreatableSelect, Select } from 'src/components/Select';
 import { Label } from 'react-bootstrap';
 import { t } from '@superset-ui/translation';
 import { SupersetClient } from '@superset-ui/connection';
@@ -358,31 +358,49 @@ export default class TableSelector extends 
React.PureComponent {
   tableSelectDisabled = true;
 }
 const options = this.state.tableOptions;
-const select = this.props.schema ? (
-  
-) : (
-  
-);
+let select = null;
+if (this.props.schema && !this.props.formMode) {
+  select = (
+
+  );
+} else if (this.props.formMode) {
+  select = (
+
+  );
+} else {
+  select = (
+
+  );
+}
 const refresh = !this.props.formMode && (
this.changeSchema({ value: this.props.schema }, true)}
diff --git a/superset-frontend/src/views/datasetList/AddDatasetModal.tsx 
b/superset-frontend/src/views/datasetList/AddDatasetModal.tsx
index c13969c..c699520 100644
--- a/superset-frontend/src/views/datasetList/AddDatasetModal.tsx
+++ b/superset-frontend/src/views/datasetList/AddDatasetModal.tsx
@@ -73,7 +73,7 @@ const DatasetModal: FunctionComponent = ({
 tableName: string;
   }) => {
 setDatasourceId(dbId);
-setDisableSave(isNil(dbId) || isEmpty(schema) || isEmpty(tableName));
+setDisableSave(isNil(dbId) || isEmpty(tableName));
 setSchema(schema);
 setTableName(tableName);
   };
@@ -83,7 +83,7 @@ const DatasetModal: FunctionComponent = ({
   endpoint: '/api/v1/dataset/',
   body: JSON.stringify({
 database: datasourceId,
-schema: currentSchema,
+...(currentSchema ? { schema: currentSchema } : {}),
 table_name: currentTableName,
   }),
   headers: { 'Content-Type': 'application/json' },



[incubator-superset] branch master updated: fix(api): fixes perf on charts and introduces sorting by database on datasets (#10392)

2020-07-23 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new 2fd37b1  fix(api): fixes perf on charts and introduces sorting by 
database on datasets (#10392)
2fd37b1 is described below

commit 2fd37b18e397c8ba700379485e9e9ddc7e6c78be
Author: Daniel Vaz Gaspar 
AuthorDate: Thu Jul 23 19:19:05 2020 +0100

fix(api): fixes perf on charts and introduces sorting by database on 
datasets (#10392)
---
 superset-frontend/src/views/datasetList/DatasetList.tsx | 8 +---
 superset/connectors/sqla/models.py  | 4 
 superset/datasets/api.py| 5 +++--
 superset/models/slice.py| 2 +-
 tests/datasets/api_tests.py | 3 +--
 5 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/superset-frontend/src/views/datasetList/DatasetList.tsx 
b/superset-frontend/src/views/datasetList/DatasetList.tsx
index a5da58a..a0fcfd6 100644
--- a/superset-frontend/src/views/datasetList/DatasetList.tsx
+++ b/superset-frontend/src/views/datasetList/DatasetList.tsx
@@ -54,7 +54,10 @@ type Dataset = {
   changed_by_url: string;
   changed_by: string;
   changed_on_delta_humanized: string;
-  database_name: string;
+  database: {
+id: string;
+database_name: string;
+  };
   explore_url: string;
   id: number;
   owners: Array;
@@ -275,8 +278,7 @@ const DatasetList: FunctionComponent = ({
 },
 {
   Header: t('Source'),
-  accessor: 'database_name',
-  disableSortBy: true,
+  accessor: 'database.database_name',
   size: 'lg',
 },
 {
diff --git a/superset/connectors/sqla/models.py 
b/superset/connectors/sqla/models.py
index f571cbc..2494096 100644
--- a/superset/connectors/sqla/models.py
+++ b/superset/connectors/sqla/models.py
@@ -493,10 +493,6 @@ class SqlaTable(  # pylint: 
disable=too-many-public-methods,too-many-instance-at
 def datasource_name(self) -> str:
 return self.table_name
 
-@property
-def database_name(self) -> str:
-return self.database.name
-
 @classmethod
 def get_datasource_by_name(
 cls,
diff --git a/superset/datasets/api.py b/superset/datasets/api.py
index 34d08d5..eee5e33 100644
--- a/superset/datasets/api.py
+++ b/superset/datasets/api.py
@@ -72,8 +72,8 @@ class DatasetRestApi(BaseSupersetModelRestApi):
 }
 list_columns = [
 "id",
-"database_id",
-"database_name",
+"database.id",
+"database.database_name",
 "changed_by_name",
 "changed_by_url",
 "changed_by.first_name",
@@ -97,6 +97,7 @@ class DatasetRestApi(BaseSupersetModelRestApi):
 "schema",
 "changed_by.first_name",
 "changed_on_delta_humanized",
+"database.database_name",
 ]
 show_columns = [
 "database.database_name",
diff --git a/superset/models/slice.py b/superset/models/slice.py
index 30f56ca..b7f9e05 100644
--- a/superset/models/slice.py
+++ b/superset/models/slice.py
@@ -269,7 +269,7 @@ class Slice(
 
 @property
 def changed_by_url(self) -> str:
-return f"/superset/profile/{self.created_by.username}"  # type: ignore
+return f"/superset/profile/{self.changed_by.username}"  # type: ignore
 
 @property
 def icons(self) -> str:
diff --git a/tests/datasets/api_tests.py b/tests/datasets/api_tests.py
index d5bf9b0..0710b9d 100644
--- a/tests/datasets/api_tests.py
+++ b/tests/datasets/api_tests.py
@@ -92,8 +92,7 @@ class TestDatasetApi(SupersetTestCase):
 "changed_by_url",
 "changed_on_delta_humanized",
 "changed_on_utc",
-"database_id",
-"database_name",
+"database",
 "default_endpoint",
 "explore_url",
 "id",



[incubator-superset] branch master updated (7d10669 -> d92cb66)

2020-07-20 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


from 7d10669  move control panel to filterbox folder (#10346)
 add d92cb66  docs: add and update README badges (#10366)

No new revisions were added by this update.

Summary of changes:
 README.md | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)



[incubator-superset] branch master updated: fix: update community Slack link (#10360)

2020-07-17 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new 1a41ea4  fix: update community Slack link (#10360)
1a41ea4 is described below

commit 1a41ea49880520d296a7cb58f2d8ebccfbd5681a
Author: kxu 
AuthorDate: Fri Jul 17 14:10:50 2020 -0700

fix: update community Slack link (#10360)
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 3ad6c91..9741174 100644
--- a/README.md
+++ b/README.md
@@ -105,7 +105,7 @@ supported databases can be found
 ## Get Involved
 
 * Ask and answer questions on 
[StackOverflow](https://stackoverflow.com/questions/tagged/apache-superset)
-* [Join our community's 
Slack](https://join.slack.com/t/apache-superset/shared_invite/enQtNDMxMDY5NjM4MDU0LWJmOTcxYjlhZTRhYmEyYTMzOWYxOWEwMjcwZDZiNWRiNDY2NDUwNzcwMDFhNzE1ZmMxZTZlZWY0ZTQ2MzMyNTU)
+* [Join our community's 
Slack](https://join.slack.com/t/apache-superset/shared_invite/zt-g8lpruog-HeqpgYrwdfrD5OYhlU7hPQ)
   and please read our [Slack Community 
Guidelines](CODE_OF_CONDUCT.md#slack-community-guidelines)
 * [Join our d...@superset.apache.org Mailing 
list](https://lists.apache.org/list.html?d...@superset.apache.org)
 



[incubator-superset] branch master updated: feat(listviews): SIP-34 Bulk Select (#10298)

2020-07-16 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new 0eee678  feat(listviews): SIP-34 Bulk Select (#10298)
0eee678 is described below

commit 0eee6785a812cfa65276cd2bfbef08da8ff357f3
Author: ʈᵃᵢ 
AuthorDate: Thu Jul 16 16:07:49 2020 -0700

feat(listviews): SIP-34 Bulk Select (#10298)
---
 superset-frontend/jest.config.js   |   1 +
 .../waitForComponentToPaint.ts}|  29 ++-
 .../components/ListView/ListView_spec.jsx  |  70 ++--
 .../dashboard/components/CodeModal_spec.jsx|   6 +-
 .../views/datasetList/DatasetList_spec.jsx |  81 -
 .../src/SqlLab/components/RunQueryActionButton.tsx |   4 +-
 .../src/components/{Button.jsx => Button.tsx}  |  78 +---
 .../src/components/ListView/ListView.tsx   | 132 +-
 .../src/components/ListView/ListViewStyles.less|   9 +
 .../src/components/ListView/TableCollection.tsx|   6 +-
 superset-frontend/src/components/ListView/utils.ts |   2 +
 superset-frontend/src/components/Menu/Menu.jsx |   3 +-
 superset-frontend/src/components/Menu/SubMenu.tsx  | 113 +---
 .../src/views/chartList/ChartList.tsx  |  56 +++---
 .../src/views/dashboardList/DashboardList.tsx  |  65 ---
 .../{DatasetModal.tsx => AddDatasetModal.tsx}  |  16 +-
 .../src/views/datasetList/DatasetList.tsx  | 199 +
 superset-frontend/webpack.config.js|   1 +
 18 files changed, 570 insertions(+), 301 deletions(-)

diff --git a/superset-frontend/jest.config.js b/superset-frontend/jest.config.js
index ea190d1..18b05cc 100644
--- a/superset-frontend/jest.config.js
+++ b/superset-frontend/jest.config.js
@@ -23,6 +23,7 @@ module.exports = {
 '\\.(gif|ttf|eot)$': '/spec/__mocks__/fileMock.js',
 '\\.svg$': '/spec/__mocks__/svgrMock.js',
 '^src/(.*)$': '/src/$1',
+'^spec/(.*)$': '/spec/$1',
   },
   setupFilesAfterEnv: ['/spec/helpers/shim.js'],
   testURL: 'http://localhost',
diff --git 
a/superset-frontend/spec/javascripts/dashboard/components/CodeModal_spec.jsx 
b/superset-frontend/spec/helpers/waitForComponentToPaint.ts
similarity index 58%
copy from 
superset-frontend/spec/javascripts/dashboard/components/CodeModal_spec.jsx
copy to superset-frontend/spec/helpers/waitForComponentToPaint.ts
index 297492e..2e57a80 100644
--- a/superset-frontend/spec/javascripts/dashboard/components/CodeModal_spec.jsx
+++ b/superset-frontend/spec/helpers/waitForComponentToPaint.ts
@@ -16,20 +16,19 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import React from 'react';
-import { mount } from 'enzyme';
+import { ReactWrapper } from 'enzyme';
+import { act } from 'react-dom/test-utils';
 
-import CodeModal from 'src/dashboard/components/CodeModal';
-
-describe('CodeModal', () => {
-  const mockedProps = {
-triggerNode: ,
-  };
-  it('is valid', () => {
-expect(React.isValidElement()).toBe(true);
-  });
-  it('renders the trigger node', () => {
-const wrapper = mount();
-expect(wrapper.find('.fa-edit')).toHaveLength(1);
+// taken from: https://github.com/enzymejs/enzyme/issues/2073
+// There is currently and issue with enzyme and react-16's hooks
+// that results in a race condition between tests and react hook updates.
+// This function ensures tests run after all react updates are done.
+export default async function waitForComponentToPaint(
+  wrapper: ReactWrapper,
+  amount = 0,
+) {
+  await act(async () => {
+await new Promise(resolve => setTimeout(resolve, amount));
+wrapper.update();
   });
-});
+}
diff --git 
a/superset-frontend/spec/javascripts/components/ListView/ListView_spec.jsx 
b/superset-frontend/spec/javascripts/components/ListView/ListView_spec.jsx
index bb7b2d8..6f62e4e 100644
--- a/superset-frontend/spec/javascripts/components/ListView/ListView_spec.jsx
+++ b/superset-frontend/spec/javascripts/components/ListView/ListView_spec.jsx
@@ -22,13 +22,17 @@ import { act } from 'react-dom/test-utils';
 import { MenuItem } from 'react-bootstrap';
 import Select from 'src/components/Select';
 import { QueryParamProvider } from 'use-query-params';
+import { supersetTheme, ThemeProvider } from '@superset-ui/style';
 
 import ListView from 'src/components/ListView/ListView';
 import ListViewFilters from 'src/components/ListView/Filters';
 import ListViewPagination from 'src/components/ListView/Pagination';
 import Pagination from 'src/components/Pagination';
+import Button from 'src/components/Button';
 import { areArraysShallowEqual } from 'src/reduxUtils';
-import { supersetTheme, ThemeProvider } from '@superset-ui/style';
+
+import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
+import IndeterminateCheckbox

[incubator-superset] branch master updated: fix: fetch datasets list after dataset created successfully (#10290)

2020-07-11 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new 9d75740  fix: fetch datasets list after dataset created successfully 
(#10290)
9d75740 is described below

commit 9d757403be58cba16386f4a55e4c7194abc6881c
Author: Lily Kuang 
AuthorDate: Sat Jul 11 20:57:54 2020 -0700

fix: fetch datasets list after dataset created successfully (#10290)
---
 superset-frontend/src/components/Menu/SubMenu.tsx  | 111 +++--
 .../src/views/datasetList/DatasetList.tsx  |   6 +-
 .../src/views/datasetList/DatasetModal.tsx |  24 +++--
 3 files changed, 75 insertions(+), 66 deletions(-)

diff --git a/superset-frontend/src/components/Menu/SubMenu.tsx 
b/superset-frontend/src/components/Menu/SubMenu.tsx
index f565af0..5b45ae1 100644
--- a/superset-frontend/src/components/Menu/SubMenu.tsx
+++ b/superset-frontend/src/components/Menu/SubMenu.tsx
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import React from 'react';
+import React, { useState } from 'react';
 import styled from '@superset-ui/style';
 import DatasetModal from 'src/views/datasetList/DatasetModal';
 import { Button, Nav, Navbar, MenuItem } from 'react-bootstrap';
@@ -64,71 +64,72 @@ const StyledHeader = styled.header`
 `;
 
 interface SubMenuProps {
-  createButton?: { name: string; url: string | null };
   canCreate?: boolean;
-  name: string;
   childs?: Array<{ label: string; name: string; url: string }>;
+  createButton?: { name: string; url: string | null };
+  fetchData?: () => void;
+  name: string;
 }
 
-interface SubMenuState {
-  selectedMenu: string;
-  isModalOpen: boolean;
-}
-
-class SubMenu extends React.PureComponent {
-  state: SubMenuState = {
-selectedMenu:
-  this.props.childs && this.props.childs[0]
-? this.props.childs[0].label
-: '',
-isModalOpen: false,
-  };
+const SubMenu = ({
+  canCreate,
+  childs,
+  createButton,
+  fetchData,
+  name,
+}: SubMenuProps) => {
+  const [isModalOpen, setIsModalOpen] = useState(false);
+  const [selectedMenu, setSelectedMenu] = useState(
+childs?.[0]?.label,
+  );
 
-  onOpen = () => {
-this.setState({ isModalOpen: true });
+  const onOpen = () => {
+setIsModalOpen(true);
   };
 
-  onClose = () => {
-this.setState({ isModalOpen: false });
+  const onClose = () => {
+setIsModalOpen(false);
   };
 
-  handleClick = (item: string) => () => {
-this.setState({ selectedMenu: item });
+  const handleClick = (item: string) => () => {
+setSelectedMenu(item);
   };
 
-  render() {
-return (
-  
-
-  
-{this.props.name}
-  
-  
-  
-{this.props.childs &&
-  this.props.childs.map(child => (
-
-  {child.label}
-
-  ))}
+  return (
+
+  
+
+  {name}
+
+
+
+  {childs &&
+childs.map(child => (
+  
+{child.label}
+  
+))}
+
+{canCreate && createButton && (
+  
+
+   {createButton.name}
+
   
-  {this.props.canCreate && this.props.createButton && (
-
-  
- {this.props.createButton.name}
-  
-
-  )}
-
-  
-);
-  }
-}
+)}
+  
+
+  );
+};
 
 export default SubMenu;
diff --git a/superset-frontend/src/views/datasetList/DatasetList.tsx 
b/superset-frontend/src/views/datasetList/DatasetList.tsx
index cc6fe46..e6c6248 100644
--- a/superset-frontend/src/views/datasetList/DatasetList.tsx
+++ b/superset-frontend/src/views/datasetList/DatasetList.tsx
@@ -519,7 +519,11 @@ const DatasetList: FunctionComponent = ({
 
   return (
 <>
-  
+   lastFetchDataConfig && fetchData(lastFetchDataConfig)}
+  />
void;
   addSuccessToast: (msg: string) => void;
+  fetchData?: () => void;
   onHide: () => void;
   show: boolean;
 }
@@ -47,13 +48,14 @@ const TableSelectorContainer = styled.div`
 const DatasetModal: FunctionComponent = ({
   addDangerToast,
   addSuccessToast,
+  fetchData,
   onHide,
   show,
 }) => {
-  const [datasourceId, setDatasourceId] = useState(null);
-  const [disableSave, setDisableSave] = useState(true);
   const [currentSchema, setSchema] = useState('');
   const [currentTableName, setTableName] = useState('');
+  const [datasourceId, setDatasourceId] = useState(null);
+  const [disableSave, setDisableSave] = useState(true);
 
   const onChange = ({
 dbId,
@@ -71,17 +73,19 @@ 

[incubator-superset] branch master updated: style: new toast design closer to SIP-34 (#10178)

2020-07-10 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new 3b4df51  style: new toast design closer to SIP-34 (#10178)
3b4df51 is described below

commit 3b4df51848f1ff3b4f22771eacdd49e77077125d
Author: Lily Kuang 
AuthorDate: Fri Jul 10 14:58:59 2020 -0700

style: new toast design closer to SIP-34 (#10178)
---
 superset-frontend/images/icons/check.svg   |  22 +
 superset-frontend/images/icons/error.svg   |  22 +
 .../dashboard/components/DashboardBuilder_spec.jsx |   5 +
 .../components/ToastPresenter_spec.jsx |   4 +-
 .../messageToasts/components/Toast_spec.jsx|  24 ++---
 .../javascripts/sqllab/TabbedSqlEditors_spec.jsx   |   7 ++
 superset-frontend/src/components/Icon.tsx  |   6 ++
 .../src/messageToasts/components/Toast.jsx | 109 -
 .../src/messageToasts/components/Toast.tsx |  93 ++
 .../messageToasts/components/ToastPresenter.jsx|  56 ---
 .../messageToasts/components/ToastPresenter.tsx|  91 +
 .../src/messageToasts/stylesheets/toast.less   |  78 ---
 superset-frontend/src/messageToasts/types.ts   |  24 +
 13 files changed, 285 insertions(+), 256 deletions(-)

diff --git a/superset-frontend/images/icons/check.svg 
b/superset-frontend/images/icons/check.svg
new file mode 100644
index 000..7f6fd6e
--- /dev/null
+++ b/superset-frontend/images/icons/check.svg
@@ -0,0 +1,22 @@
+
+http://www.w3.org/2000/svg;>
+
+
diff --git a/superset-frontend/images/icons/error.svg 
b/superset-frontend/images/icons/error.svg
new file mode 100644
index 000..03c1962
--- /dev/null
+++ b/superset-frontend/images/icons/error.svg
@@ -0,0 +1,22 @@
+
+http://www.w3.org/2000/svg;>
+
+
+
diff --git 
a/superset-frontend/spec/javascripts/dashboard/components/DashboardBuilder_spec.jsx
 
b/superset-frontend/spec/javascripts/dashboard/components/DashboardBuilder_spec.jsx
index dbdee6a..04d885e 100644
--- 
a/superset-frontend/spec/javascripts/dashboard/components/DashboardBuilder_spec.jsx
+++ 
b/superset-frontend/spec/javascripts/dashboard/components/DashboardBuilder_spec.jsx
@@ -22,6 +22,7 @@ import { shallow, mount } from 'enzyme';
 import sinon from 'sinon';
 
 import { ParentSize } from '@vx/responsive';
+import { supersetTheme, ThemeProvider } from '@superset-ui/style';
 import { Sticky, StickyContainer } from 'react-sticky';
 import { TabContainer, TabContent, TabPane } from 'react-bootstrap';
 
@@ -77,6 +78,10 @@ describe('DashboardBuilder', () => {
   
 {builder}
   ,
+  {
+wrappingComponent: ThemeProvider,
+wrappingComponentProps: { theme: supersetTheme },
+  },
 )
   : shallow(builder);
   }
diff --git 
a/superset-frontend/spec/javascripts/messageToasts/components/ToastPresenter_spec.jsx
 
b/superset-frontend/spec/javascripts/messageToasts/components/ToastPresenter_spec.jsx
index d888dad..9b3e4a0 100644
--- 
a/superset-frontend/spec/javascripts/messageToasts/components/ToastPresenter_spec.jsx
+++ 
b/superset-frontend/spec/javascripts/messageToasts/components/ToastPresenter_spec.jsx
@@ -34,9 +34,9 @@ describe('ToastPresenter', () => {
 return wrapper;
   }
 
-  it('should render a div with class toast-presenter', () => {
+  it('should render a div with id toast-presenter', () => {
 const wrapper = setup();
-expect(wrapper.find('.toast-presenter')).toHaveLength(1);
+expect(wrapper.find('#toast-presenter')).toHaveLength(1);
   });
 
   it('should render a Toast for each toast object', () => {
diff --git 
a/superset-frontend/spec/javascripts/messageToasts/components/Toast_spec.jsx 
b/superset-frontend/spec/javascripts/messageToasts/components/Toast_spec.jsx
index a37b834..d411093 100644
--- a/superset-frontend/spec/javascripts/messageToasts/components/Toast_spec.jsx
+++ b/superset-frontend/spec/javascripts/messageToasts/components/Toast_spec.jsx
@@ -19,21 +19,19 @@
 import { Alert } from 'react-bootstrap';
 import React from 'react';
 import { mount } from 'enzyme';
+import { act } from 'react-dom/test-utils';
 import Toast from 'src/messageToasts/components/Toast';
 
 import mockMessageToasts from '../mockMessageToasts';
 
-describe('Toast', () => {
-  const props = {
-toast: mockMessageToasts[0],
-onCloseToast() {},
-  };
+const props = {
+  toast: mockMessageToasts[0],
+  onCloseToast() {},
+};
 
-  function setup(overrideProps) {
-const wrapper = mount();
-return wrapper;
-  }
+const setup = overrideProps => mount();
 
+describe('Toast', () => {
   it('should render an Alert', () => {
 const wrapper = setup();
 expect(wrapper.find(Alert)).toHaveLength(1);
@@ -52,9 +50,13 @@ describe('Toast', () => {
   

[incubator-superset] branch master updated (316de3a -> 0afa151)

2020-07-02 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


from 316de3a  Update README.md (#10221)
 add 0afa151  fix(listview): use disableSortBy to disable sorting in table 
columns (#10223)

No new revisions were added by this update.

Summary of changes:
 superset-frontend/src/views/chartList/ChartList.tsx |  9 -
 superset-frontend/src/views/dashboardList/DashboardList.tsx |  7 +++
 superset-frontend/src/views/datasetList/DatasetList.tsx | 11 +--
 superset-frontend/src/welcome/DashboardTable.jsx|  3 ---
 4 files changed, 16 insertions(+), 14 deletions(-)



[incubator-superset] branch master updated (8bdc6b1 -> 3414f35)

2020-06-26 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


from 8bdc6b1  fix: row count container alignment (#10179)
 add 3414f35  refactor: better naming for config flags (#10180)

No new revisions were added by this update.

Summary of changes:
 .../spec/javascripts/components/ListView/ListView_spec.jsx |  2 +-
 superset-frontend/src/components/ListView/ListView.tsx | 10 +-
 superset-frontend/src/featureFlags.ts  |  2 +-
 superset-frontend/src/views/chartList/ChartList.tsx|  8 
 superset-frontend/src/views/dashboardList/DashboardList.tsx|  8 
 superset/config.py |  5 +++--
 6 files changed, 18 insertions(+), 17 deletions(-)



[incubator-superset] branch master updated: style: listviews closer to SIP-34 (#10094)

2020-06-23 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new be936c2  style: listviews closer to SIP-34 (#10094)
be936c2 is described below

commit be936c2eb89fa09ed6147fb9f2dc4c63ed1390bd
Author: ʈᵃᵢ 
AuthorDate: Tue Jun 23 14:17:28 2020 -0700

style: listviews closer to SIP-34 (#10094)
---
 .../components/ListView/ListView_spec.jsx  |   3 +-
 .../javascripts/views/chartList/ChartList_spec.jsx |   4 +
 .../views/dashboardList/DashboardList_spec.jsx |   4 +
 .../javascripts/welcome/DashboardTable_spec.jsx|   8 +-
 superset-frontend/src/components/AvatarIcon.tsx|  29 ++-
 .../src/components/ListView/ListView.tsx   | 211 ++---
 .../src/components/ListView/ListViewStyles.less| 169 ++---
 .../src/components/ListView/Pagination.tsx |  11 +-
 .../src/components/ListView/TableCollection.tsx|  82 ++--
 superset-frontend/src/components/Menu/SubMenu.tsx  |  16 +-
 superset-frontend/src/components/Pagination.tsx| 132 +
 .../src/types/react-table-config.d.ts  |  10 +-
 superset-frontend/src/utils/common.js  |   4 +
 .../src/views/chartList/ChartList.tsx  | 103 +-
 .../src/views/dashboardList/DashboardList.tsx  | 125 ++--
 .../src/views/datasetList/DatasetList.tsx  | 179 +
 superset-frontend/stylesheets/less/variables.less  |   4 -
 17 files changed, 682 insertions(+), 412 deletions(-)

diff --git 
a/superset-frontend/spec/javascripts/components/ListView/ListView_spec.jsx 
b/superset-frontend/spec/javascripts/components/ListView/ListView_spec.jsx
index e5e04d5..52e15ff 100644
--- a/superset-frontend/spec/javascripts/components/ListView/ListView_spec.jsx
+++ b/superset-frontend/spec/javascripts/components/ListView/ListView_spec.jsx
@@ -19,13 +19,14 @@
 import React from 'react';
 import { mount, shallow } from 'enzyme';
 import { act } from 'react-dom/test-utils';
-import { MenuItem, Pagination } from 'react-bootstrap';
+import { MenuItem } from 'react-bootstrap';
 import Select from 'src/components/Select';
 import { QueryParamProvider } from 'use-query-params';
 
 import ListView from 'src/components/ListView/ListView';
 import ListViewFilters from 'src/components/ListView/Filters';
 import ListViewPagination from 'src/components/ListView/Pagination';
+import Pagination from 'src/components/Pagination';
 import { areArraysShallowEqual } from 'src/reduxUtils';
 import { ThemeProvider } from 'emotion-theming';
 import { supersetTheme } from '@superset-ui/style';
diff --git 
a/superset-frontend/spec/javascripts/views/chartList/ChartList_spec.jsx 
b/superset-frontend/spec/javascripts/views/chartList/ChartList_spec.jsx
index d5785bf..1ec7275 100644
--- a/superset-frontend/spec/javascripts/views/chartList/ChartList_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/chartList/ChartList_spec.jsx
@@ -21,6 +21,8 @@ import { mount } from 'enzyme';
 import thunk from 'redux-thunk';
 import configureStore from 'redux-mock-store';
 import fetchMock from 'fetch-mock';
+import { ThemeProvider } from 'emotion-theming';
+import { supersetTheme } from '@superset-ui/style';
 
 import ChartList from 'src/views/chartList/ChartList';
 import ListView from 'src/components/ListView/ListView';
@@ -77,6 +79,8 @@ describe('ChartList', () => {
   const mockedProps = {};
   const wrapper = mount(, {
 context: { store },
+wrappingComponent: ThemeProvider,
+wrappingComponentProps: { theme: supersetTheme },
   });
 
   it('renders', () => {
diff --git 
a/superset-frontend/spec/javascripts/views/dashboardList/DashboardList_spec.jsx 
b/superset-frontend/spec/javascripts/views/dashboardList/DashboardList_spec.jsx
index 086d9d1..456035e 100644
--- 
a/superset-frontend/spec/javascripts/views/dashboardList/DashboardList_spec.jsx
+++ 
b/superset-frontend/spec/javascripts/views/dashboardList/DashboardList_spec.jsx
@@ -21,6 +21,8 @@ import { mount } from 'enzyme';
 import thunk from 'redux-thunk';
 import configureStore from 'redux-mock-store';
 import fetchMock from 'fetch-mock';
+import { ThemeProvider } from 'emotion-theming';
+import { supersetTheme } from '@superset-ui/style';
 
 import DashboardList from 'src/views/dashboardList/DashboardList';
 import ListView from 'src/components/ListView/ListView';
@@ -67,6 +69,8 @@ describe('DashboardList', () => {
   const mockedProps = {};
   const wrapper = mount(, {
 context: { store },
+wrappingComponent: ThemeProvider,
+wrappingComponentProps: { theme: supersetTheme },
   });
 
   it('renders', () => {
diff --git a/superset-frontend/spec/javascripts/welcome/DashboardTable_spec.jsx 
b/superset-frontend/spec/javascripts/welcome/DashboardTable_spec.jsx
index a31761a..2fe659b 100644
--- a/superset-f

[incubator-superset] branch master updated: feat: dataset add modal (#10104)

2020-06-23 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new 4d1d409  feat: dataset add modal (#10104)
4d1d409 is described below

commit 4d1d40989c333e85441fb750774bb9cc0d6c831d
Author: Lily Kuang 
AuthorDate: Tue Jun 23 10:15:35 2020 -0700

feat: dataset add modal (#10104)
---
 superset-frontend/images/icons/warning.svg |  22 
 superset-frontend/src/components/Icon.tsx  |  29 ++---
 superset-frontend/src/components/Menu/SubMenu.tsx  |  34 --
 superset-frontend/src/components/TableSelector.jsx |  44 +--
 superset-frontend/src/views/datasetList/Button.tsx |  67 +++
 .../src/views/datasetList/DatasetModal.tsx | 129 +
 superset-frontend/src/views/datasetList/Modal.tsx  |  93 +++
 7 files changed, 382 insertions(+), 36 deletions(-)

diff --git a/superset-frontend/images/icons/warning.svg 
b/superset-frontend/images/icons/warning.svg
new file mode 100644
index 000..9375f58
--- /dev/null
+++ b/superset-frontend/images/icons/warning.svg
@@ -0,0 +1,22 @@
+
+http://www.w3.org/2000/svg;>
+
+
   
-{label}
+{this.props.label}
   
+  
   
-{childs &&
-  childs.map(child => (
+{this.props.childs &&
+  this.props.childs.map(child => (
  {
 
   ))}
   
-  {canCreate && (
+  {this.props.canCreate && (
 
-  
- {createButton.name}
+  
+ {this.props.createButton.name}
   
 
   )}
diff --git a/superset-frontend/src/components/TableSelector.jsx 
b/superset-frontend/src/components/TableSelector.jsx
index 6b1ae22..a477c85 100644
--- a/superset-frontend/src/components/TableSelector.jsx
+++ b/superset-frontend/src/components/TableSelector.jsx
@@ -17,6 +17,7 @@
  * under the License.
  */
 import React from 'react';
+import styled from '@superset-ui/style';
 import PropTypes from 'prop-types';
 import { Select, AsyncSelect } from 'src/components/Select';
 import { ControlLabel, Label } from 'react-bootstrap';
@@ -27,6 +28,13 @@ import SupersetAsyncSelect from './AsyncSelect';
 import RefreshLabel from './RefreshLabel';
 import './TableSelector.less';
 
+const FieldTitle = styled.p`
+  color: ${({ theme }) => theme.colors.secondary.light2};
+  font-size: ${({ theme }) => theme.typography.sizes.s};
+  margin: 20px 0 10px 0;
+  text-transform: uppercase;
+`;
+
 const propTypes = {
   dbId: PropTypes.number.isRequired,
   schema: PropTypes.string,
@@ -40,6 +48,7 @@ const propTypes = {
   tableName: PropTypes.string,
   database: PropTypes.object,
   sqlLabMode: PropTypes.bool,
+  formMode: PropTypes.bool,
   onChange: PropTypes.func,
   clearable: PropTypes.bool,
   handleError: PropTypes.func.isRequired,
@@ -55,6 +64,7 @@ const defaultProps = {
   onChange: () => {},
   tableNameSticky: true,
   sqlLabMode: true,
+  formMode: false,
   clearable: true,
 };
 
@@ -79,8 +89,10 @@ export default class TableSelector extends 
React.PureComponent {
   }
 
   componentDidMount() {
-this.fetchSchemas(this.state.dbId);
-this.fetchTables();
+if (this.state.dbId) {
+  this.fetchSchemas(this.state.dbId);
+  this.fetchTables();
+}
   }
 
   onChange() {
@@ -198,7 +210,10 @@ export default class TableSelector extends 
React.PureComponent {
 this.props.onSchemaChange(null);
 this.props.onDbChange(db);
 this.fetchSchemas(dbId, force);
-this.setState({ dbId, schema: null, tableOptions: [] }, this.onChange);
+this.setState(
+  { dbId, schema: null, tableName: null, tableOptions: [] },
+  this.onChange,
+);
   }
 
   changeSchema(schemaOpt, force = false) {
@@ -289,6 +304,12 @@ export default class TableSelector extends 
React.PureComponent {
   }
 
   renderSchema() {
+const refresh = !this.props.formMode && (
+   this.onDatabaseChange({ id: this.props.dbId }, true)}
+tooltipContent={t('Force refresh schema list')}
+  />
+);
 return this.renderSelectRow(
   ,
-   this.onDatabaseChange({ id: this.props.dbId }, true)}
-tooltipContent={t('Force refresh schema list')}
-  />,
+  refresh,
 );
   }
 
@@ -346,15 +364,16 @@ export default class TableSelector extends 
React.PureComponent {
 value={this.state.tableName}
 loadOptions={this.getTableNamesBySubStr}
 optionRenderer={this.renderTableOption}
+isDisabled={this.props.formMode}
   />
 );
-return this.renderSelectRow(
-  select,
+const refresh = !this.props.formMode && (
this.changeSchema({ value: this.

[incubator-superset] branch master updated (2e76fbb -> 961b55c)

2020-06-19 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


from 2e76fbb  chore: type FilterableTable (#10073)
 add 961b55c  fix: Visualization settings were lost when editing a 
datasource from Explore (#10092)

No new revisions were added by this update.

Summary of changes:
 superset-frontend/spec/javascripts/explore/exploreActions_spec.js | 2 ++
 superset-frontend/src/explore/reducers/exploreReducer.js  | 8 ++--
 2 files changed, 4 insertions(+), 6 deletions(-)



[incubator-superset] branch master updated (be6b9b8 -> c914af0)

2020-06-17 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


from be6b9b8  feat: implement dttm column configuration through db extra 
config (#9444)
 add c914af0  fix: adds pagination/infinite scroll to owners select in 
DashboardList and ChartList (#10035)

No new revisions were added by this update.

Summary of changes:
 superset-frontend/package-lock.json| 41 
 superset-frontend/package.json |  1 +
 .../components/ListView/ListView_spec.jsx  |  5 +--
 .../src/components/ListView/Filters.tsx| 44 ++
 .../src/components/ListView/ListView.tsx   |  4 +-
 superset-frontend/src/components/ListView/types.ts |  1 +
 .../src/components/Select/SupersetStyledSelect.tsx |  4 ++
 .../src/views/chartList/ChartList.tsx  |  2 +
 .../src/views/dashboardList/DashboardList.tsx  |  1 +
 9 files changed, 89 insertions(+), 14 deletions(-)



[incubator-superset] branch master updated: fix: use custom int parsing over flask int parsing in sqllab queries endpoint (#10070)

2020-06-16 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new 2612046  fix: use custom int parsing over flask int parsing in sqllab 
queries endpoint (#10070)
2612046 is described below

commit 26120467af3825577a30190f42d942836b147c9f
Author: ʈᵃᵢ 
AuthorDate: Tue Jun 16 12:58:32 2020 -0700

fix: use custom int parsing over flask int parsing in sqllab queries 
endpoint (#10070)
---
 superset/views/core.py | 7 ---
 tests/sqllab_tests.py  | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/superset/views/core.py b/superset/views/core.py
index fc14d36..e173972 100755
--- a/superset/views/core.py
+++ b/superset/views/core.py
@@ -2658,14 +2658,15 @@ class Superset(BaseSupersetView):
 return json_success(json.dumps(datasource.data))
 
 @has_access_api
-@expose("/queries/")
-def queries(self, last_updated_ms: int) -> FlaskResponse:
+@expose("/queries/")
+def queries(self, last_updated_ms: str) -> FlaskResponse:
 """
 Get the updated queries.
 
 :param last_updated_ms: unix time, milliseconds
 """
-return self.queries_exec(last_updated_ms)
+last_updated_ms_int = int(float(last_updated_ms)) if last_updated_ms 
else 0
+return self.queries_exec(last_updated_ms_int)
 
 def queries_exec(self, last_updated_ms: int) -> FlaskResponse:
 stats_logger.incr("queries")
diff --git a/tests/sqllab_tests.py b/tests/sqllab_tests.py
index 6f08f0d..e88c1b0 100644
--- a/tests/sqllab_tests.py
+++ b/tests/sqllab_tests.py
@@ -210,7 +210,7 @@ class SqlLabTests(SupersetTestCase):
 db.session.commit()
 
 data = self.get_json_resp(
-"/superset/queries/{}".format(int(datetime_to_epoch(now)) - 1000)
+"/superset/queries/{}".format(float(datetime_to_epoch(now)) - 1000)
 )
 self.assertEqual(1, len(data))
 



[incubator-superset] branch master updated (a3393c1 -> 98ab95e)

2020-06-15 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


from a3393c1  fix: native annotations (#10037)
 add 98ab95e  feat: owners profile icon on dataset list view (#10041)

No new revisions were added by this update.

Summary of changes:
 superset-frontend/package-lock.json| 17 +++
 superset-frontend/package.json |  1 +
 superset-frontend/src/components/AvatarIcon.tsx| 59 ++
 .../src/views/datasetList/DatasetList.tsx  | 35 +++--
 4 files changed, 109 insertions(+), 3 deletions(-)
 create mode 100644 superset-frontend/src/components/AvatarIcon.tsx



[incubator-superset] branch master updated: fix: remove -1, -1 from owners request in charts, dashboards list and propertiesModal (#9989)

2020-06-04 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new 619fbc9  fix: remove -1,-1 from owners request in charts, dashboards 
list and propertiesModal (#9989)
619fbc9 is described below

commit 619fbc9557a18b231be212c5a4faefc254e63f04
Author: ʈᵃᵢ 
AuthorDate: Thu Jun 4 15:31:42 2020 -0700

fix: remove -1,-1 from owners request in charts, dashboards list and 
propertiesModal (#9989)
---
 superset-frontend/src/components/ListView/Filters.tsx| 11 ++-
 superset-frontend/src/explore/components/PropertiesModal.tsx |  2 --
 superset-frontend/src/views/chartList/ChartList.tsx  | 11 ---
 superset-frontend/src/views/dashboardList/DashboardList.tsx  | 11 ---
 4 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/superset-frontend/src/components/ListView/Filters.tsx 
b/superset-frontend/src/components/ListView/Filters.tsx
index 69421d5..18380ee 100644
--- a/superset-frontend/src/components/ListView/Filters.tsx
+++ b/superset-frontend/src/components/ListView/Filters.tsx
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import React, { useState, useRef } from 'react';
+import React, { useState } from 'react';
 import styled from '@superset-ui/style';
 import { withTheme } from 'emotion-theming';
 
@@ -97,9 +97,6 @@ function SelectFilter({
   };
 
   const options = [clearFilterSelect, ...selects];
-  const optionsCache: React.MutableRefObject = useRef(
-null,
-  );
 
   const [selectedOption, setSelectedOption] = useState(clearFilterSelect);
   const onChange = (selected: SelectOption | null) => {
@@ -110,11 +107,8 @@ function SelectFilter({
 setSelectedOption(selected);
   };
   const fetchAndFormatSelects = async (inputValue: string) => {
-// only include clear filter when filter value exists
+// only include clear filter when filter value does not exist
 let result = inputValue ? [] : [clearFilterSelect];
-// only call fetch once
-// TODO: allow real async search with `inputValue`
-if (optionsCache.current) return optionsCache.current;
 if (fetchSelects) {
   const selectValues = await fetchSelects(inputValue);
   // update matching option at initial load
@@ -124,7 +118,6 @@ function SelectFilter({
   }
   result = [...result, ...selectValues];
 }
-optionsCache.current = result;
 return result;
   };
 
diff --git a/superset-frontend/src/explore/components/PropertiesModal.tsx 
b/superset-frontend/src/explore/components/PropertiesModal.tsx
index 622d5cf..b24b013 100644
--- a/superset-frontend/src/explore/components/PropertiesModal.tsx
+++ b/superset-frontend/src/explore/components/PropertiesModal.tsx
@@ -122,8 +122,6 @@ function PropertiesModal({ slice, onHide, onSave }: 
InternalProps) {
   const loadOptions = (input = '') => {
 const query = rison.encode({
   filter: input,
-  page_index: -1,
-  page_size: -1,
 });
 return SupersetClient.get({
   endpoint: `/api/v1/chart/related/owners?q=${query}`,
diff --git a/superset-frontend/src/views/chartList/ChartList.tsx 
b/superset-frontend/src/views/chartList/ChartList.tsx
index 8fed532..569049d 100644
--- a/superset-frontend/src/views/chartList/ChartList.tsx
+++ b/superset-frontend/src/views/chartList/ChartList.tsx
@@ -364,13 +364,17 @@ class ChartList extends React.PureComponent 
{
   });
   };
 
-  fetchOwners = async (filterValue = '', pageIndex = -1, pageSize = -1) => {
+  fetchOwners = async (
+filterValue = '',
+pageIndex?: number,
+pageSize?: number,
+  ) => {
 const resource = '/api/v1/chart/related/owners';
 
 try {
   const queryParams = rison.encode({
-page: pageIndex,
-page_size: pageSize,
+...(pageIndex ? { page: pageIndex } : {}),
+...(pageSize ? { page_ize: pageSize } : {}),
 ...(filterValue ? { filter: filterValue } : {}),
   });
   const { json = {} } = await SupersetClient.get({
@@ -384,6 +388,7 @@ class ChartList extends React.PureComponent {
 }),
   );
 } catch (e) {
+  console.error(e);
   this.props.addDangerToast(
 t(
   'An error occurred while fetching chart owner values: %s',
diff --git a/superset-frontend/src/views/dashboardList/DashboardList.tsx 
b/superset-frontend/src/views/dashboardList/DashboardList.tsx
index 829c6e3..0260895 100644
--- a/superset-frontend/src/views/dashboardList/DashboardList.tsx
+++ b/superset-frontend/src/views/dashboardList/DashboardList.tsx
@@ -389,13 +389,17 @@ class DashboardList extends React.PureComponent {
   });
   };
 
-  fetchOwners = async (filterValue = '', pageIndex = -1, pageSize = -1) => {
+  fetchOwners = async (
+filterValue = '',
+pageIndex?: number,
+   

[incubator-superset] branch master updated (a48a2e4 -> 21fc011)

2020-06-03 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


from a48a2e4  fix: display python_date_format in react views as well (#9934)
 add 21fc011  docs: add ELMO Cloud HR & Payroll to list of users on readme 
(#9960)

No new revisions were added by this update.

Summary of changes:
 README.md | 1 +
 1 file changed, 1 insertion(+)



[incubator-superset] branch master updated: fix: display python_date_format in react views as well (#9934)

2020-06-03 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new a48a2e4  fix: display python_date_format in react views as well (#9934)
a48a2e4 is described below

commit a48a2e44b52240675cf733246abb191b9912cd2c
Author: Bogdan 
AuthorDate: Wed Jun 3 20:24:25 2020 -0700

fix: display python_date_format in react views as well (#9934)

Co-authored-by: bogdan kyryliuk 
---
 superset/connectors/sqla/models.py | 16 
 1 file changed, 16 insertions(+)

diff --git a/superset/connectors/sqla/models.py 
b/superset/connectors/sqla/models.py
index 7236eac..b413ebd 100644
--- a/superset/connectors/sqla/models.py
+++ b/superset/connectors/sqla/models.py
@@ -300,6 +300,22 @@ class TableColumn(Model, BaseColumn):
 # TODO(john-bodley): SIP-15 will explicitly require a type conversion.
 return f"""'{dttm.strftime("%Y-%m-%d %H:%M:%S.%f")}'"""
 
+@property
+def data(self) -> Dict[str, Any]:
+attrs = (
+"id",
+"column_name",
+"verbose_name",
+"description",
+"expression",
+"filterable",
+"groupby",
+"is_dttm",
+"type",
+"python_date_format",
+)
+return {s: getattr(self, s) for s in attrs if hasattr(self, s)}
+
 
 class SqlMetric(Model, BaseMetric):
 



[incubator-superset] branch master updated: fix: fetch all owners for dashboard, chart listview filters and properties modal (#9784)

2020-06-03 Thread tai
This is an automated email from the ASF dual-hosted git repository.

tai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
 new d187d28  fix: fetch all owners for dashboard, chart listview filters 
and properties modal (#9784)
d187d28 is described below

commit d187d2887ea9348ffbc6de277ab56a1e0abab0f1
Author: ʈᵃᵢ 
AuthorDate: Wed Jun 3 19:57:03 2020 -0700

fix: fetch all owners for dashboard, chart listview filters and properties 
modal (#9784)
---
 .../javascripts/views/chartList/ChartList_spec.jsx |  2 +-
 .../views/dashboardList/DashboardList_spec.jsx |  2 +-
 .../views/datasetList/DatasetList_spec.jsx |  2 +-
 .../src/components/ListView/Filters.tsx|  2 +-
 superset-frontend/src/components/ListView/types.ts |  6 +-
 superset-frontend/src/components/ListView/utils.ts |  1 +
 .../src/explore/components/PropertiesModal.tsx |  6 +-
 .../src/views/chartList/ChartList.tsx  | 71 +++---
 .../src/views/dashboardList/DashboardList.tsx  | 83 +-
 .../src/views/datasetList/DatasetList.tsx  |  9 +--
 10 files changed, 116 insertions(+), 68 deletions(-)

diff --git 
a/superset-frontend/spec/javascripts/views/chartList/ChartList_spec.jsx 
b/superset-frontend/spec/javascripts/views/chartList/ChartList_spec.jsx
index faf0c09..d5785bf 100644
--- a/superset-frontend/spec/javascripts/views/chartList/ChartList_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/chartList/ChartList_spec.jsx
@@ -102,7 +102,7 @@ describe('ChartList', () => {
 const callsD = fetchMock.calls(/chart\/\?q/);
 expect(callsD).toHaveLength(1);
 expect(callsD[0][0]).toMatchInlineSnapshot(
-  
`"/http//localhost/api/v1/chart/?q={%22order_column%22:%22changed_on%22,%22order_direction%22:%22desc%22,%22page%22:0,%22page_size%22:25}"`,
+  
`"/http//localhost/api/v1/chart/?q=(order_column:changed_on,order_direction:desc,page:0,page_size:25)"`,
 );
   });
 });
diff --git 
a/superset-frontend/spec/javascripts/views/dashboardList/DashboardList_spec.jsx 
b/superset-frontend/spec/javascripts/views/dashboardList/DashboardList_spec.jsx
index 5dbcb81..086d9d1 100644
--- 
a/superset-frontend/spec/javascripts/views/dashboardList/DashboardList_spec.jsx
+++ 
b/superset-frontend/spec/javascripts/views/dashboardList/DashboardList_spec.jsx
@@ -92,7 +92,7 @@ describe('DashboardList', () => {
 const callsD = fetchMock.calls(/dashboard\/\?q/);
 expect(callsD).toHaveLength(1);
 expect(callsD[0][0]).toMatchInlineSnapshot(
-  
`"/http//localhost/api/v1/dashboard/?q={%22order_column%22:%22changed_on%22,%22order_direction%22:%22desc%22,%22page%22:0,%22page_size%22:25}"`,
+  
`"/http//localhost/api/v1/dashboard/?q=(order_column:changed_on,order_direction:desc,page:0,page_size:25)"`,
 );
   });
   it('edits', () => {
diff --git 
a/superset-frontend/spec/javascripts/views/datasetList/DatasetList_spec.jsx 
b/superset-frontend/spec/javascripts/views/datasetList/DatasetList_spec.jsx
index b7b3e58..c393a98 100644
--- a/superset-frontend/spec/javascripts/views/datasetList/DatasetList_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/datasetList/DatasetList_spec.jsx
@@ -92,7 +92,7 @@ describe('DatasetList', () => {
 const callsD = fetchMock.calls(/dataset\/\?q/);
 expect(callsD).toHaveLength(1);
 expect(callsD[0][0]).toMatchInlineSnapshot(
-  
`"/http//localhost/api/v1/dataset/?q={%22order_column%22:%22changed_on%22,%22order_direction%22:%22desc%22,%22page%22:0,%22page_size%22:25}"`,
+  
`"/http//localhost/api/v1/dataset/?q=(order_column:changed_on,order_direction:desc,page:0,page_size:25)"`,
 );
   });
 });
diff --git a/superset-frontend/src/components/ListView/Filters.tsx 
b/superset-frontend/src/components/ListView/Filters.tsx
index a97e498..69421d5 100644
--- a/superset-frontend/src/components/ListView/Filters.tsx
+++ b/superset-frontend/src/components/ListView/Filters.tsx
@@ -116,7 +116,7 @@ function SelectFilter({
 // TODO: allow real async search with `inputValue`
 if (optionsCache.current) return optionsCache.current;
 if (fetchSelects) {
-  const selectValues = await fetchSelects();
+  const selectValues = await fetchSelects(inputValue);
   // update matching option at initial load
   const matchingOption = result.find(x => x.value === initialValue);
   if (matchingOption) {
diff --git a/superset-frontend/src/components/ListView/types.ts 
b/superset-frontend/src/components/ListView/types.ts
index 0a1cc24..3df36a8 100644
--- a/superset-frontend/src/components/ListView/types.ts
+++ b/superset-frontend/src/components/ListView/types.ts
@@ -37,7 +37,11 @@ export interface Filter {
   unfilteredLabel?: string;
   selects?: SelectOption[];
   onFilterOpen?: () => void;