From 40fa640397a230848a5260592128231a1bea6d14 Mon Sep 17 00:00:00 2001
From: Fabio Manganiello <blacklight86@gmail.com>
Date: Tue, 2 Jul 2019 14:42:25 +0200
Subject: [PATCH] New sensors web panel WIP

---
 .../static/css/source/webpanel/plugins/sensors/index.scss | 8 ++++++++
 platypush/backend/http/static/js/plugins/sensors/index.js | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/platypush/backend/http/static/css/source/webpanel/plugins/sensors/index.scss b/platypush/backend/http/static/css/source/webpanel/plugins/sensors/index.scss
index 586551ff..9106b20d 100644
--- a/platypush/backend/http/static/css/source/webpanel/plugins/sensors/index.scss
+++ b/platypush/backend/http/static/css/source/webpanel/plugins/sensors/index.scss
@@ -1,5 +1,13 @@
 @import 'common/vars';
 
 .sensors {
+    .head {
+        text-align: right;
+
+        button {
+            border: 0;
+            &:hover { background: $hover-bg; }
+        }
+    }
 }
 
diff --git a/platypush/backend/http/static/js/plugins/sensors/index.js b/platypush/backend/http/static/js/plugins/sensors/index.js
index 14cb036d..341b4deb 100644
--- a/platypush/backend/http/static/js/plugins/sensors/index.js
+++ b/platypush/backend/http/static/js/plugins/sensors/index.js
@@ -57,8 +57,8 @@ Vue.component('sensors', {
     },
 
     mounted: function() {
-        this.refresh();
         registerEventHandler(this.onSensorEvent, 'platypush.message.event.sensor.SensorDataChangeEvent');
+        this.refresh();
     },
 });