fixes in web services
authorVictor Kirhenshtein <victor@netxms.org>
Mon, 4 Dec 2017 13:43:58 +0000 (15:43 +0200)
committerVictor Kirhenshtein <victor@netxms.org>
Mon, 4 Dec 2017 13:43:58 +0000 (15:43 +0200)
doc/internal/licensing_problems.txt
src/server/nxapisrv/java/src/main/java/org/netxms/websvc/handlers/GrafanaDataCollection.java
src/server/nxapisrv/java/src/main/java/org/netxms/websvc/handlers/HistoricalData.java

index 35b9eb2..a8156ba 100644 (file)
@@ -4,6 +4,4 @@ libnetxms:
 
 base64.h       - GPL
 base64.cpp     - GPL
-netxms-getopt.h        - GPL
-getopt.c       - GPL
 scandir.c   - GPL
index d5dd2c5..6577dce 100644 (file)
@@ -99,7 +99,7 @@ public class GrafanaDataCollection extends AbstractHandler
             continue;
          
          DciData data = getSession().getCollectedData(Long.parseLong(dciTarget.get("id").getAsString()),
-                                                      Long.parseLong(dci.get("id").getAsString()), from, to, 0);
+                                                      Long.parseLong(dci.get("id").getAsString()), from, to, 0, false);
          root = new JsonObject();
          JsonArray datapoints = new JsonArray();
          JsonArray datapoint;
index 87b8625..f79ca27 100644 (file)
@@ -67,23 +67,23 @@ public class HistoricalData extends AbstractObjectHandler
       
       if (timeFrom != null || timeTo != null)
       {
-         data = session.getCollectedData(obj.getObjectId(), dciId, new Date(parseLong(timeFrom, 0) * 1000), new Date(parseLong(timeTo, System.currentTimeMillis() / 1000) * 1000), parseInt(itemCount, 0));
+         data = session.getCollectedData(obj.getObjectId(), dciId, new Date(parseLong(timeFrom, 0) * 1000), new Date(parseLong(timeTo, System.currentTimeMillis() / 1000) * 1000), parseInt(itemCount, 0), false);
       }
       else if (timeInteval != null)
       {
          Date now = new Date();
          long from = now.getTime() - parseLong(timeInteval, 0) * 1000;
-         data  = session.getCollectedData(obj.getObjectId(), dciId, new Date(from), new Date(), parseInt(itemCount, 0));         
+         data  = session.getCollectedData(obj.getObjectId(), dciId, new Date(from), new Date(), parseInt(itemCount, 0), false);         
       }
       else if (itemCount != null)
       {         
-         data  = session.getCollectedData(obj.getObjectId(), dciId, null, null, parseInt(itemCount, 0));
+         data  = session.getCollectedData(obj.getObjectId(), dciId, null, null, parseInt(itemCount, 0), false);
       }  
       else
       {
          Date now = new Date();
          long from = now.getTime() - 3600000; // one hour
-         data  = session.getCollectedData(obj.getObjectId(), dciId, new Date(from), now, parseInt(itemCount, 0));           
+         data  = session.getCollectedData(obj.getObjectId(), dciId, new Date(from), now, parseInt(itemCount, 0), false);           
       }
       
       return new ResponseContainer("values", data);