init({
thoughtSpotHost: "https://abre.thoughtspot.cloud",
authType: AuthType.TrustedAuthTokenCookieless,
autoLogin: true,
username: "<?php echo $_SESSION['useremail']; ?>",
customizations: {
style: {
customCSSUrl: "<?php echo $abreDomain; ?>/core/css/thoughtspot_0.0.1.css"
},
content: {
strings: {
"Spotter": "Abre",
}
},
iconSpriteUrl: "<?php echo $abreDomain; ?>/core/images/abre/abre_ai_glyph.svg"
},
getAuthToken: () => {
return fetch('/modules/Abre-Insights/action_get_thoughtspot_token.php')
.then((response) => response.json())
.then((data) => data.token);
}
});
const embed = new ConversationEmbed('#thoughspot-embed', {
frameParams: {},
worksheetId: "<?php echo $worksheetId; ?>",
disableSourceSelection: false,
hideSourceSelection: false
});
embed
// Register event listeners
.on(EmbedEvent.Init, showLoader)
.on(EmbedEvent.Load, hideLoader)
.on(EmbedEvent.AuthExpire, showAuthExpired)
.render();
init({
thoughtSpotHost: "https://abre.thoughtspot.cloud",
authType: AuthType.TrustedAuthTokenCookieless,
autoLogin: true,
username: "<?php echo $_SESSION['useremail']; ?>",
customizations: {
style: {
customCSSUrl: "<?php echo $abreDomain; ?>/core/css/thoughtspot_0.0.1.css"
},
content: {
strings: {
"Spotter": "Abre",
}
},
iconSpriteUrl: "<?php echo $abreDomain; ?>/core/images/abre/abre_ai_glyph.svg"
},
getAuthToken: () => {
return fetch('/modules/Abre-Insights/action_get_thoughtspot_token.php')
.then((response) => response.json())
.then((data) => data.token);
}
});
const embed = new ConversationEmbed('#thoughspot-embed', {
frameParams: {},
worksheetId: "<?php echo $worksheetId; ?>",
disableSourceSelection: false,
hideSourceSelection: false
});
embed
// Register event listeners
.on(EmbedEvent.Init, showLoader)
.on(EmbedEvent.Load, hideLoader)
.on(EmbedEvent.AuthExpire, showAuthExpired)
.render();