Flag dockerhub searches where the container already exists in CA

This commit is contained in:
Squidly271 2022-02-26 16:11:10 -05:00
parent eb5ea2830a
commit 0b77c3115c
3 changed files with 9 additions and 1 deletions

View File

@ -20,4 +20,4 @@ e19c8f05c687dcf03ea0ba2ed7099a6e ./scripts/showStatistics.php
34554a56611dfe625889c82afd5138de ./scripts/updatePluginSupport.php
2da35d3042b93459f171595811d534b3 ./skins/Narrow/css.php
e9244df3418ca3e7fa206d9b6e94c6b1 ./skins/Narrow/skin.html
7cbc48b9a57f4bf7bf15690f8f1cf6ce ./skins/Narrow/skin.php
daee2d570f438799467550d68b6ba32a ./skins/Narrow/skin.php

View File

@ -877,6 +877,8 @@ function displaySearchResults($pageNumber) {
$result['Description'] = $result['Description'] ?: "No description present";
$result['Compatible'] = true;
$result['actionsContext'] = [["icon"=>"ca_fa-install","text"=>tr("Install"),"action"=>"dockerConvert({$result['ID']});"]];
if ( searchArray($templates,"Repository",$result['Repository']) !== false || searchArray($templates,"Repository","{$result['Repository']}.latest") !== false )
$result['caTemplateExists'] = true;
$ct .= displayCard($result);
$count++;
@ -1109,6 +1111,12 @@ function displayCard($template) {
<div class='betaPopupText ca_center' title='".tr("This application template / has been blacklisted")."'>$flagTextStart".tr("Blacklisted")."$flagTextEnd</div>
</div>
";
} elseif ( $caTemplateExists ) {
$card .= "
<div class='warningCardBackground'>
<div class='betaPopupText ca_center' title='".tr("Template already exists in Apps")."'>".tr("Template Exists")."</div>
</div>
";
} elseif ( isset($Compatible) && ! $Compatible ) {
$verMsg = $VerMessage ?: tr("This application is not compatible with your version of Unraid");
$card .= "

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB