Reputation: 9178
I am using Pentaho CDE and I am trying to put a Saiku analysis file inside the dashboard using Saiku Widget.
However I am getting No Data message on the screen and in the browser console I am getting an error 401 - Bad Credentials.
When I access the Saiku URL directly from the browser, I am getting JSON response. It is not working with-in pentaho CDE dashboard.
Can someone help me out with this?
Upvotes: 1
Views: 643
Reputation: 268
You must edit the file /biserver-ce/pentaho-solutions/system/saiku/ui/js/saiku/embed/SaikuEmbed.js and then restart bi-server, because the content of this file is minified in CDF.js
In this SaikuEmbed.js the user and password are set in
var _settings = {
server: '/saiku',
path: '/rest/saiku/embed',
user: 'admin',
password: 'admin',
blockUI: false
};
but i don't have user admin with password admin, so when it's try to do a verification before ajax call it stack with 401 authorization required.
I modified
beforeSend: function(request) {
if (self.settings.user && self.settings.password) {
var auth = 'Basic ' + Base64.encode(
self.settings.user + ':' + self.settings.password
);
request.setRequestHeader('Authorization', auth);
return true;
}
},
with
beforeSend: function(request) {
if (Dasboards.context.user) {
return true;
}
},
You can comment all beforeSend, if you want.
Upvotes: 0