From 5892a176a3a31c1bb072a0851855a016b22654d1 Mon Sep 17 00:00:00 2001 From: That-Guy Date: Sat, 21 Apr 2012 17:18:51 +0200 Subject: [PATCH] lsp protocol interface fix for 23 (#17) --- server.html | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/server.html b/server.html index d91a86d6..69b377f4 100644 --- a/server.html +++ b/server.html @@ -561,17 +561,7 @@ td { var ret = $.extend(true, { - "config": - { - "host": "", - "limits": [], - "name": "", - "protocols": {}, - "status": "", - "version": "" - }, "streams": {}, - "log": {}, "statistics": {} }, d); @@ -672,7 +662,7 @@ td "host": "", "limits": [], "name": "", - "protocols": {}, + "protocols": [], "status": "", "version": "" }, @@ -891,7 +881,7 @@ td { if(confirmDelete('Are you sure you want to force a JSON save?') == true) { - console.log('magie hier!'); // TODO FIXME + console.log('magie hier!'); // TODO FIXME JARON } }).text( 'force save to JSON file' ) ); @@ -911,26 +901,30 @@ td $table.html("ProtocolPortInterface"); $tbody = $(''); - var tr, protocol; + var tr, i, protocol, + len = settings.settings.config.protocols.length; // remove old stuff $tbody.html(''); - for(protocol in settings.settings.config.protocols) + for(i = 0; i < len; i++) { - tr = $('').attr('id', 'protocol-' + protocol); + protocol = settings.settings.config.protocols[i]; // local copy, {} - tr.append( $('').text( protocol ) ); - tr.append( $('').text( settings.settings.config.protocols[protocol].port ) ); + tr = $('').attr('id', 'protocol-' + i); - tr.append( $('').text( '_' ) ); // interface + tr.append( $('').text( protocol.connector ) ); + tr.append( $('').text( protocol.port ) ); + + tr.append( $('').text( protocol['interface'] ) ); // interface is a reserved JS keyword :) tr.append( $('').attr('class', 'center').append( $('