LSP bugfixes - mostly about status displays for protocols and streams

This commit is contained in:
cat 2013-01-16 12:17:04 +01:00 committed by Thulinma
parent b5bb288ac0
commit eb57d6f4a4
4 changed files with 198 additions and 185 deletions

View file

@ -187,7 +187,7 @@
for(var stream in data.streams)
{
streams[stream] = [data.streams[stream].online, 0];
streams[stream] = [data.streams[stream].online, 0, data.streams[stream].error];
cnt++;
}
@ -339,7 +339,7 @@
delete data.statistics; // same goes for the stats
//IE breaks if the console isn't opened, so keep commented when committing
console.log('[763] SEND', data);
//console.log('[763] SEND', data);
$.ajax(
{
@ -363,7 +363,7 @@
$('#shield').remove(); // remove loading display
//IE breaks if the console isn't opened, so keep commented when committing
console.log('[785] RECV', d);
//console.log('[785] RECV', d);
if(d && d['authorize'] && d['authorize']['challenge'])
{
@ -435,12 +435,12 @@
{
return "<span>Unknown, checking...</span>";
}
switch(status)
{
case 1: return "<span class='green'>Running</span>"; break;
case 0: return "<span class='red'>Offline</span>"; break;
default: return "<span class='red'>" + status + "</span>"; break;
case -1: return "<span>Unknown, checking...</span>"; break;
default: return "<span class='green'>" + status + "</span>"; break;
}
}

View file

@ -580,6 +580,7 @@
$('input').each(function(){
newprotocol[$(this).attr('id').split('-')[2]] = $(this).val();;
});
newprotocol.online = -1;
if (streamname == 'new') {
settings.settings.config.protocols.push(newprotocol);
}else{
@ -678,9 +679,16 @@
showTab('streams');
}
else
{
if (streams[stream][2])
{
streamstatus = streams[stream][2];
}
else
{
streamstatus = streams[stream][0];
}
}
$(this).children(':nth-child(5)').html(formatStatus(streamstatus));
$(this).children(':nth-child(6)').html(streams[stream][1]);
});
@ -738,6 +746,11 @@
$tr.append( $('<td>').text( cstr.name ) );
if (cstr.error)
{
cstr.online = cstr.error;
}
$tr.append( $('<td>').html( formatStatus( cstr.online ) ) );
var cviewers = 0;
@ -894,6 +907,8 @@
sdata.name = newname;
sdata.channel.URL = s.val();
sdata.preset.cmd = p.val();
sdata.online = -1;
sdata.error = null;
if(streamname == 'new')
{
@ -1148,8 +1163,6 @@
loadSettings(function(){
serverstats = settings.settings.capabilities;
console.log(serverstats); //weghalen
if (serverstats.cpu !== undefined)
{
$('#page').append(