changeset 174:1ce424035c41

[commands] Change param name in HTML files. Reviewed-by: jkang Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2017-June/023622.html
author Severin Gehwolf <sgehwolf@redhat.com>
date Mon, 12 Jun 2017 19:07:01 +0200
parents 81771b842d01
children 5470c4cf4683
files services/commands/src/main/resources/agent.html services/commands/src/main/resources/agent2.html services/commands/src/main/resources/index.html
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/services/commands/src/main/resources/agent.html	Mon Jun 12 11:36:02 2017 -0400
+++ b/services/commands/src/main/resources/agent.html	Mon Jun 12 19:07:01 2017 +0200
@@ -46,7 +46,7 @@
         Msg.fromRequest = (function(rawMsg) {
             var jsonObj = JSON.parse(rawMsg);
             Msg.sequence = jsonObj.sequence;
-            Msg.paramStr = jsonObj.payload.param1;
+            Msg.paramStr = jsonObj.payload.receiver;
         });
 
         CmdChan.socket = null;
--- a/services/commands/src/main/resources/agent2.html	Mon Jun 12 11:36:02 2017 -0400
+++ b/services/commands/src/main/resources/agent2.html	Mon Jun 12 19:07:01 2017 +0200
@@ -46,7 +46,7 @@
         Msg.fromRequest = (function(rawMsg) {
             var jsonObj = JSON.parse(rawMsg);
             Msg.sequence = jsonObj.sequence;
-            Msg.paramStr = jsonObj.payload.param1;
+            Msg.paramStr = jsonObj.payload.receiver;
         });
 
         CmdChan.socket = null;
--- a/services/commands/src/main/resources/index.html	Mon Jun 12 11:36:02 2017 -0400
+++ b/services/commands/src/main/resources/index.html	Mon Jun 12 19:07:01 2017 +0200
@@ -85,7 +85,7 @@
                 var clientRequest = {};
                 clientRequest.type = 2;
                 clientRequest.payload = {};
-                clientRequest.payload.param1 = message;
+                clientRequest.payload.receiver = message;
                 CmdChan.socket.send(JSON.stringify(clientRequest));
                 document.getElementById('cmd-chan').value = '';
             }
@@ -126,7 +126,7 @@
     Thermostat Commands: HTML Client
     </p>
     <p>
-        <input type="text" placeholder="type and press enter in order to send a message to agent.html" id="cmd-chan" />
+        <input type="text" placeholder="type the receiver name and press enter in order to send a message to the agent and trigger the receiver." id="cmd-chan" />
     </p>
     <div id="console-container">
         <div id="console"/>