Added button for updating TLE's from satellite page

This commit is contained in:
Andreas Kristiansen
2025-03-11 15:18:54 +01:00
parent ecd7f34afe
commit a1760c44b9
2 changed files with 17 additions and 2 deletions

View File

@@ -465,7 +465,7 @@ class Update extends CI_Controller {
}
}
public function update_tle() {
public function update_tle($returnpath = 'debug') {
$this->load->model('Update_model');
$result = $this->Update_model->tle();
if($this->session->userdata('user_type') == '99') {
@@ -474,7 +474,7 @@ class Update extends CI_Controller {
} else {
$this->session->set_flashdata('error', __("TLE Update failed. Result: ") . "'" . $result . "'");
}
redirect('debug');
redirect($returnpath);
} else {
echo $result;
}

View File

@@ -1,6 +1,20 @@
<div class="container">
<br>
<?php if ($this->session->flashdata('success')) { ?>
<!-- Display Message -->
<div class="alert alert-success">
<p><?php echo $this->session->flashdata('success'); ?></p>
</div>
<?php } ?>
<?php if ($this->session->flashdata('error')) { ?>
<!-- Display Message -->
<div class="alert alert-danger">
<p><?php echo $this->session->flashdata('error'); ?></p>
</div>
<?php } ?>
<?php if($this->session->flashdata('message')) { ?>
<!-- Display Message -->
<div class="alert-message error">
@@ -14,6 +28,7 @@
<div class="card-body">
<button onclick="createSatelliteDialog();" class="btn btn-primary btn-sm"><i class="fas fa-plus"></i> <?= __("Add a satellite"); ?></button>
<a class="btn btn-primary btn-sm" href="<?php echo site_url('/update/update_lotw_sats'); ?>" role="button"><i class="fas fa-sync-alt"></i> <?= __("Sync Satellites from LoTW"); ?></a>
<a class="btn btn-primary btn-sm" href="<?php echo site_url('/update/update_tle/satellite'); ?>" role="button"><i class="fas fa-sync-alt"></i> <?= __("Update Satellite TLE"); ?></a>
<div class="table-responsive">
<table style="width:100%" class="sattable table table-sm table-striped">