Added graph to sensor detail page. Also added missed morris.css file . issue 7
Former-commit-id: 3b2403a46aa58f3937efc345bc6a022e4deb2da5
This commit is contained in:
parent
25693209b5
commit
9961c423a3
9 changed files with 37 additions and 20 deletions
|
|
@ -73,9 +73,6 @@ public class HalServer {
|
|||
|
||||
|
||||
// init http server
|
||||
HalAlertManager.getInstance().addAlert(new HalAlert(AlertLevel.ERROR, "one view alert", AlertTTL.ONE_VIEW));
|
||||
HalAlertManager.getInstance().addAlert(new HalAlert(AlertLevel.INFO, "dissmised allert", AlertTTL.DISMISSED));
|
||||
|
||||
HalHttpPage.getRootNav().addSubNav(new HalNavigation("sensors", "Sensors"));
|
||||
HalHttpPage.getRootNav().addSubNav(new HalNavigation("events", "Events"));
|
||||
pages = new HalHttpPage[]{
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import se.hal.intf.HalHttpPage;
|
|||
import se.hal.struct.Event;
|
||||
import se.hal.struct.Sensor;
|
||||
import se.hal.struct.SwitchEventData;
|
||||
import se.hal.util.AggregateDataListSqlResult;
|
||||
import zutil.db.DBConnection;
|
||||
import se.hal.util.HistoryDataListSqlResult;
|
||||
import se.hal.util.HistoryDataListSqlResult.*;
|
||||
|
|
@ -50,6 +51,7 @@ public class SensorOverviewHttpPage extends HalHttpPage {
|
|||
Templator tmpl = new Templator(FileUtil.find(DETAIL_TEMPLATE));
|
||||
tmpl.set("sensor", sensor);
|
||||
tmpl.set("history", history);
|
||||
tmpl.set("aggregation", AggregateDataListSqlResult.getHourAggregateData(db, sensor));
|
||||
return tmpl;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue