OLAP/XMLA connectivity with async API calls
Data source
by Flexmonster Pivot Table
HTML
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>
<button onclick="diagnostic()">Diagnostic</button>
<div id="pivot-container"></div>
CSS
@import url(https://cdn.flexmonster.com/assets/jsfiddle-styles.css);
JavaScript
let pivot = new Flexmonster({
container: "pivot-container",
componentFolder: "https://cdn.flexmonster.com/",
toolbar: true
});
let proxyUrl = 'https://olap.flexmonster.com/olap/msmdpump.dll';
let dataSourceInfo = '';
let dataSourceType = '';
let catalog = '';
let cube = '';
async function diagnostic() {
dataSourceInfo = (await pivot.getXMLADataSourcesAsync(proxyUrl))[0];
dataSourceType = await pivot.getXMLAProviderNameAsync(proxyUrl);
catalog = (await pivot.getXMLACatalogsAsync(proxyUrl, dataSourceInfo))[0];
cube = (await pivot.getXMLACubesAsync(proxyUrl, dataSourceInfo, catalog))[0];
pivot.connectTo({
dataSourceType: dataSourceType,
proxyUrl: proxyUrl,
dataSourceInfo: dataSourceInfo,
catalog: catalog,
cube: cube
});
}