LSP:
- link to mistshop in menu - LTS features visible but disabled for non LTS users - record option for livestreams in LTS - in edit protocol, the saved value for the default port is now '' (empty string) instead of 0
This commit is contained in:
parent
58eaf53c9c
commit
545eaf83de
5 changed files with 69 additions and 84 deletions
|
@ -1,23 +1,14 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id='header'>
|
<div id='header'>
|
||||||
|
|
||||||
<div id='header-title'>
|
<div id='header-title'>
|
||||||
<span>Mistserver Manager</span>
|
<span>Mistserver Manager</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id='header-status'>
|
<div id='header-status'>
|
||||||
<span id='header-connection' class='disconnected'>Disconnected</span>
|
<span id='header-connection' class='disconnected'>Disconnected</span>
|
||||||
<span id='header-host'></span>
|
<span id='header-host'></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul id='nav'>
|
<ul id='nav'>
|
||||||
<li class='selected'>overview</li>
|
<li class='selected'>overview</li>
|
||||||
<li>protocols</li>
|
<li>protocols</li>
|
||||||
|
@ -27,10 +18,8 @@
|
||||||
<li>logs</li>
|
<li>logs</li>
|
||||||
<li>server stats</li>
|
<li>server stats</li>
|
||||||
<li id='logoutbutton'>disconnect</li>
|
<li id='logoutbutton'>disconnect</li>
|
||||||
|
<li><a href='http://shop.mistserver.org/' target='_blank'>Mist Shop</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div id='page'></div>
|
<div id='page'></div>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -346,7 +346,7 @@
|
||||||
delete data.statistics; // same goes for the stats
|
delete data.statistics; // same goes for the stats
|
||||||
|
|
||||||
//IE breaks if the console isn't opened, so keep commented when committing
|
//IE breaks if the console isn't opened, so keep commented when committing
|
||||||
//console.log('[763] SEND', data);
|
console.log('[763] SEND', data);
|
||||||
|
|
||||||
$.ajax(
|
$.ajax(
|
||||||
{
|
{
|
||||||
|
|
131
lsp/main.js
131
lsp/main.js
|
@ -100,6 +100,10 @@
|
||||||
clearInterval(pinterval);
|
clearInterval(pinterval);
|
||||||
clearInterval(logsinterval);
|
clearInterval(logsinterval);
|
||||||
|
|
||||||
|
$('#page').removeClass('LTS-only');
|
||||||
|
$('#page').off('mouseenter mouseleave');
|
||||||
|
removeTooltip();
|
||||||
|
|
||||||
switch(name)
|
switch(name)
|
||||||
{
|
{
|
||||||
case 'login':
|
case 'login':
|
||||||
|
@ -546,7 +550,7 @@
|
||||||
|
|
||||||
$('#page').append( $div );
|
$('#page').append( $div );
|
||||||
$('#editprotocol').append( $('<div>').attr('id','protocoldesc') );
|
$('#editprotocol').append( $('<div>').attr('id','protocoldesc') );
|
||||||
$('#editprotocol').append( $('<div>').attr('id', 'protocolfields') );
|
$('#editprotocol').append( $('<div>').attr('id','protocolfields') );
|
||||||
$('#editprotocol').append(
|
$('#editprotocol').append(
|
||||||
$('<button>').text('cancel').addClass('floatright').click(function()
|
$('<button>').text('cancel').addClass('floatright').click(function()
|
||||||
{
|
{
|
||||||
|
@ -570,17 +574,19 @@
|
||||||
|
|
||||||
$('input[type="number"]').each(function()
|
$('input[type="number"]').each(function()
|
||||||
{
|
{
|
||||||
//make sure this is a number
|
if ($(this).val() != '') {
|
||||||
if (isNaN($(this).val()))
|
//make sure this is a number
|
||||||
{
|
if (isNaN($(this).val()))
|
||||||
$(this).focus();
|
{
|
||||||
$(this).parent().addClass('red');
|
$(this).focus();
|
||||||
error = true;
|
$(this).parent().addClass('red');
|
||||||
}
|
error = true;
|
||||||
else
|
}
|
||||||
{
|
else
|
||||||
//turn all numbers into integers
|
{
|
||||||
$(this).val(Math.floor($(this).val()));
|
//turn all numbers into integers
|
||||||
|
$(this).val(Math.floor($(this).val()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//check if all uints are actually uints
|
//check if all uints are actually uints
|
||||||
|
@ -884,73 +890,48 @@
|
||||||
)
|
)
|
||||||
).append(
|
).append(
|
||||||
$('<label>').attr('for', 'stream-edit-source').text('source').append(
|
$('<label>').attr('for', 'stream-edit-source').text('source').append(
|
||||||
$('<input>').attr('type', 'text').attr('placeholder', 'SOURCE').attr('id', 'stream-edit-source').attr('value', sdata.source).keyup(function()
|
$('<input>').attr('type', 'text').attr('placeholder', '/path/name.dtsc or push://host/name').attr('id', 'stream-edit-source').attr('value', sdata.source).keyup(function(){
|
||||||
{
|
|
||||||
var text = $(this).val();
|
var text = $(this).val();
|
||||||
|
if(text.charAt(0) == '/'){
|
||||||
/*
|
$('.live-only').hide();
|
||||||
if(text.charAt(0) == '/' || text.substr(0, 7) == 'push://')
|
$('.live-only').children('label').children('input').val('');
|
||||||
{
|
|
||||||
$('#stream-edit-preset').val('');
|
|
||||||
$('#stream-edit-preset').hide();
|
|
||||||
$('#stream-edit-preset-label').hide();
|
|
||||||
}else{
|
|
||||||
$('#stream-edit-preset').show();
|
|
||||||
$('#stream-edit-preset-label').show();
|
|
||||||
}
|
}
|
||||||
*/
|
else{
|
||||||
|
$('.live-only').show();
|
||||||
if(text.charAt(0) == '/')
|
|
||||||
{
|
|
||||||
$('#stream-edit-buffer').val('');
|
|
||||||
$('#stream-edit-buffer').hide();
|
|
||||||
$('#stream-edit-buffer-label').hide();
|
|
||||||
}else{
|
|
||||||
$('#stream-edit-buffer').show();
|
|
||||||
$('#stream-edit-buffer-label').show();
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
/*.append(
|
|
||||||
$('<label>').attr('id', 'stream-edit-preset-label').attr('for', 'stream-edit-preset').text('preset').append(
|
|
||||||
$('<input>').attr('type', 'text').attr('placeholder', 'PRESET').attr('id', 'stream-edit-preset').attr('value', sdata.preset.cmd)
|
|
||||||
)
|
|
||||||
) */
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (sdata.DVR == undefined)
|
// BUFFER
|
||||||
{
|
if (sdata.DVR == undefined) { var DVR = ''; } else { var DVR = sdata.DVR; }
|
||||||
var DVR = '';
|
|
||||||
} else {
|
|
||||||
var DVR = sdata.DVR;
|
|
||||||
}
|
|
||||||
$('#editserver').append(
|
$('#editserver').append(
|
||||||
$('<label>').attr('id','stream-edit-buffer-label').attr('for','stream-edit-buffer').attr('title','Only applies to live streams').text('Buffer time [ms]').append(
|
$('<span>').addClass('live-only').append(
|
||||||
$('<input>').attr('type','text').attr('placeholder','2 keyframes').attr('id','stream-edit-buffer').attr('value', DVR)
|
$('<label>').attr('id','stream-edit-buffer-label').attr('for','stream-edit-buffer').attr('title','Only applies to live streams').text('Buffer time [ms]').append(
|
||||||
|
$('<input>').attr('type','text').attr('placeholder','2 keyframes').attr('id','stream-edit-buffer').attr('value', DVR)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// RECORD
|
||||||
|
if (sdata.record == undefined) { var record = ''; } else { var record = sdata.record; }
|
||||||
|
$('#editserver').append(
|
||||||
|
$('<span>').addClass('live-only').addClass('LTS-only').append(
|
||||||
|
$('<label>').attr('id','stream-edit-record-label').attr('for','stream-edit-record').attr('title','Only applies to live streams').text('Record to:').append(
|
||||||
|
$('<input>').attr('type','text').attr('placeholder','2 keyframes').attr('id','stream-edit-record').attr('value', record).attr('placeholder','/path/to/filename.dtsc')
|
||||||
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// if the source is push or file, don't do a preset
|
|
||||||
var text = $('#stream-edit-source').val();
|
var text = $('#stream-edit-source').val();
|
||||||
/*
|
//if the source is not live, show any stuff marked as live-only
|
||||||
if(text.charAt(0) == '/' || text.substr(0, 7) == 'push://')
|
|
||||||
{
|
|
||||||
$('#stream-edit-preset').hide();
|
|
||||||
$('#stream-edit-preset-label').hide();
|
|
||||||
}else{
|
|
||||||
$('#stream-edit-preset').show();
|
|
||||||
$('#stream-edit-preset-label').show();
|
|
||||||
} */
|
|
||||||
//if the source is not live, don't do DVR buffer time
|
|
||||||
if(text.charAt(0) == '/')
|
if(text.charAt(0) == '/')
|
||||||
{
|
{
|
||||||
$('#stream-edit-buffer').val('');
|
$('.live-only').hide();
|
||||||
$('#stream-edit-buffer').hide();
|
$('.live-only').children('label').children('input').val('');
|
||||||
$('#stream-edit-buffer-label').hide();
|
|
||||||
}else{
|
}else{
|
||||||
$('#stream-edit-buffer').show();
|
$('.live-only').show();
|
||||||
$('#stream-edit-buffer-label').show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#editserver').append(
|
$('#editserver').append(
|
||||||
|
@ -979,6 +960,7 @@
|
||||||
var s = $('#stream-edit-source');
|
var s = $('#stream-edit-source');
|
||||||
var p = $('#stream-edit-preset');
|
var p = $('#stream-edit-preset');
|
||||||
var b = $('#stream-edit-buffer');
|
var b = $('#stream-edit-buffer');
|
||||||
|
var r = $('#stream-edit-record');
|
||||||
|
|
||||||
if(n.val() == ''){ n.focus(); return; }
|
if(n.val() == ''){ n.focus(); return; }
|
||||||
if(s.val() == ''){ s.focus(); return; }
|
if(s.val() == ''){ s.focus(); return; }
|
||||||
|
@ -991,6 +973,7 @@
|
||||||
sdata.preset.cmd = p.val();
|
sdata.preset.cmd = p.val();
|
||||||
sdata.online = -1;
|
sdata.online = -1;
|
||||||
sdata.error = null;
|
sdata.error = null;
|
||||||
|
sdata.record = r.val();
|
||||||
if (b.val() != '') { sdata.DVR = b.val(); }
|
if (b.val() != '') { sdata.DVR = b.val(); }
|
||||||
|
|
||||||
if(streamname == 'new')
|
if(streamname == 'new')
|
||||||
|
@ -1068,10 +1051,12 @@
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'limits':
|
case 'limits':
|
||||||
if (settings.settings.LTS != 1) {
|
/*if (settings.settings.LTS != 1) {
|
||||||
$('#page').html('Limits are not supported in your version. Buy the LTS! :)');
|
$('#page').html('Limits are not supported in your version. Buy the LTS! :)');
|
||||||
return;
|
return;
|
||||||
}
|
} */
|
||||||
|
$cont = $('<span>').addClass('LTS-only');
|
||||||
|
$('#page').append($cont);
|
||||||
|
|
||||||
$table = $('<table>');
|
$table = $('<table>');
|
||||||
$table.html("<thead><th>Hard/soft</th><th>Type</th><th>Value</th><th>Applies to</th><th>Action</th></thead>");
|
$table.html("<thead><th>Hard/soft</th><th>Type</th><th>Value</th><th>Applies to</th><th>Action</th></thead>");
|
||||||
|
@ -1111,7 +1096,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
$table.append($tbody);
|
$table.append($tbody);
|
||||||
$('#page').append($table);
|
$cont.append($table);
|
||||||
|
|
||||||
//tooltip
|
//tooltip
|
||||||
$('.limits_type').live({
|
$('.limits_type').live({
|
||||||
|
@ -1148,7 +1133,7 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
//build buttons
|
//build buttons
|
||||||
$('#page').append(
|
$cont.append(
|
||||||
$('<button>').text('Add limit').click(function(){
|
$('<button>').text('Add limit').click(function(){
|
||||||
$tbody.append(BuildLimitRow({"name":"kbps_max", "val":0, "type":"soft"}));
|
$tbody.append(BuildLimitRow({"name":"kbps_max", "val":0, "type":"soft"}));
|
||||||
})
|
})
|
||||||
|
@ -1537,5 +1522,17 @@
|
||||||
//placeholder for older browsers
|
//placeholder for older browsers
|
||||||
$('input[placeholder]').placeholder();
|
$('input[placeholder]').placeholder();
|
||||||
|
|
||||||
|
if (settings.settings.LTS != 1) {
|
||||||
|
$('.LTS-only input').add('.LTS-only select').add('.LTS-only button').attr('disabled','disabled');
|
||||||
|
$('.LTS-only').hover(function(e){
|
||||||
|
removeTooltip();
|
||||||
|
showTooltip(e,undefined,'This is feature is only available in the LTS version.');
|
||||||
|
},function(){
|
||||||
|
removeTooltip();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.LTS-only').add('.LTS-only p').add('.LTS-only label').add('.LTS-only button').css('color','#b4b4b4');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
<li>logs</li>
|
<li>logs</li>
|
||||||
<li>server stats</li>
|
<li>server stats</li>
|
||||||
<li id='logoutbutton'>disconnect</li>
|
<li id='logoutbutton'>disconnect</li>
|
||||||
|
<li><a href='http://shop.mistserver.org/' target='_blank'>Mist Shop</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div id='page'></div>
|
<div id='page'></div>
|
||||||
|
|
|
@ -452,8 +452,6 @@ td
|
||||||
color: black;
|
color: black;
|
||||||
font: normal normal 11pt Arial, sans-serif;
|
font: normal normal 11pt Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
code
|
code
|
||||||
{
|
{
|
||||||
font-size: 0.9em;
|
font-size: 0.9em;
|
||||||
|
|
Loading…
Add table
Reference in a new issue