Commit f444a7a0 authored by sdhaul's avatar sdhaul

To fetch report config from json file

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@193375 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2e391c82
...@@ -572,6 +572,26 @@ public class DashboardUtil ...@@ -572,6 +572,26 @@ public class DashboardUtil
componentData.put("feed", feedList); componentData.put("feed", feedList);
} }
//Added By Saitej D on 26 Nov 2018 [To fetch report config from json file] START
JSONObject exploreDetails = componentData.optJSONObject("explore_details");
System.out.println("exploreDetails in getColumnsData::::::::"+exploreDetails);
if(exploreDetails != null && exploreDetails.length() > 0) {
String reportFile = exploreDetails.optString("reportFile");
System.out.println("exploreDetails reportFile in getColumnsData::::::::"+reportFile);
if(reportFile != null && !reportFile.isEmpty()) {
String reportFilePath = CommonConstants.JBOSSHOME + File.separator + "server" + File.separator + "default" + File.separator + "deploy" + File.separator + "ibase.ear" + File.separator + "ibase.war" + File.separator + "dashboard" + File.separator + "metadataxml" + File.separator +reportFile+".json";
File file = new File(reportFilePath);
if(file.exists()) {
String fileString = FileUtils.readFileToString(file);
JSONObject reportJson = new JSONObject(fileString);
exploreDetails.put("reportConfig", reportJson);
componentData.put("explore_details", exploreDetails);
}
}
}
//Added By Saitej D on 26 Nov 2018 [To fetch report config from json file] END
return componentData; return componentData;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment