Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "gooddata", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"author": "GoodData", | ||
@@ -5,0 +5,0 @@ "description": "GoodData JavaScript SDK", |
@@ -71,3 +71,7 @@ // Copyright (C) 2007-2014, GoodData(R) Corporation. All rights reserved. | ||
* [{column: 'identifier', direction: 'asc|desc'}] | ||
* @param {Object} settings - AJAX settings | ||
* @param {Object} settings - Set "extended" to true to retrieve the result | ||
* including internal attribute IDs (useful to construct filters | ||
* for subsequent report execution requests). | ||
* Supports additional settings accepted by the underlying | ||
* xhr.ajax() calls | ||
* | ||
@@ -81,2 +85,6 @@ * @return {Object} Structure with `headers` and `rawData` keys filled with values from execution. | ||
// Extended result exposes internal attribute element IDs which can | ||
// be used when constructing executionConfiguration filters for | ||
// subsequent report execution requests | ||
const resultKey = settings.extended ? 'extendedTabularDataResult' : 'tabularDataResult'; | ||
// Create request and result structures | ||
@@ -104,3 +112,3 @@ const request = { | ||
// Start polling on url returned in the executionResult for tabularData | ||
return ajax(result.executionResult.tabularDataResult, settings); | ||
return ajax(result.executionResult[resultKey], settings); | ||
}) | ||
@@ -126,4 +134,4 @@ .then((r) => { | ||
return Object.assign({}, executedReport, { | ||
rawData: get(result, 'tabularDataResult.values', []), | ||
warnings: get(result, 'tabularDataResult.warnings', []), | ||
rawData: get(result, `${resultKey}.values`, []), | ||
warnings: get(result, `${resultKey}.warnings`, []), | ||
isLoaded: true, | ||
@@ -130,0 +138,0 @@ isEmpty: status === 204 |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
883894
21608