Merge pull request #52 from pboyd04/AddDeviceName

Add ability to set device name
This commit is contained in:
Max Stockner 2018-07-09 23:18:00 +02:00 committed by GitHub
commit 71e55827c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,7 +95,10 @@
var html = "<div><h1>" + universe + "</h1>"; var html = "<div><h1>" + universe + "</h1>";
for(var device in setup.universes[universe].devices) { for(var device in setup.universes[universe].devices) {
var dev = setup.universes[universe].devices[device]; var dev = setup.universes[universe].devices[device];
html += '<div class="device">' html += '<div class="device">';
if(dev.name !== undefined) {
html += '<h4 class="name">'+dev.name+'</h4>'
}
for(var channel in devices[dev.type].channels) { for(var channel in devices[dev.type].channels) {
var channel_id = dev.address + Number(channel) var channel_id = dev.address + Number(channel)
var html_id = get_html_id(universe, channel_id); var html_id = get_html_id(universe, channel_id);
@ -151,4 +154,4 @@
</div> </div>
</div> </div>
</body> </body>
</html> </html>