update call
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-03-19 00:31:33 +01:00
parent 6b3a409dc2
commit 65e8554032
2 changed files with 18 additions and 1 deletions

View File

@@ -148,7 +148,7 @@ function show_service_update($name, $update, $uptodate) {
if (!empty($update)) { if (!empty($update)) {
$arr = explode(" ",$update); $arr = explode(" ",$update);
foreach ($arr as $container) { foreach ($arr as $container) {
$str .= "<tr><td>&nbsp;</td><td>".$container."</td><td>UPDATE AVAILABLE</td><td>UPDATE</td></tr>"; $str .= "<tr><td>&nbsp;</td><td>".$container."</td><td>UPDATE AVAILABLE</td><td><a href=\"#\" onclick=\"update('{$name}')\">UPDATE</a></td></tr>";
} }
} }

View File

@@ -277,6 +277,23 @@ function get_updates() {
}); });
} }
function update(service) {
if (service=='framework') {
framework_upgrade();
}
else alert(service+' update under construction');
}
function framework_upgrade() {
var url = 'scan.php?op=upgrade';
jQuery.get(url, function(data) {
console.log('framework upgrade: '+data);
if (data=="OK") {
setTimeout(check_upgrade, 1000);
}
});
}
function load_template(additional) { function load_template(additional) {
jQuery("div.deployment").each(function(index) { jQuery("div.deployment").each(function(index) {