aboutsummaryrefslogtreecommitdiffstats
path: root/datarouter-prov/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'datarouter-prov/src/main/java')
-rw-r--r--datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/LogServlet.java13
-rw-r--r--datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/PublishRecord.java2
2 files changed, 11 insertions, 4 deletions
diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/LogServlet.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/LogServlet.java
index eceab571..8a1a4ba5 100644
--- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/LogServlet.java
+++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/LogServlet.java
@@ -69,7 +69,7 @@ public class LogServlet extends BaseServlet {
private static final String FMT_1 = "yyyy-MM-dd'T'HH:mm:ss'Z'";
private static final String FMT_2 = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
- private static boolean isfeedlog;
+ private boolean isfeedlog;
public abstract class RowHandler {
private final ServletOutputStream out;
@@ -281,12 +281,14 @@ public class LogServlet extends BaseServlet {
map.put("err", "bad type");
return map;
}
- } else
+ } else {
map.put("type", "all");
+ }
map.put("publishSQL", "");
map.put("statusSQL", "");
map.put("resultSQL", "");
map.put("reasonSQL", "");
+ map.put("filenameSQL", "");
s = req.getParameter("publishId");
if (s != null) {
@@ -297,6 +299,11 @@ public class LogServlet extends BaseServlet {
map.put("publishSQL", " AND PUBLISH_ID = '"+s+"'");
}
+ s = req.getParameter("filename");
+ if (s != null) {
+ map.put("filenameSQL", " AND FILENAME = '"+s+"'");
+ }
+
s = req.getParameter("statusCode");
if (s != null) {
String sql = null;
@@ -388,7 +395,7 @@ public class LogServlet extends BaseServlet {
if (type.equals("all") || type.equals("pub")) {
String sql = "select * from LOG_RECORDS where FEEDID = "+feedid
+ " AND TYPE = 'pub'"
- + map.get("timeSQL") + map.get("publishSQL") + map.get("statusSQL");
+ + map.get("timeSQL") + map.get("publishSQL") + map.get("statusSQL") + map.get("filenameSQL");
getRecordsForSQL(sql, rh);
}
}
diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/PublishRecord.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/PublishRecord.java
index 2cde3971..5e16bac8 100644
--- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/PublishRecord.java
+++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/beans/PublishRecord.java
@@ -68,7 +68,7 @@ public class PublishRecord extends BaseLogRecord {
this.remoteAddr = rs.getString("REMOTE_ADDR");
this.user = rs.getString("USER");
this.status = rs.getInt("STATUS");
- this.fileName = StringUtils.substringAfterLast(this.getRequestUri(), "/");
+ this.fileName = rs.getString("FILENAME");
}
public String getFeedFileid() {