mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Re-add dashboard short links (#5398)
* Re-add dashboard short links * Make the short link available to all users * Include filters in the short link for dashboards * Remove duplicate key causing linter error * Change URL Short link button into a menu item with Modal * Split out tests, bind URL short link in constructor
This commit is contained in:
committed by
Maxime Beauchemin
parent
0aff8659d8
commit
aa9b30cf55
@@ -0,0 +1,14 @@
|
||||
import { describe, it } from 'mocha';
|
||||
import { expect } from 'chai';
|
||||
|
||||
import getDashboardUrl from '../../../../src/dashboard/util/getDashboardUrl';
|
||||
|
||||
describe('getChartIdsFromLayout', () => {
|
||||
it('should encode filters', () => {
|
||||
const filters = { 35: { key: ['value'] } };
|
||||
const url = getDashboardUrl('path', filters);
|
||||
expect(url).to.equal(
|
||||
'path?preselect_filters=%7B%2235%22%3A%7B%22key%22%3A%5B%22value%22%5D%7D%7D',
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user