mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
[Feature] Dashboard scoped filter (#8590)
* [WIP][dashboard scoped filter] part 1: scope selector modal (#8557) * filter scope selector modal * add single-field-edit in multi-edit mode switch * fix code review comments (round 1) * refactory after design review * fix a few props initial value * [WIP][dashboard scoped filter] part 2: add algorithm to convert checked ids to scope object (#8564) * convert ids to scope object * use lodash helpers to make code readable * [WIP][dashboard scoped filter] part 3: merge filter scope settings into dashboard redux state (#8522) * merge filter scope settings into dashboard redux state * fix/add unit tests * minor bug fixes * fix save filter Scopes behavior * resolve review comments * fix save filter scope settings * minor comments * [dashboard scoped filter] Improve scrollbar inside modal (#8553) * improve scroll inside modal * make left pane and right pane scroll separately * fix review comments * force show filter_box as unchecked (#8587)
This commit is contained in:
@@ -17,10 +17,16 @@
|
||||
* under the License.
|
||||
*/
|
||||
import getDashboardUrl from '../../../../src/dashboard/util/getDashboardUrl';
|
||||
import { DASHBOARD_FILTER_SCOPE_GLOBAL } from '../../../../src/dashboard/reducers/dashboardFilters';
|
||||
|
||||
describe('getChartIdsFromLayout', () => {
|
||||
it('should encode filters', () => {
|
||||
const filters = { 35: { key: ['value'] } };
|
||||
const filters = {
|
||||
'35_key': {
|
||||
values: ['value'],
|
||||
scope: DASHBOARD_FILTER_SCOPE_GLOBAL,
|
||||
},
|
||||
};
|
||||
const url = getDashboardUrl('path', filters);
|
||||
expect(url).toBe(
|
||||
'path?preselect_filters=%7B%2235%22%3A%7B%22key%22%3A%5B%22value%22%5D%7D%7D',
|
||||
|
||||
Reference in New Issue
Block a user