test run
parent
a13539b275
commit
921be0bdca
Binary file not shown.
|
@ -2,9 +2,9 @@
|
||||||
83b3f89cd42e8601c7c217d5b4889c81 ./CA_notices.page
|
83b3f89cd42e8601c7c217d5b4889c81 ./CA_notices.page
|
||||||
7ee0b23dbd92ed55f611360a983f9565 ./ca_settings.page
|
7ee0b23dbd92ed55f611360a983f9565 ./ca_settings.page
|
||||||
993c0dff1a44225d5070cada0d805f75 ./default.cfg
|
993c0dff1a44225d5070cada0d805f75 ./default.cfg
|
||||||
d75e14605fb5583cb2bf80598ae271a2 ./include/exec.php
|
f4179352b63801da18127b34a2c2c7e9 ./include/exec.php
|
||||||
3fddb80cc00d46ff551e9ff42c70ba73 ./include/helpers.php
|
3fddb80cc00d46ff551e9ff42c70ba73 ./include/helpers.php
|
||||||
4eaa5bd1f2e88781133c1571a81e6d0c ./include/paths.php
|
aeec70878e94eead3aef390110e786e8 ./include/paths.php
|
||||||
eb76c1b6ed3da5e5b393f22d2ec18430 ./javascript/libraries.js
|
eb76c1b6ed3da5e5b393f22d2ec18430 ./javascript/libraries.js
|
||||||
8c24d585c7dd3ff9ef961bb2c2705711 ./PluginAPI.page
|
8c24d585c7dd3ff9ef961bb2c2705711 ./PluginAPI.page
|
||||||
b398273cf7daa62ab00d2de2336ca25f ./README.md
|
b398273cf7daa62ab00d2de2336ca25f ./README.md
|
||||||
|
@ -20,6 +20,6 @@ b398273cf7daa62ab00d2de2336ca25f ./README.md
|
||||||
9eba209fba4bbf1a02e57ddafebfdf8c ./scripts/showStatistics.php
|
9eba209fba4bbf1a02e57ddafebfdf8c ./scripts/showStatistics.php
|
||||||
4425f8fd4ef662a7dc65cee01de3e419 ./scripts/updatePLG.sh
|
4425f8fd4ef662a7dc65cee01de3e419 ./scripts/updatePLG.sh
|
||||||
2bd671daecaf01549f8cc0202cb184b3 ./scripts/updatePluginSupport.php
|
2bd671daecaf01549f8cc0202cb184b3 ./scripts/updatePluginSupport.php
|
||||||
94b57ac471c8c4b396379bebb26be22c ./skins/Narrow/css.php
|
6b01e3a20e2c33f6ab6f13b2945e02af ./skins/Narrow/css.php
|
||||||
4ff34c148d3dde1a420303faecd414ae ./skins/Narrow/skin.html
|
4ff34c148d3dde1a420303faecd414ae ./skins/Narrow/skin.html
|
||||||
0bdad924ad10400a65a648016ccd703e ./skins/Narrow/skin.php
|
04e6f1da0298fb648d1a813d5bd47b9c ./skins/Narrow/skin.php
|
||||||
|
|
|
@ -41,11 +41,11 @@ $DockerTemplates = new DockerTemplates();
|
||||||
|
|
||||||
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;
|
||||||
$dockerRunning = $DockerClient->getDockerContainers();
|
// $dockerRunning = $DockerClient->getDockerContainers();
|
||||||
} else {
|
} else {
|
||||||
$caSettings['dockerSearch'] = "no";
|
$caSettings['dockerSearch'] = "no";
|
||||||
unset($caSettings['dockerRunning']);
|
unset($caSettings['dockerRunning']);
|
||||||
$dockerRunning = array();
|
// $dockerRunning = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
@mkdir($caPaths['tempFiles'],0777,true);
|
@mkdir($caPaths['tempFiles'],0777,true);
|
||||||
|
@ -404,8 +404,6 @@ function getConvertedTemplates() {
|
||||||
function appOfDay($file) {
|
function appOfDay($file) {
|
||||||
global $caPaths,$caSettings,$sortOrder;
|
global $caPaths,$caSettings,$sortOrder;
|
||||||
|
|
||||||
$info = getRunningContainers();
|
|
||||||
|
|
||||||
$max = $caSettings['descriptions'] == "yes" ? 7 : 10;
|
$max = $caSettings['descriptions'] == "yes" ? 7 : 10;
|
||||||
|
|
||||||
switch ($caSettings['startup']) {
|
switch ($caSettings['startup']) {
|
||||||
|
@ -424,17 +422,18 @@ function appOfDay($file) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( $flag )
|
if ( $flag )
|
||||||
unset($app);
|
unset($appOfDay);
|
||||||
}
|
}
|
||||||
if ( ! $appOfDay ) {
|
if ( ! $appOfDay ) {
|
||||||
shuffle($file);
|
shuffle($file);
|
||||||
foreach ($file as $template) {
|
foreach ($file as $template) {
|
||||||
if ( ! checkRandomApp($template,$info,true) ) continue;
|
if ( ! checkRandomApp($template) ) continue;
|
||||||
$appOfDay[] = $template['ID'];
|
$appOfDay[] = $template['ID'];
|
||||||
if (count($appOfDay) == $max) break;
|
if (count($appOfDay) == $max) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
writeJsonFile($caPaths['appOfTheDay'],$appOfDay);
|
writeJsonFile($caPaths['appOfTheDay'],$appOfDay);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "onlynew":
|
case "onlynew":
|
||||||
$sortOrder['sortBy'] = "FirstSeen";
|
$sortOrder['sortBy'] = "FirstSeen";
|
||||||
|
@ -510,7 +509,7 @@ function appOfDay($file) {
|
||||||
#####################################################
|
#####################################################
|
||||||
# Checks selected app for eligibility as app of day #
|
# Checks selected app for eligibility as app of day #
|
||||||
#####################################################
|
#####################################################
|
||||||
function checkRandomApp($test,$info=array(),$random=false) {
|
function checkRandomApp($test) {
|
||||||
global $caSettings;
|
global $caSettings;
|
||||||
|
|
||||||
if ( $test['Name'] == "Community Applications" ) return false;
|
if ( $test['Name'] == "Community Applications" ) return false;
|
||||||
|
@ -519,7 +518,7 @@ function checkRandomApp($test,$info=array(),$random=false) {
|
||||||
if ( ! $test['Compatible'] && $caSettings['hideIncompatible'] == "true" ) return false;
|
if ( ! $test['Compatible'] && $caSettings['hideIncompatible'] == "true" ) return false;
|
||||||
if ( $test['Blacklist'] ) return false;
|
if ( $test['Blacklist'] ) return false;
|
||||||
if ( $test['Deprecated'] && ( $caSettings['hideDeprecated'] == "true" ) ) return false;
|
if ( $test['Deprecated'] && ( $caSettings['hideDeprecated'] == "true" ) ) return false;
|
||||||
if ( $random ) return ! appInstalled($test,$info);
|
// if ( $random ) return ! appInstalled($test,$info);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -619,8 +618,6 @@ function get_content() {
|
||||||
}
|
}
|
||||||
$category = $category ? "/$category/i" : false;
|
$category = $category ? "/$category/i" : false;
|
||||||
|
|
||||||
$newAppTime = strtotime($caSettings['timeNew']);
|
|
||||||
|
|
||||||
getConvertedTemplates();
|
getConvertedTemplates();
|
||||||
|
|
||||||
if ( strpos($category,":") && $filter ) {
|
if ( strpos($category,":") && $filter ) {
|
||||||
|
@ -965,8 +962,8 @@ function previous_apps() {
|
||||||
|
|
||||||
$installed = getPost("installed","");
|
$installed = getPost("installed","");
|
||||||
$filter = getPost("filter","");
|
$filter = getPost("filter","");
|
||||||
$info = $caSettings['dockerRunning'] ? $DockerClient->getDockerContainers() : array();
|
// $info = $caSettings['dockerRunning'] ? $DockerClient->getDockerContainers() : array();
|
||||||
|
$info = $caSettings['dockerRunning'] ? readJsonFile($caPaths['info']) : array();
|
||||||
@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']);
|
||||||
|
@ -1191,7 +1188,7 @@ function updatePLGstatus() {
|
||||||
# Uninstalls a docker #
|
# Uninstalls a docker #
|
||||||
#######################
|
#######################
|
||||||
function uninstall_docker() {
|
function uninstall_docker() {
|
||||||
global $DockerClient, $dockerRunning;
|
global $DockerClient, $caPaths, $caSettings;
|
||||||
$application = getPost("application","");
|
$application = getPost("application","");
|
||||||
|
|
||||||
# get the name of the container / image
|
# get the name of the container / image
|
||||||
|
@ -1199,8 +1196,8 @@ function uninstall_docker() {
|
||||||
$doc->load($application);
|
$doc->load($application);
|
||||||
$containerName = stripslashes($doc->getElementsByTagName( "Name" )->item(0)->nodeValue);
|
$containerName = stripslashes($doc->getElementsByTagName( "Name" )->item(0)->nodeValue);
|
||||||
|
|
||||||
$dockerInfo = $DockerClient->getDockerContainers();
|
$dockerRunning = $DockerClient->getDockerContainers();
|
||||||
$container = searchArray($dockerInfo,"Name",$containerName);
|
$container = searchArray($dockerRunning,"Name",$containerName);
|
||||||
|
|
||||||
if ( $dockerRunning[$container]['Running'] )
|
if ( $dockerRunning[$container]['Running'] )
|
||||||
myStopContainer($dockerRunning[$container]['Id']);
|
myStopContainer($dockerRunning[$container]['Id']);
|
||||||
|
@ -1208,6 +1205,9 @@ function uninstall_docker() {
|
||||||
$DockerClient->removeContainer($containerName,$dockerRunning[$container]['Id']);
|
$DockerClient->removeContainer($containerName,$dockerRunning[$container]['Id']);
|
||||||
$DockerClient->removeImage($dockerRunning[$container]['ImageId']);
|
$DockerClient->removeImage($dockerRunning[$container]['ImageId']);
|
||||||
|
|
||||||
|
$info = $caSettings['dockerRunning'] ? $DockerClient->getDockerContainers() : array();
|
||||||
|
writeJsonFile($caPaths['info'],$info);
|
||||||
|
|
||||||
postReturn(['status'=>"Uninstalled"]);
|
postReturn(['status'=>"Uninstalled"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1570,7 +1570,7 @@ function caChangeLog() {
|
||||||
# Populates the category list #
|
# Populates the category list #
|
||||||
###############################
|
###############################
|
||||||
function get_categories() {
|
function get_categories() {
|
||||||
global $caPaths, $sortOrder;
|
global $caPaths, $sortOrder, $caSettings, $DockerClient;
|
||||||
$categories = readJsonFile($caPaths['categoryList']);
|
$categories = readJsonFile($caPaths['categoryList']);
|
||||||
if ( ! is_array($categories) || empty($categories) ) {
|
if ( ! is_array($categories) || empty($categories) ) {
|
||||||
$cat = "<span class='ca_fa-warning'></span> Category list N/A<br><br>";
|
$cat = "<span class='ca_fa-warning'></span> Category list N/A<br><br>";
|
||||||
|
@ -1613,6 +1613,8 @@ function get_categories() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$info = $caSettings['dockerRunning'] ? $DockerClient->getDockerContainers() : array();
|
||||||
|
writeJsonFile($caPaths['info'],$info);
|
||||||
postReturn(["categories"=>$cat]);
|
postReturn(["categories"=>$cat]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,4 +62,5 @@ $caPaths['logging'] = "{$caPaths['CA_logs']}/ca_log.
|
||||||
$caPaths['languageInstalled'] = "/usr/local/emhttp/languages/";
|
$caPaths['languageInstalled'] = "/usr/local/emhttp/languages/";
|
||||||
$caPaths['updateTime'] = "/tmp/$CA/checkForUpdatesTime"; # can't be in /tmp/community.applications/tempFiles because new feed downloads erases everything there
|
$caPaths['updateTime'] = "/tmp/$CA/checkForUpdatesTime"; # can't be in /tmp/community.applications/tempFiles because new feed downloads erases everything there
|
||||||
$caPaths['dockerWriteTest'] = "/var/lib/docker/communityApplicationsWriteTest";
|
$caPaths['dockerWriteTest'] = "/var/lib/docker/communityApplicationsWriteTest";
|
||||||
|
$caPaths['info'] = $caPaths['tempFiles']."/info.json";
|
||||||
?>
|
?>
|
|
@ -232,7 +232,7 @@ a.ca_repoPopup:hover {color:<?=$unRaid66color?>;}
|
||||||
.ca_stat {color:coral; font-size:1.5rem;line-height:1.7rem;}
|
.ca_stat {color:coral; font-size:1.5rem;line-height:1.7rem;}
|
||||||
.ca_table { padding:.5rem 2rem .5rem 0; font-size:1.5rem;}
|
.ca_table { padding:.5rem 2rem .5rem 0; font-size:1.5rem;}
|
||||||
.ca_template {color:#606E7F;border-radius:0px 0px 2rem 2rem;display:inline-block;text-align:left;overflow:auto;height:27rem;width:36rem;padding-left:.5rem;padding-right:.5rem; background-color:#DDDADF;}
|
.ca_template {color:#606E7F;border-radius:0px 0px 2rem 2rem;display:inline-block;text-align:left;overflow:auto;height:27rem;width:36rem;padding-left:.5rem;padding-right:.5rem; background-color:#DDDADF;}
|
||||||
.ca_templatesDisplay {display:flex;flex-wrap:wrap;margin-bottom:5rem;}
|
.ca_templatesDisplay {display:flex;flex-wrap:wrap;}
|
||||||
.ca_template_icon {color:#606E7F;width:37rem;float:left;display:inline-block;background-color: #C7C5CB;margin:0px 0px 0px 0px;height:15rem;padding-top:1rem;}
|
.ca_template_icon {color:#606E7F;width:37rem;float:left;display:inline-block;background-color: #C7C5CB;margin:0px 0px 0px 0px;height:15rem;padding-top:1rem;}
|
||||||
.ca_twitter::before {content:"\f099";font-family:fontAwesome;}
|
.ca_twitter::before {content:"\f099";font-family:fontAwesome;}
|
||||||
.ca_webpage::before {content:"\f0ac";font-family:fontAwesome;}
|
.ca_webpage::before {content:"\f0ac";font-family:fontAwesome;}
|
||||||
|
@ -408,7 +408,7 @@ ul.subCategory {list-style-type:none;margin-left:2rem;padding:0px;cursor:pointer
|
||||||
.sweet-alert table{margin-top:0px}
|
.sweet-alert table{margin-top:0px}
|
||||||
table tbody td {line-height:1.8rem;}
|
table tbody td {line-height:1.8rem;}
|
||||||
table {background-color:transparent;}
|
table {background-color:transparent;}
|
||||||
#templates_content {overflow-x:hidden;margin-bottom:5rem;}
|
#templates_content {overflow-x:hidden;margin-bottom:3rem;}
|
||||||
.trendingDown::before {content:"\f063";font-family:fontAwesome;}
|
.trendingDown::before {content:"\f063";font-family:fontAwesome;}
|
||||||
.trendingUp::before {content:"\f062";font-family:fontAwesome;}
|
.trendingUp::before {content:"\f062";font-family:fontAwesome;}
|
||||||
.unpinned {font-size:2rem;cursor:pointer;margin-left:1rem;padding-left:.5rem;padding-right:.5rem;cursor:pointer;padding:.3rem;}
|
.unpinned {font-size:2rem;cursor:pointer;margin-left:1rem;padding-left:.5rem;padding-right:.5rem;cursor:pointer;padding:.3rem;}
|
||||||
|
|
|
@ -34,7 +34,8 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
|
||||||
|
|
||||||
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 = $DockerTemplates->getAllInfo();
|
// $info = $DockerTemplates->getAllInfo();
|
||||||
|
$info = readJsonFile($caPaths['info']);
|
||||||
$dockerRunning = $DockerClient->getDockerContainers();
|
$dockerRunning = $DockerClient->getDockerContainers();
|
||||||
$dockerUpdateStatus = readJsonFile($caPaths['dockerUpdateStatus']);
|
$dockerUpdateStatus = readJsonFile($caPaths['dockerUpdateStatus']);
|
||||||
} else {
|
} else {
|
||||||
|
@ -132,7 +133,7 @@ function my_display_apps($file,$pageNumber=1,$selectedApps=false,$startup=false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$ct .= getPageNavigation($pageNumber,count($file),false,true)."<br><br><br>";
|
$ct .= getPageNavigation($pageNumber,count($file),false,true);
|
||||||
|
|
||||||
if ( ! $count )
|
if ( ! $count )
|
||||||
$displayHeader .= "<div class='ca_NoAppsFound'>".tr("No Matching Applications Found")."</div><script>hideSortIcons();</script>";
|
$displayHeader .= "<div class='ca_NoAppsFound'>".tr("No Matching Applications Found")."</div><script>hideSortIcons();</script>";
|
||||||
|
@ -264,9 +265,9 @@ function getPopupDescriptionSkin($appNumber) {
|
||||||
}
|
}
|
||||||
$currentServer = file_get_contents($caPaths['currentServer']);
|
$currentServer = file_get_contents($caPaths['currentServer']);
|
||||||
|
|
||||||
if ( $currentServer == "Primary Server" && $template['IconHTTPS'])
|
/* if ( $currentServer == "Primary Server" && $template['IconHTTPS'])
|
||||||
$template['Icon'] = $template['IconHTTPS'];
|
$template['Icon'] = $template['IconHTTPS'];
|
||||||
|
*/
|
||||||
$ID = $template['ID'];
|
$ID = $template['ID'];
|
||||||
|
|
||||||
$template['Profile'] = $allRepositories[$template['RepoName']]['profile'];
|
$template['Profile'] = $allRepositories[$template['RepoName']]['profile'];
|
||||||
|
|
Loading…
Reference in New Issue