From a91868b4d461d903c2e0ef78a75afe89385bc7e9 Mon Sep 17 00:00:00 2001 From: "Christopher Lott (cl778h)" Date: Tue, 13 Jun 2017 14:33:51 -0400 Subject: [PORTAL-15] RAPTOR reporting fixes Also repairs a bug in the user-management overlay screen. Ticket number all caps this time. Restore epsdk-app-os pom -SNAPSHOT suffix Change-Id: I7ef620c4ebc52259bcf474908bc4810dfd7e41e7 Signed-off-by: Christopher Lott (cl778h) --- ecomp-sdk/epsdk-analytics/README.md | 2 +- .../portalsdk/analytics/model/runtime/ChartD3Helper.java | 2 +- .../openecomp/portalsdk/analytics/model/runtime/ChartJSON.java | 9 +++++++++ .../analytics/system/fusion/web/RaptorControllerAsync.java | 10 +++++++++- 4 files changed, 20 insertions(+), 3 deletions(-) (limited to 'ecomp-sdk/epsdk-analytics') diff --git a/ecomp-sdk/epsdk-analytics/README.md b/ecomp-sdk/epsdk-analytics/README.md index be0b376c..5fd6d23d 100644 --- a/ecomp-sdk/epsdk-analytics/README.md +++ b/ecomp-sdk/epsdk-analytics/README.md @@ -11,6 +11,6 @@ features including charts, maps and reports ("Raptor"). Version 1.1.0 - [Portal-7] Improvements added as part of the rebasing process - + Version 1.0.0 - Initial release diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ChartD3Helper.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ChartD3Helper.java index 22602e03..698d52a5 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ChartD3Helper.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ChartD3Helper.java @@ -1074,7 +1074,7 @@ public class ChartD3Helper { } else { wholeScript.append(" .rotateLabels(\"0\") \n "); } - //wholeScript.append(" .axisLabel('" + legendColumnName + "')"); + wholeScript.append(" .axisLabel('" + legendColumnName + "')"); if(flagNoDate == 1 || !timeAxis) { wholeScript.append(";\n"); } else { diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ChartJSON.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ChartJSON.java index 8ec6bc19..66bce17a 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ChartJSON.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/model/runtime/ChartJSON.java @@ -130,6 +130,8 @@ public class ChartJSON { this.hasCategoryAxis = hasCategoryAxis; } private ArrayList rangeAxisList; + private ArrayList rangeAxisRemoveList; + private ArrayList > wholeList; private String primaryAxisLabel; @@ -447,5 +449,12 @@ public class ChartJSON { else return ""; } + public ArrayList getRangeAxisRemoveList() { + return rangeAxisRemoveList; + } + public void setRangeAxisRemoveList(ArrayList rangeAxisRemoveList) { + this.rangeAxisRemoveList = rangeAxisRemoveList; + } + } diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java index 0194b52d..48fdbe4c 100644 --- a/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java +++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/openecomp/portalsdk/analytics/system/fusion/web/RaptorControllerAsync.java @@ -29,6 +29,7 @@ import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Enumeration; import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; @@ -1276,6 +1277,10 @@ public class RaptorControllerAsync extends RestrictedBaseController { ArrayList rangeAxisList = chartJSON.getRangeAxisList(); int r = 0; + HashSet removeRangeAxisMap = new HashSet<>(); + for(RangeAxisJSON rangeAxis:chartJSON.getRangeAxisRemoveList()){ + removeRangeAxisMap.add(rangeAxis.getRangeAxis()); + } for (int i = 0; i < rangeAxisList.size(); i++) { RangeAxisJSON rangeAxisJSON = rangeAxisList.get(i); String rangeAxis = rangeAxisJSON.getRangeAxis(); @@ -1287,7 +1292,10 @@ public class RaptorControllerAsync extends RestrictedBaseController { rangefor: for (Iterator iterator = reportCols.iterator(); iterator.hasNext();) { DataColumnType dct = (DataColumnType) iterator.next(); if (dct.getColId().equals(rangeAxis)) { - dct.setChartSeq(++r); + if(removeRangeAxisMap.contains(rangeAxis)) + dct.setChartSeq(-1); // if we set it to -1, means this range axis will not be included + else + dct.setChartSeq(++r); dct.setColOnChart("0"); dct.setYAxis(rangeYAxis); // +"|"+dct.getColId()); dct.setChartGroup(rangeChartGroup); // +"|"+dct.getColId()); -- cgit 1.2.3-korg