2 Commits

Author SHA1 Message Date
63ec0ebaa8 version, uninstall button style
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2025-08-04 16:27:11 +00:00
f925665d23 progress after install
All checks were successful
continuous-integration/drone/push Build is passing
2025-08-04 14:57:17 +00:00
6 changed files with 27 additions and 10 deletions

View File

@@ -271,7 +271,7 @@ function uninstall(additional) {
jQuery("div.deployment").each(function(index) {
$(this).html('');
});
data = '<fieldset><form action="#" method="post"><div class="row">YOU ARE GOING TO UNINSTALL '+additional.toUpperCase()+'.<br>ARE YOU SURE? IF YES, PLEASE CLICK ON THE BUTTON BELOW.<br><br></div><div class="row"><div class="mb-3"><button class="btn btn-lg btn-primary btn-block" type="button" onclick="confirm_uninstall(\''+additional+'\')">Uninstall</button></div></div></form></fieldset>';
data = '<form action="#" method="post"><div class="row">YOU ARE GOING TO UNINSTALL '+additional.toUpperCase()+'.<br>ARE YOU SURE? IF YES, PLEASE CLICK ON THE BUTTON BELOW.<br><br></div><div class="row"><div class="mb-3"><button class="save-button" type="button" onclick="confirm_uninstall(\''+additional+'\')">Uninstall</button></div></div></form>';
jQuery("#"+additional).html(data);
jQuery("#popupText").html(data); // manage2
}
@@ -480,8 +480,17 @@ function get_containers() {
});
}
function get_version() {
var url = 'scan.php?op=version';
jQuery.get(url, function(data) {
console.log('version: '+data);
jQuery('#logo').attr('title',data);
});
}
jQuery(document).ready(function(){
get_version();
get_repositories();
get_deployments();
get_system();

View File

@@ -11,12 +11,11 @@ function updateProgress(percentage) {
function setProgress(percentage) {
clearInterval(progressInterval);
updateProgress(percentage);
startProgress();
startProgress(60000);
}
function startProgress() {
function startProgress(duration) {
clearInterval(progressInterval);
const duration = 60000; // 60 seconds
const startTime = Date.now() - (currentProgress / 100) * duration;
progressInterval = setInterval(() => {
@@ -65,7 +64,7 @@ function redirectToInstall() {
function redirectToManage() {
setProgress(100);
// window.location.href = 'manage.html';
window.location.href = 'manage.html';
}
function start_system() {

View File

@@ -105,7 +105,7 @@ let install = 1;
// Initialize
updateProgress(0);
startProgress();
startProgress(90000);// 90 seconds
check_interface();
counter=0;

View File

@@ -11,7 +11,7 @@
<body>
<div class="sidebar">
<div>
<div class="logo">
<div id="logo" class="logo">
<img src="/img/logo.png" alt="Safebox"/>
<span>Safebox</span>
</div>
@@ -363,7 +363,6 @@
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.6/dist/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.2.1/dist/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
<script src="common.js?t=30"></script>
<script src="common.js?t=33"></script>
</body>
</html>

View File

@@ -25,9 +25,11 @@
<div class="progress-text" id="progressText">0%</div>
</div>
</div>
<!--
<div class="controls">
<button onclick="document.location='install.html'" class="save-button">STOP AND START INSTALL</button>
</div>
-->
</div>
</div>
<!-- Optional JavaScript -->
@@ -45,7 +47,7 @@ let install = 0; // scan
// Initialize
updateProgress(0);
startProgress();
startProgress(30000);// 30 seconds
check_interface();
</script>

View File

@@ -493,6 +493,14 @@ switch ($_GET["op"]) {
}
echo $text;
break;
case "version":
$arr = check_response("version");
if (!empty($arr)) {
$data = $arr["version"];
echo $data["VERSION"];
}
else echo "Version not found";
break;
case "repositories":
$arr = array("STATUS" => 0);
$json = json_encode($arr, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);