Skip to content
Closed
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
1609403
filter scope selector modal
Oct 17, 2019
c62b2f4
[docs] CTAS on PostgreSQL needs commit to apply (#8367)
dpgaspar Oct 17, 2019
d3406e0
[Config] Cache static resources (#8370)
Oct 17, 2019
a199901
[sqla] Enforcing ISO 8601 date/timestamp formats (#7702)
john-bodley Oct 17, 2019
9fc37ea
[ci] Deprecate flake8 (#8409)
john-bodley Oct 18, 2019
1e533db
fixed typo in installation instructions (#8413)
francishemingway Oct 21, 2019
4cfd6b3
[tests] Fix, removing deprecated function for future Python release c…
MarcusSorealheis Oct 21, 2019
cca689b
Add improved typed casting to BigQuery (#8331)
betodealmeida Oct 21, 2019
8f246ce
chore: disable another flaky cypress test (#8423)
mistercrunch Oct 22, 2019
b91205d
[pydruid] Bumping the pydruid version (#8430)
john-bodley Oct 22, 2019
a0db22b
docs: add a note to RELEASING about Slack Channel (#8419)
mistercrunch Oct 23, 2019
cde17a8
docs: Add an 'Orientation' section to CONTRIBUTING.md (#8422)
mistercrunch Oct 23, 2019
9d2a391
convert ids to scope object
Oct 22, 2019
970e636
remove changes that should be another PR
Oct 23, 2019
08c6b61
[fix] refine release instructions (#8381)
villebro Oct 23, 2019
786d770
[fix] Updating parse_human_timedelta typing (#8436)
john-bodley Oct 23, 2019
19d2ea2
spelling fix (#8442)
austinpray Oct 24, 2019
a39c24e
explain the need to enable async queries (#8444)
christophlingg Oct 24, 2019
1d5718a
introduce a space in command line option (#8438)
christophlingg Oct 24, 2019
82b1747
Split up tests/db_engine_test.py (#8449)
Oct 25, 2019
59889a4
[setup] Fix, download_url (#8439)
dpgaspar Oct 25, 2019
e704e29
Allow fetching all rows from results endpoint (#8389)
betodealmeida Oct 25, 2019
2c7fcf0
add single-field-edit in multi-edit mode switch
Oct 25, 2019
eaeed0c
removed repeated word (#8458)
alexandrebrilhante Oct 26, 2019
c1810aa
[docs] Crafting a new release (#8433)
dpgaspar Oct 28, 2019
148cec4
Add UI-only database configuration method for extended authorization …
Oct 28, 2019
a757b43
[db engine] Add support for Elasticsearch (#8441)
dpgaspar Oct 28, 2019
f7f0be5
[SIP-15] Making client time use UTC as the local time (#8450)
john-bodley Oct 28, 2019
8b74745
[SIP-15] Adding initial framework (#8398)
john-bodley Oct 28, 2019
1adf742
Provide documentation for using a Service Account to connect to BigQu…
Oct 29, 2019
5fb0bcb
[Datasource Editor] A few small UI changes in modal to prevent accide…
Oct 29, 2019
7afda6e
Update UPDATING.md (#8465)
john-bodley Oct 30, 2019
0a3b121
[sql] Fixing datetime SQL literal (#8464)
john-bodley Oct 30, 2019
18c6d17
docs: more release instructions (#8432)
mistercrunch Oct 30, 2019
3cba1bd
feat: add expand_data parameter (#8472)
khtruong Oct 30, 2019
e4ca44e
Use `config[]` not `config.get()` (#8454)
Oct 30, 2019
1ccfa4f
Re-enable DRUID_IS_ACTIVE flag (#8482)
Oct 31, 2019
a8f1589
fixing typo. (#8487)
MarcusSorealheis Oct 31, 2019
06a4108
Enhance docs for email reporting (#8486)
christophlingg Oct 31, 2019
eb150eb
[sip-15] Fix time range endpoints encoding (#8481)
john-bodley Oct 31, 2019
554a6d8
[sip-15] Adding database level python-date-format (#8474)
john-bodley Oct 31, 2019
226bd40
fix code review comments (round 1)
Oct 29, 2019
d46b47a
feat(TableVis): Switch to the new table plugin (#8446)
conglei Nov 1, 2019
acad66d
[datasource editor] Only one click target for edit action (#8495)
Nov 2, 2019
fda2333
[SIP-15] Updating ISO 8601 regex match to make time optional (#8494)
john-bodley Nov 2, 2019
a305b1a
Change Fedora installation instructions + some small formatting chang…
francishemingway Nov 4, 2019
51c2290
feat: add korea(South) info on CountryMap viz and bump legacy-plugin-…
yahwang Nov 4, 2019
5df1fcb
Add `Duplicate Tab` option (#8485)
paulvic Nov 4, 2019
4c35de1
build: bump dompurify version because of nasty xss bypass. (#8498)
MarcusSorealheis Nov 4, 2019
9a29116
[typing] superset/models/core.py (#8284)
serenajiang Nov 4, 2019
338a2b1
Allow user to customize query cost estimate (#8470)
betodealmeida Nov 4, 2019
5dba2f4
[SIP-15] Adding grace period (#8490)
john-bodley Nov 4, 2019
5617f87
Updating pip with default timeout (#8492)
liuyanpunk Nov 5, 2019
0730261
Fix column type on dbs.encrypted_extra, add instructions for testing …
Nov 5, 2019
e8af945
Update query tab's title when saving a new query (#8484)
paulvic Nov 5, 2019
926dca3
[docs] Small fixes on the release docs (#8500)
dpgaspar Nov 5, 2019
0e64dc8
[SIP-15] Making sure the toast link opens in a new tab (#8503)
john-bodley Nov 5, 2019
7e7f553
Remove tabs (#8508)
betodealmeida Nov 5, 2019
571c474
Make Report a bug link open in a new tab (#8509)
Nov 5, 2019
d78e59b
revert tablevis (#8515)
conglei Nov 6, 2019
1e3d833
[sip-15] Fixing time range endpoints from dashboards (#8513)
john-bodley Nov 6, 2019
ec476fc
Default page: remove title attribute to fall back on appbuilder.app_n…
Zanoellia Nov 6, 2019
98f1ac7
refactory after design review
Nov 5, 2019
397e1e3
Replace hardcoded default colors with defaults in setupColors.js (#8510)
villebro Nov 7, 2019
49ea232
[fix] Improve csv upload functionality (#8457)
villebro Nov 7, 2019
c4c01d6
[docs] Adding Slice parameter documentation (#8531)
john-bodley Nov 8, 2019
5ed2190
[docs] User tutorial (#8459)
francishemingway Nov 8, 2019
650c848
[cli] Fix, import datasources exported by UI (#8477)
dpgaspar Nov 10, 2019
64de9aa
[docs] Updating slice parameter documentation. (#8535)
john-bodley Nov 10, 2019
58f69a4
fix a few props initial value
Nov 11, 2019
6bce4f9
fab 2.2.0 (#8517)
nytai Nov 12, 2019
62476c5
Allow customization of documentation icon and text (#8507)
paulvic Nov 12, 2019
763f59f
Add support for database engine SAP Hana (#8411)
axuew Nov 12, 2019
b7b655e
[docs] 0.35.0 CHANGELOG (#8547)
dpgaspar Nov 12, 2019
a867d41
Upgrade superset-ui/time-format (#8541)
Nov 12, 2019
1b3e40f
Clickable checkbox labels (#8534)
rusackas Nov 12, 2019
a58b392
Encode feature flags to JSON pessimistically (#8529)
betodealmeida Nov 12, 2019
7bfa24d
[fix] Re-cleanup legacy filters (#8523)
john-bodley Nov 12, 2019
0499198
[docs] CTAS on PostgreSQL needs commit to apply (#8367)
dpgaspar Oct 17, 2019
b19a2ac
[Config] Cache static resources (#8370)
Oct 17, 2019
6ef1acc
[sqla] Enforcing ISO 8601 date/timestamp formats (#7702)
john-bodley Oct 17, 2019
a521df1
[ci] Deprecate flake8 (#8409)
john-bodley Oct 18, 2019
ae6558b
fixed typo in installation instructions (#8413)
francishemingway Oct 21, 2019
81d92b3
[tests] Fix, removing deprecated function for future Python release c…
MarcusSorealheis Oct 21, 2019
f03a179
Add improved typed casting to BigQuery (#8331)
betodealmeida Oct 21, 2019
f500d7e
chore: disable another flaky cypress test (#8423)
mistercrunch Oct 22, 2019
322296f
[pydruid] Bumping the pydruid version (#8430)
john-bodley Oct 22, 2019
ba13a0a
docs: add a note to RELEASING about Slack Channel (#8419)
mistercrunch Oct 23, 2019
0757fdf
docs: Add an 'Orientation' section to CONTRIBUTING.md (#8422)
mistercrunch Oct 23, 2019
e72d57d
[fix] refine release instructions (#8381)
villebro Oct 23, 2019
1eec068
[fix] Updating parse_human_timedelta typing (#8436)
john-bodley Oct 23, 2019
d77234e
spelling fix (#8442)
austinpray Oct 24, 2019
5c3897e
explain the need to enable async queries (#8444)
christophlingg Oct 24, 2019
88cba26
introduce a space in command line option (#8438)
christophlingg Oct 24, 2019
a81de23
Split up tests/db_engine_test.py (#8449)
Oct 25, 2019
966e9e1
[setup] Fix, download_url (#8439)
dpgaspar Oct 25, 2019
1761a81
Allow fetching all rows from results endpoint (#8389)
betodealmeida Oct 25, 2019
4f8f491
removed repeated word (#8458)
alexandrebrilhante Oct 26, 2019
f0b35cb
[docs] Crafting a new release (#8433)
dpgaspar Oct 28, 2019
6a98d0d
Add UI-only database configuration method for extended authorization …
Oct 28, 2019
7f548ef
[db engine] Add support for Elasticsearch (#8441)
dpgaspar Oct 28, 2019
eaa7082
[SIP-15] Making client time use UTC as the local time (#8450)
john-bodley Oct 28, 2019
c42960f
[SIP-15] Adding initial framework (#8398)
john-bodley Oct 28, 2019
abfd848
Provide documentation for using a Service Account to connect to BigQu…
Oct 29, 2019
165e6c4
[Datasource Editor] A few small UI changes in modal to prevent accide…
Oct 29, 2019
6c9a9fc
Update UPDATING.md (#8465)
john-bodley Oct 30, 2019
aff55a3
[sql] Fixing datetime SQL literal (#8464)
john-bodley Oct 30, 2019
14accec
docs: more release instructions (#8432)
mistercrunch Oct 30, 2019
6a04f72
feat: add expand_data parameter (#8472)
khtruong Oct 30, 2019
97bfa7a
Use `config[]` not `config.get()` (#8454)
Oct 30, 2019
2f72367
Re-enable DRUID_IS_ACTIVE flag (#8482)
Oct 31, 2019
4a0395e
fixing typo. (#8487)
MarcusSorealheis Oct 31, 2019
706da5e
Enhance docs for email reporting (#8486)
christophlingg Oct 31, 2019
29507ba
[sip-15] Fix time range endpoints encoding (#8481)
john-bodley Oct 31, 2019
9c9ddc6
[sip-15] Adding database level python-date-format (#8474)
john-bodley Oct 31, 2019
da7d4b1
feat(TableVis): Switch to the new table plugin (#8446)
conglei Nov 1, 2019
6550507
[datasource editor] Only one click target for edit action (#8495)
Nov 2, 2019
0f88e0a
[SIP-15] Updating ISO 8601 regex match to make time optional (#8494)
john-bodley Nov 2, 2019
d0ce878
Change Fedora installation instructions + some small formatting chang…
francishemingway Nov 4, 2019
ca7a3d0
feat: add korea(South) info on CountryMap viz and bump legacy-plugin-…
yahwang Nov 4, 2019
5781336
Add `Duplicate Tab` option (#8485)
paulvic Nov 4, 2019
6fdd5b4
build: bump dompurify version because of nasty xss bypass. (#8498)
MarcusSorealheis Nov 4, 2019
4eef89a
[typing] superset/models/core.py (#8284)
serenajiang Nov 4, 2019
c0053e6
Allow user to customize query cost estimate (#8470)
betodealmeida Nov 4, 2019
e8135be
[SIP-15] Adding grace period (#8490)
john-bodley Nov 4, 2019
909b7ce
Updating pip with default timeout (#8492)
liuyanpunk Nov 5, 2019
c81ded9
Fix column type on dbs.encrypted_extra, add instructions for testing …
Nov 5, 2019
8957bab
Update query tab's title when saving a new query (#8484)
paulvic Nov 5, 2019
6207802
[docs] Small fixes on the release docs (#8500)
dpgaspar Nov 5, 2019
89d0ee7
[SIP-15] Making sure the toast link opens in a new tab (#8503)
john-bodley Nov 5, 2019
9c98870
Remove tabs (#8508)
betodealmeida Nov 5, 2019
4676e4d
Make Report a bug link open in a new tab (#8509)
Nov 5, 2019
a763eb4
revert tablevis (#8515)
conglei Nov 6, 2019
cc04287
[sip-15] Fixing time range endpoints from dashboards (#8513)
john-bodley Nov 6, 2019
c1b4fdb
Default page: remove title attribute to fall back on appbuilder.app_n…
Zanoellia Nov 6, 2019
0425549
Replace hardcoded default colors with defaults in setupColors.js (#8510)
villebro Nov 7, 2019
0664189
[fix] Improve csv upload functionality (#8457)
villebro Nov 7, 2019
a622f50
[docs] Adding Slice parameter documentation (#8531)
john-bodley Nov 8, 2019
0c55647
[docs] User tutorial (#8459)
francishemingway Nov 8, 2019
18046c2
[cli] Fix, import datasources exported by UI (#8477)
dpgaspar Nov 10, 2019
249947a
[docs] Updating slice parameter documentation. (#8535)
john-bodley Nov 10, 2019
630360f
fab 2.2.0 (#8517)
nytai Nov 12, 2019
5091270
Allow customization of documentation icon and text (#8507)
paulvic Nov 12, 2019
a548c63
Add support for database engine SAP Hana (#8411)
axuew Nov 12, 2019
085ccbc
[docs] 0.35.0 CHANGELOG (#8547)
dpgaspar Nov 12, 2019
b9f5678
Upgrade superset-ui/time-format (#8541)
Nov 12, 2019
1fd36bb
Clickable checkbox labels (#8534)
rusackas Nov 12, 2019
9a29367
Encode feature flags to JSON pessimistically (#8529)
betodealmeida Nov 12, 2019
4456fa3
[fix] Re-cleanup legacy filters (#8523)
john-bodley Nov 12, 2019
90275fe
Add convert_dttm method to SnowflakeEngineSpec (#8551)
villebro Nov 13, 2019
051d311
filter scope selector modal
Oct 17, 2019
29adb4c
convert ids to scope object
Oct 22, 2019
dd5c47f
remove changes that should be another PR
Oct 23, 2019
4bcc579
add single-field-edit in multi-edit mode switch
Oct 25, 2019
b0549a2
fix code review comments (round 1)
Oct 29, 2019
7f41641
refactory after design review
Nov 5, 2019
292570e
fix a few props initial value
Nov 11, 2019
d3bc346
Merge remote-tracking branch 'origin/scope-selector-modal' into scope…
Nov 13, 2019
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
11 changes: 11 additions & 0 deletions superset/assets/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions superset/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"react-bootstrap": "^0.31.5",
"react-bootstrap-dialog": "^0.10.0",
"react-bootstrap-slider": "2.1.5",
"react-checkbox-tree": "^1.5.1",
"react-color": "^2.13.8",
"react-datetime": "^2.14.0",
"react-dnd": "^2.5.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* under the License.
*/
import { filterId } from './mockSliceEntities';
import { DASHBOARD_FILTER_SCOPE_GLOBAL } from '../../../../src/dashboard/reducers/dashboardFilters';

export const emptyFilters = {};

Expand All @@ -33,7 +34,9 @@ export const dashboardFilters = {
'ROW-l6PrlhwSjh',
'CHART-rwDfbGqeEn',
],
scope: 'ROOT_ID',
scopes: {
region: DASHBOARD_FILTER_SCOPE_GLOBAL,
},
isDateFilter: false,
isInstantFilter: true,
columns: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,6 @@ export const filterComponent = {
chartId: filterId,
width: 3,
height: 10,
chartName: 'Filter',
sliceName: 'Filter',
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ import {
REMOVE_FILTER,
CHANGE_FILTER,
} from '../../../../src/dashboard/actions/dashboardFilters';
import dashboardFiltersReducer from '../../../../src/dashboard/reducers/dashboardFilters';
import dashboardFiltersReducer, {
DASHBOARD_FILTER_SCOPE_GLOBAL,
} from '../../../../src/dashboard/reducers/dashboardFilters';
import {
emptyFilters,
dashboardFilters,
Expand All @@ -33,7 +35,6 @@ import {
column,
} from '../fixtures/mockSliceEntities';
import { filterComponent } from '../fixtures/mockDashboardLayout';
import { DASHBOARD_ROOT_ID } from '../../../../src/dashboard/util/constants';

describe('dashboardFilters reducer', () => {
const form_data = sliceEntitiesForDashboard.slices[filterId].form_data;
Expand All @@ -54,7 +55,7 @@ describe('dashboardFilters reducer', () => {
chartId: filterId,
componentId: component.id,
directPathToFilter,
scope: DASHBOARD_ROOT_ID,
filterName: component.meta.sliceName,
isDateFilter: false,
isInstantFilter: !!form_data.instant_filtering,
columns: {
Expand All @@ -63,6 +64,9 @@ describe('dashboardFilters reducer', () => {
labels: {
[column]: column,
},
scopes: {
[column]: DASHBOARD_FILTER_SCOPE_GLOBAL,
},
},
});
});
Expand All @@ -83,7 +87,6 @@ describe('dashboardFilters reducer', () => {
chartId: filterId,
componentId: component.id,
directPathToFilter,
scope: DASHBOARD_ROOT_ID,
isDateFilter: false,
isInstantFilter: !!form_data.instant_filtering,
columns: {
Expand All @@ -93,6 +96,9 @@ describe('dashboardFilters reducer', () => {
labels: {
[column]: column,
},
scopes: {
[column]: DASHBOARD_FILTER_SCOPE_GLOBAL,
},
},
});
});
Expand All @@ -113,7 +119,6 @@ describe('dashboardFilters reducer', () => {
chartId: filterId,
componentId: component.id,
directPathToFilter,
scope: DASHBOARD_ROOT_ID,
isDateFilter: false,
isInstantFilter: !!form_data.instant_filtering,
columns: {
Expand All @@ -123,6 +128,9 @@ describe('dashboardFilters reducer', () => {
labels: {
[column]: column,
},
scopes: {
[column]: DASHBOARD_FILTER_SCOPE_GLOBAL,
},
},
});
});
Expand Down
30 changes: 30 additions & 0 deletions superset/assets/src/components/ChartIcon.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/**
* 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 React from 'react';

const ChartIcon = () => (
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="0.5" y="0.5" width="17" height="17" rx="2.5" fill="#EFF9F9" stroke="#B3DADC" />
<rect x="8" y="4" width="2" height="10" rx="1" fill="#B3DADC" />
<rect x="12" y="10" width="2" height="4" rx="1" fill="#B3DADC" />
<rect x="4" y="6" width="2" height="8" rx="1" fill="#B3DADC" />
</svg>
);

export default ChartIcon;
40 changes: 40 additions & 0 deletions superset/assets/src/components/CheckboxIcons.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* 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 React from 'react';

export const CheckboxChecked = () => (
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 0H2C0.89 0 0 0.9 0 2V16C0 17.1 0.89 18 2 18H16C17.11 18 18 17.1 18 16V2C18 0.9 17.11 0 16 0Z" fill="#00A699" />
<path d="M7 14L2 9L3.41 7.59L7 11.17L14.59 3.58L16 5L7 14Z" fill="white" />
</svg>
);

export const CheckboxHalfChecked = () => (
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0Z" fill="#999999" />
<path d="M14 10H4V8H14V10Z" fill="white" />
</svg>
);

export const CheckboxUnchecked = () => (
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16 0H2C0.9 0 0 0.9 0 2V16C0 17.1 0.9 18 2 18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.1 0 16 0Z" fill="#CCCCCC" />
<path d="M16 2V16H2V2H16V2Z" fill="white" />
</svg>
);
2 changes: 2 additions & 0 deletions superset/assets/src/components/ModalTrigger.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import cx from 'classnames';
import Button from './Button';

const propTypes = {
dialogClassName: PropTypes.string,
animation: PropTypes.bool,
triggerNode: PropTypes.node.isRequired,
modalTitle: PropTypes.node,
Expand Down Expand Up @@ -72,6 +73,7 @@ export default class ModalTrigger extends React.Component {
renderModal() {
return (
<Modal
dialogClassName={this.props.dialogClassName}
animation={this.props.animation}
show={this.state.showModal}
onHide={this.close}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ export default class DeleteComponentModal extends React.PureComponent {
ref={this.setModalRef}
triggerNode={this.props.triggerNode}
modalBody={
<div className="delete-component-modal">
<div className="dashboard-modal delete">
<h1>{t('Delete dashboard tab?')}</h1>
<div>
Deleting a tab will remove all content within it. You may still
reverse this action with the <b>undo</b> button (cmd + z) until
you save your changes.
</div>
<div className="delete-modal-actions-container">
<div className="dashboard-modal-actions-container">
<Button onClick={this.close}>{t('Cancel')}</Button>
<Button bsStyle="primary" onClick={this.deleteTab}>
{t('Delete')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@ import { isEmpty } from 'lodash';
import FilterIndicator from './FilterIndicator';
import FilterIndicatorGroup from './FilterIndicatorGroup';
import { FILTER_INDICATORS_DISPLAY_LENGTH } from '../util/constants';
import {
getFilterColorKey,
getFilterColorMap,
} from '../util/dashboardFiltersColorMap';
import { getDashboardFilterKey } from '../util/getDashboardFilterKey';
import { getFilterColorMap } from '../util/dashboardFiltersColorMap';

const propTypes = {
// from props
Expand Down Expand Up @@ -92,7 +90,10 @@ export default class FilterIndicatorsContainer extends React.PureComponent {
!filterImmuneSlices.includes(currentChartId)
) {
Object.keys(columns).forEach(name => {
const colorMapKey = getFilterColorKey(chartId, name);
const colorMapKey = getDashboardFilterKey({
chartId,
column: name,
});
const directPathToLabel = directPathToFilter.slice();
directPathToLabel.push(`LABEL-${name}`);
const indicator = {
Expand Down
9 changes: 8 additions & 1 deletion superset/assets/src/dashboard/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import HeaderActionsDropdown from './HeaderActionsDropdown';
import EditableTitle from '../../components/EditableTitle';
import Button from '../../components/Button';
import FaveStar from '../../components/FaveStar';
import FilterScopeModal from './filterscope/FilterScopeModal';
import PublishedStatus from './PublishedStatus';
import UndoRedoKeylisteners from './UndoRedoKeylisteners';

Expand Down Expand Up @@ -347,7 +348,7 @@ class Header extends React.PureComponent {
bsSize="small"
onClick={this.onInsertComponentsButtonClick}
>
{t('Insert components')}
{t('Components')}
</Button>
)}

Expand All @@ -361,6 +362,12 @@ class Header extends React.PureComponent {
</Button>
)}

{editMode && (
<FilterScopeModal
triggerNode={<Button bsSize="small">{t('Filters')}</Button>}
/>
)}

{editMode && hasUnsavedChanges && (
<Button
bsSize="small"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* 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 React from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';

import FilterBadgeIcon from '../../../components/FilterBadgeIcon';

const propTypes = {
label: PropTypes.string.isRequired,
colorCode: PropTypes.string.isRequired,
isSelected: PropTypes.bool.isRequired,
};

export default function FilterFieldItem({ label, colorCode, isSelected }) {
return (
<a
className={cx('filter-field-item filter-container', {
'is-selected': isSelected,
})}
>
<FilterBadgeIcon colorCode={colorCode} />
<label htmlFor={label}>{label}</label>
</a>
);
}

FilterFieldItem.propTypes = propTypes;
Loading