[incubator-superset] 01/01: chore: Removing explicit scoped session

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

johnbodley pushed a commit to branch john-bodley--remove-scoped-session
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit 336ff8310d7879622a86663ae8c01e5f0749ac9e
Author: John Bodley <4567245+john-bod...@users.noreply.github.com>
AuthorDate: Fri Jul 24 19:41:25 2020 -0700

chore: Removing explicit scoped session
---
 superset/views/base.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/superset/views/base.py b/superset/views/base.py
index 7aeae79..58c4943 100644
--- a/superset/views/base.py
+++ b/superset/views/base.py
@@ -487,8 +487,7 @@ def check_ownership(obj: Any, raise_if_false: bool = True) 
-> bool:
 roles = [r.name for r in get_user_roles()]
 if "Admin" in roles:
 return True
-scoped_session = db.create_scoped_session()
-orig_obj = scoped_session.query(obj.__class__).filter_by(id=obj.id).first()
+orig_obj = db.session.query(obj.__class__).filter_by(id=obj.id).first()
 
 # Making a list of owners that works across ORM models
 owners: List[User] = []



[incubator-superset] branch john-bodley--remove-scoped-session created (now 336ff83)

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

johnbodley pushed a change to branch john-bodley--remove-scoped-session
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git.


  at 336ff83  chore: Removing explicit scoped session

This branch includes the following new commits:

 new 336ff83  chore: Removing explicit scoped session

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[incubator-superset] branch master updated: style: SIP-34 labels (#10403)

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

maximebeauchemin 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 ea3c3bb  style: SIP-34 labels (#10403)
ea3c3bb is described below

commit ea3c3bbae4d5e6f9ef0ca3f66b7e8ed67367d614
Author: Maxime Beauchemin 
AuthorDate: Fri Jul 24 18:03:38 2020 -0700

style: SIP-34 labels (#10403)

* style: SIP-34 labels

Aligning with SIP-34 designs for labels/pills. Going uppercase fixes the
padding issues we had before, and the rounder pills look better.

Cleaning up some CSS in the process

* lint
---
 superset-frontend/src/components/CachedLabel.jsx   |  3 +--
 superset-frontend/src/components/Timer.jsx |  9 ++---
 .../src/explore/components/ExploreChartHeader.jsx  |  1 -
 .../src/explore/components/RowCountLabel.jsx   |  5 +
 superset-frontend/src/explore/main.less| 14 --
 .../stylesheets/less/cosmo/bootswatch.less | 18 --
 .../stylesheets/less/cosmo/variables.less  |  4 ++--
 superset-frontend/stylesheets/superset.less|  4 
 8 files changed, 26 insertions(+), 32 deletions(-)

diff --git a/superset-frontend/src/components/CachedLabel.jsx 
b/superset-frontend/src/components/CachedLabel.jsx
index 2faf9af..6876e24 100644
--- a/superset-frontend/src/components/CachedLabel.jsx
+++ b/superset-frontend/src/components/CachedLabel.jsx
@@ -70,9 +70,8 @@ class CacheLabel extends React.PureComponent {
 return (
   
 
   {this.state.clockStr}
-
+
   );
 }
 return timerSpan;
diff --git a/superset-frontend/src/explore/components/ExploreChartHeader.jsx 
b/superset-frontend/src/explore/components/ExploreChartHeader.jsx
index 4c38315..d2c7403 100644
--- a/superset-frontend/src/explore/components/ExploreChartHeader.jsx
+++ b/superset-frontend/src/explore/components/ExploreChartHeader.jsx
@@ -163,7 +163,6 @@ export class ExploreChartHeader extends React.PureComponent 
{
 endTime={chartUpdateEndTime}
 isRunning={chartStatus === 'loading'}
 status={CHART_STATUS_MAP[chartStatus]}
-style={{ fontSize: '10px', marginRight: '5px' }}
   />
   
-  
+  
 {formattedRowCount} {suffix}
   
 
diff --git a/superset-frontend/src/explore/main.less 
b/superset-frontend/src/explore/main.less
index c1ea116..856258e 100644
--- a/superset-frontend/src/explore/main.less
+++ b/superset-frontend/src/explore/main.less
@@ -210,19 +210,6 @@
   border: @gray-light solid thin;
 }
 
-.label-default {
-  background-color: @gray;
-  font-weight: @font-weight-normal;
-}
-
-.btn.label-btn {
-  background-color: @gray;
-  font-weight: @font-weight-normal;
-  color: @lightest;
-  padding: 5px 4px 4px;
-  border: 0;
-}
-
 .label-dropdown ul.dropdown-menu {
   position: fixed;
   top: auto;
@@ -233,7 +220,6 @@
 .label-btn:hover,
 .label-btn-label:hover {
   background-color: @gray-dark;
-  color: @lightest;
 }
 
 .label-btn-label {
diff --git a/superset-frontend/stylesheets/less/cosmo/bootswatch.less 
b/superset-frontend/stylesheets/less/cosmo/bootswatch.less
index 9b0ebd7..057fa7e 100644
--- a/superset-frontend/stylesheets/less/cosmo/bootswatch.less
+++ b/superset-frontend/stylesheets/less/cosmo/bootswatch.less
@@ -280,9 +280,23 @@ table,
 }
 
 .label {
-  border-radius: @border-radius-normal;
-  padding: 0.3em 0.6em 0.2em;
+  border-radius: 21px;
+  padding: 0.35em 0.8em 0.35em;
   font-weight: @font-weight-normal;
+  text-transform: uppercase;
+  font-size: @font-size-s;
+}
+.label-default:hover {
+  background-color: darken(@label-default-bg, 5%);
+}
+.label-warning:hover {
+  background-color: darken(@label-warning-bg, 5%);
+}
+.label-danger:hover {
+  background-color: darken(@label-danger-bg, 5%);
+}
+.label-primary:hover {
+  background-color: darken(@label-primary-bg, 5%);
 }
 
 label {
diff --git a/superset-frontend/stylesheets/less/cosmo/variables.less 
b/superset-frontend/stylesheets/less/cosmo/variables.less
index 4380548..8f13ac3 100644
--- a/superset-frontend/stylesheets/less/cosmo/variables.less
+++ b/superset-frontend/stylesheets/less/cosmo/variables.less
@@ -28,7 +28,7 @@
 @gray-darker: lighten(@gray-base, 13.5%);
 @gray-dark: lighten(@gray-base, 20%);
 @bs-gray: lighten(@gray-base, 33.5%);
-@bs-gray-light: lighten(@gray-base, 70%);
+@bs-gray-light: lighten(@gray-base, 60%);
 @gray-lighter: lighten(@gray-base, 95%);
 
 @brand-primary: @primary-color; // superset-var
@@ -568,7 +568,7 @@
 // ** Info label background color
 @label-info-bg: @brand-info;
 // ** Warning label background color
-@label-warning-bg: @brand-warning;
+@label-warning-bg: darken(@brand-warning, 6%);
 // ** Danger label background color
 @label-danger-bg: @brand-danger;
 
diff --git 

[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: style(sqllab): fixed button width as label changes (#10404)

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

maximebeauchemin 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 0483c26  style(sqllab): fixed button width as label changes (#10404)
0483c26 is described below

commit 0483c26254bec2d70c8e86c1468ecb7d891ea102
Author: Maxime Beauchemin 
AuthorDate: Fri Jul 24 10:05:07 2020 -0700

style(sqllab): fixed button width as label changes (#10404)

As the label change from RUN to STOP, the row of button shifts
left/right. This fixes the width so that it doesn't jitter.
---
 superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx | 4 
 1 file changed, 4 insertions(+)

diff --git a/superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx 
b/superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx
index 84a8782..5d6ac94 100644
--- a/superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx
+++ b/superset-frontend/src/SqlLab/components/RunQueryActionButton.tsx
@@ -32,6 +32,9 @@ interface Props {
   stopQuery: () => void;
   sql: string;
 }
+const commonBtnStyle = {
+  width: '80px',
+};
 
 const RunQueryActionButton = ({
   allowAsync = false,
@@ -51,6 +54,7 @@ const RunQueryActionButton = ({
 bsSize: 'small',
 bsStyle: btnStyle,
 disabled: !dbId,
+style: commonBtnStyle,
   };
 
   if (shouldShowStopBtn) {



[incubator-superset] branch master updated (6fde7f8 -> a10b185)

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

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


from 6fde7f8  style: add fade transition to bottom border on navbar menu 
items (#10402)
 add a10b185  chore: deactive flaky filter test (#10406)

No new revisions were added by this update.

Summary of changes:
 .../cypress-base/cypress/integration/dashboard/filter.test.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)