Fixed resource path issues with gradle

This commit is contained in:
Ziver Koc 2020-11-11 01:48:09 +01:00
parent b405f0b191
commit 64f2f598df
178 changed files with 52224 additions and 112 deletions

View file

@ -0,0 +1,39 @@
<h1 class="page-header">Heat Map</h1>
<div id="googleMap" style="width: 95%;height: 800px;"></div>
<script src="http://maps.googleapis.com/maps/api/js"></script>
<script>
function initialize() {
var mapProp = {
center:new google.maps.LatLng(59.329323,18.068581),
zoom:12,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
var home = new google.maps.Circle({
center: {lat: 59.365954, lng: 17.975351},
radius:2000,
strokeColor:"#00FF00",
strokeOpacity:0.8,
strokeWeight:2,
fillColor:"#00FF00",
fillOpacity:0.4,
map: map
});
var external = new google.maps.Circle({
center: {lat: 59.275638, lng: 18.024362},
radius:2000,
strokeColor:"#FF0000",
strokeOpacity:0.8,
strokeWeight:2,
fillColor:"#FF0000",
fillOpacity:0.4,
map: map
});
}
google.maps.event.addDomListener(window, 'load', initialize);
</script>

View file

@ -0,0 +1,29 @@
<h1 class="page-header">Overview</h1>
<div class="row placeholders">
<H1>Last 24 hours (kWh/5min)</H1>
<div id="minute-power-chart" style="height:450px;"></div>
</div>
<div class="row placeholders">
<H1>Last Week (kWh/h)</H1>
<div id="hour-power-chart" style="height:450px;"></div>
</div>
<div class="row placeholders">
<H1>All History (kWh/day)</H1>
<div id="day-power-chart" style="height:450px;"></div>
</div>
<div class="row placeholders">
<H1>All History (kWh/week)</H1>
<div id="week-power-chart" style="height:450px;"></div>
</div>
<script>
$(function(){
createChart("#minute-power-chart", "/data/sensor?aggr=minute", 5*60*1000);
createChart("#hour-power-chart", "/data/sensor?aggr=hour", 60*60*1000);
createChart("#day-power-chart", "/data/sensor?aggr=day", 24*60*60*1000);
createChart("#week-power-chart", "/data/sensor?aggr=week", 7*24*60*60*1000);
});
</script>

View file

@ -24,6 +24,7 @@
package se.hal.plugin.powerchallenge.page;
import se.hal.HalContext;
import se.hal.intf.HalWebPage;
import zutil.io.file.FileUtil;
import zutil.parser.Templator;
@ -31,7 +32,7 @@ import zutil.parser.Templator;
import java.util.Map;
public class PCHeatMapWebPage extends HalWebPage {
private static final String TEMPLATE = "resource/web/pc_heatmap.tmpl";
private static final String TEMPLATE = HalContext.RESOURCE_ROOT + "/resource/web/pc_heatmap.tmpl";
public PCHeatMapWebPage() {

View file

@ -36,7 +36,7 @@ import java.util.List;
import java.util.Map;
public class PCOverviewWebPage extends HalWebPage {
private static final String TEMPLATE = "resource/web/pc_overview.tmpl";
private static final String TEMPLATE = HalContext.RESOURCE_WEB_ROOT + "/pc_overview.tmpl";
public PCOverviewWebPage() {
super("pc_overview");