dockerhub conversions
parent
572f15a7e8
commit
480d4366b8
Binary file not shown.
|
@ -90,6 +90,8 @@ if ( $startupDisplayed == "true" && $_COOKIE['ca_languageSwitch'] ) {
|
||||||
$killCookie = "true";
|
$killCookie = "true";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$dockerSearchActive = is_file($caPaths['dockerSearchActive']);
|
||||||
|
|
||||||
// Only check for updates to containers / plugins max once per hour
|
// Only check for updates to containers / plugins max once per hour
|
||||||
exec("mkdir -p {$caPaths['tempFiles']}");
|
exec("mkdir -p {$caPaths['tempFiles']}");
|
||||||
if ( $cfg['updateCheck'] == "yes" ) {
|
if ( $cfg['updateCheck'] == "yes" ) {
|
||||||
|
@ -635,14 +637,18 @@ $(function(){
|
||||||
initialStartup = false;
|
initialStartup = false;
|
||||||
getCategories();
|
getCategories();
|
||||||
restoreState();
|
restoreState();
|
||||||
refreshDisplay();
|
<? if ( $dockerSearchActive ): ?>
|
||||||
searchBoxAwesomplete.close();
|
dockerSearch(data.currentpage);
|
||||||
initialStartup = true;
|
<? else: ?>
|
||||||
var apppath = $.cookie("sidebarAppPath");
|
refreshDisplay();
|
||||||
var appname = $.cookie("sidebarAppName");
|
searchBoxAwesomplete.close();
|
||||||
if ( $.trim(apppath) ) {
|
initialStartup = true;
|
||||||
showSidebarApp(apppath,appname);
|
var apppath = $.cookie("sidebarAppPath");
|
||||||
}
|
var appname = $.cookie("sidebarAppName");
|
||||||
|
if ( $.trim(apppath) ) {
|
||||||
|
showSidebarApp(apppath,appname);
|
||||||
|
}
|
||||||
|
<? endif; ?>
|
||||||
} else {
|
} else {
|
||||||
post({action:"defaultSortOrder"},function() {
|
post({action:"defaultSortOrder"},function() {
|
||||||
updateContent();
|
updateContent();
|
||||||
|
@ -2183,6 +2189,9 @@ function initDockerSearch() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function dockerSearch(pageNumber) {
|
function dockerSearch(pageNumber) {
|
||||||
|
scrollToTop();
|
||||||
|
$(".selectedMenu").removeClass("selectedMenu");
|
||||||
|
$(".nonDockerSearch").removeClass("caMenuEnabled").addClass("caMenuDisabled");
|
||||||
var filter = $('#searchBox').val();
|
var filter = $('#searchBox').val();
|
||||||
var dockerURL = "https://registry.hub.docker.com/search?q=" + filter;
|
var dockerURL = "https://registry.hub.docker.com/search?q=" + filter;
|
||||||
data.docker = "searching docker";
|
data.docker = "searching docker";
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
a234e996c1eef4dddfc4133d64ad34a1 ./Apps.page
|
dbcaed60ede3ac9aaa96b6a8a186f4eb ./Apps.page
|
||||||
83b3f89cd42e8601c7c217d5b4889c81 ./CA_notices.page
|
83b3f89cd42e8601c7c217d5b4889c81 ./CA_notices.page
|
||||||
7ee0b23dbd92ed55f611360a983f9565 ./ca_settings.page
|
7ee0b23dbd92ed55f611360a983f9565 ./ca_settings.page
|
||||||
1b49ec9797713ce869ea0c1066a109f2 ./default.cfg
|
1b49ec9797713ce869ea0c1066a109f2 ./default.cfg
|
||||||
b7ab76bd389b70d23751f597e6592b16 ./include/exec.php
|
53f072907318f5134c9a3f1622a77695 ./include/exec.php
|
||||||
5810179d140aadc0a17b2d8782a32cba ./include/helpers.php
|
5810179d140aadc0a17b2d8782a32cba ./include/helpers.php
|
||||||
6113f62fd4fe2afd03bd5f082a6f5f29 ./include/paths.php
|
8ba23d3d51816bbb91245cfc3fcb8024 ./include/paths.php
|
||||||
eb76c1b6ed3da5e5b393f22d2ec18430 ./javascript/libraries.js
|
eb76c1b6ed3da5e5b393f22d2ec18430 ./javascript/libraries.js
|
||||||
8c24d585c7dd3ff9ef961bb2c2705711 ./PluginAPI.page
|
8c24d585c7dd3ff9ef961bb2c2705711 ./PluginAPI.page
|
||||||
b398273cf7daa62ab00d2de2336ca25f ./README.md
|
b398273cf7daa62ab00d2de2336ca25f ./README.md
|
||||||
|
@ -22,4 +22,4 @@ b398273cf7daa62ab00d2de2336ca25f ./README.md
|
||||||
2bd671daecaf01549f8cc0202cb184b3 ./scripts/updatePluginSupport.php
|
2bd671daecaf01549f8cc0202cb184b3 ./scripts/updatePluginSupport.php
|
||||||
dec2bf4cf4d3d57619d2c3ba49d59b9f ./skins/Narrow/css.php
|
dec2bf4cf4d3d57619d2c3ba49d59b9f ./skins/Narrow/css.php
|
||||||
e965c8fafd1eae7a0387e37cee3aeaf9 ./skins/Narrow/skin.html
|
e965c8fafd1eae7a0387e37cee3aeaf9 ./skins/Narrow/skin.html
|
||||||
42ac1f766f0493837024f11d801c6c33 ./skins/Narrow/skin.php
|
797f8022c23372b48bdb1603401256ff ./skins/Narrow/skin.php
|
||||||
|
|
|
@ -589,13 +589,15 @@ function displayRepositories() {
|
||||||
######################################################################################
|
######################################################################################
|
||||||
function get_content() {
|
function get_content() {
|
||||||
global $caPaths, $caSettings;
|
global $caPaths, $caSettings;
|
||||||
|
|
||||||
$filter = getPost("filter",false);
|
$filter = getPost("filter",false);
|
||||||
$category = getPost("category",false);
|
$category = getPost("category",false);
|
||||||
$newApp = filter_var(getPost("newApp",false),FILTER_VALIDATE_BOOLEAN);
|
$newApp = filter_var(getPost("newApp",false),FILTER_VALIDATE_BOOLEAN);
|
||||||
|
|
||||||
$caSettings['startup'] = getPost("startupDisplay",false);
|
$caSettings['startup'] = getPost("startupDisplay",false);
|
||||||
@unlink($caPaths['repositoriesDisplayed']);
|
@unlink($caPaths['repositoriesDisplayed']);
|
||||||
|
@unlink($caPaths['dockerSearchActive']);
|
||||||
|
|
||||||
switch ($category) {
|
switch ($category) {
|
||||||
case "PRIVATE":
|
case "PRIVATE":
|
||||||
$category = false;
|
$category = false;
|
||||||
|
@ -975,6 +977,7 @@ function previous_apps() {
|
||||||
@unlink($caPaths['community-templates-catSearchResults']);
|
@unlink($caPaths['community-templates-catSearchResults']);
|
||||||
@unlink($caPaths['repositoriesDisplayed']);
|
@unlink($caPaths['repositoriesDisplayed']);
|
||||||
@unlink($caPaths['startupDisplayed']);
|
@unlink($caPaths['startupDisplayed']);
|
||||||
|
@unlink($caPaths['dockerSearchActive']);
|
||||||
|
|
||||||
$file = readJsonFile($caPaths['community-templates-info']);
|
$file = readJsonFile($caPaths['community-templates-info']);
|
||||||
|
|
||||||
|
@ -1249,13 +1252,15 @@ function areAppsPinned() {
|
||||||
####################################
|
####################################
|
||||||
function pinnedApps() {
|
function pinnedApps() {
|
||||||
global $caPaths, $caSettings;
|
global $caPaths, $caSettings;
|
||||||
|
|
||||||
$pinnedApps = readJsonFile($caPaths['pinnedV2']);
|
$pinnedApps = readJsonFile($caPaths['pinnedV2']);
|
||||||
$file = readJsonFile($caPaths['community-templates-info']);
|
$file = readJsonFile($caPaths['community-templates-info']);
|
||||||
@unlink($caPaths['community-templates-allSearchResults']);
|
@unlink($caPaths['community-templates-allSearchResults']);
|
||||||
@unlink($caPaths['community-templates-catSearchResults']);
|
@unlink($caPaths['community-templates-catSearchResults']);
|
||||||
@unlink($caPaths['repositoriesDisplayed']);
|
@unlink($caPaths['repositoriesDisplayed']);
|
||||||
@unlink($caPaths['startupDisplayed']);
|
@unlink($caPaths['startupDisplayed']);
|
||||||
|
@unlink($caPaths['dockerSearchActive']);
|
||||||
|
|
||||||
foreach ($pinnedApps as $pinned) {
|
foreach ($pinnedApps as $pinned) {
|
||||||
$startIndex = 0;
|
$startIndex = 0;
|
||||||
$search = explode("&",$pinned);
|
$search = explode("&",$pinned);
|
||||||
|
@ -1958,10 +1963,12 @@ function search_dockerhub() {
|
||||||
$o['display'] = "<div class='ca_NoDockerAppsFound'>".tr("No Matching Applications Found On Docker Hub")."</div>";
|
$o['display'] = "<div class='ca_NoDockerAppsFound'>".tr("No Matching Applications Found On Docker Hub")."</div>";
|
||||||
$o['script'] = "$('#dockerSearch').hide();";
|
$o['script'] = "$('#dockerSearch').hide();";
|
||||||
postReturn($o);
|
postReturn($o);
|
||||||
@unlink($caPaths['dockerSerchResults']);
|
@unlink($caPaths['dockerSearchResults']);
|
||||||
|
@unlink($caPaths['dockerSearchActive']);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
touch($caPaths['dockerSearchActive']);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($pageresults['results'] as $result) {
|
foreach ($pageresults['results'] as $result) {
|
||||||
unset($o);
|
unset($o);
|
||||||
|
|
|
@ -64,5 +64,6 @@ $caPaths['updateTime'] = "/tmp/$CA/checkForUpdatesTime"
|
||||||
$caPaths['dockerWriteTest'] = "/var/lib/docker/communityApplicationsWriteTest";
|
$caPaths['dockerWriteTest'] = "/var/lib/docker/communityApplicationsWriteTest";
|
||||||
$caPaths['info'] = $caPaths['tempFiles']."/info.json";
|
$caPaths['info'] = $caPaths['tempFiles']."/info.json";
|
||||||
$caPaths['dockerSearchResults'] = $caPaths['tempFiles']."/dockerSearch.json";
|
$caPaths['dockerSearchResults'] = $caPaths['tempFiles']."/dockerSearch.json";
|
||||||
$caPaths['dockerSearchInstall'] = $caPaths['tempFiles']."/docksearch.xml";
|
$caPaths['dockerSearchInstall'] = $caPaths['tempFiles']."/dockerConvert.xml";
|
||||||
|
$caPaths['dockerSearchActive'] = $caPaths['tempFiles']."/dockerSearchActive";
|
||||||
?>
|
?>
|
|
@ -275,6 +275,10 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
|
||||||
function getPageNavigation($pageNumber,$totalApps,$dockerSearch,$displayCount = true) {
|
function getPageNavigation($pageNumber,$totalApps,$dockerSearch,$displayCount = true) {
|
||||||
global $caSettings;
|
global $caSettings;
|
||||||
|
|
||||||
|
$pageFunction = $dockerSearch ? "dockerSearch": "changePage";
|
||||||
|
if ( $dockerSearch )
|
||||||
|
$caSettings['maxPerPage'] = 25;
|
||||||
|
|
||||||
if ( $caSettings['maxPerPage'] < 0 ) return;
|
if ( $caSettings['maxPerPage'] < 0 ) return;
|
||||||
$swipeScript = "<script>";
|
$swipeScript = "<script>";
|
||||||
|
|
||||||
|
@ -293,30 +297,30 @@ function getPageNavigation($pageNumber,$totalApps,$dockerSearch,$displayCount =
|
||||||
|
|
||||||
$o .= "<div class='pageNavigation'>";
|
$o .= "<div class='pageNavigation'>";
|
||||||
$previousPage = $pageNumber - 1;
|
$previousPage = $pageNumber - 1;
|
||||||
$o .= ( $pageNumber == 1 ) ? "<span class='pageLeft pageNumber pageNavNoClick'></span>" : "<span class='pageLeft ca_tooltip pageNumber' onclick='changePage("$previousPage")'></span>";
|
$o .= ( $pageNumber == 1 ) ? "<span class='pageLeft pageNumber pageNavNoClick'></span>" : "<span class='pageLeft ca_tooltip pageNumber' onclick='$pageFunction("$previousPage")'></span>";
|
||||||
$swipeScript .= "data.prevpage = $previousPage;";
|
$swipeScript .= "data.prevpage = $previousPage;";
|
||||||
$startingPage = $pageNumber - 5;
|
$startingPage = $pageNumber - 5;
|
||||||
if ($startingPage < 3 )
|
if ($startingPage < 3 )
|
||||||
$startingPage = 1;
|
$startingPage = 1;
|
||||||
else
|
else
|
||||||
$o .= "<a class='ca_tooltip pageNumber' onclick='changePage("1");'>1</a><span class='pageNumber pageDots'></span>";
|
$o .= "<a class='ca_tooltip pageNumber' onclick='pageFunction("1");'>1</a><span class='pageNumber pageDots'></span>";
|
||||||
|
|
||||||
$endingPage = $pageNumber + 5;
|
$endingPage = $pageNumber + 5;
|
||||||
if ( $endingPage > $totalPages )
|
if ( $endingPage > $totalPages )
|
||||||
$endingPage = $totalPages;
|
$endingPage = $totalPages;
|
||||||
|
|
||||||
for ($i = $startingPage; $i <= $endingPage; $i++)
|
for ($i = $startingPage; $i <= $endingPage; $i++)
|
||||||
$o .= ( $i == $pageNumber ) ? "<span class='pageNumber pageSelected'>$i</span>" : "<a class='ca_tooltip pageNumber' onclick='changePage("$i");'>$i</a>";
|
$o .= ( $i == $pageNumber ) ? "<span class='pageNumber pageSelected'>$i</span>" : "<a class='ca_tooltip pageNumber' onclick='$pageFunction("$i");'>$i</a>";
|
||||||
|
|
||||||
if ( $endingPage != $totalPages) {
|
if ( $endingPage != $totalPages) {
|
||||||
if ( ($totalPages - $pageNumber ) > 6)
|
if ( ($totalPages - $pageNumber ) > 6)
|
||||||
$o .= "<span class='pageNumber pageDots'></span>";
|
$o .= "<span class='pageNumber pageDots'></span>";
|
||||||
|
|
||||||
if ( ($totalPages - $pageNumber ) >5 )
|
if ( ($totalPages - $pageNumber ) >5 )
|
||||||
$o .= "<a class='ca_tooltip pageNumber' onclick='changePage("$totalPages");'>$totalPages</a>";
|
$o .= "<a class='ca_tooltip pageNumber' onclick='$pageFunction("$totalPages");'>$totalPages</a>";
|
||||||
}
|
}
|
||||||
$nextPage = $pageNumber + 1;
|
$nextPage = $pageNumber + 1;
|
||||||
$o .= ( $pageNumber < $totalPages ) ? "<span class='ca_tooltip pageNumber pageRight' onclick='changePage("$nextPage");'></span>" : "<span class='pageRight pageNumber pageNavNoClick'></span>";
|
$o .= ( $pageNumber < $totalPages ) ? "<span class='ca_tooltip pageNumber pageRight' onclick='$pageFunction("$nextPage");'></span>" : "<span class='pageRight pageNumber pageNavNoClick'></span>";
|
||||||
$swipeScript .= ( $pageNumber < $totalPages ) ? "data.nextpage = $nextPage;" : "data.nextpage = 0;";
|
$swipeScript .= ( $pageNumber < $totalPages ) ? "data.nextpage = $nextPage;" : "data.nextpage = 0;";
|
||||||
$swipeScript .= "</script>";
|
$swipeScript .= "</script>";
|
||||||
$o .= "</div></div><script>data.currentpage = $pageNumber;</script>";
|
$o .= "</div></div><script>data.currentpage = $pageNumber;</script>";
|
||||||
|
@ -340,9 +344,13 @@ function getPopupDescriptionSkin($appNumber) {
|
||||||
|
|
||||||
if ( is_file("/var/run/dockerd.pid") && is_dir("/proc/".@file_get_contents("/var/run/dockerd.pid")) ) {
|
if ( is_file("/var/run/dockerd.pid") && is_dir("/proc/".@file_get_contents("/var/run/dockerd.pid")) ) {
|
||||||
$caSettings['dockerRunning'] = "true";
|
$caSettings['dockerRunning'] = "true";
|
||||||
$info = getAllInfo();
|
$infoTmp = getAllInfo();
|
||||||
|
foreach ($infoTmp as $container) {
|
||||||
|
$info[$container['Name']] = $container;
|
||||||
|
}
|
||||||
$dockerRunning = $DockerClient->getDockerContainers();
|
$dockerRunning = $DockerClient->getDockerContainers();
|
||||||
$dockerUpdateStatus = readJsonFile($caPaths['dockerUpdateStatus']);
|
$dockerUpdateStatus = readJsonFile($caPaths['dockerUpdateStatus']);
|
||||||
|
file_put_contents("/tmp/blah",print_r($dockerRunning,true));
|
||||||
} else {
|
} else {
|
||||||
unset($caSettings['dockerRunning']);
|
unset($caSettings['dockerRunning']);
|
||||||
$info = array();
|
$info = array();
|
||||||
|
@ -375,7 +383,7 @@ function getPopupDescriptionSkin($appNumber) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $index !== false ) {
|
if ( $index !== false ) {
|
||||||
/* $Displayed = true;
|
/* $Displayed = true;
|
||||||
*/ $template = $displayed['community'][$index];
|
*/ $template = $displayed['community'][$index];
|
||||||
|
@ -799,19 +807,19 @@ function displaySearchResults($pageNumber) {
|
||||||
$num_pages = $tempFile['num_pages'];
|
$num_pages = $tempFile['num_pages'];
|
||||||
$file = $tempFile['results'];
|
$file = $tempFile['results'];
|
||||||
$templates = readJsonFile($caPaths['community-templates-info']);
|
$templates = readJsonFile($caPaths['community-templates-info']);
|
||||||
|
$caSettings['descriptions'] = "yes";
|
||||||
|
|
||||||
$ct = dockerNavigate($num_pages,$pageNumber)."<br>";
|
$ct = tr("NOTE You must visit the dockerHub page to gather the information required to install correctly")."<br><br>";
|
||||||
$ct .= "<div class='ca_templatesDisplay'>";
|
$ct .= "<div class='ca_templatesDisplay'>";
|
||||||
|
|
||||||
$columnNumber = 0;
|
$columnNumber = 0;
|
||||||
foreach ($file as $result) {
|
foreach ($file as $result) {
|
||||||
$result['Icon'] = "/plugins/dynamix.docker.manager/images/question.png";
|
$result['Icon'] = "/plugins/dynamix.docker.manager/images/question.png";
|
||||||
$result['display_dockerName'] = "<a class='ca_tooltip ca_applicationName' style='cursor:pointer;' onclick='mySearch(this.innerText);' title='".tr("Search for similar containers")."'>{$result['Name']}</a>";
|
$result['display_dockerName'] = "<a class='ca_tooltip ca_applicationName' style='cursor:pointer;' onclick='mySearch(this.innerText);' title='".tr("Search for similar containers")."'>{$result['Name']}</a>";
|
||||||
$result['Category'] = "Docker Hub Search";
|
$result['Category'] = "Docker Hub Search";
|
||||||
$result['Description'] = $result['Description'] ?: "No description present";
|
$result['Description'] = $result['Description'] ?: "No description present";
|
||||||
$result['Compatible'] = true;
|
$result['Compatible'] = true;
|
||||||
$result['actionsContext'] = [["icon"=>"ca_fa-install","text"=>tr("Install"),"action"=>"dockerConvert($ID);"]];
|
$result['actionsContext'] = [["icon"=>"ca_fa-install","text"=>tr("Install"),"action"=>"dockerConvert({$result['ID']});"]];
|
||||||
|
|
||||||
|
|
||||||
$ct .= displayCard($result);
|
$ct .= displayCard($result);
|
||||||
$count++;
|
$count++;
|
||||||
|
@ -920,7 +928,7 @@ function displayCard($template) {
|
||||||
$card .= "
|
$card .= "
|
||||||
<div class='ca_holder $class'>
|
<div class='ca_holder $class'>
|
||||||
<div class='ca_bottomLine $bottomClass'>
|
<div class='ca_bottomLine $bottomClass'>
|
||||||
<div class='infoButton_docker dockerPopup' data-dockerHub='$DockerHub'>".tr("Info")."</div>";
|
<div class='infoButton_docker dockerPopup' data-dockerHub='$DockerHub'>".tr("Docker Hub")."</div>";
|
||||||
} else {
|
} else {
|
||||||
$backgroundClickable = "ca_backgroundClickable";
|
$backgroundClickable = "ca_backgroundClickable";
|
||||||
$card .= "
|
$card .= "
|
||||||
|
@ -983,7 +991,7 @@ function displayCard($template) {
|
||||||
$card .= "
|
$card .= "
|
||||||
<div class='ca_applicationName'>$Name
|
<div class='ca_applicationName'>$Name
|
||||||
";
|
";
|
||||||
if ( $CAComment || $ModeratorComment || $Deprecated || ! $Compatible || $Blacklist ) {
|
if ( $CAComment || $ModeratorComment || $Deprecated || (isset($Compatible) && ! $Compatible) || $Blacklist ) {
|
||||||
if ( $CAComment )
|
if ( $CAComment )
|
||||||
$warning = tr($CAComment);
|
$warning = tr($CAComment);
|
||||||
if ( $ModeratorComment )
|
if ( $ModeratorComment )
|
||||||
|
|
Loading…
Reference in New Issue