changeset 1027:208b960fde31

hostname in page title Ignore-this: 84be0d921c173a4c2c154d6a65e15add darcs-hash:3e14370d849be2c6c0d30db8f7c575e4433bfda7
author drewp <drewp@bigasterisk.com>
date Fri, 22 Jan 2016 00:39:35 -0800
parents 8e075449ba0a
children 70d52fa8373a
files service/arduinoNode/arduinoNode.py service/arduinoNode/static/index.html
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/service/arduinoNode/arduinoNode.py	Mon Jan 18 22:43:22 2016 -0800
+++ b/service/arduinoNode/arduinoNode.py	Fri Jan 22 00:39:35 2016 -0800
@@ -400,6 +400,7 @@
         
         self.set_header('Content-type', 'application/json')
         self.write(json.dumps({
+            'host': socket.gethostname(),
             'boards': [b.description() for b in self.settings.boards]
         }, indent=2))
             
--- a/service/arduinoNode/static/index.html	Mon Jan 18 22:43:22 2016 -0800
+++ b/service/arduinoNode/static/index.html	Fri Jan 22 00:39:35 2016 -0800
@@ -1,7 +1,7 @@
 <!doctype html>
 <html>
   <head>
-    <title>arduinoNode</title>
+    <title>arduinoNode - </title>
     <meta name=viewport content="width=device-width, initial-scale=1">
     <meta charset="utf-8" />
     <script src="/lib/polymer/1.0.9/webcomponentsjs/webcomponents.min.js"></script>
@@ -153,6 +153,12 @@
        HTMLImports.whenReady(function () {
          Polymer({
            is: 'arduinonode-boards',
+           properties: {
+             ret: { type: Object, notify: true, observer: 'onBoards' }
+           },
+           onBoards: function() {
+             document.title = document.title + ' ' + this.ret.host;
+           },
            behaviors: [BigastUri]
          });
        });