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

feat: sql lab toolbar fixes #12198

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
f4ce831
feat: View all fav charts and dashboards (#12060)
geido Dec 18, 2020
a6ac2c1
Improves chart save and go button (#12125)
michael-s-molina Dec 18, 2020
f653a8d
fix(explore): overflow issue with metric options (#12129)
rusackas Dec 18, 2020
210fd25
fix: remove SIP_34_ALERTS_UI from config (#12127)
nytai Dec 18, 2020
81f5631
fix: make example table name safe (#12135)
betodealmeida Dec 18, 2020
fa27ed1
feat: display suggestions when query has missing parameters (#12113)
betodealmeida Dec 19, 2020
877b153
feat: estimate query cost in Postgres (#12130)
betodealmeida Dec 19, 2020
865beae
feat(dashboard): Dashboard-Native Filters (#11814)
suddjian Dec 19, 2020
585c8ac
fix height (#12145)
pkdotson Dec 19, 2020
de047c6
fix(chart): replace viz_type with viz name from registry for list vie…
nytai Dec 19, 2020
4a471b8
feat: Native filters fast-follow (#12138)
rusackas Dec 19, 2020
b5dd0f3
feat: Dynamically imported viz plugins (#10288)
suddjian Dec 19, 2020
ba952ba
fix(database): adjust column sizing for list view (#12146)
nytai Dec 21, 2020
0d9c863
fix(report): fix start date format and paginated query (#12132)
Dec 21, 2020
eecdd20
refactor: Explore SaveModal to typescript (#11997)
maloun96 Dec 21, 2020
17769ca
Fix Reset All filters button (#12157)
agatapst Dec 21, 2020
8d5dcc5
fix(report): fix last_eval_dttm sort and more tests (#12121)
dpgaspar Dec 21, 2020
2f0add3
fix: database alpha permissions (#12136)
dpgaspar Dec 21, 2020
ce1abc9
chore: rename variable for clarity (#12159)
betodealmeida Dec 21, 2020
e2f6764
test(dashboard): fix flaky Cypress test (#12151)
ktmud Dec 22, 2020
8682c6f
refactor: Fix anchor-is-valid lint warnings (#12010)
michael-s-molina Dec 22, 2020
942e321
Fix Filter Bar scrolling (#12156)
agatapst Dec 22, 2020
c281e52
feat: add new dashboard with video game sales (#12162)
betodealmeida Dec 22, 2020
9b110b2
refactor: Refresh interval typescript (#12168)
maloun96 Dec 22, 2020
a52031a
chore: Change chart_is_fav to chart_is_favorite (#12075)
nikolagigic Dec 22, 2020
41fac6b
fix(explore): save chart not working (#12178)
villebro Dec 22, 2020
8e3f71d
fix: specify VARCHAR size when loading examples (#12186)
betodealmeida Dec 22, 2020
a85bb4a
fix: remove uniqueness for MySQL (#12185)
betodealmeida Dec 22, 2020
ca680cf
fix: append ID to filename when exporting chart (#12166)
betodealmeida Dec 22, 2020
de61859
fix: SQL Lab vertical space (#12187)
betodealmeida Dec 23, 2020
d2da25a
refactor: remove queryFields in QueryObject and update chart control …
ktmud Dec 23, 2020
93af329
chore: Add Loading icon to Filter Bar (#12158)
agatapst Dec 23, 2020
4ac00a0
fix(chart): rendering standalone chart and errors (#12179)
agatapst Dec 23, 2020
732d1ed
updated SQLAlchemy=1.3.21 is incompatible in setup.py file. (#12191)
jagamts1 Dec 23, 2020
09a381d
fix(reports): notification without standalone link back to superset (…
dpgaspar Dec 23, 2020
e5e9a5f
docs: update UPDATING.md with security simplification info (#12097)
dpgaspar Dec 23, 2020
3fb4e54
fix(alerts/reports): ensure correct type is sent to api (#12189)
nytai Dec 23, 2020
af40045
feat: New Limit Selector (#12065)
hughhhh Dec 15, 2020
d525bbc
remove icon in wrong place
hughhhh Dec 17, 2020
c9745db
feat: Add toolbar overflow menu (#12087)
hughhhh Dec 17, 2020
a106f53
add new button
hughhhh Dec 17, 2020
0e59844
add antd button
hughhhh Dec 17, 2020
e2da2af
switched out button
hughhhh Dec 17, 2020
c326f26
working run button
hughhhh Dec 17, 2020
deb9c35
git status
hughhhh Dec 17, 2020
026fe19
clean up the code
hughhhh Dec 17, 2020
872280b
hide entire menu if ctas and cvas
hughhhh Dec 18, 2020
1533faa
saving this for now
hughhhh Dec 18, 2020
2e9759b
feat: move sql lab save and copy buttons (#12069)
eschutho Dec 18, 2020
8d41785
feat: move keyboard shortcut hints to tooltips (#12100)
eschutho Dec 18, 2020
17d889c
everything together
hughhhh Dec 18, 2020
b307fb8
remove old code
hughhhh Dec 18, 2020
05ec5b3
feat: Update CTAS/CVAS button & Cost Estimate (#12131)
hughhhh Dec 21, 2020
f6b0e80
feat: update sql toolbar styling (#12164)
eschutho Dec 22, 2020
f020174
merge from master
eschutho Dec 23, 2020
2fa872c
update styling
eschutho Dec 23, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ This file documents any backwards-incompatible changes in Superset and
assists people when migrating to a new version.

## Next
- Security simplification (SIP-19), the following permission domains were simplified:
- [12072](https://github.com/apache/incubator-superset/pull/12072): `Query` with `can_read`, `can_write`
- [12036](https://github.com/apache/incubator-superset/pull/12036): `Database` with `can_read`, `can_write`.
- [12012](https://github.com/apache/incubator-superset/pull/12036): `Dashboard` with `can_read`, `can_write`.
- [12061](https://github.com/apache/incubator-superset/pull/12061): `Log` with `can_read`, `can_write`.
- [12000](https://github.com/apache/incubator-superset/pull/12000): `Dataset` with `can_read`, `can_write`.
- [12014](https://github.com/apache/incubator-superset/pull/12014): `Annotation` with `can_read`, `can_write`.
- [11981](https://github.com/apache/incubator-superset/pull/11981): `Chart` with `can_read`, `can_write`.
- [11853](https://github.com/apache/incubator-superset/pull/11853): `ReportSchedule` with `can_read`, `can_write`.
- [11856](https://github.com/apache/incubator-superset/pull/11856): `CssTemplate` with `can_read`, `can_write`.
- [11764](https://github.com/apache/incubator-superset/pull/11764): `SavedQuery` with `can_read`, `can_write`.
Old permissions will be automatically migrated to these new permissions and applied to all existing security Roles.
- [11499](https://github.com/apache/incubator-superset/pull/11499): Breaking change: `STORE_CACHE_KEYS_IN_METADATA_DB` config flag added (default=`False`) to write `CacheKey` records to the metadata DB. `CacheKey` recording was enabled by default previously.
- [11920](https://github.com/apache/incubator-superset/pull/11920): Undos the DB migration from [11714](https://github.com/apache/incubator-superset/pull/11714) to prevent adding new columns to the logs table. Deploying a sha between these two PRs may result in locking your DB.
- [11704](https://github.com/apache/incubator-superset/pull/11704) Breaking change: Jinja templating for SQL queries has been updated, removing default modules such as `datetime` and `random` and enforcing static template values. To restore or extend functionality, use `JINJA_CONTEXT_ADDONS` and `CUSTOM_TEMPLATE_PROCESSORS` in `superset_config.py`.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def get_git_sha():
"selenium>=3.141.0",
"simplejson>=3.15.0",
"slackclient==2.5.0", # PINNED! slack changes file upload api in the future versions
"sqlalchemy>=1.3.16, <2.0",
"sqlalchemy>=1.3.16, <2.0, !=1.3.21",
"sqlalchemy-utils>=0.36.6,<0.37",
"sqlparse==0.3.0", # PINNED! see https://github.com/andialbrecht/sqlparse/issues/562
"wtforms-json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,17 @@ describe('chart card view', () => {
.contains('Life Expectancy VS Rural %');
});

it('should delete correctly', () => {
// flaky
xit('should delete correctly', () => {
// show delete modal
cy.get('[data-test="more-horiz"]').last().trigger('mouseover');
cy.get('[data-test="chart-list-delete-option"]').should('be.visible');
cy.get('[data-test="chart-list-delete-option"]').contains('Delete').click();
cy.get('[data-test="chart-list-delete-option"]')
.last()
.should('be.visible');
cy.get('[data-test="chart-list-delete-option"]')
.last()
.contains('Delete')
.click();
cy.get('[data-test="Please Confirm-modal"]').should('be.visible');
cy.get('[data-test="modal-confirm-button"]').should(
'have.attr',
Expand All @@ -107,11 +113,12 @@ describe('chart card view', () => {
cy.get('[data-test="modal-cancel-button"]').click();
});

it('should edit correctly', () => {
// flaky
xit('should edit correctly', () => {
// show edit modal
cy.get('[data-test="more-horiz"]').last().trigger('mouseover');
cy.get('[data-test="chart-list-edit-option"]').should('be.visible');
cy.get('[data-test="chart-list-edit-option"]').click();
cy.get('[data-test="chart-list-edit-option"]').last().should('be.visible');
cy.get('[data-test="chart-list-edit-option"]').last().click();
cy.get('[data-test="properties-edit-modal"]').should('be.visible');
cy.get('[data-test="properties-modal-name-input"]').should(
'not.have.value',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('chart card view filters', () => {
cy.get('[data-test="styled-card"]').should('not.exist');
});

it('should filter by viz type correctly', () => {
xit('should filter by viz type correctly', () => {
// filter by viz type
cy.get('.Select__control').eq(2).click();
cy.get('.Select__menu').contains('area').click({ timeout: 5000 });
Expand Down Expand Up @@ -124,7 +124,8 @@ describe('chart list view filters', () => {
cy.get('[data-test="table-row"]').should('not.exist');
});

it('should filter by viz type correctly', () => {
// this is flaky, but seems to fail along with the card view test of the same name
xit('should filter by viz type correctly', () => {
// filter by viz type
cy.get('.Select__control').eq(2).click();
cy.get('.Select__menu').contains('area').click({ timeout: 5000 });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ describe('Dashboard top-level controls', () => {
});
});

it('should allow chart level refresh', () => {
// flaky test
xit('should allow chart level refresh', () => {
cy.wait(aliases);
cy.get('[data-test="grid-container"]').find('.world_map').should('exist');
cy.get(`#slice_${mapId}-controls`).click();
Expand Down Expand Up @@ -78,7 +79,7 @@ describe('Dashboard top-level controls', () => {
'ant-dropdown-menu-item-disabled',
);

// wait all charts force refreshed
// wait all charts force refreshed.
cy.wait(aliases, { responseTimeout: 15000 }).then(xhrs => {
xhrs.forEach(async xhr => {
const responseBody = await readResponseBlob(xhr.response.body);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ describe('Dashboard filter', () => {
it('should apply filter', () => {
cy.get('.Select__placeholder:first').click();

// should open the filter indicator
cy.get('svg[data-test="filter"]').should('be.visible');
// should show the filter indicator
cy.get('svg[data-test="filter"]:visible').should(nodes => {
expect(nodes.length).to.least(9);
});

cy.get('.Select__control:first input[type=text]').type('So', {
force: true,
Expand All @@ -80,9 +82,8 @@ describe('Dashboard filter', () => {
cy.get('.Select__menu').first().contains('South Asia').click();

// should still have all filter indicators
// and since the select is closed, all filter indicators should be visible
cy.get('svg[data-test="filter"]:visible').should(nodes => {
expect(nodes).to.have.length(9);
expect(nodes.length).to.least(9);
});

cy.get('.filter_box button').click({ force: true });
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
import { TABBED_DASHBOARD } from './dashboard.helper';

describe('Nativefilters', () => {
beforeEach(() => {
cy.login();
cy.server();
cy.visit(TABBED_DASHBOARD);
});
it('should show filter bar and allow user to create filters ', () => {
cy.get('[data-test="filter-bar"]').should('be.visible');
cy.get('[data-test="collapse"]').click();
cy.get('[data-test="create-filter"]').click();
cy.get('.ant-modal').should('be.visible');

cy.get('.ant-form-vertical').find('.ant-tabs-nav-add').first().click();

cy.get('.ant-modal')
.find('.ant-tabs-tab-btn')
.first()
.click({ force: true })
.type('TEST_Filter');

cy.get('.ant-modal').find('[data-test="datasource-input"]').first().click();

cy.get('[data-test="datasource-input"]')
.contains('wb_health_population')
.click();

// possible bug with cypress where it is having issue discovering the field input
// after it is enabled

/* cy.get('.ant-modal')
.find('[data-test="field-input"]')
.click()
.contains('country_name')
.click();
*/

cy.get('.ant-modal-footer').find('button').should('be.visible');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ describe('Dashboard tabs', () => {
const requestParams = JSON.parse(requestFormData.get('form_data'));
expect(requestParams.extra_filters[0]).deep.eq({
col: 'region',
op: 'in',
op: 'IN',
val: ['South Asia'],
});
});
Expand All @@ -195,7 +195,7 @@ describe('Dashboard tabs', () => {
const requestParams = JSON.parse(requestFormData.get('form_data'));
expect(requestParams.extra_filters[0]).deep.eq({
col: 'region',
op: 'in',
op: 'IN',
val: ['South Asia'],
});
});
Expand All @@ -214,7 +214,7 @@ describe('Dashboard tabs', () => {
const requestParams = JSON.parse(requestFormData.get('form_data'));
expect(requestParams.extra_filters[0]).deep.eq({
col: 'region',
op: 'in',
op: 'IN',
val: ['South Asia'],
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('Dashboard form data', () => {
});
});

it('should apply url params and queryFields to slice requests', () => {
it('should apply url params to slice requests', () => {
const aliases = getChartAliases(dashboard.slices);
// wait and verify one-by-one
cy.wait(aliases).then(requests => {
Expand All @@ -48,7 +48,6 @@ describe('Dashboard form data', () => {
if (isLegacyResponse(responseBody)) {
const requestFormData = xhr.request.body;
const requestParams = JSON.parse(requestFormData.get('form_data'));
expect(requestParams).to.have.property('queryFields');
expect(requestParams.url_params).deep.eq(urlParams);
} else {
xhr.request.body.queries.forEach(query => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@ describe('Dashboard card view', () => {
cy.get('[data-test="styled-card"]').last().contains("World Bank's Data");
});

it('should delete correctly', () => {
// real flaky
xit('should delete correctly', () => {
// show delete modal
cy.get('[data-test="more-horiz"]').last().trigger('mouseover');
cy.get('[data-test="dashboard-card-option-delete-button"]')
.last()
.should('be.visible')
.click();
cy.get('[data-test="modal-confirm-button"]').should(
Expand All @@ -106,10 +108,12 @@ describe('Dashboard card view', () => {
cy.get('[data-test="modal-cancel-button"]').click();
});

it('should edit correctly', () => {
// real flaky
xit('should edit correctly', () => {
// show edit modal
cy.get('[data-test="more-horiz"]').last().trigger('mouseover');
cy.get('[data-test="dashboard-card-option-edit-button"]')
.last()
.should('be.visible')
.click();
cy.get('[data-test="dashboard-edit-properties-form"]').should('be.visible');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe('dashboard filters list view', () => {
cy.get('[data-test="table-row"]').should('not.exist');
});

it('should filter by published correctly', () => {
xit('should filter by published correctly', () => {
// filter by published
cy.get('.Select__control').eq(2).click();
cy.get('.Select__menu').contains('Published').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('dashboard list view', () => {
cy.get('[data-test="table-row"]').should('have.length', 4); // failed, xit-ed
});

it('should sort correctly', () => {
xit('should sort correctly', () => {
cy.get('[data-test="sort-header"]').eq(1).click();
cy.get('[data-test="sort-header"]').eq(1).click();
cy.get('[data-test="table-row"]')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('No Results', () => {
{
expressionType: 'SIMPLE',
subject: 'state',
operator: 'in',
operator: 'IN',
comparator: ['Fake State'],
clause: 'WHERE',
sqlExpression: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('Visualization > Area', () => {
{
expressionType: 'SIMPLE',
subject: 'region',
operator: 'in',
operator: 'IN',
comparator: ['South Asia', 'North America'],
clause: 'WHERE',
sqlExpression: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe('Visualization > Big Number Total', () => {
{
expressionType: 'SIMPLE',
subject: 'name',
operator: 'in',
operator: 'IN',
comparator: ['Aaron', 'Amy', 'Andrea'],
clause: 'WHERE',
sqlExpression: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const MAX_STATE = {
export const SIMPLE_FILTER = {
expressionType: 'SIMPLE',
subject: 'name',
operator: 'in',
operator: 'IN',
comparator: ['Aaron', 'Amy', 'Andrea'],
clause: 'WHERE',
sqlExpression: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('Visualization > Sunburst', () => {
{
expressionType: 'SIMPLE',
subject: 'region',
operator: 'in',
operator: 'IN',
comparator: ['South Asia', 'North America'],
clause: 'WHERE',
sqlExpression: null,
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/images/icons/filter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading