I'm trying to use Community Startup Tabs to do when a user logs in the page,it redirects him to another page. I've modifyed the config.xml this way:
But it doesn't redirect the user anywhere and in the console appears this:
The tabs.js (it is the javascript that redirect the user) has the next code: (Can anybody help me? because in the pentaho 6 I didn't have this problem and I don't have anything different, I do not know if in the new version something has changed)
Code:
<?xml version="1.0"?>
<cstConfig>
<rule match="USER" pattern="false" value="educa">
<tab title="Bienvenida" order="1" fullScreen="true" tooltip="Bienvenida"><![CDATA[api/repos/%3Apublic%3Aaula_upv%3Abienvenida%3Aindex.wcdf/generatedContent]]></tab>
</rule>
<rule match="USER" pattern="false" value="asistic">
<tab title="Bienvenida" order="1" fullScreen="true" tooltip="Bienvenida"><![CDATA[api/repos/%3Apublic%3Aaula_upv%3Abienvenida%3Aindex.wcdf/generatedContent]]></tab>
</rule>
</cstConfig>
HTML Code:
"GET localhost:8080/pentaho/plugin/cst/api/readConfigOnce 500 (Error Interno del Servidor)"
Code:
var fetchAndOpenTabs = function(){
var tabs;
$.ajax({
type: "GET",
url: CONTEXT_PATH + "plugin/cst/api/readConfigOnce",
dataType: "json",
success: function(data){
if(data.resultset){
var mode = $.unique($.map(data.resultset, function(row){
return row[4];
}));
//console.log("CST: " + JSON.stringify(mode));
if (mode[0] == "launcher"){
window.top.mantle_openTab('CST', 'Community Startup Tabs', CONTEXT_PATH + "plugin/cst/api/launcher");
} else {
var tabsCount = data.queryInfo.totalRows;
$.each(data.resultset, function(i, tab){
if(tab[2]){
if(tabsCount == 1){
window.location.href = tab[3];
} else {
window.open(tab[3], tab[1]);
}
} else {
window.top.mantle_openTab(tab[0], tab[1], tab[3]);
}
});
}
$($(".pentaho-tab-deck-panel iframe")[0]).load(function(){
setTimeout(function(){
$($(".pentaho-tab-bar .pentaho-tabWidget")[0]).mouseup();
}, 1000);
});
}
}
});
};