CC-3160: Once Hardware dropdown is changed, stream information does not refresh
-fixed
This commit is contained in:
parent
beab24d068
commit
0440eb7539
|
@ -2,30 +2,30 @@
|
||||||
$s_name = "s".$this->stream_number;
|
$s_name = "s".$this->stream_number;
|
||||||
?>
|
?>
|
||||||
<h3 class="collapsible-header <?php echo $this->stream_number == '1'?"close":""?>"><span class="arrow-icon"></span>Stream <?php echo $this->stream_number?></h3>
|
<h3 class="collapsible-header <?php echo $this->stream_number == '1'?"close":""?>"><span class="arrow-icon"></span>Stream <?php echo $this->stream_number?></h3>
|
||||||
<div class="stream-setting-content" <?php echo $this->enabled == 0?'style="display: none;':''?> id="<?=$s_name?>-config">
|
<div class="stream-setting-content" <?php echo $this->enabled == 0?'style="display: none;':''?> id="<?php echo $s_name?>-config">
|
||||||
<fieldset class="padded">
|
<fieldset class="padded">
|
||||||
<dl class="zend_form clearfix">
|
<dl class="zend_form clearfix">
|
||||||
<dd id="<?=$s_name?>Liquidsoap-error-msg-element" class="liquidsoap_status">
|
<dd id="<?php echo $s_name?>Liquidsoap-error-msg-element" class="liquidsoap_status">
|
||||||
<?php echo $this->liquidsoap_error_msg?>
|
<?php echo $this->liquidsoap_error_msg?>
|
||||||
</dd>
|
</dd>
|
||||||
<dt id="<?=$s_name?>Enabled-label">
|
<dt id="<?php echo $s_name?>Enabled-label">
|
||||||
<label for="<?=$s_name?>Enabled"><?php echo $this->element->getElement('enable')->getLabel() ?></label>
|
<label for="<?php echo $s_name?>Enabled"><?php echo $this->element->getElement('enable')->getLabel() ?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="<?=$s_name?>Enabled-element">
|
<dd id="<?php echo $s_name?>Enabled-element">
|
||||||
<?php echo $this->element->getElement('enable')?>
|
<?php echo $this->element->getElement('enable')?>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt id="<?=$s_name?>Type-label">
|
<dt id="<?php echo $s_name?>Type-label">
|
||||||
<label for="<?=$s_name?>Type"><?php echo $this->element->getElement('type')->getLabel()?></label>
|
<label for="<?php echo $s_name?>Type"><?php echo $this->element->getElement('type')->getLabel()?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="<?=$s_name?>Type-element">
|
<dd id="<?php echo $s_name?>Type-element">
|
||||||
<?php echo $this->element->getElement('type')?>
|
<?php echo $this->element->getElement('type')?>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
<dt id="<?=$s_name?>Bitrate-label">
|
<dt id="<?php echo $s_name?>Bitrate-label">
|
||||||
<label for="<?=$s_name?>Bitrate"><?php echo $this->element->getElement('bitrate')->getLabel()?></label>
|
<label for="<?php echo $s_name?>Bitrate"><?php echo $this->element->getElement('bitrate')->getLabel()?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="<?=$s_name?>Bitrate-element">
|
<dd id="<?php echo $s_name?>Bitrate-element">
|
||||||
<?php echo $this->element->getElement('bitrate')?>
|
<?php echo $this->element->getElement('bitrate')?>
|
||||||
</dd>
|
</dd>
|
||||||
<dt id="outputServer-label">
|
<dt id="outputServer-label">
|
||||||
|
@ -54,10 +54,10 @@
|
||||||
</ul>
|
</ul>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</dd>
|
</dd>
|
||||||
<dt id="<?=$s_name?>Output-label">
|
<dt id="<?php echo $s_name?>Output-label">
|
||||||
<label for="<?=$s_name?>Output"><?php echo $this->element->getElement('output')->getLabel()?></label>
|
<label for="<?php echo $s_name?>Output"><?php echo $this->element->getElement('output')->getLabel()?></label>
|
||||||
</dt>
|
</dt>
|
||||||
<dd id="<?=$s_name?>Output-element">
|
<dd id="<?php echo $s_name?>Output-element">
|
||||||
<?php echo $this->element->getElement('output')?>
|
<?php echo $this->element->getElement('output')?>
|
||||||
</dd>
|
</dd>
|
||||||
|
|
||||||
|
@ -159,4 +159,4 @@
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -81,8 +81,8 @@ function checkLiquidsoapStatus(){
|
||||||
var json_obj = jQuery.parseJSON(json);
|
var json_obj = jQuery.parseJSON(json);
|
||||||
for(var i=0;i<json_obj.length;i++){
|
for(var i=0;i<json_obj.length;i++){
|
||||||
var obj = json_obj[i];
|
var obj = json_obj[i];
|
||||||
var id
|
var id;
|
||||||
var status
|
var status;
|
||||||
for(var key in obj){
|
for(var key in obj){
|
||||||
if(key == "id"){
|
if(key == "id"){
|
||||||
id = obj[key];
|
id = obj[key];
|
||||||
|
@ -91,15 +91,15 @@ function checkLiquidsoapStatus(){
|
||||||
status = obj[key];
|
status = obj[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var html
|
var html;
|
||||||
if(status == "OK"){
|
if(status == "OK"){
|
||||||
html = '<div class="stream-status status-good"><h3>Connected to the streaming server</h3></div>'
|
html = '<div class="stream-status status-good"><h3>Connected to the streaming server</h3></div>';
|
||||||
}else if(status == "N/A"){
|
}else if(status == "N/A"){
|
||||||
html = '<div class="stream-status status-disabled"><h3>The stream is disabled</h3></div>'
|
html = '<div class="stream-status status-disabled"><h3>The stream is disabled</h3></div>';
|
||||||
}else if(status == "waiting"){
|
}else if(status == "waiting"){
|
||||||
html = '<div class="stream-status status-info"><h3>Getting information from the server...</h3></div>'
|
html = '<div class="stream-status status-info"><h3>Getting information from the server...</h3></div>';
|
||||||
}else{
|
}else{
|
||||||
html = '<div class="stream-status status-error"><h3>Can not connect to the streaming server</h3><p>'+status+'</p></div>'
|
html = '<div class="stream-status status-error"><h3>Can not connect to the streaming server</h3><p>'+status+'</p></div>';
|
||||||
}
|
}
|
||||||
$("#s"+id+"Liquidsoap-error-msg-element").html(html);
|
$("#s"+id+"Liquidsoap-error-msg-element").html(html);
|
||||||
}
|
}
|
||||||
|
@ -175,4 +175,4 @@ $(document).ready(function() {
|
||||||
showErrorSections()
|
showErrorSections()
|
||||||
setInterval('checkLiquidsoapStatus()', 1000)
|
setInterval('checkLiquidsoapStatus()', 1000)
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue