Reduce service restart speed + UI tweaks

This commit is contained in:
billz 2023-10-21 15:43:49 +01:00
parent ca157b1789
commit 3e404b0202
3 changed files with 8 additions and 7 deletions

View file

@ -274,15 +274,16 @@ function loadChannel() {
}
$('#hostapdModal').on('shown.bs.modal', function (e) {
var seconds = 9;
var seconds = 3;
var pct = 0;
var countDown = setInterval(function(){
if(seconds <= 0){
clearInterval(countDown);
}
var pct = Math.floor(100-(seconds*100/9));
document.getElementsByClassName('progress-bar').item(0).setAttribute('style','width:'+Number(pct)+'%');
seconds --;
}, 1000);
pct = Math.floor(100-(seconds*100/4));
}, 500);
});
$('#configureClientModal').on('shown.bs.modal', function (e) {

View file

@ -49,11 +49,11 @@ function DisplayHostAPDConfig()
if (isset($_POST['StartHotspot']) || isset($_POST['RestartHotspot'])) {
$status->addMessage('Attempting to start hotspot', 'info');
if ($arrHostapdConf['BridgedEnable'] == 1) {
exec('sudo '.RASPI_CONFIG.'/hostapd/servicestart.sh --interface br0 --seconds 3', $return);
exec('sudo '.RASPI_CONFIG.'/hostapd/servicestart.sh --interface br0 --seconds 2', $return);
} elseif ($arrHostapdConf['WifiAPEnable'] == 1) {
exec('sudo '.RASPI_CONFIG.'/hostapd/servicestart.sh --interface uap0 --seconds 3', $return);
exec('sudo '.RASPI_CONFIG.'/hostapd/servicestart.sh --interface uap0 --seconds 2', $return);
} else {
exec('sudo '.RASPI_CONFIG.'/hostapd/servicestart.sh --seconds 3', $return);
exec('sudo '.RASPI_CONFIG.'/hostapd/servicestart.sh --seconds 2', $return);
}
foreach ($return as $line) {
$status->addMessage($line, 'info');

View file

@ -12,7 +12,7 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<div class="modal-title" id="ModalLabel"><i class="fas fa-sync-alt mr-2"></i><?php echo $msg ?></div>
<div class="modal-title" id="ModalLabel"><i class="fas fa-sync-alt fa-spin mr-2"></i><?php echo $msg ?></div>
</div>
<div class="modal-body">
<div class="col-md-12 mb-3 mt-1"><?php echo _("Executing RaspAP service start") ?>...</div>