mirror of
https://github.com/Squidly271/community.applications.git
synced 2025-06-03 14:52:13 +08:00
tabs to spaces
This commit is contained in:
parent
69f0d82a04
commit
52b04ad1f7
BIN
archive/community.applications-2023.09.23-x86_64-1.txz
Normal file
BIN
archive/community.applications-2023.09.23-x86_64-1.txz
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -20,52 +20,52 @@ $caCFG = parse_plugin_cfg("community.applications");
|
||||
<script>
|
||||
var CA_BANNER_NOTICES = [];
|
||||
$(function() {
|
||||
$.post("/plugins/community.applications/scripts/notices.php",{action:"scan"},function(data) {
|
||||
console.groupCollapsed("Result: CA Background Scan");
|
||||
console.log(data);
|
||||
console.groupEnd();
|
||||
CA_BANNER_NOTICES = JSON.parse(data);
|
||||
$.each(CA_BANNER_NOTICES,function(i,el) {
|
||||
<? if ( $unRaid68 ): ?>
|
||||
var dismiss = "<a class='bannerDismiss' onclick='ca_DismissNotice("+i+");'></a>";
|
||||
<? else: ?>
|
||||
var dismiss = "<span class='ca_PluginUpdateDismiss'><i class='fa fa-close' onclick='ca_DismissNotice("+i+");'></i></span>";
|
||||
<? endif; ?>
|
||||
CA_BANNER_NOTICES[i]['warning_index'] = addBannerWarning(el.Banner+" <a onclick='ca_Notices("+i+");' style='cursor:pointer;'>More Info</a>"+dismiss,true,true);
|
||||
});
|
||||
});
|
||||
$.post("/plugins/community.applications/scripts/notices.php",{action:"scan"},function(data) {
|
||||
console.groupCollapsed("Result: CA Background Scan");
|
||||
console.log(data);
|
||||
console.groupEnd();
|
||||
CA_BANNER_NOTICES = JSON.parse(data);
|
||||
$.each(CA_BANNER_NOTICES,function(i,el) {
|
||||
<? if ( $unRaid68 ): ?>
|
||||
var dismiss = "<a class='bannerDismiss' onclick='ca_DismissNotice("+i+");'></a>";
|
||||
<? else: ?>
|
||||
var dismiss = "<span class='ca_PluginUpdateDismiss'><i class='fa fa-close' onclick='ca_DismissNotice("+i+");'></i></span>";
|
||||
<? endif; ?>
|
||||
CA_BANNER_NOTICES[i]['warning_index'] = addBannerWarning(el.Banner+" <a onclick='ca_Notices("+i+");' style='cursor:pointer;'>More Info</a>"+dismiss,true,true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function ca_Notices(index) {
|
||||
var title = CA_BANNER_NOTICES[index]['App'];
|
||||
if ( CA_BANNER_NOTICES[index]['Name'] ) {
|
||||
title = CA_BANNER_NOTICES[index]['Name'];
|
||||
}
|
||||
swal({
|
||||
title: title,
|
||||
text: CA_BANNER_NOTICES[index]['PopUp'],
|
||||
type: "error",
|
||||
showCancelButton: false,
|
||||
showConfirmButton: true,
|
||||
html: true
|
||||
});
|
||||
var title = CA_BANNER_NOTICES[index]['App'];
|
||||
if ( CA_BANNER_NOTICES[index]['Name'] ) {
|
||||
title = CA_BANNER_NOTICES[index]['Name'];
|
||||
}
|
||||
swal({
|
||||
title: title,
|
||||
text: CA_BANNER_NOTICES[index]['PopUp'],
|
||||
type: "error",
|
||||
showCancelButton: false,
|
||||
showConfirmButton: true,
|
||||
html: true
|
||||
});
|
||||
}
|
||||
|
||||
function ca_DismissNotice(index) {
|
||||
swal({
|
||||
title: "Are you sure?",
|
||||
text: "Are you sure you want to dismiss this warning?<br> ("+CA_BANNER_NOTICES[index]['Banner']+")",
|
||||
html: true,
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
showConfirmButton: true,
|
||||
confirmButtonText: "Yes"
|
||||
},function(isConfirm) {
|
||||
if ( isConfirm ) {
|
||||
removeBannerWarning(CA_BANNER_NOTICES[index]['warning_index']);
|
||||
$.post("/plugins/community.applications/scripts/notices.php",{action:"dismiss",ID:CA_BANNER_NOTICES[index]['ID']});
|
||||
}
|
||||
});
|
||||
swal({
|
||||
title: "Are you sure?",
|
||||
text: "Are you sure you want to dismiss this warning?<br> ("+CA_BANNER_NOTICES[index]['Banner']+")",
|
||||
html: true,
|
||||
type: 'warning',
|
||||
showCancelButton: true,
|
||||
showConfirmButton: true,
|
||||
confirmButtonText: "Yes"
|
||||
},function(isConfirm) {
|
||||
if ( isConfirm ) {
|
||||
removeBannerWarning(CA_BANNER_NOTICES[index]['warning_index']);
|
||||
$.post("/plugins/community.applications/scripts/notices.php",{action:"dismiss",ID:CA_BANNER_NOTICES[index]['ID']});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<?endif;?>
|
@ -1,25 +1,25 @@
|
||||
3580e1add40be466f0d5b1df14508e6c ./Apps.page
|
||||
106b521c1feebda4d7b3f558cc016cda ./CA_notices.page
|
||||
4a79f2efa7a8c2f9e41d1050edded513 ./ca_settings.page
|
||||
dbcd3253215c5714e7fb165f02bc782c ./Apps.page
|
||||
385834d91dc8758bfcd5d34f1c3e530e ./CA_notices.page
|
||||
2c2a1b7d148fe51ee38813d1a0e71589 ./ca_settings.page
|
||||
01ed7990078dee7cecfeda9a4e49377e ./default.cfg
|
||||
638f22a3dfc75940b2caa27c3e612e28 ./include/exec.php
|
||||
6315b71595f089a310861ef2e1954d84 ./include/helpers.php
|
||||
3f6ae4c4fef3077dd2ca45117f780846 ./include/paths.php
|
||||
2fbccf0c27923cf5089e496993deecfc ./include/exec.php
|
||||
4bb86b8d71180b347444e9cb88f5d3d3 ./include/helpers.php
|
||||
343e1d26129551fc142b09b5d6e10503 ./include/paths.php
|
||||
7234caf6800479df03abb222aaedaca5 ./javascript/libraries.js
|
||||
71f911a818d88d3d567f8a2898094ee2 ./README.md
|
||||
ec075d8b9758ba00bda9b02c4692f972 ./scripts/checkForUpdates.php
|
||||
75b7153ce7582b7234c466c5f73c8528 ./scripts/checkForUpdates.php
|
||||
99a9d58a49a7f6812f18bd4be2b563b9 ./scripts/checkForUpdates.sh
|
||||
d4a279514f1adc0e4e2bbfbab5a82a61 ./scripts/dockerConvert.php
|
||||
6ee3b2cdf12209893af916ab0b42152a ./scripts/installMulti.php
|
||||
e549862bcbeed9843b6bdcdb83e1bf3f ./scripts/installMultiPlugin.php
|
||||
529bd09b91b233715167f6c283103ef7 ./scripts/dockerConvert.php
|
||||
4a0281e185e5d9bc69e8e1ce92443724 ./scripts/installMulti.php
|
||||
d60714f36cea666eb0fcb752820dabaf ./scripts/installMultiPlugin.php
|
||||
524afab04ca930f59117a846f819fb2f ./scripts/installPluginUpdate.sh
|
||||
53879be89ce610c57922c1f25ba2b1d2 ./scripts/installUpdate.php
|
||||
112064897f06b818e595a63e30a37f11 ./scripts/installUpdate.php
|
||||
5846421e95b475e1156c3f68164ccc4f ./scripts/languageInstall.sh
|
||||
cf717f6cb60ff17a7c924c330ed16343 ./scripts/notices.php
|
||||
ed42a35b3524b55e2024cdd56a795733 ./scripts/pluginInstall.php
|
||||
f2a86fd875cb73bb095388e69ca035fd ./scripts/showStatistics.php
|
||||
a1cb6e1930f2ad689ce9e7fc2e39c846 ./scripts/notices.php
|
||||
4c67ce0b8366c15356d21768ea515d56 ./scripts/pluginInstall.php
|
||||
47456eef0760a57a792177ea065358c3 ./scripts/showStatistics.php
|
||||
4425f8fd4ef662a7dc65cee01de3e419 ./scripts/updatePLG.sh
|
||||
5c088a7cf82229cb64edfd4c415a84a0 ./scripts/updatePluginSupport.php
|
||||
62498637efe9636e86f805ff75ab327b ./skins/Narrow/css.php
|
||||
d642a25efb891e51471fc4c7636da885 ./skins/Narrow/skin.html
|
||||
07c9450dea50baca4b0f9f52526018b1 ./skins/Narrow/skin.php
|
||||
52355989c2bec01cfd55fe619588a033 ./scripts/updatePluginSupport.php
|
||||
5a0516d49f7c195b67e4d61913b12bd5 ./skins/Narrow/css.php
|
||||
53cc49a55e85e0ec20dcd94b965821ed ./skins/Narrow/skin.html
|
||||
c93b47ea6190783d3d8747721f21439a ./skins/Narrow/skin.php
|
||||
|
@ -20,29 +20,29 @@ require_once "$docroot/plugins/$plugin/include/helpers.php";
|
||||
$cfg = parse_plugin_cfg($plugin);
|
||||
|
||||
function tr($string,$ret=false) {
|
||||
if ( function_exists("_") )
|
||||
$string = str_replace('"',""",str_replace("'","'",_($string)));
|
||||
if ( $ret )
|
||||
return $string;
|
||||
else
|
||||
echo $string;
|
||||
if ( function_exists("_") )
|
||||
$string = str_replace('"',""",str_replace("'","'",_($string)));
|
||||
if ( $ret )
|
||||
return $string;
|
||||
else
|
||||
echo $string;
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
$(function() {
|
||||
<?if ( is_file($caPaths['logging']) ):?>
|
||||
$("#debugging").show();
|
||||
<?endif;?>
|
||||
<?if ( is_file($caPaths['logging']) ):?>
|
||||
$("#debugging").show();
|
||||
<?endif;?>
|
||||
});
|
||||
|
||||
function debug() {
|
||||
var tzoffset = (new Date()).getTimezoneOffset() * 60000; //offset in milliseconds
|
||||
var localISOTime = (new Date(Date.now() - tzoffset)).toISOString().slice(0, -1);
|
||||
var filename='CA-Logging-'+localISOTime.substr(0,16).replace(/[-:]/g,'').replace('T','-')+'.zip';
|
||||
var tzoffset = (new Date()).getTimezoneOffset() * 60000; //offset in milliseconds
|
||||
var localISOTime = (new Date(Date.now() - tzoffset)).toISOString().slice(0, -1);
|
||||
var filename='CA-Logging-'+localISOTime.substr(0,16).replace(/[-:]/g,'').replace('T','-')+'.zip';
|
||||
|
||||
$.post('/webGui/include/Download.php',{cmd:'save',file:filename,source:"<?=$caPaths['logging']?>"},function(zip) {
|
||||
location = zip;
|
||||
});
|
||||
$.post('/webGui/include/Download.php',{cmd:'save',file:filename,source:"<?=$caPaths['logging']?>"},function(zip) {
|
||||
location = zip;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -51,58 +51,58 @@ function debug() {
|
||||
|
||||
_(Hide Deprecated Applications)_:
|
||||
: <select name='hideDeprecated' size='1'>
|
||||
<?=mk_option($cfg['hideDeprecated'], "true", tr("Yes",true))?>
|
||||
<?=mk_option($cfg['hideDeprecated'], "false", tr("No",true))?>
|
||||
</select>
|
||||
<?=mk_option($cfg['hideDeprecated'], "true", tr("Yes",true))?>
|
||||
<?=mk_option($cfg['hideDeprecated'], "false", tr("No",true))?>
|
||||
</select>
|
||||
|
||||
> <?tr("This setting hides deprecated applications from the list of available apps. Deprecated apps will still however display within the installed and previous apps sections.");?>
|
||||
|
||||
_(Hide Incompatible Applications)_:
|
||||
: <select name='hideIncompatible' size='1'>
|
||||
<?=mk_option($cfg['hideIncompatible'], "true", tr("Yes",true))?>
|
||||
<?=mk_option($cfg['hideIncompatible'], "false", tr("No",true))?>
|
||||
</select>
|
||||
<?=mk_option($cfg['hideIncompatible'], "true", tr("Yes",true))?>
|
||||
<?=mk_option($cfg['hideIncompatible'], "false", tr("No",true))?>
|
||||
</select>
|
||||
|
||||
> <?tr("This setting will hide applications that are listed as being incompatible with your version of Unraid");?>
|
||||
|
||||
_(Allow install of second instance)_:
|
||||
: <select name='defaultReinstall' size='1'>
|
||||
<?=mk_option($cfg['defaultReinstall'],'false',tr("No",true))?>
|
||||
<?=mk_option($cfg['defaultReinstall'],'true',tr("Yes",true))?>
|
||||
</select>
|
||||
<?=mk_option($cfg['defaultReinstall'],'false',tr("No",true))?>
|
||||
<?=mk_option($cfg['defaultReinstall'],'true',tr("Yes",true))?>
|
||||
</select>
|
||||
|
||||
> <?tr("This option enables another button on the cards and popups which will allow you to reinstall an installed application using it's default template values. This option can be confusing at times, and is only generally used if you wish to install and have an application running twice simultaneously");?>
|
||||
|
||||
_(Automatically open the sidebar)_:
|
||||
: <select name='sidebarOpen' size='1'>
|
||||
<?=mk_option($cfg['sidebarOpen'],'yes',tr("Yes",true))?>
|
||||
<?=mk_option($cfg['sidebarOpen'],'no',tr("No",true))?>
|
||||
</select>
|
||||
<?=mk_option($cfg['sidebarOpen'],'yes',tr("Yes",true))?>
|
||||
<?=mk_option($cfg['sidebarOpen'],'no',tr("No",true))?>
|
||||
</select>
|
||||
|
||||
> <?tr("Allows CA to automatically open the sidebar for more information when hovering over an application's icon");?>
|
||||
|
||||
_(Allow CA to check for updates to applications)_:
|
||||
: <select name="updateCheck" size="1">
|
||||
<?=mk_option($cfg['updateCheck'],"yes",tr("Yes",true))?>
|
||||
<?=mk_option($cfg['updateCheck'],"no",tr("No",true))?>
|
||||
</select>
|
||||
|
||||
<?=mk_option($cfg['updateCheck'],"yes",tr("Yes",true))?>
|
||||
<?=mk_option($cfg['updateCheck'],"no",tr("No",true))?>
|
||||
</select>
|
||||
|
||||
> <?tr("This setting enables CA to check for updates to applications");?>
|
||||
|
||||
_(Disable Mouse Wheel Page Changes)_:
|
||||
: <select name="wheelPage" size="1">
|
||||
<?=mk_option($cfg['wheelPage'],"no",tr("No",true))?>
|
||||
<?=mk_option($cfg['wheelPage'],"yes",tr("Yes",true))?>
|
||||
</select>
|
||||
|
||||
<?=mk_option($cfg['wheelPage'],"no",tr("No",true))?>
|
||||
<?=mk_option($cfg['wheelPage'],"yes",tr("Yes",true))?>
|
||||
</select>
|
||||
|
||||
> <?tr("This setting disables using left or right on a mouse wheel to change the page");?>
|
||||
|
||||
|
||||
_(Allow CA to send any emergency notifications)_:
|
||||
: <select name='notifications' size='1'>
|
||||
<?=mk_option($cfg['notifications'],"yes",tr("Yes",true))?>
|
||||
<?=mk_option($cfg['notifications'],"no",tr("No",true))?>
|
||||
</select>
|
||||
<?=mk_option($cfg['notifications'],"yes",tr("Yes",true))?>
|
||||
<?=mk_option($cfg['notifications'],"no",tr("No",true))?>
|
||||
</select>
|
||||
|
||||
> <?tr("This setting allows CA to periodically scan your system and alert you to the presence of:");?><br>
|
||||
> <?tr("1. Known malware and security vulnerabilities within applications");?><br>
|
||||
@ -111,18 +111,18 @@ _(Allow CA to send any emergency notifications)_:
|
||||
|
||||
_(Save CA debugging information)_:
|
||||
: <select name='debugging' size='1'>
|
||||
<?=mk_option($cfg['debugging'],"yes",tr("Yes",true))?>
|
||||
<?=mk_option($cfg['debugging'],"no",tr("No",true))?>
|
||||
</select>
|
||||
|
||||
<?=mk_option($cfg['debugging'],"yes",tr("Yes",true))?>
|
||||
<?=mk_option($cfg['debugging'],"no",tr("No",true))?>
|
||||
</select>
|
||||
|
||||
> <?tr("Only enable this when advised to from the author of Community Applications")?>
|
||||
|
||||
_(Enable developer mode)_:
|
||||
: <select name='dev' size='1'>
|
||||
<?=mk_option($cfg['dev'],"no",tr("No",true))?>
|
||||
<?=mk_option($cfg['dev'],"yes",tr("Yes",true))?>
|
||||
</select>
|
||||
|
||||
<?=mk_option($cfg['dev'],"no",tr("No",true))?>
|
||||
<?=mk_option($cfg['dev'],"yes",tr("Yes",true))?>
|
||||
</select>
|
||||
|
||||
> <?tr("This unlocks some extra features within CA generally only used by developers. Not recommended to enable")?>
|
||||
|
||||
<input id='debugging' type='button' onclick='debug();' value='DOWNLOAD LOG' style='display:none;'></input>
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -12,18 +12,18 @@ require_once "$docroot/plugins/dynamix/include/Wrappers.php";
|
||||
$CA = "community.applications";
|
||||
|
||||
if ( ! isset($dockerManPaths) ) {
|
||||
$dockerManPaths = [
|
||||
'autostart-file' => "/var/lib/docker/unraid-autostart",
|
||||
'update-status' => "/var/lib/docker/unraid-update-status.json",
|
||||
'template-repos' => "/boot/config/plugins/dockerMan/template-repos",
|
||||
'templates-user' => "/boot/config/plugins/dockerMan/templates-user",
|
||||
'templates-usb' => "/boot/config/plugins/dockerMan/templates",
|
||||
'images' => "/var/lib/docker/unraid/images",
|
||||
'user-prefs' => "/boot/config/plugins/dockerMan/userprefs.cfg",
|
||||
'plugin' => "$docroot/plugins/dynamix.docker.manager",
|
||||
'images-ram' => "$docroot/state/plugins/dynamix.docker.manager/images",
|
||||
'webui-info' => "$docroot/state/plugins/dynamix.docker.manager/docker.json"
|
||||
];
|
||||
$dockerManPaths = [
|
||||
'autostart-file' => "/var/lib/docker/unraid-autostart",
|
||||
'update-status' => "/var/lib/docker/unraid-update-status.json",
|
||||
'template-repos' => "/boot/config/plugins/dockerMan/template-repos",
|
||||
'templates-user' => "/boot/config/plugins/dockerMan/templates-user",
|
||||
'templates-usb' => "/boot/config/plugins/dockerMan/templates",
|
||||
'images' => "/var/lib/docker/unraid/images",
|
||||
'user-prefs' => "/boot/config/plugins/dockerMan/userprefs.cfg",
|
||||
'plugin' => "$docroot/plugins/dynamix.docker.manager",
|
||||
'images-ram' => "$docroot/state/plugins/dynamix.docker.manager/images",
|
||||
'webui-info' => "$docroot/state/plugins/dynamix.docker.manager/docker.json"
|
||||
];
|
||||
}
|
||||
|
||||
$caPaths['tempFiles'] = "/tmp/$CA/tempFiles"; /* path to temporary files */
|
||||
|
@ -14,8 +14,8 @@ require_once "$docroot/plugins/community.applications/include/paths.php";
|
||||
require_once "$docroot/plugins/community.applications/include/helpers.php";
|
||||
|
||||
if ( is_file($caPaths['updateRunning']) && file_exists("/proc/".@file_get_contents($caPaths['updateRunning'])) ) {
|
||||
echo tr("Check for updates already running")."\n";
|
||||
exit();
|
||||
echo tr("Check for updates already running")."\n";
|
||||
exit();
|
||||
}
|
||||
|
||||
file_put_contents($caPaths['updateRunning'],getmypid());
|
||||
@ -25,16 +25,16 @@ echo tr("Checking for docker container updates")."\n";
|
||||
exec("$docroot/plugins/dynamix.docker.manager/scripts/dockerupdate check nonotify > /dev/null 2>&1");
|
||||
echo tr("Checking for plugin updates")."\n";
|
||||
foreach (glob("/var/log/plugins/*.plg") as $plg) {
|
||||
if ( $plg == "/var/log/plugins/community.applications.plg" || $plg == "/var/log/plugins/unRAIDServer.plg" || $plg == "/var/log/plugins/gui.search.plg" || $plg == "/var/log/plugins/page.notes.plg")
|
||||
continue; // avoid possible race condition since CA / gui.search automatically check for updates for themselves when on Apps tab
|
||||
echo sprintf(tr("Checking %s"),$plg)."\n";
|
||||
exec("$docroot/plugins/dynamix.plugin.manager/scripts/plugin check ".escapeshellarg(basename($plg))." > /dev/null 2>&1");
|
||||
if ( $plg == "/var/log/plugins/community.applications.plg" || $plg == "/var/log/plugins/unRAIDServer.plg" || $plg == "/var/log/plugins/gui.search.plg" || $plg == "/var/log/plugins/page.notes.plg")
|
||||
continue; // avoid possible race condition since CA / gui.search automatically check for updates for themselves when on Apps tab
|
||||
echo sprintf(tr("Checking %s"),$plg)."\n";
|
||||
exec("$docroot/plugins/dynamix.plugin.manager/scripts/plugin check ".escapeshellarg(basename($plg))." > /dev/null 2>&1");
|
||||
}
|
||||
echo tr("Checking for language updates")."\n";
|
||||
foreach (glob("/var/log/plugins/lang-*.xml") as $lang) {
|
||||
$lingo = str_replace(["lang-",".xml"],["",""],$lang);
|
||||
echo sprintf(tr("Checking %s"),basename($lingo))."\n";
|
||||
exec("$docroot/plugins/dynamix.plugin.manager/scripts/language check ".basename($lingo));
|
||||
$lingo = str_replace(["lang-",".xml"],["",""],$lang);
|
||||
echo sprintf(tr("Checking %s"),basename($lingo))."\n";
|
||||
exec("$docroot/plugins/dynamix.plugin.manager/scripts/language check ".basename($lingo));
|
||||
}
|
||||
@unlink($caPaths['updateRunning']);
|
||||
?>
|
@ -28,141 +28,141 @@ $javascript = file_get_contents("/usr/local/emhttp/plugins/dynamix/javascript/dy
|
||||
echo "<script>$javascript</script>";
|
||||
|
||||
if ( $_GET['ID'] !== false) {
|
||||
$dockerID = $_GET['ID'];
|
||||
$file = readJsonFile($caPaths['dockerSearchResults']);
|
||||
$dockerIndex = searchArray($file['results'],"ID",$dockerID);
|
||||
$docker = $file['results'][$dockerIndex];
|
||||
$docker['Description'] = str_replace("&", "&", $docker['Description']);
|
||||
$dockerID = $_GET['ID'];
|
||||
$file = readJsonFile($caPaths['dockerSearchResults']);
|
||||
$dockerIndex = searchArray($file['results'],"ID",$dockerID);
|
||||
$docker = $file['results'][$dockerIndex];
|
||||
$docker['Description'] = str_replace("&", "&", $docker['Description']);
|
||||
|
||||
$dockerfile['Name'] = "CA_TEST_CONTAINER_DOCKERHUB";
|
||||
$dockerfile['Support'] = $docker['DockerHub'];
|
||||
$dockerfile['Description'] = $docker['Description']."\n\nConverted By Community Applications Always verify this template (and values) against the support page for the container\n\n{$docker['DockerHub']}";
|
||||
$dockerfile['Overview'] = $dockerfile['Description'];
|
||||
$dockerfile['Registry'] = $docker['DockerHub'];
|
||||
$dockerfile['Repository'] = $docker['Repository'];
|
||||
$dockerfile['BindTime'] = "true";
|
||||
$dockerfile['Privileged'] = "false";
|
||||
$dockerfile['Networking']['Mode'] = "bridge";
|
||||
$dockerXML = makeXML($dockerfile);
|
||||
file_put_contents("/boot/config/plugins/dockerMan/templates-user/my-CA_TEST_CONTAINER_DOCKERHUB.xml",$dockerXML);
|
||||
|
||||
|
||||
echo "<div id='output'>";
|
||||
$dockers = ["CA_TEST_CONTAINER_DOCKERHUB"];
|
||||
echo sprintf(tr("Installing test container"),str_replace(",",", ",$_GET['docker'] ?? ""))."<br>";
|
||||
$_GET['updateContainer'] = true;
|
||||
$_GET['ct'] = $dockers;
|
||||
$_GET['communityApplications'] = true;
|
||||
$_GET['mute'] = false;
|
||||
@include($exeFile); # under new GUI, this line returns a duplicated session_start() error.
|
||||
echo "</div>";
|
||||
$dockerfile['Name'] = "CA_TEST_CONTAINER_DOCKERHUB";
|
||||
$dockerfile['Support'] = $docker['DockerHub'];
|
||||
$dockerfile['Description'] = $docker['Description']."\n\nConverted By Community Applications Always verify this template (and values) against the support page for the container\n\n{$docker['DockerHub']}";
|
||||
$dockerfile['Overview'] = $dockerfile['Description'];
|
||||
$dockerfile['Registry'] = $docker['DockerHub'];
|
||||
$dockerfile['Repository'] = $docker['Repository'];
|
||||
$dockerfile['BindTime'] = "true";
|
||||
$dockerfile['Privileged'] = "false";
|
||||
$dockerfile['Networking']['Mode'] = "bridge";
|
||||
$dockerXML = makeXML($dockerfile);
|
||||
file_put_contents("/boot/config/plugins/dockerMan/templates-user/my-CA_TEST_CONTAINER_DOCKERHUB.xml",$dockerXML);
|
||||
|
||||
|
||||
echo "<div id='output'>";
|
||||
$dockers = ["CA_TEST_CONTAINER_DOCKERHUB"];
|
||||
echo sprintf(tr("Installing test container"),str_replace(",",", ",$_GET['docker'] ?? ""))."<br>";
|
||||
$_GET['updateContainer'] = true;
|
||||
$_GET['ct'] = $dockers;
|
||||
$_GET['communityApplications'] = true;
|
||||
$_GET['mute'] = false;
|
||||
@include($exeFile); # under new GUI, this line returns a duplicated session_start() error.
|
||||
echo "</div>";
|
||||
?>
|
||||
|
||||
<script>
|
||||
$("button").hide();
|
||||
var cursor = "";
|
||||
function addLog(logLine) {
|
||||
var scrollTop = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode).scrollTop;
|
||||
var clientHeight = (document.documentElement || document.body.parentNode).clientHeight;
|
||||
var scrollHeight = (document.documentElement || document.body.parentNode).scrollHeight;
|
||||
var isScrolledToBottom = scrollHeight - clientHeight <= scrollTop + 1;
|
||||
if (logLine.slice(-1) == "\n") {
|
||||
document.body.innerHTML = document.body.innerHTML.slice(0,cursor) + logLine.slice(0,-1) + "<br>";
|
||||
lastLine = document.body.innerHTML.length;
|
||||
cursor = lastLine;
|
||||
}
|
||||
else if (logLine.slice(-1) == "\r") {
|
||||
document.body.innerHTML = document.body.innerHTML.slice(0,cursor) + logLine.slice(0,-1);
|
||||
cursor = lastLine;
|
||||
}
|
||||
else if (logLine.slice(-1) == "\b") {
|
||||
if (logLine.length > 1)
|
||||
document.body.innerHTML = document.body.innerHTML.slice(0,cursor) + logLine.slice(0,-1);
|
||||
cursor += logLine.length-2;
|
||||
}
|
||||
else {
|
||||
document.body.innerHTML += logLine;
|
||||
cursor += logLine.length;
|
||||
}
|
||||
if (isScrolledToBottom) {
|
||||
window.scrollTo(0,document.body.scrollHeight);
|
||||
}
|
||||
var scrollTop = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode).scrollTop;
|
||||
var clientHeight = (document.documentElement || document.body.parentNode).clientHeight;
|
||||
var scrollHeight = (document.documentElement || document.body.parentNode).scrollHeight;
|
||||
var isScrolledToBottom = scrollHeight - clientHeight <= scrollTop + 1;
|
||||
if (logLine.slice(-1) == "\n") {
|
||||
document.body.innerHTML = document.body.innerHTML.slice(0,cursor) + logLine.slice(0,-1) + "<br>";
|
||||
lastLine = document.body.innerHTML.length;
|
||||
cursor = lastLine;
|
||||
}
|
||||
else if (logLine.slice(-1) == "\r") {
|
||||
document.body.innerHTML = document.body.innerHTML.slice(0,cursor) + logLine.slice(0,-1);
|
||||
cursor = lastLine;
|
||||
}
|
||||
else if (logLine.slice(-1) == "\b") {
|
||||
if (logLine.length > 1)
|
||||
document.body.innerHTML = document.body.innerHTML.slice(0,cursor) + logLine.slice(0,-1);
|
||||
cursor += logLine.length-2;
|
||||
}
|
||||
else {
|
||||
document.body.innerHTML += logLine;
|
||||
cursor += logLine.length;
|
||||
}
|
||||
if (isScrolledToBottom) {
|
||||
window.scrollTo(0,document.body.scrollHeight);
|
||||
}
|
||||
}
|
||||
function addCloseButton() {
|
||||
addLog("<p class='centered'><button class='logLine' type='button' onclick='" + (parent.Shadowbox ? "parent.Shadowbox" : "window") + ".close()'><?=tr("Done")?></button></p>");
|
||||
addLog("<p class='centered'><button class='logLine' type='button' onclick='" + (parent.Shadowbox ? "parent.Shadowbox" : "window") + ".close()'><?=tr("Done")?></button></p>");
|
||||
}
|
||||
</script>
|
||||
<?
|
||||
$output = shell_exec("docker inspect CA_TEST_CONTAINER_DOCKERHUB");
|
||||
echo "<br>".tr("Removing test installation")."<br>";
|
||||
exec("docker rm CA_TEST_CONTAINER_DOCKERHUB");
|
||||
|
||||
exec("docker rmi {$docker['Repository']}");
|
||||
@unlink("/boot/config/plugins/dockerMan/templates-user/my-CA_TEST_CONTAINER_DOCKERHUB.xml");
|
||||
|
||||
$json = json_decode($output,true);
|
||||
if ( $json ) {
|
||||
$paths = isset($json[0]['Mounts']) ? $json[0]['Mounts'] : [];
|
||||
$ports = isset($json[0]['Config']['ExposedPorts']) ? $json[0]['Config']['ExposedPorts'] : [];
|
||||
$vars = isset($json[0]['Config']['Env']) ? $json[0]['Config']['Env'] : [];
|
||||
|
||||
$count = 1;
|
||||
$Config = [];
|
||||
foreach ($paths as $path) {
|
||||
$p = ["Name"=>"Container Path $count",'Type'=>"Path","Target"=>$path['Destination'],"Default"=>"","Mode"=>"rw","Display"=>"always","Required"=>"false","Mask"=>"false"];
|
||||
if ( $unRaid69 ) $p['Description'] = "Container Path: {$path['Destination']}";
|
||||
$Config[]['@attributes'] = $p;
|
||||
$count++;
|
||||
}
|
||||
$count = 1;
|
||||
foreach ($ports as $port => $name) {
|
||||
$pp = explode("/",$port);
|
||||
$p = ["Name"=>"Container Port $count",'Type'=>"Port","Target"=>$pp[0],"Default"=>$pp[0],"Mode"=>$pp[1],"Display"=>"always","Required"=>"false","Mask"=>"false","Description"=>""];
|
||||
if ( $unRaid69 ) $p['Description'] = "Container Port: {$pp[0]}";
|
||||
$Config[]['@attributes'] = $p;
|
||||
$count++;
|
||||
}
|
||||
$textvars = "";
|
||||
foreach ($vars as $var) {
|
||||
$textvars .= "$var\n";
|
||||
}
|
||||
$testvars = @parse_ini_string($textvars) ?: [];
|
||||
$defaultvars = ["HOST_HOSTNAME","HOST_OS","HOST_CONTAINERNAME","TZ","PATH"];
|
||||
$count = 1;
|
||||
foreach ($testvars as $var => $varcont) {
|
||||
if ( in_array($var,$defaultvars) )
|
||||
continue;
|
||||
$output = shell_exec("docker inspect CA_TEST_CONTAINER_DOCKERHUB");
|
||||
echo "<br>".tr("Removing test installation")."<br>";
|
||||
exec("docker rm CA_TEST_CONTAINER_DOCKERHUB");
|
||||
|
||||
exec("docker rmi {$docker['Repository']}");
|
||||
@unlink("/boot/config/plugins/dockerMan/templates-user/my-CA_TEST_CONTAINER_DOCKERHUB.xml");
|
||||
|
||||
$json = json_decode($output,true);
|
||||
if ( $json ) {
|
||||
$paths = isset($json[0]['Mounts']) ? $json[0]['Mounts'] : [];
|
||||
$ports = isset($json[0]['Config']['ExposedPorts']) ? $json[0]['Config']['ExposedPorts'] : [];
|
||||
$vars = isset($json[0]['Config']['Env']) ? $json[0]['Config']['Env'] : [];
|
||||
|
||||
$count = 1;
|
||||
$Config = [];
|
||||
foreach ($paths as $path) {
|
||||
$p = ["Name"=>"Container Path $count",'Type'=>"Path","Target"=>$path['Destination'],"Default"=>"","Mode"=>"rw","Display"=>"always","Required"=>"false","Mask"=>"false"];
|
||||
if ( $unRaid69 ) $p['Description'] = "Container Path: {$path['Destination']}";
|
||||
$Config[]['@attributes'] = $p;
|
||||
$count++;
|
||||
}
|
||||
$count = 1;
|
||||
foreach ($ports as $port => $name) {
|
||||
$pp = explode("/",$port);
|
||||
$p = ["Name"=>"Container Port $count",'Type'=>"Port","Target"=>$pp[0],"Default"=>$pp[0],"Mode"=>$pp[1],"Display"=>"always","Required"=>"false","Mask"=>"false","Description"=>""];
|
||||
if ( $unRaid69 ) $p['Description'] = "Container Port: {$pp[0]}";
|
||||
$Config[]['@attributes'] = $p;
|
||||
$count++;
|
||||
}
|
||||
$textvars = "";
|
||||
foreach ($vars as $var) {
|
||||
$textvars .= "$var\n";
|
||||
}
|
||||
$testvars = @parse_ini_string($textvars) ?: [];
|
||||
$defaultvars = ["HOST_HOSTNAME","HOST_OS","HOST_CONTAINERNAME","TZ","PATH"];
|
||||
$count = 1;
|
||||
foreach ($testvars as $var => $varcont) {
|
||||
if ( in_array($var,$defaultvars) )
|
||||
continue;
|
||||
|
||||
$p = ["Name"=>"Container Variable $count",'Target'=>$var,"Type"=>"Variable","Default"=>$varcont,"Description"=>"","Required"=>"false","Mask"=>"false","Display"=>"always"];
|
||||
if ( $unRaid69 ) $p['Description'] = "Container Variable: $var";
|
||||
$Config[]['@attributes'] = $p;
|
||||
$count++;
|
||||
}
|
||||
$Config[]['@attributes'] = ["Name"=>"Community Applications Conversion",'Target'=>"Community_Applications_Conversion","Type"=>"Variable","Default"=>"true","Description"=>"","Required"=>"false","Mask"=>"false","Display"=>"always"];
|
||||
$p = ["Name"=>"Container Variable $count",'Target'=>$var,"Type"=>"Variable","Default"=>$varcont,"Description"=>"","Required"=>"false","Mask"=>"false","Display"=>"always"];
|
||||
if ( $unRaid69 ) $p['Description'] = "Container Variable: $var";
|
||||
$Config[]['@attributes'] = $p;
|
||||
$count++;
|
||||
}
|
||||
$Config[]['@attributes'] = ["Name"=>"Community Applications Conversion",'Target'=>"Community_Applications_Conversion","Type"=>"Variable","Default"=>"true","Description"=>"","Required"=>"false","Mask"=>"false","Display"=>"always"];
|
||||
|
||||
if ( !empty($Config) )
|
||||
$dockerfile['Config'] = $Config;
|
||||
} else {
|
||||
$error = tr("An error occurred - Could not determine configuration");
|
||||
}
|
||||
$dockerfile['Name'] = $docker['Name'];
|
||||
if ( !empty($Config) )
|
||||
$dockerfile['Config'] = $Config;
|
||||
} else {
|
||||
$error = tr("An error occurred - Could not determine configuration");
|
||||
}
|
||||
$dockerfile['Name'] = $docker['Name'];
|
||||
|
||||
$existing_templates = array_diff(scandir($dockerManPaths['templates-user']),[".",".."]);
|
||||
foreach ( $existing_templates as $template ) {
|
||||
if ( strtolower($dockerfile['Name']) == strtolower(str_replace(["my-",".xml"],["",""],$template)) )
|
||||
$dockerfile['Name'] .= "-1";
|
||||
}
|
||||
|
||||
file_put_contents($caPaths['dockerSearchInstall'],makeXML($dockerfile));
|
||||
$existing_templates = array_diff(scandir($dockerManPaths['templates-user']),[".",".."]);
|
||||
foreach ( $existing_templates as $template ) {
|
||||
if ( strtolower($dockerfile['Name']) == strtolower(str_replace(["my-",".xml"],["",""],$template)) )
|
||||
$dockerfile['Name'] .= "-1";
|
||||
}
|
||||
|
||||
file_put_contents($caPaths['dockerSearchInstall'],makeXML($dockerfile));
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
<? if ( $json ): ?>
|
||||
window.parent.location = "/Apps/AddContainer?xmlTemplate=default:<?=$caPaths['dockerSearchInstall']?>";
|
||||
<? if ( $json ): ?>
|
||||
window.parent.location = "/Apps/AddContainer?xmlTemplate=default:<?=$caPaths['dockerSearchInstall']?>";
|
||||
|
||||
<? else: ?>
|
||||
alert("<?=$error?>");
|
||||
window.parent.location = "/Apps/AddContainer?xmlTemplate=default:<?=$caPaths['dockerSearchInstall']?>";
|
||||
|
||||
<? endif; ?>
|
||||
<? else: ?>
|
||||
alert("<?=$error?>");
|
||||
window.parent.location = "/Apps/AddContainer?xmlTemplate=default:<?=$caPaths['dockerSearchInstall']?>";
|
||||
|
||||
<? endif; ?>
|
||||
</script>
|
@ -23,16 +23,16 @@ require_once "$docroot/plugins/dynamix.docker.manager/include/DockerClient.php";
|
||||
$unRaidVersion = parse_ini_file($caPaths['unRaidVersion']);
|
||||
|
||||
function tr($string,$ret=true) {
|
||||
if ( function_exists("_") )
|
||||
$string = str_replace('"',""",str_replace("'","'",_($string)));
|
||||
if ( $ret )
|
||||
return $string;
|
||||
else
|
||||
echo $string;
|
||||
if ( function_exists("_") )
|
||||
$string = str_replace('"',""",str_replace("'","'",_($string)));
|
||||
if ( $ret )
|
||||
return $string;
|
||||
else
|
||||
echo $string;
|
||||
}
|
||||
|
||||
function startsWith($haystack, $needle) {
|
||||
return $needle === "" || strripos($haystack, $needle, -strlen($haystack)) !== FALSE;
|
||||
return $needle === "" || strripos($haystack, $needle, -strlen($haystack)) !== FALSE;
|
||||
}
|
||||
|
||||
$exeFile = "/usr/local/emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php";
|
||||
@ -41,15 +41,15 @@ $javascript = file_get_contents("/usr/local/emhttp/plugins/dynamix/javascript/dy
|
||||
echo "<script>$javascript</script>";
|
||||
|
||||
if ( $_GET['docker'] ) {
|
||||
echo "<div id='output'>";
|
||||
$dockers = explode(",",$_GET['docker']);
|
||||
echo sprintf(tr("Installing docker applications %s"),str_replace(",",", ",$_GET['docker']))."<br>";
|
||||
$_GET['updateContainer'] = true;
|
||||
$_GET['ct'] = $dockers;
|
||||
$_GET['communityApplications'] = true;
|
||||
$_GET['mute'] = false;
|
||||
@include($exeFile); # under new GUI, this line returns a duplicated session_start() error.
|
||||
echo "</div>";
|
||||
echo "<div id='output'>";
|
||||
$dockers = explode(",",$_GET['docker']);
|
||||
echo sprintf(tr("Installing docker applications %s"),str_replace(",",", ",$_GET['docker']))."<br>";
|
||||
$_GET['updateContainer'] = true;
|
||||
$_GET['ct'] = $dockers;
|
||||
$_GET['communityApplications'] = true;
|
||||
$_GET['mute'] = false;
|
||||
@include($exeFile); # under new GUI, this line returns a duplicated session_start() error.
|
||||
echo "</div>";
|
||||
?>
|
||||
|
||||
<script>
|
||||
@ -57,71 +57,71 @@ $("input,#output").hide();
|
||||
|
||||
var cursor = "";
|
||||
function addLog(logLine) {
|
||||
var scrollTop = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode).scrollTop;
|
||||
var clientHeight = (document.documentElement || document.body.parentNode).clientHeight;
|
||||
var scrollHeight = (document.documentElement || document.body.parentNode).scrollHeight;
|
||||
var isScrolledToBottom = scrollHeight - clientHeight <= scrollTop + 1;
|
||||
if (logLine.slice(-1) == "\n") {
|
||||
document.body.innerHTML = document.body.innerHTML.slice(0,cursor) + logLine.slice(0,-1) + "<br>";
|
||||
lastLine = document.body.innerHTML.length;
|
||||
cursor = lastLine;
|
||||
}
|
||||
else if (logLine.slice(-1) == "\r") {
|
||||
document.body.innerHTML = document.body.innerHTML.slice(0,cursor) + logLine.slice(0,-1);
|
||||
cursor = lastLine;
|
||||
}
|
||||
else if (logLine.slice(-1) == "\b") {
|
||||
if (logLine.length > 1)
|
||||
document.body.innerHTML = document.body.innerHTML.slice(0,cursor) + logLine.slice(0,-1);
|
||||
cursor += logLine.length-2;
|
||||
}
|
||||
else {
|
||||
document.body.innerHTML += logLine;
|
||||
cursor += logLine.length;
|
||||
}
|
||||
if (isScrolledToBottom) {
|
||||
window.scrollTo(0,document.body.scrollHeight);
|
||||
}
|
||||
var scrollTop = (window.pageYOffset !== undefined) ? window.pageYOffset : (document.documentElement || document.body.parentNode).scrollTop;
|
||||
var clientHeight = (document.documentElement || document.body.parentNode).clientHeight;
|
||||
var scrollHeight = (document.documentElement || document.body.parentNode).scrollHeight;
|
||||
var isScrolledToBottom = scrollHeight - clientHeight <= scrollTop + 1;
|
||||
if (logLine.slice(-1) == "\n") {
|
||||
document.body.innerHTML = document.body.innerHTML.slice(0,cursor) + logLine.slice(0,-1) + "<br>";
|
||||
lastLine = document.body.innerHTML.length;
|
||||
cursor = lastLine;
|
||||
}
|
||||
else if (logLine.slice(-1) == "\r") {
|
||||
document.body.innerHTML = document.body.innerHTML.slice(0,cursor) + logLine.slice(0,-1);
|
||||
cursor = lastLine;
|
||||
}
|
||||
else if (logLine.slice(-1) == "\b") {
|
||||
if (logLine.length > 1)
|
||||
document.body.innerHTML = document.body.innerHTML.slice(0,cursor) + logLine.slice(0,-1);
|
||||
cursor += logLine.length-2;
|
||||
}
|
||||
else {
|
||||
document.body.innerHTML += logLine;
|
||||
cursor += logLine.length;
|
||||
}
|
||||
if (isScrolledToBottom) {
|
||||
window.scrollTo(0,document.body.scrollHeight);
|
||||
}
|
||||
}
|
||||
function addCloseButton() {
|
||||
addLog("<p class='centered'><button class='logLine' type='button' onclick='" + (top.Shadowbox ? "top.Shadowbox" : "window") + ".close()'><?=tr("Done")?></button></p>");
|
||||
addLog("<p class='centered'><button class='logLine' type='button' onclick='" + (top.Shadowbox ? "top.Shadowbox" : "window") + ".close()'><?=tr("Done")?></button></p>");
|
||||
}
|
||||
</script>
|
||||
<?
|
||||
$failFlag = false;
|
||||
foreach ($dockers as $docker) {
|
||||
echo sprintf(tr("Starting %s"),"<span class='ca_bold'>$docker</span>")."<br>";
|
||||
unset($output);
|
||||
exec("docker start $docker 2>&1",$output,$retval);
|
||||
if ($retval) {
|
||||
$failFlag = true;
|
||||
echo sprintf(tr("%s failed to start. You should install it by itself to fix the errors"),"<span class='ca_bold'>$docker</span>")."<br>";
|
||||
foreach ($output as $line) {
|
||||
echo "<tt>$line</tt><br>";
|
||||
}
|
||||
echo "<br>";
|
||||
}
|
||||
}
|
||||
if ( ! is_file("/var/lib/docker/unraid-autostart") ) {
|
||||
echo "<br>".tr("Setting installed applications to autostart")."<br>";
|
||||
$autostartFile = array();
|
||||
$failFlag = false;
|
||||
foreach ($dockers as $docker) {
|
||||
echo sprintf(tr("Starting %s"),"<span class='ca_bold'>$docker</span>")."<br>";
|
||||
unset($output);
|
||||
exec("docker start $docker 2>&1",$output,$retval);
|
||||
if ($retval) {
|
||||
$failFlag = true;
|
||||
echo sprintf(tr("%s failed to start. You should install it by itself to fix the errors"),"<span class='ca_bold'>$docker</span>")."<br>";
|
||||
foreach ($output as $line) {
|
||||
echo "<tt>$line</tt><br>";
|
||||
}
|
||||
echo "<br>";
|
||||
}
|
||||
}
|
||||
if ( ! is_file("/var/lib/docker/unraid-autostart") ) {
|
||||
echo "<br>".tr("Setting installed applications to autostart")."<br>";
|
||||
$autostartFile = array();
|
||||
|
||||
foreach ($dockers as $docker) {
|
||||
$autostart[$docker] = true;
|
||||
}
|
||||
$autostartFile = implode("\n",array_keys($autostart));
|
||||
file_put_contents("/var/lib/docker/unraid-autostart",$autostartFile);
|
||||
}
|
||||
|
||||
echo "<br>".tr("Downloading docker icons")."<br>";
|
||||
$DockerTemplates->getAllInfo();
|
||||
exec("$docroot/plugins/dynamix.docker.manager/scripts/dockerupdate check nonotify > /dev/null 2>&1");
|
||||
foreach ($dockers as $docker) {
|
||||
$autostart[$docker] = true;
|
||||
}
|
||||
$autostartFile = implode("\n",array_keys($autostart));
|
||||
file_put_contents("/var/lib/docker/unraid-autostart",$autostartFile);
|
||||
}
|
||||
|
||||
echo "<br>".tr("Downloading docker icons")."<br>";
|
||||
$DockerTemplates->getAllInfo();
|
||||
exec("$docroot/plugins/dynamix.docker.manager/scripts/dockerupdate check nonotify > /dev/null 2>&1");
|
||||
|
||||
if ( $failFlag || !$_GET['plugin']) {
|
||||
echo "<br>".tr("Docker Application Installation finished")."<br><script>addCloseButton();</script>";
|
||||
} else {
|
||||
echo "<script>top.Shadowbox.close();</script>";
|
||||
}
|
||||
@unlink("/tmp/community.applications/tempFiles/newCreateDocker.php");
|
||||
if ( $failFlag || !$_GET['plugin']) {
|
||||
echo "<br>".tr("Docker Application Installation finished")."<br><script>addCloseButton();</script>";
|
||||
} else {
|
||||
echo "<script>top.Shadowbox.close();</script>";
|
||||
}
|
||||
@unlink("/tmp/community.applications/tempFiles/newCreateDocker.php");
|
||||
}
|
||||
?>
|
@ -12,25 +12,25 @@ require_once "/usr/local/emhttp/plugins/community.applications/include/helpers.p
|
||||
$apps = readJsonFile($caPaths['community-templates-info']);
|
||||
$plugins = explode("*",$argv[1]);
|
||||
foreach ($plugins as $plugin) {
|
||||
echo $plugin;
|
||||
if (! $plugin ) continue;
|
||||
$pluginName = basename($plugin);
|
||||
$pathInfo = pathinfo($plugin);
|
||||
if ( $pathInfo['extension'] !== "plg" ) {
|
||||
if ( is_file("/var/log/plugins/lang-$pluginName.xml") ) {
|
||||
passthru("/usr/local/emhttp/plugins/community.applications/scripts/languageInstall.sh update $pluginName");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ( searchArray($apps,"PluginURL",$plugin) !== false ) {
|
||||
if ( is_file("/var/log/plugins/$pluginName") ) {
|
||||
passthru("/usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin update $pluginName");
|
||||
} else {
|
||||
passthru("/usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin install ".escapeshellarg($plugin));
|
||||
}
|
||||
} else
|
||||
echo "$plugin not found in application feed\n";
|
||||
@unlink("{$caPaths['pluginPending']}/$pluginName");
|
||||
echo $plugin;
|
||||
if (! $plugin ) continue;
|
||||
$pluginName = basename($plugin);
|
||||
$pathInfo = pathinfo($plugin);
|
||||
if ( $pathInfo['extension'] !== "plg" ) {
|
||||
if ( is_file("/var/log/plugins/lang-$pluginName.xml") ) {
|
||||
passthru("/usr/local/emhttp/plugins/community.applications/scripts/languageInstall.sh update $pluginName");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if ( searchArray($apps,"PluginURL",$plugin) !== false ) {
|
||||
if ( is_file("/var/log/plugins/$pluginName") ) {
|
||||
passthru("/usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin update $pluginName");
|
||||
} else {
|
||||
passthru("/usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin install ".escapeshellarg($plugin));
|
||||
}
|
||||
} else
|
||||
echo "$plugin not found in application feed\n";
|
||||
@unlink("{$caPaths['pluginPending']}/$pluginName");
|
||||
}
|
||||
passthru("/usr/local/emhttp/plugins/community.applications/scripts/updatePluginSupport.php");
|
||||
?>
|
@ -20,7 +20,7 @@ require_once "/usr/local/emhttp/plugins/dynamix/include/Helpers.php";
|
||||
$_GET['updateContainer'] = "true";
|
||||
$_GET['mute'] = false;
|
||||
// $_GET['communityApplications'] = true;
|
||||
include("/usr/local/emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php");
|
||||
include("/usr/local/emhttp/plugins/dynamix.docker.manager/include/CreateDocker.php");
|
||||
?>
|
||||
<script src='<?autov("/plugins/dynamix/javascript/dynamix.js")?>'></script>
|
||||
<script>
|
||||
|
@ -25,8 +25,8 @@ $paths['dismiss'] = "/boot/config/plugins/community.applications/notifica
|
||||
$caSettings = $cfg = parse_plugin_cfg("community.applications");
|
||||
@mkdir($caPaths['CA_logs'],0777,true);
|
||||
if ( $cfg['notifications'] == "no" ) {
|
||||
echo json_encode([]);
|
||||
exit();
|
||||
echo json_encode([]);
|
||||
exit();
|
||||
}
|
||||
|
||||
exec("mkdir -p {$paths['CA_root']}");
|
||||
@ -36,205 +36,205 @@ $local = false; // ONLY SET TO TRUE FOR DEBUGGING. MUST BE FALSE FOR RELEASES
|
||||
$action = $_POST['action'] ?? null;
|
||||
// check if started from command prompt or gui
|
||||
if ( ! $action ){
|
||||
$debugging = true;
|
||||
$sendNotification = true;
|
||||
$action = 'scan';
|
||||
$debugging = true;
|
||||
$sendNotification = true;
|
||||
$action = 'scan';
|
||||
}
|
||||
|
||||
if ( is_file("/var/run/dockerd.pid") && is_dir("/proc/".@file_get_contents("/var/run/dockerd.pid")) ) {
|
||||
$dockerRunning = true;
|
||||
$DockerClient = new DockerClient();
|
||||
$dockerRunning = true;
|
||||
$DockerClient = new DockerClient();
|
||||
} else
|
||||
$dockerRunning = false;
|
||||
$dockerRunning = false;
|
||||
|
||||
function debug1($message) {
|
||||
global $debugging;
|
||||
global $debugging;
|
||||
|
||||
if ($debugging) echo $message;
|
||||
if ($debugging) echo $message;
|
||||
}
|
||||
|
||||
function conditionsMet($value) {
|
||||
global $conditionsMet;
|
||||
global $conditionsMet;
|
||||
|
||||
if ($value)
|
||||
debug1(" Passed\n");
|
||||
else {
|
||||
$conditionsMet = false;
|
||||
debug1(" Failed\n");
|
||||
}
|
||||
if ($value)
|
||||
debug1(" Passed\n");
|
||||
else {
|
||||
$conditionsMet = false;
|
||||
debug1(" Failed\n");
|
||||
}
|
||||
}
|
||||
|
||||
############## MAIN ##############
|
||||
switch ($action) {
|
||||
case 'scan':
|
||||
if ( $local ) {
|
||||
$notices = readJsonFile($paths['local']);
|
||||
copy($paths['local'],$paths['notices']);
|
||||
} else {
|
||||
if ( is_file($paths['notices']) && ( time() - filemtime($paths['notices']) < 604800 ) ) {
|
||||
// Only send one notification per week
|
||||
$notices = readJsonFile($paths['notices']);
|
||||
$sendNotification = false;
|
||||
} else {
|
||||
case 'scan':
|
||||
if ( $local ) {
|
||||
$notices = readJsonFile($paths['local']);
|
||||
copy($paths['local'],$paths['notices']);
|
||||
} else {
|
||||
if ( is_file($paths['notices']) && ( time() - filemtime($paths['notices']) < 604800 ) ) {
|
||||
// Only send one notification per week
|
||||
$notices = readJsonFile($paths['notices']);
|
||||
$sendNotification = false;
|
||||
} else {
|
||||
// exec("logger downloading new notifications");
|
||||
$notices = download_json($paths['notices_remote'],$paths['notices']);
|
||||
}
|
||||
}
|
||||
$notices = download_json($paths['notices_remote'],$paths['notices']);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $local && ! is_array($notices) ) {
|
||||
debug1("Not a valid local json file");
|
||||
return;
|
||||
}
|
||||
if ( $local && ! is_array($notices) ) {
|
||||
debug1("Not a valid local json file");
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! is_array($notices) ) $notices = array();
|
||||
$dismissed = readJsonFile($paths['dismiss']);
|
||||
foreach ( $notices as $app => $notice ) {
|
||||
if ( in_array($notice['ID'],$dismissed) )
|
||||
continue;
|
||||
if ( ! is_array($notices) ) $notices = array();
|
||||
$dismissed = readJsonFile($paths['dismiss']);
|
||||
foreach ( $notices as $app => $notice ) {
|
||||
if ( in_array($notice['ID'],$dismissed) )
|
||||
continue;
|
||||
|
||||
debug1("Searching for $app");
|
||||
$found = false;
|
||||
debug1("Searching for $app");
|
||||
$found = false;
|
||||
|
||||
$plugin = ( startsWith($app,"https://") || strtolower(pathinfo($app,PATHINFO_EXTENSION)) == "plg");
|
||||
$plugin = ( startsWith($app,"https://") || strtolower(pathinfo($app,PATHINFO_EXTENSION)) == "plg");
|
||||
|
||||
if ( ! $plugin && $dockerRunning) {
|
||||
$info = $DockerClient->getDockerContainers();
|
||||
$search = explode(":",$app);
|
||||
if ( ! ($search[1] ?? false) )
|
||||
$app .= ":latest";
|
||||
|
||||
foreach($info as $container) {
|
||||
if ( ($search[1] ?? "") == "*" ) {
|
||||
if ( explode(":",$container['Image'])[0] == $search[0])
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
if ($container['Image'] == $app) {
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ( is_file("/var/log/plugins/".basename($app)) ) {
|
||||
if ( startswith($app,"https:") ) {
|
||||
if ( plugin("pluginURL","/var/log/plugins/".basename($app)) == $app) {
|
||||
$found = true;
|
||||
}
|
||||
} else
|
||||
$found = true;
|
||||
}
|
||||
}
|
||||
if ( $found ) {
|
||||
debug1(" Found Looking for conditions\n");
|
||||
$conditionsMet = true;
|
||||
if ( $notice['Conditions']['unraid'] ?? false ) {
|
||||
$unraid = parse_ini_file("/etc/unraid-version");
|
||||
$unraidVersion = $unraid['version'];
|
||||
foreach ($notice['Conditions']['unraid'] as $condition) {
|
||||
if ( ! $conditionsMet ) break;
|
||||
debug1("Testing unraid version $unraidVersion {$condition[0]} {$condition[1]}");
|
||||
conditionsMet(version_compare($unraidVersion,$condition[1],$condition[0]));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
debug1(" Not Found");
|
||||
continue;
|
||||
}
|
||||
if ( ! $plugin && $dockerRunning) {
|
||||
$info = $DockerClient->getDockerContainers();
|
||||
$search = explode(":",$app);
|
||||
if ( ! ($search[1] ?? false) )
|
||||
$app .= ":latest";
|
||||
|
||||
foreach($info as $container) {
|
||||
if ( ($search[1] ?? "") == "*" ) {
|
||||
if ( explode(":",$container['Image'])[0] == $search[0])
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
if ($container['Image'] == $app) {
|
||||
$found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ( is_file("/var/log/plugins/".basename($app)) ) {
|
||||
if ( startswith($app,"https:") ) {
|
||||
if ( plugin("pluginURL","/var/log/plugins/".basename($app)) == $app) {
|
||||
$found = true;
|
||||
}
|
||||
} else
|
||||
$found = true;
|
||||
}
|
||||
}
|
||||
if ( $found ) {
|
||||
debug1(" Found Looking for conditions\n");
|
||||
$conditionsMet = true;
|
||||
if ( $notice['Conditions']['unraid'] ?? false ) {
|
||||
$unraid = parse_ini_file("/etc/unraid-version");
|
||||
$unraidVersion = $unraid['version'];
|
||||
foreach ($notice['Conditions']['unraid'] as $condition) {
|
||||
if ( ! $conditionsMet ) break;
|
||||
debug1("Testing unraid version $unraidVersion {$condition[0]} {$condition[1]}");
|
||||
conditionsMet(version_compare($unraidVersion,$condition[1],$condition[0]));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
debug1(" Not Found");
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( $plugin && ($notice['Conditions']['plugin'] ?? false) ) {
|
||||
$pluginVersion = @plugin("version","/var/log/plugins/".basename($app));
|
||||
if ( ! $pluginVersion ) {
|
||||
debug1("Unable to determine plugin version. Carrying on");
|
||||
continue;
|
||||
}
|
||||
foreach ($notice['Conditions']['plugin'] as $condition) {
|
||||
if ( ! $conditionsMet ) break;
|
||||
debug1("Testing plugin version $pluginVersion {$condition[0]} {$condition[1]}");
|
||||
$cmp = strcmp($pluginVersion,$condition[1]);
|
||||
// do some operator substitutions
|
||||
switch($condition[0]) {
|
||||
case "=":
|
||||
$condition[0] = "==";
|
||||
break;
|
||||
case "eq":
|
||||
$condition[0] = "==";
|
||||
break;
|
||||
case "=<":
|
||||
$condition[0] = "<=";
|
||||
break;
|
||||
case "le":
|
||||
$condition[0] = "<=";
|
||||
break;
|
||||
case "lt":
|
||||
$condition[0] = "<";
|
||||
break;
|
||||
case ">=":
|
||||
$condition[0] = ">=";
|
||||
break;
|
||||
case "ge":
|
||||
$condition[0] = ">=";
|
||||
break;
|
||||
case "gt":
|
||||
$condition[0] = ">";
|
||||
case "ne":
|
||||
$condition[0] = "!";
|
||||
break;
|
||||
case "<>":
|
||||
$condition[0] = "!";
|
||||
break;
|
||||
case "!=":
|
||||
$condition[0] = "!";
|
||||
break;
|
||||
}
|
||||
if ( $plugin && ($notice['Conditions']['plugin'] ?? false) ) {
|
||||
$pluginVersion = @plugin("version","/var/log/plugins/".basename($app));
|
||||
if ( ! $pluginVersion ) {
|
||||
debug1("Unable to determine plugin version. Carrying on");
|
||||
continue;
|
||||
}
|
||||
foreach ($notice['Conditions']['plugin'] as $condition) {
|
||||
if ( ! $conditionsMet ) break;
|
||||
debug1("Testing plugin version $pluginVersion {$condition[0]} {$condition[1]}");
|
||||
$cmp = strcmp($pluginVersion,$condition[1]);
|
||||
// do some operator substitutions
|
||||
switch($condition[0]) {
|
||||
case "=":
|
||||
$condition[0] = "==";
|
||||
break;
|
||||
case "eq":
|
||||
$condition[0] = "==";
|
||||
break;
|
||||
case "=<":
|
||||
$condition[0] = "<=";
|
||||
break;
|
||||
case "le":
|
||||
$condition[0] = "<=";
|
||||
break;
|
||||
case "lt":
|
||||
$condition[0] = "<";
|
||||
break;
|
||||
case ">=":
|
||||
$condition[0] = ">=";
|
||||
break;
|
||||
case "ge":
|
||||
$condition[0] = ">=";
|
||||
break;
|
||||
case "gt":
|
||||
$condition[0] = ">";
|
||||
case "ne":
|
||||
$condition[0] = "!";
|
||||
break;
|
||||
case "<>":
|
||||
$condition[0] = "!";
|
||||
break;
|
||||
case "!=":
|
||||
$condition[0] = "!";
|
||||
break;
|
||||
}
|
||||
|
||||
switch ($condition[0]) {
|
||||
case "<":
|
||||
conditionsMet($cmp < 0);
|
||||
break;
|
||||
case ">":
|
||||
conditionsMet($cmp > 0);
|
||||
break;
|
||||
case "==":
|
||||
conditionsMet($cmp == 0);
|
||||
break;
|
||||
case "<=":
|
||||
conditionsMet($cmp < 1);
|
||||
break;
|
||||
case "=>":
|
||||
conditionsMet($cmp > -1);
|
||||
break;
|
||||
case "!":
|
||||
conditionsMet($cmp != 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
switch ($condition[0]) {
|
||||
case "<":
|
||||
conditionsMet($cmp < 0);
|
||||
break;
|
||||
case ">":
|
||||
conditionsMet($cmp > 0);
|
||||
break;
|
||||
case "==":
|
||||
conditionsMet($cmp == 0);
|
||||
break;
|
||||
case "<=":
|
||||
conditionsMet($cmp < 1);
|
||||
break;
|
||||
case "=>":
|
||||
conditionsMet($cmp > -1);
|
||||
break;
|
||||
case "!":
|
||||
conditionsMet($cmp != 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ($notice['Conditions']['code'] ?? false) && $conditionsMet) {
|
||||
debug1("Executing {$notice['Conditions']['code']}");
|
||||
conditionsMet(eval($notice['Conditions']['code']));
|
||||
}
|
||||
|
||||
$unRaidNotifications = [];
|
||||
if ($conditionsMet) {
|
||||
debug1("Conditions Met. Send the notification!\n");
|
||||
if ( $sendNotification ) {
|
||||
$command = "/usr/local/emhttp/plugins/dynamix/scripts/notify -b -e 'Community Applications Background Scanning' -s 'Attention Required' -d ".escapeshellarg($notice['email']." Login to your server for more detail. To not receive this notification again, dismiss the banner when logged into your server")." -i 'warning'";
|
||||
exec($command);
|
||||
}
|
||||
$notice['App'] = $app;
|
||||
$unRaidNotifications[] = $notice;
|
||||
} else {
|
||||
debug1("Conditions not met. Do nothing!\n");
|
||||
}
|
||||
debug1("\n");
|
||||
}
|
||||
echo json_encode($unRaidNotifications ?: [],JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
|
||||
break;
|
||||
case 'dismiss':
|
||||
$notifications = readJsonFile($paths['dismiss']);
|
||||
$notifications[] = $_POST['ID'];
|
||||
writeJsonFile($paths['dismiss'],$notifications);
|
||||
break;
|
||||
if ( ($notice['Conditions']['code'] ?? false) && $conditionsMet) {
|
||||
debug1("Executing {$notice['Conditions']['code']}");
|
||||
conditionsMet(eval($notice['Conditions']['code']));
|
||||
}
|
||||
|
||||
$unRaidNotifications = [];
|
||||
if ($conditionsMet) {
|
||||
debug1("Conditions Met. Send the notification!\n");
|
||||
if ( $sendNotification ) {
|
||||
$command = "/usr/local/emhttp/plugins/dynamix/scripts/notify -b -e 'Community Applications Background Scanning' -s 'Attention Required' -d ".escapeshellarg($notice['email']." Login to your server for more detail. To not receive this notification again, dismiss the banner when logged into your server")." -i 'warning'";
|
||||
exec($command);
|
||||
}
|
||||
$notice['App'] = $app;
|
||||
$unRaidNotifications[] = $notice;
|
||||
} else {
|
||||
debug1("Conditions not met. Do nothing!\n");
|
||||
}
|
||||
debug1("\n");
|
||||
}
|
||||
echo json_encode($unRaidNotifications ?: [],JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);
|
||||
break;
|
||||
case 'dismiss':
|
||||
$notifications = readJsonFile($paths['dismiss']);
|
||||
$notifications[] = $_POST['ID'];
|
||||
writeJsonFile($paths['dismiss'],$notifications);
|
||||
break;
|
||||
}
|
||||
?>
|
@ -12,14 +12,14 @@ require_once "/usr/local/emhttp/plugins/community.applications/include/helpers.p
|
||||
$pluginURL = $argv[2];
|
||||
|
||||
if ( ! $pluginURL ) {
|
||||
echo "No URL passed";
|
||||
exit(1);
|
||||
echo "No URL passed";
|
||||
exit(1);
|
||||
}
|
||||
$apps = readJsonFile($caPaths['community-templates-info']);
|
||||
if ( searchArray($apps,"PluginURL",$pluginURL) !== false || $argv[1] == "update" || $argv[1] == "remove") {
|
||||
passthru("/usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin ".escapeshellarg($argv[1])." ".escapeshellarg($argv[2]));
|
||||
passthru("/usr/local/emhttp/plugins/community.applications/scripts/updatePluginSupport.php");
|
||||
passthru("/usr/local/emhttp/plugins/dynamix.plugin.manager/scripts/plugin ".escapeshellarg($argv[1])." ".escapeshellarg($argv[2]));
|
||||
passthru("/usr/local/emhttp/plugins/community.applications/scripts/updatePluginSupport.php");
|
||||
}
|
||||
else
|
||||
echo "URL passed for installation does not exist in application feed\n";
|
||||
echo "URL passed for installation does not exist in application feed\n";
|
||||
?>
|
||||
|
@ -21,11 +21,11 @@ require_once "$docroot/plugins/community.applications/include/helpers.php";
|
||||
$caSettings = parse_plugin_cfg("community.applications");
|
||||
|
||||
function tr($string,$ret=true) {
|
||||
$string = str_replace('"',""",str_replace("'","'",_($string)));
|
||||
if ( $ret )
|
||||
return $string;
|
||||
else
|
||||
echo $string;
|
||||
$string = str_replace('"',""",str_replace("'","'",_($string)));
|
||||
if ( $ret )
|
||||
return $string;
|
||||
else
|
||||
echo $string;
|
||||
}
|
||||
|
||||
?>
|
||||
@ -51,106 +51,106 @@ div.spinner .unraid_mark_7{animation:mark_7 1.5s ease infinite}
|
||||
<?
|
||||
$repositories = readJsonFile($caPaths['repositoryList']);
|
||||
switch ($_GET['arg1']) {
|
||||
case 'Repository':
|
||||
foreach ($repositories as $name => $repo) {
|
||||
$repos[$name] = $repo['url'];
|
||||
}
|
||||
ksort($repos,SORT_FLAG_CASE | SORT_NATURAL);
|
||||
echo "<tt><table>";
|
||||
foreach (array_keys($repos) as $repo) {
|
||||
echo "<tr><td><span class='ca_bold'>$repo</td><td><a class='popUpLink' href='{$repos[$repo]}' target='_blank'>{$repos[$repo]}</a></td></tr>";
|
||||
}
|
||||
echo "</table></tt>";
|
||||
break;
|
||||
case 'Invalid':
|
||||
$moderation = json_encode(json_decode(@file_get_contents($caPaths['invalidXML_txt'])),JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
|
||||
if ( ! $moderation ) {
|
||||
echo "<br><br><div class='ca_center'><span class='ca_bold'>".tr("No invalid templates found")."</span></div>";
|
||||
return;
|
||||
}
|
||||
$moderation = str_replace(" "," ",$moderation);
|
||||
$moderation = str_replace("\n","<br>",$moderation);
|
||||
echo "<tt>".tr("These templates are invalid and the application they are referring to is unknown")."<br><br>$moderation";
|
||||
break;
|
||||
case 'Fixed':
|
||||
$moderation = @file_get_contents($caPaths['fixedTemplates_txt']);
|
||||
if ( ! $moderation ) {
|
||||
echo "<br><br><div class='ca_center'><span class='ca_bold'>".tr("No templates were automatically fixed")."</span></div>";
|
||||
} else {
|
||||
$json = json_decode($moderation,true);
|
||||
ksort($json,SORT_NATURAL | SORT_FLAG_CASE);
|
||||
echo tr("All of these errors found have been fixed automatically")."<br><br>".tr("Note that many of these errors can be avoided by following the directions")." <a href='https://forums.unraid.net/topic/57181-real-docker-faq/#comment-566084' target='_blank'>".tr("HERE")."</a><br><br>";
|
||||
foreach (array_keys($json) as $repository) {
|
||||
echo "<br><b><span style='font-size:20px;'>$repository</span></b><br>";
|
||||
foreach (array_keys($json[$repository]) as $repo) {
|
||||
echo "<code> <b><span style='font-size:16px;'>$repo:</span></b><br>";
|
||||
foreach ($json[$repository][$repo] as $error) {
|
||||
echo " ".str_replace(" "," ",$error)."<br>";
|
||||
}
|
||||
echo "</code>";
|
||||
}
|
||||
}
|
||||
}
|
||||
case 'Repository':
|
||||
foreach ($repositories as $name => $repo) {
|
||||
$repos[$name] = $repo['url'];
|
||||
}
|
||||
ksort($repos,SORT_FLAG_CASE | SORT_NATURAL);
|
||||
echo "<tt><table>";
|
||||
foreach (array_keys($repos) as $repo) {
|
||||
echo "<tr><td><span class='ca_bold'>$repo</td><td><a class='popUpLink' href='{$repos[$repo]}' target='_blank'>{$repos[$repo]}</a></td></tr>";
|
||||
}
|
||||
echo "</table></tt>";
|
||||
break;
|
||||
case 'Invalid':
|
||||
$moderation = json_encode(json_decode(@file_get_contents($caPaths['invalidXML_txt'])),JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);
|
||||
if ( ! $moderation ) {
|
||||
echo "<br><br><div class='ca_center'><span class='ca_bold'>".tr("No invalid templates found")."</span></div>";
|
||||
return;
|
||||
}
|
||||
$moderation = str_replace(" "," ",$moderation);
|
||||
$moderation = str_replace("\n","<br>",$moderation);
|
||||
echo "<tt>".tr("These templates are invalid and the application they are referring to is unknown")."<br><br>$moderation";
|
||||
break;
|
||||
case 'Fixed':
|
||||
$moderation = @file_get_contents($caPaths['fixedTemplates_txt']);
|
||||
if ( ! $moderation ) {
|
||||
echo "<br><br><div class='ca_center'><span class='ca_bold'>".tr("No templates were automatically fixed")."</span></div>";
|
||||
} else {
|
||||
$json = json_decode($moderation,true);
|
||||
ksort($json,SORT_NATURAL | SORT_FLAG_CASE);
|
||||
echo tr("All of these errors found have been fixed automatically")."<br><br>".tr("Note that many of these errors can be avoided by following the directions")." <a href='https://forums.unraid.net/topic/57181-real-docker-faq/#comment-566084' target='_blank'>".tr("HERE")."</a><br><br>";
|
||||
foreach (array_keys($json) as $repository) {
|
||||
echo "<br><b><span style='font-size:20px;'>$repository</span></b><br>";
|
||||
foreach (array_keys($json[$repository]) as $repo) {
|
||||
echo "<code> <b><span style='font-size:16px;'>$repo:</span></b><br>";
|
||||
foreach ($json[$repository][$repo] as $error) {
|
||||
echo " ".str_replace(" "," ",$error)."<br>";
|
||||
}
|
||||
echo "</code>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$dupeList = readJsonFile($caPaths['pluginDupes']);
|
||||
if ($dupeList) {
|
||||
$templates = readJsonFile($caPaths['community-templates-info']);
|
||||
echo "<br><br><span class='ca_bold'></tt>".tr("The following plugins have duplicated filenames and are not able to be installed simultaneously:")."</span><br><br>";
|
||||
foreach (array_keys($dupeList) as $dupe) {
|
||||
echo "<span class='ca_bold'>$dupe</span><br>";
|
||||
foreach ($templates as $template) {
|
||||
if ( basename($template['PluginURL']??"") == $dupe ) {
|
||||
echo "<tt>{$template['Author']} - {$template['Name']}<br></tt>";
|
||||
}
|
||||
}
|
||||
echo "<br>";
|
||||
}
|
||||
}
|
||||
$templates = readJsonFile($caPaths['community-templates-info']);
|
||||
$dupeRepos = "";
|
||||
foreach ($templates as $template) {
|
||||
$template['Repository'] = str_replace(":latest","",$template['Repository']);
|
||||
$count = 0;
|
||||
foreach ($templates as $searchTemplates) {
|
||||
if ( $template['Language'] ) continue;
|
||||
if ( (str_replace(["lscr.io/","ghcr.io/"],"",$template['Repository']) == str_replace(":latest","",str_replace(["lscr.io/","ghcr.io/"],"",$searchTemplates['Repository']))) ) {
|
||||
if ( $searchTemplates['BranchName'] || $searchTemplates['Blacklist'] || $searchTemplates['Deprecated']) {
|
||||
continue;
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
if ($count > 1 ) {
|
||||
$dupeRepos .= "Duplicated Template: {$template['RepoName']} - {$template['Repository']} - {$template['Name']}<br>";
|
||||
}
|
||||
}
|
||||
if ( $dupeRepos ) {
|
||||
echo "<br><span class='ca_bold'></tt>".tr("The following docker applications refer to the same docker repository but may have subtle changes in the template to warrant this")."</span><br><br><tt>$dupeRepos";
|
||||
}
|
||||
$dupeList = readJsonFile($caPaths['pluginDupes']);
|
||||
if ($dupeList) {
|
||||
$templates = readJsonFile($caPaths['community-templates-info']);
|
||||
echo "<br><br><span class='ca_bold'></tt>".tr("The following plugins have duplicated filenames and are not able to be installed simultaneously:")."</span><br><br>";
|
||||
foreach (array_keys($dupeList) as $dupe) {
|
||||
echo "<span class='ca_bold'>$dupe</span><br>";
|
||||
foreach ($templates as $template) {
|
||||
if ( basename($template['PluginURL']??"") == $dupe ) {
|
||||
echo "<tt>{$template['Author']} - {$template['Name']}<br></tt>";
|
||||
}
|
||||
}
|
||||
echo "<br>";
|
||||
}
|
||||
}
|
||||
$templates = readJsonFile($caPaths['community-templates-info']);
|
||||
$dupeRepos = "";
|
||||
foreach ($templates as $template) {
|
||||
$template['Repository'] = str_replace(":latest","",$template['Repository']);
|
||||
$count = 0;
|
||||
foreach ($templates as $searchTemplates) {
|
||||
if ( $template['Language'] ) continue;
|
||||
if ( (str_replace(["lscr.io/","ghcr.io/"],"",$template['Repository']) == str_replace(":latest","",str_replace(["lscr.io/","ghcr.io/"],"",$searchTemplates['Repository']))) ) {
|
||||
if ( $searchTemplates['BranchName'] || $searchTemplates['Blacklist'] || $searchTemplates['Deprecated']) {
|
||||
continue;
|
||||
}
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
if ($count > 1 ) {
|
||||
$dupeRepos .= "Duplicated Template: {$template['RepoName']} - {$template['Repository']} - {$template['Name']}<br>";
|
||||
}
|
||||
}
|
||||
if ( $dupeRepos ) {
|
||||
echo "<br><span class='ca_bold'></tt>".tr("The following docker applications refer to the same docker repository but may have subtle changes in the template to warrant this")."</span><br><br><tt>$dupeRepos";
|
||||
}
|
||||
|
||||
break;
|
||||
case 'Moderation':
|
||||
echo "<br><div class='ca_center'><strong>".tr("If any of these entries are incorrect then contact the moderators of CA to discuss")."</strong></div><br><br>";
|
||||
$moderation = file_get_contents($caPaths['moderation']);
|
||||
$repoComment = "";
|
||||
foreach ($repositories as $repo) {
|
||||
if ($repo['RepoComment']??false) {
|
||||
$repoComment .= "<tr><td>{$repo['name']}</td><td>{$repo['RepoComment']}</td></tr>";
|
||||
}
|
||||
}
|
||||
if ( $repoComment ) {
|
||||
echo "<br><div class='ca_center'><strong>".tr("Global Repository Comments:")."</strong><br>".tr("(Applied to all applications)")."</div><br><br><tt><table>$repoComment</table><br><br>";
|
||||
}
|
||||
if ( ! $moderation ) {
|
||||
echo "<br><br><div class='ca_center'><span class='ca_bold'>No moderation entries found</span></div>";
|
||||
}
|
||||
echo "</tt><div class='ca_center'><strong>".tr("Individual Application Moderation")."</strong></div><br><br>";
|
||||
$moderation = str_replace(" "," ",$moderation);
|
||||
$moderation = str_replace("\n","<br>",$moderation);
|
||||
echo "<tt>$moderation";
|
||||
break;
|
||||
break;
|
||||
case 'Moderation':
|
||||
echo "<br><div class='ca_center'><strong>".tr("If any of these entries are incorrect then contact the moderators of CA to discuss")."</strong></div><br><br>";
|
||||
$moderation = file_get_contents($caPaths['moderation']);
|
||||
$repoComment = "";
|
||||
foreach ($repositories as $repo) {
|
||||
if ($repo['RepoComment']??false) {
|
||||
$repoComment .= "<tr><td>{$repo['name']}</td><td>{$repo['RepoComment']}</td></tr>";
|
||||
}
|
||||
}
|
||||
if ( $repoComment ) {
|
||||
echo "<br><div class='ca_center'><strong>".tr("Global Repository Comments:")."</strong><br>".tr("(Applied to all applications)")."</div><br><br><tt><table>$repoComment</table><br><br>";
|
||||
}
|
||||
if ( ! $moderation ) {
|
||||
echo "<br><br><div class='ca_center'><span class='ca_bold'>No moderation entries found</span></div>";
|
||||
}
|
||||
echo "</tt><div class='ca_center'><strong>".tr("Individual Application Moderation")."</strong></div><br><br>";
|
||||
$moderation = str_replace(" "," ",$moderation);
|
||||
$moderation = str_replace("\n","<br>",$moderation);
|
||||
echo "<tt>$moderation";
|
||||
break;
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
document.getElementById("spinner").style.display = "none";
|
||||
document.getElementById("spinner").style.display = "none";
|
||||
</script>
|
@ -24,39 +24,39 @@ require_once("$docroot/plugins/dynamix/include/Translations.php");
|
||||
$plugins = glob("/boot/config/plugins/*.plg");
|
||||
$templates = readJsonFile($caPaths['community-templates-info']);
|
||||
if ( ! $templates ) {
|
||||
echo "You must enter the apps tab before using this script\n";
|
||||
return;
|
||||
echo "You must enter the apps tab before using this script\n";
|
||||
return;
|
||||
}
|
||||
|
||||
echo "\n<b>".tr("Updating Support Links")."</b>\n\n";
|
||||
foreach ($plugins as $plugin) {
|
||||
$pluginURL = plugin("pluginURL",$plugin);
|
||||
$pluginEntry = searchArray($templates,"PluginURL",$pluginURL);
|
||||
if ( $pluginEntry === false ) {
|
||||
$pluginEntry = searchArray($templates,"PluginURL",str_replace("https://raw.github.com/","https://raw.githubusercontent.com/",$pluginURL));
|
||||
}
|
||||
if ( $pluginEntry !== false && $templates[$pluginEntry]['PluginURL']) {
|
||||
$xml = simplexml_load_file($plugin);
|
||||
if ( ! $templates[$pluginEntry]['Support'] ) {
|
||||
continue;
|
||||
}
|
||||
if ( @plugin("support",$plugin) !== $templates[$pluginEntry]['Support'] ) {
|
||||
// remove existing support attribute if it exists
|
||||
if ( @plugin("support",$plugin) ) {
|
||||
$existing_support = $xml->xpath("//PLUGIN/@support");
|
||||
foreach ($existing_support as $node) {
|
||||
unset($node[0]);
|
||||
}
|
||||
}
|
||||
$xml->addAttribute("support",$templates[$pluginEntry]['Support']);
|
||||
$dom = new DOMDocument('1.0');
|
||||
$dom->preserveWhiteSpace = false;
|
||||
$dom->formatOutput = true;
|
||||
$dom->loadXML($xml->asXML());
|
||||
file_put_contents($plugin, $dom->saveXML());
|
||||
echo "<b>".plugin("name",$plugin)."</b> --> <a href='{$templates[$pluginEntry]['Support']}' target='_blank'>{$templates[$pluginEntry]['Support']}</a>\n";
|
||||
}
|
||||
}
|
||||
$pluginURL = plugin("pluginURL",$plugin);
|
||||
$pluginEntry = searchArray($templates,"PluginURL",$pluginURL);
|
||||
if ( $pluginEntry === false ) {
|
||||
$pluginEntry = searchArray($templates,"PluginURL",str_replace("https://raw.github.com/","https://raw.githubusercontent.com/",$pluginURL));
|
||||
}
|
||||
if ( $pluginEntry !== false && $templates[$pluginEntry]['PluginURL']) {
|
||||
$xml = simplexml_load_file($plugin);
|
||||
if ( ! $templates[$pluginEntry]['Support'] ) {
|
||||
continue;
|
||||
}
|
||||
if ( @plugin("support",$plugin) !== $templates[$pluginEntry]['Support'] ) {
|
||||
// remove existing support attribute if it exists
|
||||
if ( @plugin("support",$plugin) ) {
|
||||
$existing_support = $xml->xpath("//PLUGIN/@support");
|
||||
foreach ($existing_support as $node) {
|
||||
unset($node[0]);
|
||||
}
|
||||
}
|
||||
$xml->addAttribute("support",$templates[$pluginEntry]['Support']);
|
||||
$dom = new DOMDocument('1.0');
|
||||
$dom->preserveWhiteSpace = false;
|
||||
$dom->formatOutput = true;
|
||||
$dom->loadXML($xml->asXML());
|
||||
file_put_contents($plugin, $dom->saveXML());
|
||||
echo "<b>".plugin("name",$plugin)."</b> --> <a href='{$templates[$pluginEntry]['Support']}' target='_blank'>{$templates[$pluginEntry]['Support']}</a>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "\n\n";
|
||||
echo tr("Finished Installing. If the DONE button did not appear, then you will need to click the red X in the top right corner")."\n";
|
||||
|
@ -23,96 +23,96 @@ $unRaid66color = "#FF8C2F";
|
||||
$linkColor = "#486dba";
|
||||
$startupColor = "#FF8C2F";
|
||||
switch ($theme) {
|
||||
case 'black':
|
||||
$donateBackground = "#ffffff";
|
||||
$donateText = "#000000";
|
||||
$templateBackground = "#191818";
|
||||
$templateHoverBackground = "#121212";
|
||||
$templateFavourite = "#333333";
|
||||
$hrColor = "#2b2b2b";
|
||||
$borderColor = "#2b2b2b";
|
||||
$watermarkColor = "rgba(43, 43, 43, 0.4)";
|
||||
$aColor = "#00b8d6";
|
||||
$sidebarBackground = "#000000";
|
||||
$sidebarText = "#f2f2f2";
|
||||
$betaPopupOffset = "0";
|
||||
$supportPopupText = "#000000";
|
||||
$supportPopupBackground = "#ffffff";
|
||||
$modCommentBorder = "#cf3131";
|
||||
$sidebarCloseBackground = "rgba(0,0,0,0.7)";
|
||||
break;
|
||||
case 'white':
|
||||
$donateBackground = "#1c1b1b";
|
||||
$donateText = "#f2f2f2";
|
||||
$templateBackground = "#f5f5f5";
|
||||
$templateHoverBackground = "#ffffff";
|
||||
$templateFavourite = "#d0d0d0";
|
||||
$hrColor = "lightgrey";
|
||||
$borderColor = "#e3e3e3";
|
||||
$watermarkColor = "rgba(211, 211, 211, 0.8)";
|
||||
$aColor = "#486dba";
|
||||
$sidebarBackground = "#ffffff";
|
||||
$sidebarText = "#000000";
|
||||
$betaPopupOffset = "0";
|
||||
$supportPopupText = "#f2f2f2";
|
||||
$supportPopupBackground = "#1c1b1b";
|
||||
$modCommentBorder = "#cf3131";
|
||||
$sidebarCloseBackground = "rgba(0,0,0,0.7)";
|
||||
break;
|
||||
case 'azure':
|
||||
$donateBackground = "#606e7f";
|
||||
$donateText = "#e4e2e4";
|
||||
$templateBackground = "transparent";
|
||||
$templateHoverBackground = "#edeaef";
|
||||
$templateFavourite = "#e0e0e0";
|
||||
$hrColor = "#606e7f";
|
||||
$border = "#9794a7";
|
||||
$watermarkColor = "rgba(96, 110, 127, 0.1)";
|
||||
$aColor = "#486dba";
|
||||
$sidebarBackground = "#edeaef";
|
||||
$sidebarText = "#606e7f";
|
||||
$betaPopupOffset = "1.5rem;";
|
||||
$supportPopupText = "#1b1d1b";
|
||||
$supportPopupBackground = "#ffffff";
|
||||
$modCommentBorder = "#cf3131";
|
||||
$sidebarCloseBackground = "rgba(0,0,0,0.7)";
|
||||
break;
|
||||
case 'gray':
|
||||
$donateBackground = "#606e7f";
|
||||
$donateText = "#1b1d1b";
|
||||
$templateBackground = "transparent";
|
||||
$templateHoverBackground = "#0c0f0b";
|
||||
$templateFavourite = "#2b2b2b";
|
||||
$hrColor = "#606e7f";
|
||||
$border = "#606e7f";
|
||||
$watermarkColor = "rgba(96, 110, 127, 0.1)";
|
||||
$aColor = "#00b8d6";
|
||||
$sidebarBackground = "#121510";
|
||||
$sidebarText = "#f2f2f2";
|
||||
$betaPopupOffset = "1.5rem;";
|
||||
$supportPopupText = "#1b1d1b";
|
||||
$supportPopupBackground = "#ffffff";
|
||||
$modCommentBorder = "#cf3131";
|
||||
$sidebarCloseBackground = "rgba(0,0,0,0.7)";
|
||||
break;
|
||||
case 'black':
|
||||
$donateBackground = "#ffffff";
|
||||
$donateText = "#000000";
|
||||
$templateBackground = "#191818";
|
||||
$templateHoverBackground = "#121212";
|
||||
$templateFavourite = "#333333";
|
||||
$hrColor = "#2b2b2b";
|
||||
$borderColor = "#2b2b2b";
|
||||
$watermarkColor = "rgba(43, 43, 43, 0.4)";
|
||||
$aColor = "#00b8d6";
|
||||
$sidebarBackground = "#000000";
|
||||
$sidebarText = "#f2f2f2";
|
||||
$betaPopupOffset = "0";
|
||||
$supportPopupText = "#000000";
|
||||
$supportPopupBackground = "#ffffff";
|
||||
$modCommentBorder = "#cf3131";
|
||||
$sidebarCloseBackground = "rgba(0,0,0,0.7)";
|
||||
break;
|
||||
case 'white':
|
||||
$donateBackground = "#1c1b1b";
|
||||
$donateText = "#f2f2f2";
|
||||
$templateBackground = "#f5f5f5";
|
||||
$templateHoverBackground = "#ffffff";
|
||||
$templateFavourite = "#d0d0d0";
|
||||
$hrColor = "lightgrey";
|
||||
$borderColor = "#e3e3e3";
|
||||
$watermarkColor = "rgba(211, 211, 211, 0.8)";
|
||||
$aColor = "#486dba";
|
||||
$sidebarBackground = "#ffffff";
|
||||
$sidebarText = "#000000";
|
||||
$betaPopupOffset = "0";
|
||||
$supportPopupText = "#f2f2f2";
|
||||
$supportPopupBackground = "#1c1b1b";
|
||||
$modCommentBorder = "#cf3131";
|
||||
$sidebarCloseBackground = "rgba(0,0,0,0.7)";
|
||||
break;
|
||||
case 'azure':
|
||||
$donateBackground = "#606e7f";
|
||||
$donateText = "#e4e2e4";
|
||||
$templateBackground = "transparent";
|
||||
$templateHoverBackground = "#edeaef";
|
||||
$templateFavourite = "#e0e0e0";
|
||||
$hrColor = "#606e7f";
|
||||
$border = "#9794a7";
|
||||
$watermarkColor = "rgba(96, 110, 127, 0.1)";
|
||||
$aColor = "#486dba";
|
||||
$sidebarBackground = "#edeaef";
|
||||
$sidebarText = "#606e7f";
|
||||
$betaPopupOffset = "1.5rem;";
|
||||
$supportPopupText = "#1b1d1b";
|
||||
$supportPopupBackground = "#ffffff";
|
||||
$modCommentBorder = "#cf3131";
|
||||
$sidebarCloseBackground = "rgba(0,0,0,0.7)";
|
||||
break;
|
||||
case 'gray':
|
||||
$donateBackground = "#606e7f";
|
||||
$donateText = "#1b1d1b";
|
||||
$templateBackground = "transparent";
|
||||
$templateHoverBackground = "#0c0f0b";
|
||||
$templateFavourite = "#2b2b2b";
|
||||
$hrColor = "#606e7f";
|
||||
$border = "#606e7f";
|
||||
$watermarkColor = "rgba(96, 110, 127, 0.1)";
|
||||
$aColor = "#00b8d6";
|
||||
$sidebarBackground = "#121510";
|
||||
$sidebarText = "#f2f2f2";
|
||||
$betaPopupOffset = "1.5rem;";
|
||||
$supportPopupText = "#1b1d1b";
|
||||
$supportPopupBackground = "#ffffff";
|
||||
$modCommentBorder = "#cf3131";
|
||||
$sidebarCloseBackground = "rgba(0,0,0,0.7)";
|
||||
break;
|
||||
// Use settings for black as a fallback
|
||||
default:
|
||||
$donateBackground = "#f2f2f2";
|
||||
$donateText = "#1c1b1b";
|
||||
$templateBackground = "#0f0f0f";
|
||||
$templateFavourite = "#333333";
|
||||
$hrColor = "#2b2b2b";
|
||||
$borderColor = "#2b2b2b";
|
||||
$watermarkColor = "rgba(43, 43, 43, 0.4)";
|
||||
$aColor = "#00b8d6";
|
||||
$sidebarBackground = "#000000";
|
||||
$sidebarText = "#f2f2f2";
|
||||
$betaPopupOffset = "0";
|
||||
$supportPopupText = "#000000";
|
||||
$supportPopupBackground = "#ffffff";
|
||||
$modCommentBorder = "#cf3131";
|
||||
$sidebarCloseBackground = "rgba(0,0,0,.7)";
|
||||
break;
|
||||
default:
|
||||
$donateBackground = "#f2f2f2";
|
||||
$donateText = "#1c1b1b";
|
||||
$templateBackground = "#0f0f0f";
|
||||
$templateFavourite = "#333333";
|
||||
$hrColor = "#2b2b2b";
|
||||
$borderColor = "#2b2b2b";
|
||||
$watermarkColor = "rgba(43, 43, 43, 0.4)";
|
||||
$aColor = "#00b8d6";
|
||||
$sidebarBackground = "#000000";
|
||||
$sidebarText = "#f2f2f2";
|
||||
$betaPopupOffset = "0";
|
||||
$supportPopupText = "#000000";
|
||||
$supportPopupBackground = "#ffffff";
|
||||
$modCommentBorder = "#cf3131";
|
||||
$sidebarCloseBackground = "rgba(0,0,0,.7)";
|
||||
break;
|
||||
}
|
||||
?>
|
||||
a {color:<?=$aColor?>;}
|
||||
@ -462,8 +462,8 @@ table {background-color:transparent;}
|
||||
|
||||
|
||||
@keyframes cycleRed {
|
||||
0% {color: inherit;}
|
||||
50% {color: #882626;}
|
||||
0% {color: inherit;}
|
||||
50% {color: #882626;}
|
||||
}
|
||||
.awesomplete [hidden] {display: none;}
|
||||
.awesomplete .visually-hidden {position: absolute;clip: rect(0, 0, 0, 0);}
|
||||
@ -473,7 +473,7 @@ table {background-color:transparent;}
|
||||
.awesomplete > ul:empty {display: none;}
|
||||
.awesomplete > ul {border-radius: .3em;margin: .2em 0 0;background: hsla(0,0%,100%);background: linear-gradient(to bottom right, white, hsla(0,0%,100%));border: 1px solid rgba(0,0,0,.3);box-shadow: .05em .2em .6em rgba(0,0,0,.2);text-shadow: none;}
|
||||
@supports (transform: scale(0)) {.awesomplete > ul {transition: .3s cubic-bezier(.4,.2,.5,1.4);transform-origin: 1.43em -.43em;}
|
||||
.awesomplete > ul[hidden],.awesomplete > ul:empty {opacity: 0;transform: scale(0);display: block;transition-timing-function: ease;}
|
||||
.awesomplete > ul[hidden],.awesomplete > ul:empty {opacity: 0;transform: scale(0);display: block;transition-timing-function: ease;}
|
||||
}
|
||||
/* Pointer */
|
||||
.awesomplete > ul:before {content: "";position: absolute;top: -.43em;left: 1em;width: 0; height: 0;padding: .4em;background: white;border: inherit;border-right: 0;border-bottom: 0;-webkit-transform: rotate(45deg);transform: rotate(45deg);}
|
||||
@ -543,22 +543,22 @@ img.mfp-img {width: auto;max-width: 100%;height: auto;display: block;line-height
|
||||
.mfp-gallery .mfp-image-holder .mfp-figure {cursor: pointer; }
|
||||
@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
|
||||
/**
|
||||
* Remove all paddings around the image on small screen
|
||||
* Remove all paddings around the image on small screen
|
||||
*/
|
||||
.mfp-img-mobile .mfp-image-holder {padding-left: 0;padding-right: 0; }
|
||||
.mfp-img-mobile img.mfp-img {padding: 0; }
|
||||
.mfp-img-mobile .mfp-figure:after {top: 0;bottom: 0; }
|
||||
.mfp-img-mobile .mfp-figure small {display: inline;margin-left: 5px; }
|
||||
.mfp-img-mobile .mfp-bottom-bar {background: rgba(0, 0, 0, 0.6);bottom: 0;margin: 0;top: auto;padding: 3px 5px;position: fixed;box-sizing: border-box; }
|
||||
.mfp-img-mobile .mfp-bottom-bar:empty {padding: 0; }
|
||||
.mfp-img-mobile .mfp-counter {right: 5px;top: 3px; }
|
||||
.mfp-img-mobile .mfp-close {top: 0;right: 0;width: 35px;height: 35px;line-height: 35px;background: rgba(0, 0, 0, 0.6);position: fixed;text-align: center;padding: 0; }
|
||||
.mfp-img-mobile .mfp-image-holder {padding-left: 0;padding-right: 0; }
|
||||
.mfp-img-mobile img.mfp-img {padding: 0; }
|
||||
.mfp-img-mobile .mfp-figure:after {top: 0;bottom: 0; }
|
||||
.mfp-img-mobile .mfp-figure small {display: inline;margin-left: 5px; }
|
||||
.mfp-img-mobile .mfp-bottom-bar {background: rgba(0, 0, 0, 0.6);bottom: 0;margin: 0;top: auto;padding: 3px 5px;position: fixed;box-sizing: border-box; }
|
||||
.mfp-img-mobile .mfp-bottom-bar:empty {padding: 0; }
|
||||
.mfp-img-mobile .mfp-counter {right: 5px;top: 3px; }
|
||||
.mfp-img-mobile .mfp-close {top: 0;right: 0;width: 35px;height: 35px;line-height: 35px;background: rgba(0, 0, 0, 0.6);position: fixed;text-align: center;padding: 0; }
|
||||
}
|
||||
@media all and (max-width: 900px) {
|
||||
.mfp-arrow {-webkit-transform: scale(0.75);transform: scale(0.75); }
|
||||
.mfp-arrow-left {-webkit-transform-origin: 0;transform-origin: 0; }
|
||||
.mfp-arrow-right {-webkit-transform-origin: 100%;transform-origin: 100%; }
|
||||
.mfp-container {padding-left: 6px;padding-right: 6px; }
|
||||
.mfp-arrow {-webkit-transform: scale(0.75);transform: scale(0.75); }
|
||||
.mfp-arrow-left {-webkit-transform-origin: 0;transform-origin: 0; }
|
||||
.mfp-arrow-right {-webkit-transform-origin: 100%;transform-origin: 100%; }
|
||||
.mfp-container {padding-left: 6px;padding-right: 6px; }
|
||||
}
|
||||
/* overlay at start */
|
||||
.mfp-fade.mfp-bg {opacity: 0;-webkit-transition: all 0.5s ease-out;-moz-transition: all 0.5s ease-out;transition: all 0.5s ease-out;}
|
||||
|
@ -1,45 +1,45 @@
|
||||
<div class='spinnerBackground'></div>
|
||||
<div class='menuItems'>
|
||||
<ul class='caMenu '>
|
||||
<li class='startupButton caMenuItem onlyShowWithFeed' data-category='new'><?tr("Home");?></li>
|
||||
<hr class='onlyShowWithFeed'>
|
||||
<li class='caMenuItem sectionMenu onlyShowWithFeed' data-category='installed_apps'><?tr("Installed Apps");?></li>
|
||||
<ul class='subCategory onlyShowWithFeed'>
|
||||
<li class='caMenuItem sectionMenu onlyShowWithFeed dockerSpecific' data-category='inst_docker'><?tr("Docker");?></li>
|
||||
<li class='caMenuItem sectionMenu onlyShowWithFeed' data-category='inst_plugins'><?tr("Plugins");?></li>
|
||||
</ul>
|
||||
<li class='caMenuItem sectionMenu onlyShowWithFeed' data-category='previous_apps'><?tr("Previous Apps");?></li>
|
||||
<ul class='subCategory onlyShowWithFeed'>
|
||||
<li class='caMenuItem sectionMenu dockerSpecific' data-category='prev_docker'><?tr("Docker");?></li>
|
||||
<li class='caMenuItem sectionMenu' data-category='prev_plugins'><?tr("Plugins");?></li>
|
||||
</ul>
|
||||
<li class='caMenuItem sectionMenu caPinnedMenu onlyShowWithFeed' data-category='pinned_apps'><?tr("Pinned Apps");?></li>
|
||||
<li class='caMenuItem favouriteRepo onlyShowWithFeed'><?tr("Favourite Repo");?></li>
|
||||
<li class='caMenuItem sectionMenu actionCentre onlyShowWithFeed' style='display:none;' data-category='action_centre'><?tr("Action Centre");?> <span class='ca_fa-warning'></span></li>
|
||||
<hr class='onlyShowWithFeed'>
|
||||
<li class='startupButton caMenuItem onlyShowWithFeed' data-category='new'><?tr("Home");?></li>
|
||||
<hr class='onlyShowWithFeed'>
|
||||
<li class='caMenuItem sectionMenu onlyShowWithFeed' data-category='installed_apps'><?tr("Installed Apps");?></li>
|
||||
<ul class='subCategory onlyShowWithFeed'>
|
||||
<li class='caMenuItem sectionMenu onlyShowWithFeed dockerSpecific' data-category='inst_docker'><?tr("Docker");?></li>
|
||||
<li class='caMenuItem sectionMenu onlyShowWithFeed' data-category='inst_plugins'><?tr("Plugins");?></li>
|
||||
</ul>
|
||||
<li class='caMenuItem sectionMenu onlyShowWithFeed' data-category='previous_apps'><?tr("Previous Apps");?></li>
|
||||
<ul class='subCategory onlyShowWithFeed'>
|
||||
<li class='caMenuItem sectionMenu dockerSpecific' data-category='prev_docker'><?tr("Docker");?></li>
|
||||
<li class='caMenuItem sectionMenu' data-category='prev_plugins'><?tr("Plugins");?></li>
|
||||
</ul>
|
||||
<li class='caMenuItem sectionMenu caPinnedMenu onlyShowWithFeed' data-category='pinned_apps'><?tr("Pinned Apps");?></li>
|
||||
<li class='caMenuItem favouriteRepo onlyShowWithFeed'><?tr("Favourite Repo");?></li>
|
||||
<li class='caMenuItem sectionMenu actionCentre onlyShowWithFeed' style='display:none;' data-category='action_centre'><?tr("Action Centre");?> <span class='ca_fa-warning'></span></li>
|
||||
<hr class='onlyShowWithFeed'>
|
||||
|
||||
<ul class='caMenu'>
|
||||
<span id='category_list' class='onlyShowWithFeed'></span>
|
||||
<li class='categoryMenu caMenuItem allApps onlyShowWithFeed nonDockerSearch' data-category='All'><?tr("All Apps");?></li>
|
||||
<hr class='category_hr'>
|
||||
<li class='categoryMenu caMenuItem caRepositoryMenu onlyShowWithFeed nonDockerSearch' data-category='repos'><?tr("Repositories");?></li>
|
||||
<ul class='caMenu'>
|
||||
<span id='category_list' class='onlyShowWithFeed'></span>
|
||||
<li class='categoryMenu caMenuItem allApps onlyShowWithFeed nonDockerSearch' data-category='All'><?tr("All Apps");?></li>
|
||||
<hr class='category_hr'>
|
||||
<li class='categoryMenu caMenuItem caRepositoryMenu onlyShowWithFeed nonDockerSearch' data-category='repos'><?tr("Repositories");?></li>
|
||||
<hr class='category_hr onlyShowWithFeed'>
|
||||
<li class='caMenuItem' onclick='window.location="/Apps/ca_settings"'><?tr("Settings");?></a></li>
|
||||
<li class='caMenuItem statistics' onclick='disableSort();scrollToTop();showStatistics();'><?tr("Statistics");?></li>
|
||||
<li class='caMenuItem' onclick='disableSort();scrollToTop();showCredits();'><?tr("Credits");?></li>
|
||||
<li class='caMenuItem'><a class='caMenuItem' href='https://forums.unraid.net/topic/38582-plug-in-community-applications/' target='_blank' style='text-decoration:none;color:inherit;'><?tr("Support");?></a></li>
|
||||
<li class='caMenuItem' onclick='window.location="/Apps/ca_settings"'><?tr("Settings");?></a></li>
|
||||
<li class='caMenuItem statistics' onclick='disableSort();scrollToTop();showStatistics();'><?tr("Statistics");?></li>
|
||||
<li class='caMenuItem' onclick='disableSort();scrollToTop();showCredits();'><?tr("Credits");?></li>
|
||||
<li class='caMenuItem'><a class='caMenuItem' href='https://forums.unraid.net/topic/38582-plug-in-community-applications/' target='_blank' style='text-decoration:none;color:inherit;'><?tr("Support");?></a></li>
|
||||
<hr class='category_hr'>
|
||||
</ul>
|
||||
</ul>
|
||||
<ul class='nonselectMenu'>
|
||||
<li><?=tr("VERSION");?></li>
|
||||
<li><span id='caInstalledVersion'></span></li>
|
||||
<li class='caMenuItem caChangeLog'><?tr("Change Log");?></li>
|
||||
<li><?=tr("VERSION");?></li>
|
||||
<li><span id='caInstalledVersion'></span></li>
|
||||
<li class='caMenuItem caChangeLog'><?tr("Change Log");?></li>
|
||||
<?if ($md5Error):?>
|
||||
<li><font size='0'>Modified</font></li>
|
||||
<li><font size='0'>Modified</font></li>
|
||||
<?endif;?>
|
||||
<?if ($cfg['debugging'] == "yes"):?>
|
||||
<hr>
|
||||
<li class='caMenuItem debugging'><?tr("Debugging");?></li>
|
||||
<li class='caMenuItem debugging'><?tr("Debugging");?></li>
|
||||
<?endif;?>
|
||||
</ul>
|
||||
</div>
|
||||
@ -61,22 +61,22 @@
|
||||
</div>
|
||||
<span id='debugging'></span>
|
||||
<span id='caCredits' style='display:none;'>
|
||||
<div class='credits'>
|
||||
<div class='ca_center'><i class='fa fa-users' style='font-size:5rem;margin-top:2rem;'></i></div>
|
||||
<div class='ca_center'><font size='5'>Community Applications</font></div>
|
||||
<div class='ca_center ca_creditheader'><?tr("Development");?></div>
|
||||
<div class='ca_center ca_credit'>Andrew Zawadzki</div>
|
||||
<div class='ca_center ca_creditheader'><?tr("Additional Contributions");?></div>
|
||||
<div class='ca_center ca_credit'>bonienl, Lime Technology Inc</div>
|
||||
<div class='ca_center ca_creditheader'><?tr("GUI Layout Design");?></div>
|
||||
<div class='ca_center ca_credit'>Magnus Engø</div>
|
||||
<div class='ca_center ca_creditheader'><?tr("Application Feed");?></div>
|
||||
<div class='ca_center ca_credit'>Andrew Zawadzki, Kode, Lime Technology Inc</div>
|
||||
<div class='ca_center ca_creditheader'><?tr("Additional Testing");?></div>
|
||||
<div class='ca_center ca_credit'>CHBMB, SpaceInvaderOne, Sparklyballs, wgstarks, DJoss, Zer0Nin3r, Mex, prostuff1, bonienl, ljm42, kizer, trurl, Jos, Lime Technology Inc, SimonF, ich777, jimmy898, Alex.b, neruve, Eugeni_CAT, ChaseCares, TheEyeTGuy, dlandon</div>
|
||||
<div class='ca_center ca_creditheader'><?tr("Additional Libraries");?></div>
|
||||
<div class='ca_center ca_credit'>Awesomeplete (Lea Verou)<br>Chart.js (various)<br>chartjs-plugin-trendline (Marcus Alsterfjord)<br>XML2Array/Array2XML (Miles Johnson)<br>sprintf.js (Alexandru Mărășteanu) (< Unraid 6.10 only)<br>Magnific-Popup (Dmitry Semenov)</div>
|
||||
<br>
|
||||
<div class='ca_center ca_italic'><font size='1rem;'><?tr("Copyright");?> © 2015-2023 Andrew Zawadzki</font></div>
|
||||
</div>
|
||||
<div class='credits'>
|
||||
<div class='ca_center'><i class='fa fa-users' style='font-size:5rem;margin-top:2rem;'></i></div>
|
||||
<div class='ca_center'><font size='5'>Community Applications</font></div>
|
||||
<div class='ca_center ca_creditheader'><?tr("Development");?></div>
|
||||
<div class='ca_center ca_credit'>Andrew Zawadzki</div>
|
||||
<div class='ca_center ca_creditheader'><?tr("Additional Contributions");?></div>
|
||||
<div class='ca_center ca_credit'>bonienl, Lime Technology Inc</div>
|
||||
<div class='ca_center ca_creditheader'><?tr("GUI Layout Design");?></div>
|
||||
<div class='ca_center ca_credit'>Magnus Engø</div>
|
||||
<div class='ca_center ca_creditheader'><?tr("Application Feed");?></div>
|
||||
<div class='ca_center ca_credit'>Andrew Zawadzki, Kode, Lime Technology Inc</div>
|
||||
<div class='ca_center ca_creditheader'><?tr("Additional Testing");?></div>
|
||||
<div class='ca_center ca_credit'>CHBMB, SpaceInvaderOne, Sparklyballs, wgstarks, DJoss, Zer0Nin3r, Mex, prostuff1, bonienl, ljm42, kizer, trurl, Jos, Lime Technology Inc, SimonF, ich777, jimmy898, Alex.b, neruve, Eugeni_CAT, ChaseCares, TheEyeTGuy, dlandon</div>
|
||||
<div class='ca_center ca_creditheader'><?tr("Additional Libraries");?></div>
|
||||
<div class='ca_center ca_credit'>Awesomeplete (Lea Verou)<br>Chart.js (various)<br>chartjs-plugin-trendline (Marcus Alsterfjord)<br>XML2Array/Array2XML (Miles Johnson)<br>sprintf.js (Alexandru Mărășteanu) (< Unraid 6.10 only)<br>Magnific-Popup (Dmitry Semenov)</div>
|
||||
<br>
|
||||
<div class='ca_center ca_italic'><font size='1rem;'><?tr("Copyright");?> © 2015-2023 Andrew Zawadzki</font></div>
|
||||
</div>
|
||||
</span>
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user