Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
pdpi committed Nov 8, 2012
2 parents 1889e43 + 8bbb79c commit bac3606
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 46 deletions.
10 changes: 8 additions & 2 deletions bi-platform-v2-plugin/cdf/js/Dashboards.js
Expand Up @@ -1908,10 +1908,16 @@ Query = function() {
queryDefinition.settingdtSearchableColumns = options.dtSearchableColumns;
}
}
_exportIframe = _exportIframe || $('<iframe style="display:none">');

var theDoQuery = CDA_PATH + 'wrapItUp=wrapit';
$.post(theDoQuery, queryDefinition, function(uuid) {
var _exportIframe = $('<iframe style="display:none">');
_exportIframe.detach();
_exportIframe[0].src = CDA_PATH + $.param(queryDefinition);
_exportIframe[0].src = webAppPath + '/content/cda/unwrapQuery?' + $.param( {"path": queryDefinition.path, "uuid": uuid});
_exportIframe.appendTo($('body'));
});


}

this.fetchData = function(params, callback) {
Expand Down
2 changes: 1 addition & 1 deletion bi-platform-v2-plugin/cdf/js/components/ccc.js
Expand Up @@ -111,7 +111,7 @@ var BaseCccComponent = BaseComponent.extend({
}

var scriptName = myself.name.replace(/render_/,"");
chartDefinition.script = ("/"+ Dashboards.context.solution + "/" + Dashboards.context.path + "/" + scriptName +".js").replace(/\/+/g,'/') ;
chartDefinition.script = ("/"+ Dashboards.context.solution + "/" + Dashboards.context.path + "/" + Dashboards.context.file.split('.')[0] + "_" + scriptName +".js").replace(/\/+/g,'/') ;
chartDefinition.attachmentName = scriptName;
return chartDefinition;
};
Expand Down
5 changes: 4 additions & 1 deletion bi-platform-v2-plugin/cdf/js/components/input.js
Expand Up @@ -256,13 +256,16 @@ var DateRangeInputComponent = BaseComponent.extend({
changed = closed = false;
}
};

var format = (myself.dateFormat == undefined || myself.dateFormat == null)? 'yy-mm-dd' : myself.dateFormat;

$(function(){
$("#" + myself.htmlObject + " input").daterangepicker({
posX: offset.left + leftOffset,
posY: offset.top + topOffset,
earliestDate: earliestDate,
latestDate: latestDate,
dateFormat: 'yy-mm-dd',
dateFormat: format,
onOpen: function() {
changed = closed = false;
myself.startValue = null;
Expand Down
9 changes: 6 additions & 3 deletions bi-platform-v2-plugin/cdf/js/lib/CCC/protovis.js
Expand Up @@ -6428,7 +6428,8 @@ pv.SvgScene.rule = function(scenes) {
"y2": s.top + s.height,
"stroke": stroke.color,
"stroke-opacity": stroke.opacity,
"stroke-width": s.lineWidth / this.scale
"stroke-width": s.lineWidth / this.scale,
"stroke-dasharray": s.strokeDasharray || 'none'
});
e = this.append(e, scenes, i);
}
Expand Down Expand Up @@ -8845,7 +8846,8 @@ pv.Rule.prototype = pv.extend(pv.Mark)
.property("width", Number)
.property("height", Number)
.property("lineWidth", Number)
.property("strokeStyle", pv.color);
.property("strokeStyle", pv.color)
.property("strokeDasharray", String);

pv.Rule.prototype.type = "rule";

Expand Down Expand Up @@ -8894,7 +8896,8 @@ pv.Rule.prototype.defaults = new pv.Rule()
.extend(pv.Mark.prototype.defaults)
.lineWidth(1)
.strokeStyle("black")
.antialias(false);
.antialias(false)
.strokeDasharray("none");

/**
* Constructs a new rule anchor with default properties. Rules support five
Expand Down
19 changes: 16 additions & 3 deletions bi-platform-v2-plugin/cdf/js/lib/CCC/pvc-d1.0.js
@@ -1,4 +1,4 @@
//VERSION TRUNK-20120215-patched-20120803
//VERSION TRUNK-20120215-patched-20121015-b

// ECMAScript 5 shim
if(!Object.keys) {
Expand Down Expand Up @@ -4582,15 +4582,28 @@ pvc.CategoricalAbstract = pvc.TimeseriesAbstract.extend({
var bypassAxisSize = pvc.get(keyArgs, 'bypassAxisSize', false),
dMax = this.dataEngine.getSecondAxisMax(),
dMin = this.dataEngine.getSecondAxisMin();


if(!isFinite(dMin)){
dMin = 0;
}

if(!isFinite(dMax)){
dMax = 0;
}

if(dMin * dMax > 0 && options.secondAxisOriginIsZero){
if(dMin > 0){
dMin = 0;
} else {
dMax = 0;
}
}


if (dMin === dMax) {
dMin = dMin !== 0 ? dMin * 0.99 : options.secondAxisOriginIsZero ? 0 : -0.1;
dMax = dMax !== 0 ? dMax * 1.01 : 0.1;
}

// Adding a small offset to the scale's domain:
var dOffset = (dMax - dMin) * options.secondAxisOffset,
scale = new pv.Scale.linear(
Expand Down
10 changes: 5 additions & 5 deletions bi-platform-v2-plugin/ivy.xml
Expand Up @@ -51,11 +51,11 @@
<dependency org="pentaho" name="cpf" rev="TRUNK-SNAPSHOT" transitive="false" changing="true" conf="runtime->default"/>

<!-- orient db (persistence) -->
<dependency org="com.orientechnologies" name="orient-commons" rev="1.1.0" transitive="false" conf="runtime,default->default"/>
<dependency org="com.orientechnologies" name="orientdb-core" rev="1.1.0" transitive="false" conf="runtime,default->default"/>
<dependency org="com.orientechnologies" name="orientdb-server" rev="1.1.0" transitive="false" conf="runtime,default->default" />
<dependency org="com.orientechnologies" name="orientdb-client" rev="1.1.0" transitive="false" conf="runtime,default->default" />
<dependency org="com.orientechnologies" name="orientdb-enterprise" rev="1.1.0" transitive="false" conf="runtime,default->default" />
<dependency org="com.orientechnologies" name="orient-commons" rev="1.3.0-SNAPSHOT" transitive="false" conf="runtime,default->default"/>
<dependency org="com.orientechnologies" name="orientdb-core" rev="1.3.0-SNAPSHOT" transitive="false" conf="runtime,default->default"/>
<dependency org="com.orientechnologies" name="orientdb-server" rev="1.3.0-SNAPSHOT" transitive="false" conf="runtime,default->default" />
<dependency org="com.orientechnologies" name="orientdb-client" rev="1.3.0-SNAPSHOT" transitive="false" conf="runtime,default->default" />
<dependency org="com.orientechnologies" name="orientdb-enterprise" rev="1.3.0-SNAPSHOT" transitive="false" conf="runtime,default->default" />


</dependencies>
Expand Down
11 changes: 5 additions & 6 deletions bi-platform-v2-plugin/src/org/pentaho/cdf/DashboardContext.java
@@ -1,7 +1,7 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */

package org.pentaho.cdf;

import java.io.IOException;
Expand Down Expand Up @@ -189,7 +189,7 @@ private JSONObject processAutoIncludes(String dashboardPath, Document config) {
if (canInclude(dashboardPath, include.selectNodes("dashboards/*"), pat.matcher(path))) {
logger.debug("Accepted dashboard " + dashboardPath);
List<String> ids = listQueries(path);
String idPattern = (String) cda.selectObject("string(ids)");
//String idPattern = (String) cda.selectObject("string(ids)");
for (String id : ids) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("dataAccessId", id);
Expand All @@ -209,7 +209,6 @@ private JSONObject processAutoIncludes(String dashboardPath, Document config) {
}
logger.info("[Timing] Finished testing includes: " + (new SimpleDateFormat("HH:mm:ss.SSS")).format(new Date()));


return queries;
}

Expand Down
@@ -1,18 +1,18 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */

package org.pentaho.cdf;

import org.json.JSONException;

/**
*
* @author pedro
*/
public class InvalidCdfOperationException extends Exception{

private static final long serialVersionUID = 1L;

public InvalidCdfOperationException(Exception ex) {
super(ex);
}
Expand Down
17 changes: 8 additions & 9 deletions bi-platform-v2-plugin/src/org/pentaho/cdf/NavigateComponent.java
@@ -1,7 +1,7 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */

package org.pentaho.cdf;

import java.util.Hashtable;
Expand All @@ -23,7 +23,6 @@
import org.pentaho.platform.api.repository.ISolutionRepositoryService;
import org.pentaho.platform.engine.core.system.PentahoBase;
import org.pentaho.platform.engine.core.system.PentahoSystem;
import org.pentaho.platform.web.servlet.SolutionRepositoryService;

/**
* @author pedro
Expand All @@ -36,11 +35,11 @@ public class NavigateComponent extends PentahoBase
private static final String CONTENTLIST = "contentList";
private static final String SOLUTIONTREE = "solutionTree";
private static final String TYPE_DIR = "FOLDER";
private static final String TYPE_XACTION = "XACTION";
// private static final String TYPE_XACTION = "XACTION";
private static final String TYPE_URL = "URL";
private static final String TYPE_XCDF = "XCDF";
private static final String TYPE_WCDF = "WCDF";
private static final String TYPE_PRPT = "PRPT";
// private static final String TYPE_XCDF = "XCDF";
// private static final String TYPE_WCDF = "WCDF";
// private static final String TYPE_PRPT = "PRPT";
private static final String CACHE_NAVIGATOR = "CDF_NAVIGATOR_JSON";
private static final String CACHE_SOLUTIONTREE = "CDF_SOLUTIONTREE_JSON";
private static final String CACHE_REPOSITORY_DOCUMENT = "CDF_REPOSITORY_DOCUMENT";
Expand Down
8 changes: 4 additions & 4 deletions bi-platform-v2-plugin/src/org/pentaho/cdf/views/View.java
@@ -1,7 +1,7 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */

package org.pentaho.cdf.views;

import java.util.ArrayList;
Expand Down
12 changes: 5 additions & 7 deletions bi-platform-v2-plugin/src/org/pentaho/cdf/views/ViewManager.java
@@ -1,7 +1,7 @@
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */

package org.pentaho.cdf.views;

import java.io.OutputStream;
Expand Down Expand Up @@ -68,7 +68,7 @@ public View getView(String id) {
filter.where("name").equalTo(id).and().where("user").equalTo(userSession.getName());
List<View> views = sp.load(View.class, filter);

return views.size() > 0 ? views.get(0) : null;
return (views != null && views.size() > 0) ? views.get(0) : null;
}

public JSONObject listViews() {
Expand Down Expand Up @@ -108,9 +108,7 @@ public String saveView(IParameterProvider requestParams, IParameterProvider path
}

public String deleteView(IParameterProvider requestParams, IParameterProvider pathParams) {
View view = new View();
IPentahoSession userSession = PentahoSessionHolder.getSession();

try {
String name = requestParams.getStringParameter("name", "");
Filter filter = new Filter();
Expand Down

0 comments on commit bac3606

Please sign in to comment.