Skip to content

Commit d2f91fa

Browse files
committed
-Implemented: zwavetopology screen, tooltip to indication what will be reported in the group (xs4)
-Implemented: zwavetopology screen, tooltip on the add node screen (hint that you can also use the multi instance association) (xs4)
1 parent 6a0162d commit d2f91fa

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

hardware/OpenZWave.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2920,6 +2920,14 @@ int COpenZWave::ListGroupsForNode(const int nodeID)
29202920
return m_pManager->GetNumGroups(m_controllerID, nodeID);
29212921
}
29222922

2923+
std::string COpenZWave::GetGroupName(const int nodeID,const int groupID)
2924+
{
2925+
if (m_pManager == NULL)
2926+
return "";
2927+
2928+
return m_pManager->GetGroupLabel(m_controllerID, nodeID, groupID);
2929+
}
2930+
29232931
int COpenZWave::ListAssociatedNodesinGroup(const int nodeID, const int groupID, std::vector<string> &nodesingroup)
29242932
{
29252933

@@ -4370,10 +4378,12 @@ namespace http {
43704378
std::stringstream list;
43714379
std::copy(nodesingroup.begin(), nodesingroup.end(), std::ostream_iterator<string>(list, ","));
43724380
root["result"]["nodes"][ii]["groups"][gi]["id"] = x;
4381+
root["result"]["nodes"][ii]["groups"][gi]["groupName"] = pOZWHardware->GetGroupName(nodeID, x);
43734382
root["result"]["nodes"][ii]["groups"][gi]["nodes"] = list.str();
43744383
}
43754384
else {
43764385
root["result"]["nodes"][ii]["groups"][gi]["id"] = x;
4386+
root["result"]["nodes"][ii]["groups"][gi]["groupName"] = pOZWHardware->GetGroupName(nodeID, x);
43774387
root["result"]["nodes"][ii]["groups"][gi]["nodes"] = "";
43784388
}
43794389
gi++;

hardware/OpenZWave.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ class COpenZWave : public AsyncSerial, public ZWaveBase, public COpenZWaveContro
115115
bool GetFailedState();
116116
bool NetworkInfo(const int hwID,std::vector< std::vector< int > > &NodeArray);
117117
int ListGroupsForNode(const int nodeID);
118+
std::string GetGroupName(const int nodeID, const int groupID);
118119
int ListAssociatedNodesinGroup(const int nodeID,const int groupID,std::vector< string > &nodesingroup);
119120
bool AddNodeToGroup(const int nodeID,const int groupID, const int addID, const int instance);
120121
bool RemoveNodeFromGroup(const int nodeID,const int groupID, const int removeID, const int instance);

www/html5.appcache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# ref 998
2+
# ref 999
33

44
CACHE:
55
# CSS

www/zwavetopology.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
function addNodeToGroup(node,group) {
5353
var hwid=getParameter("hwid");
5454
bootbox.dialog({
55-
message: $.t("Please enter the node to add to this group:")+"<input type='text' id='add_node'></input>",
55+
message: $.t("Please enter the node to add to this group:")+"<input type='text' id='add_node' data-toggle='tooltip' title='NodeId or NodeId.Instance'></input>",
5656
title: "Add node",
5757
buttons: {
5858
main: {
@@ -118,7 +118,7 @@
118118
if (noGroups > 0) {
119119
groupnodes = item.groups;
120120
$.each(groupnodes, function(g, group) {
121-
td = $('<td></td>');
121+
td = $('<td data-toggle="tooltip" title="' + group.groupName + '"></td>');
122122
$.each(group.nodes.split(','), function(){
123123
if (this!="") {
124124
button=$('<span class="label label-info lcursor" onclick="removeNodeFromGroup('+item.nodeID+','+group.id+','+this+');">'+this+'</span>');

0 commit comments

Comments
 (0)