summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-analytics/src/main/java/org/onap
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src/main/java/org/onap')
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/ActionHandler.java62
1 files changed, 1 insertions, 61 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/ActionHandler.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/ActionHandler.java
index 1cc75b5e..b660ca95 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/ActionHandler.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/controller/ActionHandler.java
@@ -613,7 +613,6 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject {
if (aLR!=null && !aLR.getReportID().equals(reportID)) {
request.setAttribute(AppConstants.RI_SHOW_BACK_BTN, "Y");
}
-// }
}
if(rDisplayContent)
@@ -1829,29 +1828,6 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject {
public String getChildDropDown(HttpServletRequest request, String nextPage) throws RaptorRuntimeException {
if(request.getParameter("firstTime") != null) { return nextPage; }
-
- /*ReportRuntime rr = (ReportRuntime) request.getSession().getAttribute(
- AppConstants.SI_REPORT_RUNTIME);
-
- String c_master = request.getParameter("c_master");
- java.util.HashMap valuesMap = Globals.getRequestParamtersMap(request);
- request.setAttribute("c_master", c_master);
-
- int idx = 0;
- ReportFormFields rff = rr.getReportFormFields();
- FormField ff = null;
- for(rff.resetNext(); rff.hasNext(); idx++) {
- ff = rff.getNext();
-
-
- if(ff.getDependsOn() != null && ff.getDependsOn().trim() != "")
- {
- String val = request.getParameter(ff.getFieldName());
- request.setAttribute(ff.getFieldName(), ff.getHtml(val, valuesMap, rr));
- }
-
- }
- */
return nextPage;
}
@@ -1940,20 +1916,16 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject {
colNames.append(dc.getColId());
if (dc.isVisible()) {
//TODO: Drilldown URL
- //sql = reportRuntime.parseReportSQLForDrillDownParams(sql, dc, request);
}
}
DataSet ds = null;
- // try {
String dbInfo = reportRuntime.getDBInfo();
if(maxRows == 1)
sql += " limit "+ maxRows;
System.out.println("SQL getReportData()- " + sql);
ds = ConnectionUtils.getDataSet(sql, dbInfo);
int totalRows = 0;
- /*if (reportRuntime.getReportDataSize() < 0) {*/
- //String countSQL = "SELECT count(*) FROM (" + sql + ") x";
String dbType = "";
if (dbInfo!=null && (!dbInfo.equals(AppConstants.DB_LOCAL))) {
@@ -1966,18 +1938,12 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject {
}
totalRows = ds.getRowCount();
- /*}*/
ReportData rd = new ReportData(0, true);
if(totalRows > 0) {
// Already defined changed for modifying request parameters
- //List reportCols = getAllColumns();
Vector visibleCols = new Vector(reportCols.size());
Vector formatProcessors = new Vector(reportCols.size());
-
- // ColumnHeaderRow chr = new ColumnHeaderRow();
- // rd.reportColumnHeaderRows.addColumnHeaderRow(chr);
- // chr.setRowHeight("30");
int count =0 ;
/* ADDED */
@@ -1993,7 +1959,6 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject {
for(int i = 0 ; i < rff.size(); i++) {
fieldDisplayName = "["+((FormField)rff.getFormField(i)).getFieldDisplayName()+"]";
fieldValue = "";
- //if(dct.getOriginalDisplayName()==null) dct.setOriginalDisplayName(dct.getDisplayName());
if (dct.getDependsOnFormField().equals(fieldDisplayName)) {
fieldValue = nvl(request.getParameter(((FormField)rff.getFormField(i)).getFieldName()));
@@ -2028,7 +1993,6 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject {
}
if (dc.isVisible()) {
visibleCols.add(count,dc);
- //if(dc.getColId().startsWith("group")) {
for (int d = 0; d < reportCols.size(); d++) {
if(reportCols.get(d)!=null) {
DataColumnType dct1 = (DataColumnType) reportCols.get(d);
@@ -2038,21 +2002,17 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject {
}
}
}
- //}
VisualManager visualManager = reportRuntime.getVisualManager();
rd.createColumn(dc.getColId(), dc.getDisplayName(), dc.getDisplayWidthInPxls(),dc.getDisplayHeaderAlignment(),
visualManager.isColumnVisible(dc.getColId()), visualManager
.getSortByColId().equals(dc.getColId()) ? visualManager
.getSortByAscDesc() : null, true, dc.getLevel()!=null?dc.getLevel():0, dc.getStart()!=null?dc.getStart():0, dc.getColspan()!=null?dc.getColspan():0, dc.isIsSortable()!=null?dc.isIsSortable():false);
- // chr.addColumnHeader(new ColumnHeader(dc.getDisplayName(),
- // (dc.getDisplayWidth()>100)?"10%":(""+dc.getDisplayWidth()+"%")));
} // if
else {
visibleCols.add(count,null);
rd.createColumn(dc.getColId(), AppConstants.HIDDEN, dc.getDisplayWidthInPxls(), dc.getDisplayHeaderAlignment(),
false, null,false,dc.getLevel()!=null?dc.getLevel():0, dc.getStart()!=null?dc.getStart():0, dc.getColspan()!=null?dc.getColspan():0, dc.isIsSortable()!=null?dc.isIsSortable():false);
-// formatProcessors.add(count,null);
}
count++;
} // for
@@ -2097,7 +2057,6 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject {
}
if (dv.getDisplayValue().length() == 0) {
- //dv.setDisplayValue("[NULL]");
dv.setDisplayValue("");
}
} // if
@@ -2116,34 +2075,18 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject {
dv.setVisible(true);
dv.setAlignment(dct.getDisplayAlignment());
dv.setDisplayTotal(dct.getDisplayTotal());
- dv.setDisplayName(dct.getDisplayName());
-
-// if (nvl(dct.getDrillDownURL()).length() > 0) {
-
-// if(dv.getDisplayValue().length() > 0) {
- //TODO: Below Drilldown URL
-// dv.setDrillDownURL(reportRuntime.parseDrillDownURL(r, /* c, */ds, dct,request, childReportFormFields));
-// dv.setDrillDowninPoPUp(dct.isDrillinPoPUp());
-// }
-//
-// if (dv.getDisplayValue().length() == 0) {
-// //dv.setDisplayValue("[NULL]");
-// dv.setDisplayValue("");
-// }
-// } // if
+ dv.setDisplayName(dct.getDisplayName());
} else {
dv.setVisible(false);
dv.setHidden(true);
}
- //System.out.println("in Linear report b4" + dr.getFormatId() + dr.getBgColorHtml() + dv.getDisplayValue());
if(dr.getFormatId()!=null)
((FormatProcessor) formatProcessors.get(c)).setHtmlFormatters(dv, dr, true);
else
((FormatProcessor) formatProcessors.get(c)).setHtmlFormatters(dv, dr, false);
- //System.out.println("in Linear report After" + dr.getFormatId() + dr.getBgColorHtml() + dv.getDisplayValue());
} // if reportCols
} // for
reportDataList.add(dr);
@@ -2151,7 +2094,6 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject {
rd.setReportDataList(reportDataList);
//Only if rownumber options is needed
- //rd.addRowNumbers(pageNo, getPageSize());
DataRow colDataTotalsLinear = null;
if (colDataTotalsLinear == null)
colDataTotalsLinear = reportRuntime.generateColumnDataTotalsLinear(new ArrayList(reportCols), AppUtils.getUserID(request),
@@ -2171,8 +2113,6 @@ public class ActionHandler extends org.onap.portalsdk.analytics.RaptorObject {
if(rr!=null) {
ReportJSONRuntime reportJSONRuntime = rr.createFormFieldJSONRuntime(request);
ObjectMapper mapper = new ObjectMapper();
- //mapper.setVisibility(JsonMethod.FIELD, Visibility.ANY);
- //mapper.setVisibilityChecker(mapper.getVisibilityChecker().with(JsonAutoDetect.Visibility.NONE));
mapper.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
String jsonInString = "";