Skip to content

Commit

Permalink
update to 3.43.15 (3.43.x Release Candidate 15)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfgang Willinghöfer authored and Wolfgang Willinghöfer committed Feb 18, 2019
1 parent 8c82c09 commit 9fff131
Show file tree
Hide file tree
Showing 57 changed files with 669 additions and 307 deletions.
Binary file modified HMserver/opt/HMServer/HMIPServer.jar
Binary file not shown.
Binary file modified HMserver/opt/HMServer/HMServer.jar
Binary file not shown.
280 changes: 260 additions & 20 deletions HMserver/opt/HMServer/pages/EditAccessPointSettingsDialog.ftl
Original file line number Diff line number Diff line change
@@ -1,8 +1,130 @@
<script>
var accessPointName,
btnOKVisible = false;
eyeIsVisible = false,
btnOKVisible = false,
userPassPhrase = null,
selectedMaxBusCurrent,
selectedBusConfig,
configDirty = false,
minBusCurrent,
maxBusCurrent,
dlgEditAP,
dlgConfigAPEnterPassphrase,
dlgConfigAP;
togglePwdPic = "/ise/img/visible.png";
showPlainPassword = function() {
var passwordElm = jQuery("#passphraseConfigAP"),
elmType = passwordElm.prop("type"),
value = passwordElm.val();
if (elmType == "password") {
passwordElm.prop("type", "text");
} else {
passwordElm.prop("type", "password");
}
passwordElm.val(value);
};
getDrapConfiguration = function() {
MessageBox.show(
translateKey('lblQueryConfig'),
'<br/><br/><img id="msgBoxBarGraph" src="/ise/img/anim_bargraph.gif"><br/>',
'','320','105','getDrapConfig', 'msgBoxBarGraph');
var url = '/pages/jpages/hmip/AccessPointSettings/getDRAPConfiguration?sid='+SessionId;
var data = "{";
data += '"id" : "${accessPoint.id}"';
data += ',"passphrase" : "' + userPassPhrase +'"';
data += '}';
var opt =
{
postBody: data,
onComplete: function(t) {
MessageBox.close();
var response = JSON.parse(t.responseText);
if (response.isSuccessful) {
var content = JSON.parse(response.content);
setDrapConfiguration(content);
} else {
MessageBox.show(translateKey('stringTableError'),translateKey(response.content), function() {
showDlgEditAP();
});
}
}
}
new Ajax.Request(url,opt);
};
setNewDrapConfiguration = function() {
if (configDirty) {
MessageBox.show(
translateKey('lblSetConfig'),
'<br/><br/><img id="msgBoxBarGraph" src="/ise/img/anim_bargraph.gif"><br/>',
'','320','105','getDrapConfig', 'msgBoxBarGraph');
var url = '/pages/jpages/hmip/AccessPointSettings/setDRAPConfiguration?sid='+SessionId;
var data = "{";
data += '"id" : "${accessPoint.id}"';
data += ',"passphrase" : "' + userPassPhrase +'"';
data += ',"bus_config" : '+ selectedBusConfig;
data += ',"max_bus_current" : '+ selectedMaxBusCurrent;
data += '}';
var opt =
{
postBody: data,
onComplete: function(t) {
configDirty = false;
MessageBox.close();
var response = JSON.parse(t.responseText);
if (response.isSuccessful) {
MessageBox.show("",translateKey(response.content), function() {
showDlgEditAP();
});
} else {
MessageBox.show(translateKey('stringTableError'),translateKey(response.content), function() {
showDlgEditAP();
});
}
}
}
new Ajax.Request(url,opt);
} else {
// Configuration not changed
MessageBox.show(translateKey("dialogHint"),translateKey("lblConfigNotChanged"), function() {
showDlgEditAP();
});
}
};
setDrapConfiguration = function(data) {
minBusCurrent = data.max_bus_current.min;
maxBusCurrent = data.max_bus_current.max;
dlgConfigAP = new YesNoDialog(translateKey("titleConfigDialog"),getConfigAPDlgHTML(data),function(btnPress){
if (btnPress == YesNoDialog.RESULT_YES) {
setNewDrapConfiguration();
} else {
showDlgEditAP();
}
}, "html");
dlgConfigAP.btnTextNo(translateKey('dialogBack'));
dlgConfigAP.btnTextYes(translateKey('btnSave'));
window.setTimeout(function() {
jQuery("#busConfig option[value="+data.bus_config.value+"]").prop("selected", true);
}, 250);
};
ShowAccessPointList = function()
{
Expand Down Expand Up @@ -85,6 +207,114 @@
new Ajax.Request(url,opt);
};
storePassphrase = function(value) {
if (!eyeIsVisible){
var elm = jQuery("#theEye");
elm.show();
eyeIsVisible = true;
}
userPassPhrase = value;
if (userPassPhrase.length > 0) {
dlgConfigAPEnterPassphrase.btnYesShow();
} else {
dlgConfigAPEnterPassphrase.btnYesHide();
}
};
checkMinMaxBusCurrent = function(value) {
var result = parseInt(value);
if ((isNaN(result)) || (parseInt(value) < minBusCurrent)) {
result = minBusCurrent;
}
if (parseInt(value) > maxBusCurrent) {
result = maxBusCurrent;
}
jQuery("#maxBusCurrent").val(result);
return result;
};
storeMaxBusCurrent = function(value) {
selectedBusConfig = jQuery("#busConfig").val();
selectedMaxBusCurrent = checkMinMaxBusCurrent(value);
configDirty = true;
};
storeBusConfig = function(value) {
selectedBusConfig = value;
selectedMaxBusCurrent = checkMinMaxBusCurrent(jQuery("#maxBusCurrent").val());
configDirty = true;
};
ConfigureAccessPoint = function() {
getDrapConfiguration();
};
EnterPassPhraseAccessPoint = function() {
dlgEditAP.close();
dlgConfigAPEnterPassphrase = new YesNoDialog(translateKey("titleConfigDialog"),getConfigAPPassphraseDlgHTML(),function(btnPress){
if (btnPress == YesNoDialog.RESULT_YES) {
ConfigureAccessPoint();
} else {
eyeIsVisible = false;
showDlgEditAP();
}
}, "html");
dlgConfigAPEnterPassphrase.setWidth(450);
dlgConfigAPEnterPassphrase.btnTextNo(translateKey('dialogBack'));
dlgConfigAPEnterPassphrase.btnTextYes(translateKey('btnNext'));
dlgConfigAPEnterPassphrase.btnYesHide();
};
getConfigAPPassphraseDlgHTML = function() {
var html = "";
html += "<table align='center'>"
html += "<tr><td align='center'>"+translateKey('accessPointPassphrase')+"</td></tr>";
html += "<tr><td class='td2'>"
html += "<input id='passphraseConfigAP' type='password' size='32' onkeyup='storePassphrase(this.value)' onpaste='var self=this; setTimeout(function() {storePassphrase(self.value)},10);' style='text-align:center'>"
html += "<div style='font-weight:normal; font-size:11px !important;text-align:center'>"+translateKey("accessPointPassphraseA")+"</div>"
html += "</td>";
html += "<td id='theEye' class='hidden'>"; // show password
html += "<div style='height:16px; width:16px; padding-bottom:15px' onclick='showPlainPassword();'>";
html += "<img style='max-width:100%; max-height:100%;' src='"+togglePwdPic+"'>";
html += "</div>";
html += "</td>";
html += "</tr>";
html += "</table>";
return html;
};
showHelp =function(topic) {
MessageBox.show(translateKey('genericBtnTxtHelp'),topic);
};
getConfigAPDlgHTML = function(data) {
var html = "";
html += "<table>";
html += "<tr><td>"+translateKey('drapMaxCurrentBus')+":</td>"
html += "<td><input id='maxBusCurrent' type='text' size='4' onchange='storeMaxBusCurrent(this.value)' value='"+data.max_bus_current.value+"'>&nbsp;mA ("+data.max_bus_current.min+" - "+data.max_bus_current.max+")";
html += "&nbsp;<img src='/ise/img/help.png' style='cursor: pointer; width:18px; height:18px; position:relative; top:2px' onclick='showHelp(translateKey(\"drapHelpMaxCurrentBus\"));'>";
html += "</td></tr>";
html += "<tr><td>"+translateKey('drapBusConfig')+":</td><td>";
html += "<select id='busConfig' onchange='storeBusConfig(this.value)'>";
html += "<option value='1'>"+translateKey('optionRingMode')+"</option>";
html += "<option value='2'>"+translateKey('optionTwoSeparateBusSystems')+"</option>";
html += "</select>";
html += "&nbsp;<img src='/ise/img/help.png' style='cursor: pointer; width:18px; height:18px; position:relative; top:2px' onclick='showHelp(translateKey(\"drapHelpBusConfig\"));'>";
html += "</td></tr>";
html += "</table>";
return html;
};
storeNewName = function(name) {
accessPointName = name;
Expand All @@ -109,7 +339,11 @@
var devicePic = (accessPointType == "") ? "/config/img/devices/250/CCU3.png" : "/config/img/devices/250/162_hmipw-drap.png";
showBtnUpload = ((availableFwVersion != versionNotAvailable) || (availableFwVersionCoPro != versionNotAvailable)) ? true : false;
showBtnUpload = (
(availableFwVersion != accessPointVersion) || (availableFwVersionCoPro != coProcessorVersion) ||
((accessPointVersion == versionNotAvailable) && (availableFwVersion != versionNotAvailable)) ||
((coProcessorVersion == versionNotAvailable) && (availableFwVersionCoPro != versionNotAvailable))
) ? true : false;
var dlgHtml = "";
Expand All @@ -123,7 +357,6 @@
dlgHtml += "<table>";
dlgHtml += "<tr>";
dlgHtml += "<td>"; // Picture
dlgHtml += "<div class='border1' style='height:200px; width:200px; margin-right:35px'>";
dlgHtml += "<img style='max-width:100%; max-height:100%;' src='"+devicePic+"'>";
Expand All @@ -133,7 +366,6 @@
dlgHtml += "<td>"; // Content
dlgHtml += "<table>";
dlgHtml += "<tr>";
dlgHtml += "<td>";
dlgHtml += translateKey("thAccessPointID")+":";
Expand All @@ -159,7 +391,7 @@
dlgHtml += translateKey("thAccessPointName")+":";
dlgHtml += "</td>";
dlgHtml += "<td class='td2'>";
dlgHtml += "<input id='accessPointName' type='text' size='30' value='${accessPoint.name}' onblur='storeNewName(this.value)'>";
dlgHtml += "<input id='accessPointName' type='text' size='30' value='${accessPoint.name}' onkeyup='storeNewName(this.value)' onpaste='var self=this; setTimeout(function() {storeNewName(self.value)},10);'>";
dlgHtml += "</td>";
dlgHtml += "</tr>";
Expand Down Expand Up @@ -203,30 +435,38 @@
dlgHtml += "</tr>";
}
dlgHtml += "</table>"
dlgHtml += "<tr><td colspan='3'><hr></td></tr>";
//dlgHtml += "<tr align='center'><td colspan='3'>"+translateKey('lblAccessPointConfiguration')+"</td></tr>";
dlgHtml += "<tr align='center'>";
dlgHtml += "<td colspan='3'><input type='button' class='DeviceListButton' name='lblAccessPointConfig' value='"+translateKey('btnAccessPointConfig')+"' onclick='EnterPassPhraseAccessPoint();'></td>";
dlgHtml += "</tr>";
dlgHtml += "</table>"
dlgHtml += "<table>";
dlgHtml += "</td>"; // END Content
dlgHtml += "</tr>";
dlgHtml += "</table>";
var dlg = new YesNoDialog(translateKey("dialogEditAccessPointTitle"),dlgHtml,function(btnPress){
if (btnPress == YesNoDialog.RESULT_YES) {
if (typeof accessPointName != "undefined") {
SetAccessPointName();
showDlgEditAP = function() {
dlgEditAP = new YesNoDialog(translateKey("dialogEditAccessPointTitle"),dlgHtml,function(btnPress){
if (btnPress == YesNoDialog.RESULT_YES) {
if (typeof accessPointName != "undefined") {
SetAccessPointName();
} else {
PopupClose();
}
} else {
PopupClose();
}
} else {
PopupClose();
}
}, "html");
btnOKElm = jQuery(".YesNoDialog_yesButton")[0];
btnOKElm.hide();
dlg.btnTextYes(translateKey("btnOk"));
dlg.btnTextNo(translateKey("dialogBack"));
dlg.setWidth(650);
}, "html");
btnOKElm = jQuery(".YesNoDialog_yesButton")[0];
btnOKElm.hide();
dlgEditAP.btnTextYes(translateKey("btnOk"));
dlgEditAP.btnTextNo(translateKey("dialogBack"));
dlgEditAP.setWidth(650);
};
showDlgEditAP();
</script>

4 changes: 2 additions & 2 deletions HMserver/opt/HMServer/pages/NewAccessPointDialog.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
dlgHtml += translateKey("thAccessPointName")+":";
dlgHtml += "</td>";
dlgHtml += "<td class='td2'>";
dlgHtml += "<input id='name' type='text' size='32' value='${accessPoint.name}' onblur='storeNewName(this.value)'>";
dlgHtml += "<input id='name' type='text' size='32' value='${accessPoint.name}' onkeyup='storeNewName(this.value)' onpaste='var self=this; setTimeout(function() {storeNewName(self.value)},10);'>";
dlgHtml += "</td>";
dlgHtml += "</tr>";
Expand All @@ -231,7 +231,7 @@
dlgHtml += translateKey("accessPointPassphrase")+":";
dlgHtml += "</td>";
dlgHtml += "<td class='td2'>";
dlgHtml += "<input id='passphrase' type='password' size='32' onkeyup='storePassphrase(this.value)'>";
dlgHtml += "<input id='passphrase' type='password' size='32' onkeyup='storePassphrase(this.value)' onpaste='var self=this; setTimeout(function() {storePassphrase(self.value)},10);'>";
dlgHtml += "<div style='font-weight:normal; font-size:11px !important;text-align:center'>"+translateKey("accessPointPassphraseA")+"</div>"
dlgHtml += "</td>";
Expand Down
7 changes: 7 additions & 0 deletions WebUI/www/api/methods.conf
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,13 @@ Channel.listProgramIds {
ARGUMENTS {_session_id_ id}
}

Channel.hasProgramIds {
LEVEL GUEST
SCRIPT_FILE channel/hasprogramids.tcl
INFO {Pr�ft, ob der Kanal in Programmen verwendet wird}
ARGUMENTS {_session_id_ id}
}

Channel.setName {
LEVEL ADMIN
SCRIPT_FILE channel/setname.tcl
Expand Down
25 changes: 25 additions & 0 deletions WebUI/www/api/methods/channel/hasprogramids.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
##
# Channel.hasProgramIds
# Prüft, ob der Kanal in Programmen verwendet wird
#
# Paramter:
# id: [string] Id des Kanals
#
# Rückgabewert: boolean true/false
#
##

set script {
var channel = dom.GetObject(id);
if ( (channel) )
{
string programIds = channel.ChnEnumDPUsagePrograms();
if (programIds.Length() > 0) {
Write(true);
} else {
Write(false);
}
}
}

jsonrpc_response [hmscript $script args]
Loading

0 comments on commit 9fff131

Please sign in to comment.