Bugfix
This commit is contained in:
parent
d04706f9d1
commit
74c2d79428
2 changed files with 4 additions and 4 deletions
|
|
@ -99,7 +99,7 @@ public class PCOverviewHttpPage extends HalHttpPage implements HalHttpPage.HalJs
|
|||
for (AggregateDataListSqlResult.AggregateData data : dataList) {
|
||||
DataNode dataNode = new DataNode(DataNode.DataType.Map);
|
||||
dataNode.set("time", data.timestamp);
|
||||
if (Float.isNaN(data.data))
|
||||
if (data.data == null || Float.isNaN(data.data))
|
||||
dataNode.set("" + data.id, (String)null);
|
||||
else
|
||||
dataNode.set("" + data.id, data.data);
|
||||
|
|
|
|||
|
|
@ -17,10 +17,10 @@ public class AggregateDataListSqlResult implements SQLResultHandler<ArrayList<Ag
|
|||
public static class AggregateData {
|
||||
public int id;
|
||||
public long timestamp;
|
||||
public float data;
|
||||
public Float data;
|
||||
public String username;
|
||||
|
||||
public AggregateData(int id, long time, float data, String uname) {
|
||||
public AggregateData(int id, long time, Float data, String uname) {
|
||||
this.id = id;
|
||||
this.timestamp = time;
|
||||
this.data = data;
|
||||
|
|
@ -76,7 +76,7 @@ public class AggregateDataListSqlResult implements SQLResultHandler<ArrayList<Ag
|
|||
|
||||
//add null data point to list if one or more periods of data is missing before this
|
||||
if(previousTimestampEnd != -1 && previousTimestampEnd+1 < timestampStart){
|
||||
list.add(new AggregateData(id, previousTimestampEnd+1, Float.NaN, username));
|
||||
list.add(new AggregateData(id, previousTimestampEnd+1, null /*Float.NaN*/, username));
|
||||
}
|
||||
|
||||
list.add(new AggregateData(id, timestampEnd, (estimatedData/1000f), username)); //add this data point to list
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue