mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
Expose docker tag information using the API
This information is available since the introduction of `versions` file. Docker info is shown by `pihole -v` and the web interface footer, but it was never added to the versions API. Signed-off-by: RD WebDesign <github@rdwebdesign.com.br>
This commit is contained in:
@@ -71,6 +71,13 @@ if (isset($_GET['enable']) && $auth) {
|
||||
$branches = array('core_branch' => $core_branch,
|
||||
'web_branch' => $web_branch,
|
||||
'FTL_branch' => $FTL_branch, );
|
||||
if (isset($versions['DOCKER_VERSION'])) {
|
||||
// Docker info is available only inside containers
|
||||
$updates['docker_update'] = $docker_update;
|
||||
$current['docker_current'] = $docker_current;
|
||||
$latest['docker_latest'] = $docker_latest;
|
||||
}
|
||||
|
||||
$data = array_merge($data, $updates);
|
||||
$data = array_merge($data, $current);
|
||||
$data = array_merge($data, $latest);
|
||||
|
||||
Reference in New Issue
Block a user