From 12d88c2c2af20805c95f2a0b73913d9cb14f435a Mon Sep 17 00:00:00 2001 From: jamespcole Date: Sun, 5 Apr 2015 01:06:04 +1100 Subject: [PATCH] Added loading spinner to the history screen --- .../polymer/components/state-timeline.html | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/homeassistant/components/frontend/www_static/polymer/components/state-timeline.html b/homeassistant/components/frontend/www_static/polymer/components/state-timeline.html index a5b017628e1..0836e890c47 100644 --- a/homeassistant/components/frontend/www_static/polymer/components/state-timeline.html +++ b/homeassistant/components/frontend/www_static/polymer/components/state-timeline.html @@ -8,8 +8,25 @@ :host { display: block; } + + #loadingbox { + text-align: center; + } + + .loadingmessage { + margin-top: 10px; + } +
+
+
+
+
{{spinnerMessage}}
+
+
+
+
@@ -19,6 +36,8 @@ Polymer({ apiLoaded: false, stateHistory: null, + isLoading: true, + spinnerMessage: "Loading data...", googleApiLoaded: function() { google.load("visualization", "1", { @@ -38,6 +57,7 @@ if (!this.apiLoaded || !this.stateHistory) { return; } + this.isLoading = true; var container = this.$.timeline; var chart = new google.visualization.Timeline(container); @@ -244,6 +264,7 @@ dataTable.addRows(data); chart.draw(dataTable, options); } + this.isLoading = false; },