webdetails / cdf Goto Github PK
View Code? Open in Web Editor NEWCommunity Dashboard Framework
License: Mozilla Public License 2.0
Community Dashboard Framework
License: Mozilla Public License 2.0
The generated dashboard HTML contain a javascrit variable named Dashboards.context. I think it is not complete. The file value is blank. And I suggest add a fullPath value.
The generated sample Dashboards.context as folow:
Dashboards.context = {
"file": "",
"locale": "en_US",
"params": {},
"path": "",
"queryData": {},
"roles": [
"Admin",
"Authenticated",
"ceo"
],
"serverLocalDate": 1345879506232,
"serverUTCDate": 1345908306232,
"sessionAttributes": {},
"solution": "00-Dashboard",
"user": "joe"
}
What I expect as folow:
Dashboards.context = {
"file": "xxx.xcdf",
"fullPath":"/00-Dashboard/xxx.xcdf",
"locale": "en_US",
"params": {},
"path": "",
"queryData": {},
"roles": [
"Admin",
"Authenticated",
"ceo"
],
"serverLocalDate": 1345879506232,
"serverUTCDate": 1345908306232,
"sessionAttributes": {},
"solution": "00-Dashboard",
"user": "joe"
}
Consider a new template template-dashboard-itisbi.html, the content as flows:
<html>
<head></head>
<body>{content}</body>
</html>
CdfContentGenerator output:
1 head end tag miss "<"
/head>
2 body start tag miss ">"
<body
Fetch latest master code (commit 5cce488), then run ant "resolve", get flowing error:
[ivy:resolve] :: problems summary ::
[ivy:resolve] :::: WARNINGS
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: UNRESOLVED DEPENDENCIES ::
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve] :: com.orientechnologies#orient-commons;1.3.0-SNAPSHOT: java.lang.NullPointerException at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:174)
[ivy:resolve] :: com.orientechnologies#orientdb-core;1.3.0-SNAPSHOT: java.lang.NullPointerException at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:174)
[ivy:resolve] :: com.orientechnologies#orientdb-server;1.3.0-SNAPSHOT: java.lang.NullPointerException at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:174)
[ivy:resolve] :: com.orientechnologies#orientdb-client;1.3.0-SNAPSHOT: java.lang.NullPointerException at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:174)
[ivy:resolve] :: com.orientechnologies#orientdb-enterprise;1.3.0-SNAPSHOT: java.lang.NullPointerException at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:174)
[ivy:resolve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:resolve]
It seems there is no com.orientechnologies:orientdb-parent:1.3.0-SNAPSHOT in the repository.
My company forces to deploy all the webapps on a second level URL, in this case, Pentaho should be deployed at https://mycompanysite/aplicaciones/pentaho
I renamed the war file to aplicaciones#pentaho
and changed all the necessary configuration parameters and got it working with one exception.
Some of the URLs, when working with an ETL, get the last folder chopped
Notice that the pentaho
part of the URL is missing.
I started to look at the javascript and it turns out that in the file pentaho-solutions/system/pentaho-cdf/js/cdf-bootstrap-script-includes.js
at line 5266 you can see
if(webAppPath==undefined){webAppPath="/"+pathArray[1];}
I changed it to
if(webAppPath==undefined){webAppPath="/"+pathArray[1]+"/"+pathArray[2];}
And everything is working fine.
I know that this is a corner case and the suggestion is just a "hack" to make it work, but the rest of the URLs are generated correctly; that means that the correct logic to guess the correct webAppPath should exist somewhere else in the code.
Cheers
PS: The Pentaho I installed is pentaho-server-ce-9.3.0.0-428.zip
MessageBundler seems to be creating temp files in the CATALINA_BASE directory, rather than in the CATALINA_TEMP directory. When running under a "normal" tomcat installation on CentOS (yum install tomcat6), the CATALINA_BASE directory is owned by root, so I am getting "permission denied" errors.
19:17:56,340 ERROR [CdfContentGenerator] Error creating cdf content:
java.io.FileNotFoundException: tempMessageFile_1405711076336 (Permission denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(FileOutputStream.java:221)
at java.io.FileWriter.(FileWriter.java:107)
at org.pentaho.cdf.localization.MessageBundlesHelper.appendMessageFiles(MessageBundlesHelper.java:139)
at org.pentaho.cdf.localization.MessageBundlesHelper.appendMessageFiles(MessageBundlesHelper.java:114)
I have verified that changing the owner of CATALINA_BASE to the tomcat user makes these errors go away.
Don't know if this is related to some already known issue...
Trying to run ExecutePrptComponent sample, I get this error in pentaho.log:
GenericServlet.ERROR_0004 - Resource /reporting/reportviewer/common-ui/util/util.js not found in plugin Pentaho Reporting Plugin
environment: pentaho-cdf version 12.10.17, BI platform version 4.5-stable (cbf build)
in biserver 5.0.1 not have problems.
have Problems biserver 5.2 to send parameters en string.
example 1
Arg=ParUser_BA Value=ParameterUser
*"ParameterUser" is simple Parameter
it works.
example 2
Arg=ParUser Value=MIKE
*"MIKE" not is simple Parameter, is string
not it works.
example 3
Arg=ParUsers_BA Value=ParListUsers.toString()
*"ParListUsers" is simple Parameter(set value multiselectComponent)
not it works.
Solution:
modify the file
biserver-ce/pentaho-solutions/system/pentaho-cdf/js/Dashboards.Main.js
I edit function:
Dashboards._getValueFromContext = function(o, path) {
if (!o) return; //undefined
if (null != path) {
if (this._flatParameters) {
return o[path];
} else {
var parts = (path instanceof Array) ? path : path.split("."), L = parts.length;
if (L) for (var i = 0; L > i; ) {
var part = parts[i++], value = o[part];
if (null == value) {
return; //the path requested is undefined
}
o = value;
}
}
}
return o;
};
to This :
Dashboards._getValueFromContext = function(o, path) {
if (!o) return; //undefined
if (null != path) {
if (this._flatParameters) {
return o[path];
} else {
var parts = (path instanceof Array) ? path : path.split("."), L = parts.length;
if (L) for (var i = 0; L > i; ) {
var part = parts[i++], value = o[part];
if (null == value) {//the path requested is undefined
try{
path= eval(path);
}catch(e){
return path;
}
return path;
}
o = value;
}
}
}
return o;
};
Reason (line 6596):
this.extend(this.pvBar,"barPanel_");
Patch (line 6596):
this.extend(this.pvBarPanel,"barPanel_");
I was trying to add a new datasource in CDE through script using the mentioned code snippet -
// defaults to a CDA query
dashboard.addDataSource("myDatasource", {dataAccessId: "query1", path: "/public/queries.cda"});
dashboard.getQuery({dataSource: "myDatasource"});
Though I found this error on console
Reference in the link - https://help.pentaho.com/Documentation/6.1/0R0/cdf.dashboard.Dashboard#addDataSource
Do we have any workaround in this case?
Awaiting quick response and TIA.
Like DateInputComponent, the developer should be able to define the date format on DateRangeInputComponent .
These are the changes that I made on the file:
CoreComponents.JS
//Line ~ ~1139
var format = (myself.dateFormat == undefined || myself.dateFormat == null)? 'yy-mm-dd' : myself.dateFormat;
$("#" + myself.htmlObject + " input").daterangepicker({
posX: offset.left + leftOffset,
posY: offset.top + topOffset,
earliestDate: earliestDate,
latestDate: latestDate,
//change begin
dateFormat: format ,
//change End
onOpen: function() {
changed = closed = false;
myself.startValue = null;
myself.endValue = null;
},
date.js (in daterangepicker.jQuery.js) overrides Date.now to be new Date() (type object) instead of current timestamp (type number).
This change of a browser's API breaks other modern javascript libraries that might be included on the page.
This appears to be a patched version of date.js that doesn't have the issue...but I don't know who is updating or maintaining date.js.
http://cdnjs.cloudflare.com/ajax/libs/datejs/1.0/date.min.js
I went ahead and made the change. Pull request is here:
When using a check component and setting a custom parameter's Javascript code to an array of integers like [1,2,3], it all works as expected and the first three options are pre-selected when opening the dashboard.
However, this is not the case with the multiple select component; nothing gets selected. The reason is that jQuery.inArray( value, currentValArray) compares strings (value) against integers (currentValArray) and never matches anything.
Of course one solution is populating the array with strings ["1","2","3"] but it could be more foolproof to convert all values in currentValArray to strings by default in SelectBaseComponent à la:
jQuery.each(currentValArray, function(k, v) { currentValArray[k] = "" + v; });
Or someone with a better knowledge of the codebase might have a more elegant solution.
When fetchData is called only with callback argument and _callback field is not set, the 'QueryNotInitialized' is launched.
Reason (line 1537):
if (typeof _callback != 'function') { //Teste somente o field quando deveria testar o argumento da função
throw 'QueryNotInitialized';
}
Patch (line 1536):
var doQuery = function(outsideCallback){
var url;
var queryDefinition;
var callback = (outsideCallback ? outsideCallback : _callback);
if (typeof callback != 'function') {
throw 'QueryNotInitialized';
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.