mirror of
https://github.com/stagehacks/Cue-View.git
synced 2026-08-11 16:53:40 +00:00
split device port into local and remote ports
This commit is contained in:
+14
-3
@@ -74,7 +74,7 @@ function generateBodyHTML(d) {
|
||||
str += "<div class='not-responding'>";
|
||||
str += `<h2><em>${d.type}</em> is not responding to requests for data.</h2>`;
|
||||
str += `<h3>IP <em>${d.addresses[0]}</em></h3>`;
|
||||
str += `<h3>Port <em>${d.port}</em></h3>`;
|
||||
str += `<h3>Port <em>${d.remotePort}</em></h3>`;
|
||||
str += '<hr></div>';
|
||||
str += `<div class="device-info">${PLUGINS.all[d.type].info()}<div>`;
|
||||
}
|
||||
@@ -173,13 +173,24 @@ function switchDevice(id) {
|
||||
document.getElementById('device-settings-plugin-dropdown').value = activeDevice.type;
|
||||
document.getElementById('device-settings-name').value = activeDevice.displayName || activeDevice.defaultName || '';
|
||||
document.getElementById('device-settings-ip').value = activeDevice.addresses[0] || '';
|
||||
document.getElementById('device-settings-port').value = activeDevice.port || '';
|
||||
document.getElementById('device-settings-port').value = activeDevice.remotePort || '';
|
||||
document.getElementById('device-settings-pin').checked = activeDevice.pinIndex;
|
||||
|
||||
if (activeDevice.plugin.config.mayChangePort) {
|
||||
if (activeDevice.plugin.config.mayChangePorts) {
|
||||
document.getElementById('device-settings-port').disabled = false;
|
||||
document.getElementById('device-settings-rx-port').disabled = false;
|
||||
} else {
|
||||
document.getElementById('device-settings-port').disabled = true;
|
||||
document.getElementById('device-settings-rx-port').disabled = true;
|
||||
}
|
||||
|
||||
if (activeDevice.plugin.config.localPort) {
|
||||
// document.getElementById('device-settings-port-label').textContent = 'Remote\nPort:';
|
||||
document.getElementById('device-settings-rx-port-row').style.display = 'table-row';
|
||||
document.getElementById('device-settings-rx-port').value = activeDevice.localPort || '';
|
||||
} else {
|
||||
document.getElementById('device-settings-port-label').textContent = 'Port:';
|
||||
document.getElementById('device-settings-rx-port-row').style.display = 'none';
|
||||
}
|
||||
|
||||
updateFields();
|
||||
|
||||
Reference in New Issue
Block a user