end of day 25mar2021...
This commit is contained in:
@@ -89,6 +89,10 @@ input:focus,
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.modal {
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.mapbig {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 143 KiB |
+17
-26
@@ -30,34 +30,25 @@ var start = dstart.utc().format('YYYY-MM-DDTHH:mm:ss[Z]');
|
||||
var dstop = moment();
|
||||
var stop = dstop.utc().format('YYYY-MM-DDTHH:mm:ss[Z]');
|
||||
|
||||
function vbat2icon(level) {
|
||||
switch (level) {
|
||||
case 1:
|
||||
fa_battery_string = "fa-battery-empty";
|
||||
icon_color = "has-text-danger";
|
||||
break;
|
||||
case 2:
|
||||
fa_battery_string = "fa-battery-quarter";
|
||||
icon_color = "has-text-warning";
|
||||
break;
|
||||
case 3:
|
||||
fa_battery_string = "fa-battery-half";
|
||||
icon_color = "has-text-info";
|
||||
break;
|
||||
case 4:
|
||||
fa_battery_string = "fa-battery-three-quarters";
|
||||
icon_color = "has-text-link";
|
||||
break;
|
||||
case 5:
|
||||
fa_battery_string = "fa-battery-full";
|
||||
icon_color = "has-text-success";
|
||||
break;
|
||||
default:
|
||||
fa_battery_string = "fa-battery-slash";
|
||||
icon_color = "has-text-danger";
|
||||
function vbat2icon(percent) {
|
||||
if (percent <= 20) {
|
||||
fa_battery_string = "fa-battery-empty";
|
||||
icon_color = "has-background-danger-dark has-text-white pl-2 pr-2";
|
||||
} else if (percent <= 40) {
|
||||
fa_battery_string = "fa-battery-quarter";
|
||||
icon_color = "has-background-danger-light has-text-danger pl-2 pr-2";
|
||||
} else if (percent <= 60) {
|
||||
fa_battery_string = "fa-battery-half";
|
||||
icon_color = "has-text-success pl-2 pr-2";
|
||||
} else if (percent <= 80) {
|
||||
fa_battery_string = "fa-battery-three-quarters";
|
||||
icon_color = "has-text-success pl-2 pr-2";
|
||||
} else {
|
||||
fa_battery_string = "fa-battery-full";
|
||||
icon_color = "has-text-success pl-2 pr-2";
|
||||
}
|
||||
|
||||
return '<span class="icon ' + icon_color + '"><i class="fas ' + fa_battery_string + '"></i></span>';
|
||||
return '<span class="' + icon_color + '"><i class="fas ' + fa_battery_string + '"></i> ' + percent + ' %</span>';
|
||||
}
|
||||
|
||||
function refreshDatapoints(deveui, start, stop) {
|
||||
|
||||
@@ -278,12 +278,12 @@ $(document).ready(function () {
|
||||
var url = 'https://wmts20.geo.admin.ch/1.0.0/ch.swisstopo.pixelkarte-farbe/default/current/3857/{z}/{x}/{y}.jpeg';
|
||||
var tilelayer = new L.tileLayer(url);
|
||||
map.addLayer(tilelayer);
|
||||
map.attributionControl.setPrefix('Source: Swiss Federal Office of Topography')
|
||||
map.setView(L.latLng(lat, lon), 10);
|
||||
|
||||
var marker = L.marker([lat, lon], { icon: woBischIcon }).addTo(map);
|
||||
|
||||
maps.push(map);
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user