Edit Dashboard title and Slice title in place (#2940)

* Edit Dashboard title and Slice title in place

Add EditableTitle component into Dashboard and Explore view to support edit title inline.
This commit is contained in:
Grace Guo
2017-06-14 12:52:12 -07:00
committed by GitHub
parent da0a87a735
commit 8329ea2b9b
13 changed files with 302 additions and 15 deletions

View File

@@ -1,7 +1,8 @@
/* eslint camelcase: 0 */
import URI from 'urijs';
export function getExploreUrl(form_data, endpointType = 'base', force = false, curUrl = null) {
export function getExploreUrl(form_data, endpointType = 'base', force = false,
curUrl = null, requestParams = {}) {
if (!form_data.datasource) {
return null;
}
@@ -38,6 +39,14 @@ export function getExploreUrl(form_data, endpointType = 'base', force = false, c
if (endpointType === 'query') {
search.query = 'true';
}
const paramNames = Object.keys(requestParams);
if (paramNames.length) {
paramNames.forEach((name) => {
if (requestParams.hasOwnProperty(name)) {
search[name] = requestParams[name];
}
});
}
uri = uri.search(search).directory(directory);
return uri.toString();
}