WIP reporting refactor

This commit is contained in:
John Woodlock
2012-05-11 17:57:09 +10:00
parent e729ea901d
commit d219f6fa14
8 changed files with 164 additions and 16 deletions
@@ -42,7 +42,7 @@ public class ReportingRestOperationsImpl implements ReportingRestOperations {
public void hackToForceAuthentication() {
try {
URI restUri = URI
.create(getBaseServerUrl().concat("api/protected/reporting/forceauth"));
.create(getBaseServerUrl().concat("api/v1/flexiblereporting/forceauth"));
this.oauthRestServiceTemplate.exchange(restUri, HttpMethod.GET, emptyRequest(), null);
} catch (HttpStatusCodeException e) {
@@ -1076,10 +1076,14 @@ function getReportDataNoAuth(inParams, successFunction) {
$.ajax({
url: RESTUrl,
type:'GET',
dataType: 'jsonp',
dataType: 'json',
data: inQueryParameters,
contentType: "application/json; charset=utf-8",
crossDomain: true,
crossDomain: false,
//cache: true,
beforeSend: function( xhr ) {
xhr.setRequestHeader("Accept", "application/json");
},
success: successFunction,
error:function(jqXHR, textStatus, errorThrown){
showMsgE("getReportDataNoAuth: ");
@@ -16,6 +16,6 @@
<script type="text/javascript" src="${resValue}/libs/DataTables-1.8.2/extras/TableTools/media/js/TableTools.min.js"></script>
<script type="text/javascript" src="${resValue}/libs/jquery.i18n.properties-min-1.0.9.js"></script>
<script type="text/javascript" src="${resValue}/libs/OAuthSimple.js"></script>
<script type="text/javascript" src="${resValue}/stretchyreporting/stretchyreporting-0.95.js"></script>
<script type="text/javascript" src="${resValue}/stretchyreporting/stretchyreporting-0.96.js"></script>
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
@@ -91,7 +91,8 @@ function selectNewThousandsSep(selectedVal) {
var reportingParams = {
rptDB: "mifosngprovider",
RESTUrl: "${baseUrl}api/protected/reporting/flexireport",
//old link RESTUrl: "${baseUrl}api/protected/reporting/flexireport",
RESTUrl: "${baseUrl}api/v1/flexiblereporting",
pentahoUrl: "${baseUrl}pentahoreport",
exportUrl: "${rootContext}/exportcsv",
bundleDir: "${resValue}/stretchyreporting/mifosngbundle/",
@@ -103,13 +104,13 @@ var reportingParams = {
indianFormat: false,
highlightMissingXlations: "N",
loadingImg: "${resValue}/stretchyreporting/dots64.gif",
resValue: "${resValue}/stretchyreporting/",
resValue: "${resValue}/stretchyreporting/"
//OAuth 1.0a parameters
apiKey: "${consumerKey}",
sharedSecret: "${consumerSecret}",
accessToken: "${accessToken}",
tokenSecret: "${tokenSecret}"
//apiKey: "${consumerKey}",
//sharedSecret: "${consumerSecret}",
//accessToken: "${accessToken}",
//tokenSecret: "${tokenSecret}"
};
jQuery.stretchyReporting.initialise(reportingParams);