diff --git a/js/dashboard.js b/js/dashboard.js index 9e43794..4e35010 100644 --- a/js/dashboard.js +++ b/js/dashboard.js @@ -149,7 +149,9 @@ class BlueWeatherDashboard { var thisUpdateTime = document.createElement("small") thisUpdateTime.classList.add("text-muted") var lastUpdated = new Date(latestVal.timestamp * 1000) - thisUpdateTime.innerHTML = "last updated " + (lastUpdated.getDate() === new Date().getDate() ? "today" : lastUpdated.getFullYear + "-" + lastUpdated.getMonth() + "-" + lastUpdated.getDate()) + " at " + lastUpdated.getHours() + ":" + lastUpdated.getMinutes() + thisUpdateTime.innerHTML = "last updated " + + (lastUpdated.getDate() === new Date().getDate() ? "today" : lastUpdated.getFullYear() + "-" + lastUpdated.getMonth() + "-" + lastUpdated.getDate()) + + " at " + lastUpdated.getHours() + ":" + lastUpdated.getMinutes() thisFooter.appendChild(thisUpdateTime) thisWidget.appendChild(thisFooter) @@ -159,6 +161,7 @@ class BlueWeatherDashboard { switch (displayProperties.type) { case "doughnut": // the widget is gauge-like + thisWidget.classList.add("text-center") var thisChart = document.createElement("canvas") thisChart.id = "chartOf" + sensor.sensorname