kopia lustrzana https://github.com/magicbug/Cloudlog
[Dashboard] Update radio frequency display every 5 seconds
rodzic
8354bf609f
commit
e8c62a26cf
|
@ -114,6 +114,13 @@ class Dashboard extends CI_Controller {
|
|||
|
||||
}
|
||||
|
||||
function radio_display_component() {
|
||||
$this->load->model('cat');
|
||||
|
||||
$data['radio_status'] = $this->cat->recent_status();
|
||||
$this->load->view('components/radio_display_table', $data);
|
||||
}
|
||||
|
||||
function map() {
|
||||
$this->load->model('logbook_model');
|
||||
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<?php if($radio_status->num_rows()) { ?>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-broadcast-tower"></i> Radio Status</td>
|
||||
</tr>
|
||||
|
||||
<?php foreach ($radio_status->result_array() as $row) { ?>
|
||||
<tr>
|
||||
<td><?php echo $row['radio']; ?></td>
|
||||
<td>
|
||||
<?php if($row['prop_mode'] == 'SAT') { ?>
|
||||
<?php echo $row['sat_name']; ?>
|
||||
<?php } else { ?>
|
||||
<?php echo $this->frequency->hz_to_mhz($row['frequency']); ?> (<?php echo $row['mode']; ?>)
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</table>
|
||||
|
||||
<?php } ?>
|
|
@ -160,29 +160,8 @@ function echoQrbCalcLink($mygrid, $grid, $vucc) {
|
|||
<?php } ?>
|
||||
<div class="table-responsive">
|
||||
|
||||
<?php if($radio_status->num_rows()) { ?>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tr class="titles">
|
||||
<td colspan="2"><i class="fas fa-broadcast-tower"></i> Radio Status</td>
|
||||
</tr>
|
||||
|
||||
<?php foreach ($radio_status->result_array() as $row) { ?>
|
||||
<tr>
|
||||
<td><?php echo $row['radio']; ?></td>
|
||||
<td>
|
||||
<?php if($row['prop_mode'] == 'SAT') { ?>
|
||||
<?php echo $row['sat_name']; ?>
|
||||
<?php } else { ?>
|
||||
<?php echo $this->frequency->hz_to_mhz($row['frequency']); ?> (<?php echo $row['mode']; ?>)
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
</table>
|
||||
|
||||
<?php } ?>
|
||||
<div id="radio_display" hx-get="<?php echo site_url('dashboard/radio_display_component'); ?>" hx-trigger="every 5s"></div>
|
||||
|
||||
<table class="table table-striped">
|
||||
<tr class="titles">
|
||||
|
|
Ładowanie…
Reference in New Issue