[Debian-iot-packaging] [openzwave-controlpanel] 47/81: add RefeshNodeInfo Support
Dara Adib
daradib-guest at moszumanska.debian.org
Thu Dec 22 16:57:50 UTC 2016
This is an automated email from the git hooks/post-receive script.
daradib-guest pushed a commit to branch debian/master
in repository openzwave-controlpanel.
commit bfe261b29038d5476f32ec97895ca1ee2510d08f
Author: Justin Hammond <justin at dynam.ac>
Date: Tue Jun 30 14:16:08 2015 +0800
add RefeshNodeInfo Support
---
cp.html | 1 +
cp.js | 5 ++++-
webserver.cpp | 6 ++++++
3 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/cp.html b/cp.html
index 4c99f07..d029870 100644
--- a/cp.html
+++ b/cp.html
@@ -403,6 +403,7 @@
<option value="reps">Replication Send</option>
<option value="addbtn">Add Button</option>
<option value="delbtn">Delete Button</option>
+ <option value="refreshnode">Refresh Node Info</option>
</select>
</div>
<div id="admcntl" name="admcntl" class="rsb" style="display: none;"></div>
diff --git a/cp.js b/cp.js
index b0b30d9..30a0862 100644
--- a/cp.js
+++ b/cp.js
@@ -677,7 +677,7 @@ function DoAdmPost(can)
if (fun == 'hnf' || fun == 'remfn' || fun == 'repfn' || fun == 'reqnu' ||
fun == 'reqnnu' || fun == 'assrr' || fun == 'delarr' || fun == 'reps' ||
- fun == 'addbtn' || fun == 'delbtn') {
+ fun == 'addbtn' || fun == 'delbtn' || fun == 'refreshnode' ) {
if (curnode == null) {
ainfo = document.getElementById('adminfo');
ainfo.innerHTML = 'Must select a node below for this function.';
@@ -787,6 +787,9 @@ function DoAdmHelp()
else
ainfo.innerHTML = 'Remove a button from a handheld.';
ainfo.style.display = 'block';
+ } else if (document.AdmPost.adminops.value == 'refreshnode') {
+ ainfo.innerHTML = 'Refresh Node Info';
+ ainfo.style.display = 'block';
} else {
ainfo.style.display = 'none';
document.AdmPost.admgo.style.display = 'none';
diff --git a/webserver.cpp b/webserver.cpp
index ef7169a..94d84c0 100644
--- a/webserver.cpp
+++ b/webserver.cpp
@@ -1257,7 +1257,13 @@ int Webserver::Handler (struct MHD_Connection *conn, const char *url,
setAdminFunction("Delete Button");
setAdminState(Manager::Get()->DeleteButton(homeId, node, button));
}
+ } else if (strcmp((char *)cp->conn_arg1, "refreshnode") == 0) {
+ if (cp->conn_arg2 != NULL && strlen((char *)cp->conn_arg2) > 4) {
+ uint8 node = strtol(((char *)cp->conn_arg2) + 4, NULL, 10);
+ Manager::Get()->RefreshNodeInfo(homeId, node);
+ }
}
+
return MHD_YES;
} else
ret = web_send_data(conn, EMPTY, MHD_HTTP_OK, false, false, NULL); // no free, no copy
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-iot/openzwave-controlpanel.git
More information about the Debian-iot-packaging
mailing list