Skip to content

Commit c095f98

Browse files
committed
support dashboard set access token and fixed bug in new interact operation in demo
1 parent 383cbcc commit c095f98

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

demo/v2-demo/scripts/report.js

+3
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ function OpenInteractStep() {
115115
$("#settings").load("settings_interact_tile.html", function() {
116116
SetToggleHandler("tile-operations-div");
117117
LoadCodeArea("#embedCodeDiv", "");
118+
AddImgToNewOperations();
118119
});
119120
}
120121
else if (entityType == EntityType.Dashboard)
@@ -123,6 +124,7 @@ function OpenInteractStep() {
123124
SetToggleHandler("dashboard-operations-div");
124125
SetToggleHandler("dashboard-events-operations-div");
125126
LoadCodeArea("#embedCodeDiv", _Dashboard_GetId);
127+
AddImgToNewOperations();
126128
});
127129
}
128130
else if (entityType == EntityType.Qna)
@@ -131,6 +133,7 @@ function OpenInteractStep() {
131133
SetToggleHandler("qna-operations-div");
132134
SetToggleHandler("qna-events-operations-div");
133135
LoadCodeArea("#embedCodeDiv", _Qna_SetQuestion);
136+
AddImgToNewOperations();
134137
});
135138
}
136139
else

src/embed.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,8 @@ export abstract class Embed {
367367
* @returns {Promise<void>}
368368
*/
369369
setAccessToken(accessToken: string): Promise<void> {
370-
return this.service.hpm.post<models.IError[]>('/report/token', accessToken, { uid: this.config.uniqueId }, this.iframe.contentWindow)
370+
var embedType = this.config.type;
371+
return this.service.hpm.post<models.IError[]>('/' + embedType + '/token', accessToken, { uid: this.config.uniqueId }, this.iframe.contentWindow)
371372
.then(response => {
372373
return response.body;
373374
})

0 commit comments

Comments
 (0)