summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-analytics/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main/java')
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java274
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSONHelper.java2
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartWebRuntime.java2
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/upgrade/SystemUpgrade.java124
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ColumnHeaderRow.java6
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ReportData.java8
6 files changed, 212 insertions, 204 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java
index f5c641a4..f09309e1 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartD3Helper.java
@@ -113,144 +113,144 @@ public class ChartD3Helper {
this.reportRuntime = rr;
}
- public String createVisualization(String reportID, HttpServletRequest request) throws RaptorException {
- //From annotations chart
- clearReportRuntimeBackup(request);
-
- //HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.currentRequestAttributes()).getRequest();
- final Long user_id = new Long((long) UserUtils.getUserId(request));
- //String action = request.getParameter(AppConstants.RI_ACTION);
- //String reportID = AppUtils.getRequestValue(request, AppConstants.RI_REPORT_ID);
-
- ReportHandler rh = new ReportHandler();
- ReportData reportData = null;
- HashMap<String, String> chartOptionsMap = new HashMap<String, String>();
- try {
- if(reportID !=null) {
- reportRuntime = rh.loadReportRuntime(request, reportID, true, 1);
- setChartType(reportRuntime.getChartType());
- reportData = reportRuntime.loadReportData(0, user_id.toString(), 10000,request, false);
- }
-
-
-
- String rotateLabelsStr = "";
- rotateLabelsStr = AppUtils.nvl(reportRuntime.getLegendLabelAngle());
- if(rotateLabelsStr.toLowerCase().equals("standard")) {
- rotateLabelsStr = "0";
- } else if (rotateLabelsStr.toLowerCase().equals("up45")) {
- rotateLabelsStr = "45";
- } else if (rotateLabelsStr.toLowerCase().equals("down45")) {
- rotateLabelsStr = "-45";
- } else if (rotateLabelsStr.toLowerCase().equals("up90")) {
- rotateLabelsStr = "90";
- } else if (rotateLabelsStr.toLowerCase().equals("down90")) {
- rotateLabelsStr = "-90";
- } else
- rotateLabelsStr = "0";
-
- String width = (AppUtils.getRequestNvlValue(request, "width").length()>0?AppUtils.getRequestNvlValue(request, "width"):(AppUtils.nvl(reportRuntime.getChartWidth()).length()>0?reportRuntime.getChartWidth():"700"));
- String height = (AppUtils.getRequestNvlValue(request, "height").length()>0?AppUtils.getRequestNvlValue(request, "height"):(AppUtils.nvl(reportRuntime.getChartHeight()).length()>0?reportRuntime.getChartHeight():"300"));
- String animationStr = (AppUtils.getRequestNvlValue(request, "animation").length()>0?AppUtils.getRequestNvlValue(request, "animation"):new Boolean(reportRuntime.isAnimateAnimatedChart()).toString());
-
- String rotateLabels = (AppUtils.getRequestNvlValue(request, "rotateLabels").length()>0?AppUtils.getRequestNvlValue(request, "rotateLabels"):(rotateLabelsStr.length()>0?rotateLabelsStr:"0"));
- String staggerLabelsStr = (AppUtils.getRequestNvlValue(request, "staggerLabels").length()>0?AppUtils.getRequestNvlValue(request, "staggerLabels"):"false");
- String showMaxMinStr = (AppUtils.getRequestNvlValue(request, "showMaxMin").length()>0?AppUtils.getRequestNvlValue(request, "showMaxMin"):"false");
- String showControlsStr = (AppUtils.getRequestNvlValue(request, "showControls").length()>0?AppUtils.getRequestNvlValue(request, "showControls"):new Boolean(reportRuntime.displayBarControls()).toString());
- String showLegendStr = (AppUtils.getRequestNvlValue(request, "showLegend").length()>0?AppUtils.getRequestNvlValue(request, "showLegend"):new Boolean(!new Boolean(reportRuntime.hideChartLegend())).toString());
- String topMarginStr = AppUtils.getRequestNvlValue(request, "topMargin");
- String topMargin = (AppUtils.nvl(topMarginStr).length()<=0)?(reportRuntime.getTopMargin()!=null?reportRuntime.getTopMargin().toString():"30"):topMarginStr;
- String bottomMarginStr = AppUtils.getRequestNvlValue(request, "bottomMargin");
- String bottomMargin = (AppUtils.nvl(bottomMarginStr).length()<=0)?(reportRuntime.getBottomMargin()!=null?reportRuntime.getBottomMargin().toString():"50"):bottomMarginStr;
- String leftMarginStr = AppUtils.getRequestNvlValue(request, "leftMargin");
- String leftMargin = (AppUtils.nvl(leftMarginStr).length()<=0)?(reportRuntime.getLeftMargin()!=null?reportRuntime.getLeftMargin().toString():"100"):leftMarginStr;
- String rightMarginStr = AppUtils.getRequestNvlValue(request, "rightMargin");
- String rightMargin = (AppUtils.nvl(rightMarginStr).length()<=0)?(reportRuntime.getRightMargin()!=null?reportRuntime.getRightMargin().toString():"160"):rightMarginStr;
- String showTitleStr = (AppUtils.getRequestNvlValue(request, "showTitle").length()>0?AppUtils.getRequestNvlValue(request, "showTitle"):new Boolean(reportRuntime.displayChartTitle()).toString());
- String subType = AppUtils.getRequestNvlValue(request, "subType").length()>0?AppUtils.getRequestNvlValue(request, "subType"):(AppUtils.nvl(reportRuntime.getTimeSeriesRender()).equals("area")?reportRuntime.getTimeSeriesRender():"");
- String stackedStr = AppUtils.getRequestNvlValue(request, "stacked").length()>0?AppUtils.getRequestNvlValue(request, "stacked"):new Boolean(reportRuntime.isChartStacked()).toString();
- String horizontalBar = AppUtils.getRequestNvlValue(request, "horizontalBar").length()>0?AppUtils.getRequestNvlValue(request, "horizontalBar"):new Boolean(reportRuntime.isHorizontalOrientation()).toString();
- String barRealTimeAxis = AppUtils.getRequestNvlValue(request, "barRealTimeAxis");
- String barReduceXAxisLabels = AppUtils.getRequestNvlValue(request, "barReduceXAxisLabels").length()>0?AppUtils.getRequestNvlValue(request, "barReduceXAxisLabels"):new Boolean(reportRuntime.isLessXaxisTickers()).toString();;
- String timeAxis = AppUtils.getRequestNvlValue(request, "timeAxis").length()>0?AppUtils.getRequestNvlValue(request, "timeAxis"):new Boolean(reportRuntime.isTimeAxis()).toString();
- String logScale = AppUtils.getRequestNvlValue(request, "logScale").length()>0?AppUtils.getRequestNvlValue(request, "logScale"):new Boolean(reportRuntime.isLogScale()).toString();
- String precision = AppUtils.getRequestNvlValue(request, "precision").length()>0?AppUtils.getRequestNvlValue(request, "precision"):"2";
-
-
- chartOptionsMap.put("width", width);
- chartOptionsMap.put("height", height);
- chartOptionsMap.put("animation", animationStr);
- chartOptionsMap.put("rotateLabels", rotateLabels);
- chartOptionsMap.put("staggerLabels", staggerLabelsStr);
- chartOptionsMap.put("showMaxMin", showMaxMinStr);
- chartOptionsMap.put("showControls", showControlsStr);
- chartOptionsMap.put("showLegend", showLegendStr);
- chartOptionsMap.put("topMargin", topMargin);
- chartOptionsMap.put("bottomMargin", bottomMargin);
- chartOptionsMap.put("leftMargin", leftMargin);
- chartOptionsMap.put("rightMargin", rightMargin);
- chartOptionsMap.put("showTitle", showTitleStr);
- chartOptionsMap.put("subType", subType);
- chartOptionsMap.put("stacked", stackedStr);
- chartOptionsMap.put("horizontalBar", horizontalBar);
- chartOptionsMap.put("timeAxis", timeAxis);
- chartOptionsMap.put("barRealTimeAxis", barRealTimeAxis);
- chartOptionsMap.put("barReduceXAxisLabels", barReduceXAxisLabels);
-
- chartOptionsMap.put("logScale", logScale);
- chartOptionsMap.put("precision", precision);
-
-
- } catch (RaptorException ex) {
- ex.printStackTrace();
- }
- return createVisualization(reportRuntime, chartOptionsMap, request);
- }
+// public String createVisualization(String reportID, HttpServletRequest request) throws RaptorException {
+// //From annotations chart
+// clearReportRuntimeBackup(request);
+//
+// //HttpServletRequest request = ((ServletRequestAttributes)RequestContextHolder.currentRequestAttributes()).getRequest();
+// final Long user_id = new Long((long) UserUtils.getUserId(request));
+// //String action = request.getParameter(AppConstants.RI_ACTION);
+// //String reportID = AppUtils.getRequestValue(request, AppConstants.RI_REPORT_ID);
+//
+// ReportHandler rh = new ReportHandler();
+// ReportData reportData = null;
+// HashMap<String, String> chartOptionsMap = new HashMap<String, String>();
+// try {
+// if(reportID !=null) {
+// reportRuntime = rh.loadReportRuntime(request, reportID, true, 1);
+// setChartType(reportRuntime.getChartType());
+// reportData = reportRuntime.loadReportData(0, user_id.toString(), 10000,request, false);
+// }
+//
+//
+//
+// String rotateLabelsStr = "";
+// rotateLabelsStr = AppUtils.nvl(reportRuntime.getLegendLabelAngle());
+// if(rotateLabelsStr.toLowerCase().equals("standard")) {
+// rotateLabelsStr = "0";
+// } else if (rotateLabelsStr.toLowerCase().equals("up45")) {
+// rotateLabelsStr = "45";
+// } else if (rotateLabelsStr.toLowerCase().equals("down45")) {
+// rotateLabelsStr = "-45";
+// } else if (rotateLabelsStr.toLowerCase().equals("up90")) {
+// rotateLabelsStr = "90";
+// } else if (rotateLabelsStr.toLowerCase().equals("down90")) {
+// rotateLabelsStr = "-90";
+// } else
+// rotateLabelsStr = "0";
+//
+// String width = (AppUtils.getRequestNvlValue(request, "width").length()>0?AppUtils.getRequestNvlValue(request, "width"):(AppUtils.nvl(reportRuntime.getChartWidth()).length()>0?reportRuntime.getChartWidth():"700"));
+// String height = (AppUtils.getRequestNvlValue(request, "height").length()>0?AppUtils.getRequestNvlValue(request, "height"):(AppUtils.nvl(reportRuntime.getChartHeight()).length()>0?reportRuntime.getChartHeight():"300"));
+// String animationStr = (AppUtils.getRequestNvlValue(request, "animation").length()>0?AppUtils.getRequestNvlValue(request, "animation"):new Boolean(reportRuntime.isAnimateAnimatedChart()).toString());
+//
+// String rotateLabels = (AppUtils.getRequestNvlValue(request, "rotateLabels").length()>0?AppUtils.getRequestNvlValue(request, "rotateLabels"):(rotateLabelsStr.length()>0?rotateLabelsStr:"0"));
+// String staggerLabelsStr = (AppUtils.getRequestNvlValue(request, "staggerLabels").length()>0?AppUtils.getRequestNvlValue(request, "staggerLabels"):"false");
+// String showMaxMinStr = (AppUtils.getRequestNvlValue(request, "showMaxMin").length()>0?AppUtils.getRequestNvlValue(request, "showMaxMin"):"false");
+// String showControlsStr = (AppUtils.getRequestNvlValue(request, "showControls").length()>0?AppUtils.getRequestNvlValue(request, "showControls"):new Boolean(reportRuntime.displayBarControls()).toString());
+// String showLegendStr = (AppUtils.getRequestNvlValue(request, "showLegend").length()>0?AppUtils.getRequestNvlValue(request, "showLegend"):new Boolean(!new Boolean(reportRuntime.hideChartLegend())).toString());
+// String topMarginStr = AppUtils.getRequestNvlValue(request, "topMargin");
+// String topMargin = (AppUtils.nvl(topMarginStr).length()<=0)?(reportRuntime.getTopMargin()!=null?reportRuntime.getTopMargin().toString():"30"):topMarginStr;
+// String bottomMarginStr = AppUtils.getRequestNvlValue(request, "bottomMargin");
+// String bottomMargin = (AppUtils.nvl(bottomMarginStr).length()<=0)?(reportRuntime.getBottomMargin()!=null?reportRuntime.getBottomMargin().toString():"50"):bottomMarginStr;
+// String leftMarginStr = AppUtils.getRequestNvlValue(request, "leftMargin");
+// String leftMargin = (AppUtils.nvl(leftMarginStr).length()<=0)?(reportRuntime.getLeftMargin()!=null?reportRuntime.getLeftMargin().toString():"100"):leftMarginStr;
+// String rightMarginStr = AppUtils.getRequestNvlValue(request, "rightMargin");
+// String rightMargin = (AppUtils.nvl(rightMarginStr).length()<=0)?(reportRuntime.getRightMargin()!=null?reportRuntime.getRightMargin().toString():"160"):rightMarginStr;
+// String showTitleStr = (AppUtils.getRequestNvlValue(request, "showTitle").length()>0?AppUtils.getRequestNvlValue(request, "showTitle"):new Boolean(reportRuntime.displayChartTitle()).toString());
+// String subType = AppUtils.getRequestNvlValue(request, "subType").length()>0?AppUtils.getRequestNvlValue(request, "subType"):(AppUtils.nvl(reportRuntime.getTimeSeriesRender()).equals("area")?reportRuntime.getTimeSeriesRender():"");
+// String stackedStr = AppUtils.getRequestNvlValue(request, "stacked").length()>0?AppUtils.getRequestNvlValue(request, "stacked"):new Boolean(reportRuntime.isChartStacked()).toString();
+// String horizontalBar = AppUtils.getRequestNvlValue(request, "horizontalBar").length()>0?AppUtils.getRequestNvlValue(request, "horizontalBar"):new Boolean(reportRuntime.isHorizontalOrientation()).toString();
+// String barRealTimeAxis = AppUtils.getRequestNvlValue(request, "barRealTimeAxis");
+// String barReduceXAxisLabels = AppUtils.getRequestNvlValue(request, "barReduceXAxisLabels").length()>0?AppUtils.getRequestNvlValue(request, "barReduceXAxisLabels"):new Boolean(reportRuntime.isLessXaxisTickers()).toString();;
+// String timeAxis = AppUtils.getRequestNvlValue(request, "timeAxis").length()>0?AppUtils.getRequestNvlValue(request, "timeAxis"):new Boolean(reportRuntime.isTimeAxis()).toString();
+// String logScale = AppUtils.getRequestNvlValue(request, "logScale").length()>0?AppUtils.getRequestNvlValue(request, "logScale"):new Boolean(reportRuntime.isLogScale()).toString();
+// String precision = AppUtils.getRequestNvlValue(request, "precision").length()>0?AppUtils.getRequestNvlValue(request, "precision"):"2";
+//
+//
+// chartOptionsMap.put("width", width);
+// chartOptionsMap.put("height", height);
+// chartOptionsMap.put("animation", animationStr);
+// chartOptionsMap.put("rotateLabels", rotateLabels);
+// chartOptionsMap.put("staggerLabels", staggerLabelsStr);
+// chartOptionsMap.put("showMaxMin", showMaxMinStr);
+// chartOptionsMap.put("showControls", showControlsStr);
+// chartOptionsMap.put("showLegend", showLegendStr);
+// chartOptionsMap.put("topMargin", topMargin);
+// chartOptionsMap.put("bottomMargin", bottomMargin);
+// chartOptionsMap.put("leftMargin", leftMargin);
+// chartOptionsMap.put("rightMargin", rightMargin);
+// chartOptionsMap.put("showTitle", showTitleStr);
+// chartOptionsMap.put("subType", subType);
+// chartOptionsMap.put("stacked", stackedStr);
+// chartOptionsMap.put("horizontalBar", horizontalBar);
+// chartOptionsMap.put("timeAxis", timeAxis);
+// chartOptionsMap.put("barRealTimeAxis", barRealTimeAxis);
+// chartOptionsMap.put("barReduceXAxisLabels", barReduceXAxisLabels);
+//
+// chartOptionsMap.put("logScale", logScale);
+// chartOptionsMap.put("precision", precision);
+//
+//
+// } catch (RaptorException ex) {
+// ex.printStackTrace();
+// }
+// return createVisualization(reportRuntime, chartOptionsMap, request);
+// }
- public String createVisualization(ReportRuntime reportRuntime, HttpServletRequest request) throws RaptorException {
-
- String rotateLabelsStr = "";
- rotateLabelsStr = AppUtils.nvl(reportRuntime.getLegendLabelAngle());
- if(rotateLabelsStr.toLowerCase().equals("standard")) {
- rotateLabelsStr = "0";
- } else if (rotateLabelsStr.toLowerCase().equals("up45")) {
- rotateLabelsStr = "45";
- } else if (rotateLabelsStr.toLowerCase().equals("down45")) {
- rotateLabelsStr = "-45";
- } else if (rotateLabelsStr.toLowerCase().equals("up90")) {
- rotateLabelsStr = "90";
- } else if (rotateLabelsStr.toLowerCase().equals("down90")) {
- rotateLabelsStr = "-90";
- } else
- rotateLabelsStr = "0";
-
- HashMap<String,String> chartOptionsMap = new HashMap<String, String>();
- chartOptionsMap.put("width", reportRuntime.getChartWidth());
- chartOptionsMap.put("height", reportRuntime.getChartHeight());
- chartOptionsMap.put("animation", new Boolean(reportRuntime.isAnimateAnimatedChart()).toString());
- chartOptionsMap.put("rotateLabels", rotateLabelsStr);
- chartOptionsMap.put("staggerLabels", "false");
- chartOptionsMap.put("showMaxMin", "false");
- chartOptionsMap.put("showControls", new Boolean(reportRuntime.displayBarControls()).toString());
- chartOptionsMap.put("showLegend", new Boolean(!reportRuntime.hideChartLegend()).toString());
- chartOptionsMap.put("topMargin", reportRuntime.getTopMargin()!=null?reportRuntime.getTopMargin().toString():"30");
- chartOptionsMap.put("bottomMargin", reportRuntime.getBottomMargin()!=null?reportRuntime.getBottomMargin().toString():"50");
- chartOptionsMap.put("leftMargin", reportRuntime.getLeftMargin()!=null?reportRuntime.getLeftMargin().toString():"100");
- chartOptionsMap.put("rightMargin", reportRuntime.getRightMargin()!=null?reportRuntime.getRightMargin().toString():"160");
- chartOptionsMap.put("showTitle", new Boolean(reportRuntime.displayChartTitle()).toString());
- chartOptionsMap.put("subType", (AppUtils.nvl(reportRuntime.getTimeSeriesRender()).equals("area")?reportRuntime.getTimeSeriesRender():""));
- chartOptionsMap.put("stacked", new Boolean(reportRuntime.isChartStacked()).toString());
- chartOptionsMap.put("horizontalBar", new Boolean(reportRuntime.isHorizontalOrientation()).toString());
- chartOptionsMap.put("timeAxis", new Boolean(reportRuntime.isTimeAxis()).toString());
- chartOptionsMap.put("barReduceXAxisLabels", new Boolean(reportRuntime.isLessXaxisTickers()).toString());
-
- chartOptionsMap.put("logScale", new Boolean(reportRuntime.isLogScale()).toString());
- chartOptionsMap.put("precision", "2");
-
-
-
- return createVisualization(reportRuntime, chartOptionsMap, request);
- }
+// public String createVisualization(ReportRuntime reportRuntime, HttpServletRequest request) throws RaptorException {
+//
+// String rotateLabelsStr = "";
+// rotateLabelsStr = AppUtils.nvl(reportRuntime.getLegendLabelAngle());
+// if(rotateLabelsStr.toLowerCase().equals("standard")) {
+// rotateLabelsStr = "0";
+// } else if (rotateLabelsStr.toLowerCase().equals("up45")) {
+// rotateLabelsStr = "45";
+// } else if (rotateLabelsStr.toLowerCase().equals("down45")) {
+// rotateLabelsStr = "-45";
+// } else if (rotateLabelsStr.toLowerCase().equals("up90")) {
+// rotateLabelsStr = "90";
+// } else if (rotateLabelsStr.toLowerCase().equals("down90")) {
+// rotateLabelsStr = "-90";
+// } else
+// rotateLabelsStr = "0";
+//
+// HashMap<String,String> chartOptionsMap = new HashMap<String, String>();
+// chartOptionsMap.put("width", reportRuntime.getChartWidth());
+// chartOptionsMap.put("height", reportRuntime.getChartHeight());
+// chartOptionsMap.put("animation", new Boolean(reportRuntime.isAnimateAnimatedChart()).toString());
+// chartOptionsMap.put("rotateLabels", rotateLabelsStr);
+// chartOptionsMap.put("staggerLabels", "false");
+// chartOptionsMap.put("showMaxMin", "false");
+// chartOptionsMap.put("showControls", new Boolean(reportRuntime.displayBarControls()).toString());
+// chartOptionsMap.put("showLegend", new Boolean(!reportRuntime.hideChartLegend()).toString());
+// chartOptionsMap.put("topMargin", reportRuntime.getTopMargin()!=null?reportRuntime.getTopMargin().toString():"30");
+// chartOptionsMap.put("bottomMargin", reportRuntime.getBottomMargin()!=null?reportRuntime.getBottomMargin().toString():"50");
+// chartOptionsMap.put("leftMargin", reportRuntime.getLeftMargin()!=null?reportRuntime.getLeftMargin().toString():"100");
+// chartOptionsMap.put("rightMargin", reportRuntime.getRightMargin()!=null?reportRuntime.getRightMargin().toString():"160");
+// chartOptionsMap.put("showTitle", new Boolean(reportRuntime.displayChartTitle()).toString());
+// chartOptionsMap.put("subType", (AppUtils.nvl(reportRuntime.getTimeSeriesRender()).equals("area")?reportRuntime.getTimeSeriesRender():""));
+// chartOptionsMap.put("stacked", new Boolean(reportRuntime.isChartStacked()).toString());
+// chartOptionsMap.put("horizontalBar", new Boolean(reportRuntime.isHorizontalOrientation()).toString());
+// chartOptionsMap.put("timeAxis", new Boolean(reportRuntime.isTimeAxis()).toString());
+// chartOptionsMap.put("barReduceXAxisLabels", new Boolean(reportRuntime.isLessXaxisTickers()).toString());
+//
+// chartOptionsMap.put("logScale", new Boolean(reportRuntime.isLogScale()).toString());
+// chartOptionsMap.put("precision", "2");
+//
+//
+//
+// return createVisualization(reportRuntime, chartOptionsMap, request);
+// }
public String createVisualization(ReportRuntime reportRuntime, HashMap<String,String> chartOptionsMap, HttpServletRequest request) throws RaptorException {
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSONHelper.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSONHelper.java
index 59ae4996..0470ddb8 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSONHelper.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartJSONHelper.java
@@ -1563,4 +1563,4 @@ public class ChartJSONHelper {
}
-}
+} \ No newline at end of file
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartWebRuntime.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartWebRuntime.java
index 3329528d..b046dabd 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartWebRuntime.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/model/runtime/ChartWebRuntime.java
@@ -94,7 +94,7 @@ public class ChartWebRuntime implements Serializable {
public List getRolesCommaSeperated(HttpServletRequest request) {
Map roles = UserUtils.getRoles(request);
List roleList = null;
- StringBuffer roleBuf = new StringBuffer("");
+// StringBuffer roleBuf = new StringBuffer("");
int count = 0;
if( roles != null ) {
roleList = Arrays.asList(roles.keySet().toArray());
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/upgrade/SystemUpgrade.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/upgrade/SystemUpgrade.java
index 9c2255b4..9a427003 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/upgrade/SystemUpgrade.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/util/upgrade/SystemUpgrade.java
@@ -77,67 +77,67 @@ public class SystemUpgrade extends org.onap.portalsdk.analytics.RaptorObject {
}*/
} // upgradeDB
- private static void upgrateFromV1ToV2_0(HttpServletRequest request) throws Exception {
- StringBuffer log = new StringBuffer();
- log.append("Starting upgrade...<br>\n");
-
- DataSet ds = DbUtils.executeQuery("SELECT cr.rep_id, cr.sched_mailto_user_ids FROM cr_report cr");
- for(int i=0; i<ds.getRowCount(); i++) {
- String repId = ds.getString(i, 0);
- log.append("<li>Processing report ["+repId+"]: ");
-
- Connection connection = DbUtils.startTransaction();
- String emailIds = nvls(ds.getString(i, 1));
- if(emailIds.length()>0)
- try {
- log.append("Converting emails ");
- StringTokenizer st = new StringTokenizer(emailIds, ",");
- while(st.hasMoreTokens()) {
- String userId = nvls(st.nextToken());
- log.append(userId);
- if(userId.length()>0)
- DbUtils.executeUpdate(connection, "INSERT INTO cr_report_schedule_users (rep_id, user_id) VALUES ("+repId+", "+userId+")");
- log.append("-success, ");
- } // while
- log.append(" <font color=green>COMPLETED</font>; ");
- } catch(Exception e) {
- log.append("-<font color=red>FAILED</font>; ");
- }
-
- String reportXML = ReportLoader.loadCustomReportXML(repId);
- ReportDefinition rdef = ReportDefinition.unmarshal(reportXML, repId, request);
- ReportWrapper rw = new ReportWrapper(rdef.cloneCustomReport(), repId, null, null, null, null, null, null, false);
-
- for(Iterator iter=rw.getAllColumns().iterator(); iter.hasNext(); ) {
- DataColumnType col = (DataColumnType) iter.next();
- String drillDownURL = nvls(col.getDrillDownURL());
- if(drillDownURL.startsWith("dispatcher?action=custrep.run&c_master=")) {
- drillDownURL = AppUtils.getReportExecuteActionURL()+drillDownURL.substring("dispatcher?action=custrep.run&c_master=".length());
- log.append("Drill-down processed; ");
- col.setDrillDownURL(drillDownURL);
- }
- } // for
-
- reportXML = rw.marshal();
-
- /*PrintWriter xmlOut = new PrintWriter(new BufferedWriter(new FileWriter(new File(AppUtils.getTempFolderPath()+AppUtils.getUserID(request)))));
- xmlOut.println(reportXML);
- xmlOut.close();*/
-
- try {
- ReportLoader.updateCustomReportRec(connection, rw, reportXML);
- DbUtils.commitTransaction(connection);
- log.append("<font color=green>REPORT UPDATED</font></li>\n");
- } catch(Exception e) {
- log.append("<font color=red>REPORT UPDATE FAILED</font></li>\n");
- DbUtils.rollbackTransaction(connection);
- } finally {
- DbUtils.clearConnection(connection);
- }
- } // for
-
- log.append("<br>\nSystem upgrade successfully completed...<br>\n");
- request.setAttribute("system_message", log.toString());
- } // upgrateFromV1ToV2_0
+// private static void upgrateFromV1ToV2_0(HttpServletRequest request) throws Exception {
+// StringBuffer log = new StringBuffer();
+// log.append("Starting upgrade...<br>\n");
+//
+// DataSet ds = DbUtils.executeQuery("SELECT cr.rep_id, cr.sched_mailto_user_ids FROM cr_report cr");
+// for(int i=0; i<ds.getRowCount(); i++) {
+// String repId = ds.getString(i, 0);
+// log.append("<li>Processing report ["+repId+"]: ");
+//
+// Connection connection = DbUtils.startTransaction();
+// String emailIds = nvls(ds.getString(i, 1));
+// if(emailIds.length()>0)
+// try {
+// log.append("Converting emails ");
+// StringTokenizer st = new StringTokenizer(emailIds, ",");
+// while(st.hasMoreTokens()) {
+// String userId = nvls(st.nextToken());
+// log.append(userId);
+// if(userId.length()>0)
+// DbUtils.executeUpdate(connection, "INSERT INTO cr_report_schedule_users (rep_id, user_id) VALUES ("+repId+", "+userId+")");
+// log.append("-success, ");
+// } // while
+// log.append(" <font color=green>COMPLETED</font>; ");
+// } catch(Exception e) {
+// log.append("-<font color=red>FAILED</font>; ");
+// }
+//
+// String reportXML = ReportLoader.loadCustomReportXML(repId);
+// ReportDefinition rdef = ReportDefinition.unmarshal(reportXML, repId, request);
+// ReportWrapper rw = new ReportWrapper(rdef.cloneCustomReport(), repId, null, null, null, null, null, null, false);
+//
+// for(Iterator iter=rw.getAllColumns().iterator(); iter.hasNext(); ) {
+// DataColumnType col = (DataColumnType) iter.next();
+// String drillDownURL = nvls(col.getDrillDownURL());
+// if(drillDownURL.startsWith("dispatcher?action=custrep.run&c_master=")) {
+// drillDownURL = AppUtils.getReportExecuteActionURL()+drillDownURL.substring("dispatcher?action=custrep.run&c_master=".length());
+// log.append("Drill-down processed; ");
+// col.setDrillDownURL(drillDownURL);
+// }
+// } // for
+//
+// reportXML = rw.marshal();
+//
+// /*PrintWriter xmlOut = new PrintWriter(new BufferedWriter(new FileWriter(new File(AppUtils.getTempFolderPath()+AppUtils.getUserID(request)))));
+// xmlOut.println(reportXML);
+// xmlOut.close();*/
+//
+// try {
+// ReportLoader.updateCustomReportRec(connection, rw, reportXML);
+// DbUtils.commitTransaction(connection);
+// log.append("<font color=green>REPORT UPDATED</font></li>\n");
+// } catch(Exception e) {
+// log.append("<font color=red>REPORT UPDATE FAILED</font></li>\n");
+// DbUtils.rollbackTransaction(connection);
+// } finally {
+// DbUtils.clearConnection(connection);
+// }
+// } // for
+//
+// log.append("<br>\nSystem upgrade successfully completed...<br>\n");
+// request.setAttribute("system_message", log.toString());
+// } // upgrateFromV1ToV2_0
} // SystemUpgrade
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ColumnHeaderRow.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ColumnHeaderRow.java
index 8be2a68d..b85ed44e 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ColumnHeaderRow.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ColumnHeaderRow.java
@@ -101,9 +101,9 @@ public class ColumnHeaderRow extends Vector {
return (s == null) ? "" : s;
}
- private String nvl(String s, String sDefault) {
- return nvl(s).equals("") ? sDefault : s;
- }
+// private String nvl(String s, String sDefault) {
+// return nvl(s).equals("") ? sDefault : s;
+// }
public String getAlignment() {
return alignment;
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ReportData.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ReportData.java
index b11cfd29..d82cb654 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ReportData.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/view/ReportData.java
@@ -88,6 +88,14 @@ public class ReportData extends org.onap.portalsdk.analytics.RaptorObject implem
columnVisuals = new Vector();
} // ReportData
+ public Vector getColumnVisuals() {
+ return columnVisuals;
+ }
+
+ public void setColumnVisuals(Vector columnVisuals) {
+ this.columnVisuals = columnVisuals;
+ }
+
public int getPageNo() {
return pageNo;
} // pageNo