Show radio CAT status above QSO panel if available
这个提交包含在:
		
							父节点
							
								
									fd450673db
								
							
						
					
					
						当前提交
						642135e88d
					
				
					共有  1 个文件被更改,包括 21 次插入 和 2 次删除
				
			
		|  | @ -1247,13 +1247,32 @@ $(document).on('keypress',function(e) { | ||||||
|           var minutes = Math.floor(<?php echo $this->optionslib->get_option('cat_timeout_interval'); ?> / 60);
 |           var minutes = Math.floor(<?php echo $this->optionslib->get_option('cat_timeout_interval'); ?> / 60);
 | ||||||
| 
 | 
 | ||||||
|           if(data.updated_minutes_ago > minutes) { |           if(data.updated_minutes_ago > minutes) { | ||||||
|  |             $(".radio_cat_state" ).remove(); | ||||||
|             if($('.radio_timeout_error').length == 0) { |             if($('.radio_timeout_error').length == 0) { | ||||||
|               $('.qso_panel').prepend('<div class="alert alert-danger radio_timeout_error" role="alert">Radio connection timed-out: ' + $('select.radios option:selected').text() + ' data is ' + data.updated_minutes_ago + ' minutes old.</div>'); |               $('.qso_panel').prepend('<div class="alert alert-danger radio_timeout_error" role="alert"><i class="fas fa-broadcast-tower"></i> Radio connection timed-out: ' + $('select.radios option:selected').text() + ' data is ' + data.updated_minutes_ago + ' minutes old.</div>'); | ||||||
|             } else { |             } else { | ||||||
|               $('.radio_timeout_error').text('Radio connection timed-out: ' + $('select.radios option:selected').text() + ' data is ' + data.updated_minutes_ago + ' minutes old.'); |               $('.radio_timeout_error').html('Radio connection timed-out: ' + $('select.radios option:selected').text() + ' data is ' + data.updated_minutes_ago + ' minutes old.'); | ||||||
|             } |             } | ||||||
|           } else { |           } else { | ||||||
|             $(".radio_timeout_error" ).remove(); |             $(".radio_timeout_error" ).remove(); | ||||||
|  |             text = '<i class="fas fa-broadcast-tower"></i><span style="margin-left:10px;"></span><b>TX:</b> '+parseInt(data.frequency)/1000/1000+' MHz'; | ||||||
|  |             if(data.power != null && data.power != 0) { | ||||||
|  |                text = text+'<span style="margin-left:10px"></span>'+data.power+'W'; | ||||||
|  |             } | ||||||
|  |             if(data.prop_mode != null && data.prop_mode != '') { | ||||||
|  |                text = text+'<span style="margin-left:10px"></span>('+data.prop_mode; | ||||||
|  |                if (data.prop_mode == 'SAT') { | ||||||
|  |                   text = text+' '+data.satname; | ||||||
|  |                } | ||||||
|  |             } | ||||||
|  |             if(data.frequency_rx != null && data.frequency_rx != 0) { | ||||||
|  |                text = text+'<span style="margin-left:10px"></span><b>RX:</b> '+parseInt(data.frequency_rx)/1000/1000+' MHz)'; | ||||||
|  |             } | ||||||
|  |             if (! $('#radio_cat_state').length) { | ||||||
|  |                $('.qso_panel').prepend('<div id="radio_cat_state" class="alert alert-success radio_cat_state" role="alert">'+text+'</div>'); | ||||||
|  |             } else { | ||||||
|  |                $('#radio_cat_state').html(text); | ||||||
|  |             } | ||||||
|           } |           } | ||||||
| 
 | 
 | ||||||
|       }); |       }); | ||||||
|  |  | ||||||
		正在加载…
	
		在新工单中引用