mirror of
https://github.com/apache/superset.git
synced 2026-04-25 11:04:48 +00:00
Implement caching and dynamic data fetching. (#1466)
* Rename rv => o in the decorator. * Address comments. * Permissions cleanup: remove none and duplicates. (#1967) * Updates * Rename var and dropdown text * Cleanup * Resolve comments. * Add user to the perm check.
This commit is contained in:
@@ -213,9 +213,9 @@ export function mergeTable(table, query) {
|
||||
return { type: MERGE_TABLE, table, query };
|
||||
}
|
||||
|
||||
export function addTable(query, tableName) {
|
||||
export function addTable(query, tableName, schemaName) {
|
||||
return function (dispatch) {
|
||||
let url = `/superset/table/${query.dbId}/${tableName}/${query.schema}/`;
|
||||
let url = `/superset/table/${query.dbId}/${tableName}/${schemaName}/`;
|
||||
$.get(url, (data) => {
|
||||
const dataPreviewQuery = {
|
||||
id: shortid.generate(),
|
||||
@@ -232,7 +232,7 @@ export function addTable(query, tableName) {
|
||||
Object.assign(data, {
|
||||
dbId: query.dbId,
|
||||
queryEditorId: query.id,
|
||||
schema: query.schema,
|
||||
schema: schemaName,
|
||||
expanded: true,
|
||||
}), dataPreviewQuery)
|
||||
);
|
||||
@@ -248,12 +248,12 @@ export function addTable(query, tableName) {
|
||||
);
|
||||
});
|
||||
|
||||
url = `/superset/extra_table_metadata/${query.dbId}/${tableName}/${query.schema}/`;
|
||||
url = `/superset/extra_table_metadata/${query.dbId}/${tableName}/${schemaName}/`;
|
||||
$.get(url, (data) => {
|
||||
const table = {
|
||||
dbId: query.dbId,
|
||||
queryEditorId: query.id,
|
||||
schema: query.schema,
|
||||
schema: schemaName,
|
||||
name: tableName,
|
||||
};
|
||||
Object.assign(table, data);
|
||||
|
||||
Reference in New Issue
Block a user