mirror of
https://github.com/unraid/webgui.git
synced 2026-01-13 13:09:58 -06:00
Docker: Fix: show docker updates as 'available' instead of 'unknown' when upgrading from 6.1 to 6.2
This commit is contained in:
@@ -466,7 +466,7 @@ class DockerUpdate{
|
||||
// Add :latest tag to image if it's absent
|
||||
$image = ($image && count(preg_split("#[:\/]#", $image)) < 3) ? "${image}:latest" : $image;
|
||||
if(isset($updateStatus[$image])) {
|
||||
if ($updateStatus[$image]['local'] && $updateStatus[$image]['remote']) {
|
||||
if ($updateStatus[$image]['local'] || $updateStatus[$image]['remote']) {
|
||||
return ($updateStatus[$image]['local'] == $updateStatus[$image]['remote']) ? true : false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,8 +45,10 @@ if (!isset($check)) {
|
||||
$image = $ct['Image'];
|
||||
if ($info[$name]['updated'] == "false") {
|
||||
$updateStatus = (is_file($dockerManPaths['update-status'])) ? json_decode(file_get_contents($dockerManPaths['update-status']), TRUE) : array();
|
||||
$new = $updateStatus[$image]['remote'];
|
||||
exec("$notify -e 'Docker - $name [$new]' -s 'Notice [$server] - Docker update $new' -d 'A new version of $name is available' -i 'normal $output' -x");
|
||||
$new = str_replace('sha256:', '', $updateStatus[$image]['remote']);
|
||||
$new = substr($new, 0, 4).'..'.substr($new, -4, 4);
|
||||
|
||||
exec("$notify -e ".escapeshellarg("Docker - $name [$new]")." -s ".escapeshellarg("Notice [$server] - Docker update $new")." -d ".escapeshellarg("A new version of $name is available")." -i ".escapeshellarg("normal $output")." -x");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user