mirror of
https://github.com/Squidly271/community.applications.git
synced 2025-06-03 14:52:13 +08:00
Ability to run anyways on memory requirements not met
This commit is contained in:
parent
e4d473c61c
commit
ba441e063e
Binary file not shown.
@ -121,9 +121,14 @@ if ( is_file($caPaths['docker_cfg']) )
|
|||||||
$memRaw = trim(str_replace("MemTotal:","",exec("cat /proc/meminfo | grep MemTotal:")));
|
$memRaw = trim(str_replace("MemTotal:","",exec("cat /proc/meminfo | grep MemTotal:")));
|
||||||
$memoryInstalled = explode(" ",$memRaw);
|
$memoryInstalled = explode(" ",$memRaw);
|
||||||
|
|
||||||
|
$RequirementsBanner = false;
|
||||||
$CArequirementsNOTmet = $memoryInstalled[0] < 2500000;
|
$CArequirementsNOTmet = $memoryInstalled[0] < 2500000;
|
||||||
$ServerDateCorrect = checkServerDate() ? "true": "false";
|
if ( $CArequirementsNOTmet && isset($_COOKIE['ca_memoryOverride']) && $_COOKIE['ca_memoryOverride']) {
|
||||||
|
$CArequirementsNOTmet = false;
|
||||||
|
$RequirementsBanner = "true";
|
||||||
|
}
|
||||||
|
|
||||||
|
$ServerDateCorrect = checkServerDate() ? "true": "false";
|
||||||
|
|
||||||
function tr($string,$ret=false) {
|
function tr($string,$ret=false) {
|
||||||
$string = str_replace('"',""",str_replace("'","'",_($string)));
|
$string = str_replace('"',""",str_replace("'","'",_($string)));
|
||||||
@ -199,12 +204,18 @@ $(function(){
|
|||||||
text: '<?tr('Community Applications (and Unraid OS) have a minimum required memory of 4G. CA cannot run without those mimimums being met');?>',
|
text: '<?tr('Community Applications (and Unraid OS) have a minimum required memory of 4G. CA cannot run without those mimimums being met');?>',
|
||||||
html: true,
|
html: true,
|
||||||
type: 'error',
|
type: 'error',
|
||||||
showCancelButton: false,
|
showCancelButton: true,
|
||||||
showConfirmButton: true,
|
showConfirmButton: true,
|
||||||
cancelButtonText: "<?tr('Cancel')?>",
|
cancelButtonText: "<?tr('Run Anyways')?>",
|
||||||
confirmButtonText: "<?tr('I Understand')?>"
|
confirmButtonText: "<?tr('I Understand')?>"
|
||||||
}, function (isConfirm) {
|
}, function (isConfirm) {
|
||||||
history.back();
|
if ( isConfirm ) {
|
||||||
|
$.cookie("ca_memoryOverride","");
|
||||||
|
history.back();
|
||||||
|
} else {
|
||||||
|
$.cookie("ca_memoryOverride","override");
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
<? endif; ?>
|
<? endif; ?>
|
||||||
@ -271,8 +282,8 @@ $(function(){
|
|||||||
if ( "<?=$date?>" == "1/01" ) addBannerWarning("<?tr("Happy New Year!")?>",false);
|
if ( "<?=$date?>" == "1/01" ) addBannerWarning("<?tr("Happy New Year!")?>",false);
|
||||||
if ( "<?=$date?>" == "12/31" ) addBannerWarning("<?tr("Happy New Year!")?> <i style='float:initial;cursor:initial;' class='fa fa-beer'></i> <?tr("Please Enjoy Responsibly")?>",false);
|
if ( "<?=$date?>" == "12/31" ) addBannerWarning("<?tr("Happy New Year!")?> <i style='float:initial;cursor:initial;' class='fa fa-beer'></i> <?tr("Please Enjoy Responsibly")?>",false);
|
||||||
if ( "<?=$ServerDateCorrect?>" == "false" ) addBannerWarning("<?tr("Server Date and Time Incorrect. Issues will result with Community Applications. Fix this in Settings - Date And Time")?>",true,true);
|
if ( "<?=$ServerDateCorrect?>" == "false" ) addBannerWarning("<?tr("Server Date and Time Incorrect. Issues will result with Community Applications. Fix this in Settings - Date And Time")?>",true,true);
|
||||||
|
if ( "<?=$RequirementsBanner?>" == "true" ) addBannerWarning("<?tr("Memory Requirements not met. Problems may result")?>");
|
||||||
|
|
||||||
context.init({preventDoubleContext:false,left:false,right:false,bottom:true,above:true});
|
context.init({preventDoubleContext:false,left:false,right:false,bottom:true,above:true});
|
||||||
|
|
||||||
$(".maxPerPage").html(sprintf("<?tr("Results Per Page: %s")?>","<?=$cfg['maxPerPage']?>"));
|
$(".maxPerPage").html(sprintf("<?tr("Results Per Page: %s")?>","<?=$cfg['maxPerPage']?>"));
|
||||||
@ -1222,7 +1233,7 @@ function closeSidebar(cookie=false,visible=false) {
|
|||||||
$(".sidebar").fadeOut();
|
$(".sidebar").fadeOut();
|
||||||
<? if ($unRaid612): ?>
|
<? if ($unRaid612): ?>
|
||||||
$(".nav-user.show").show();
|
$(".nav-user.show").show();
|
||||||
<?endif;?>
|
<?endif;?>
|
||||||
}
|
}
|
||||||
|
|
||||||
function installPlugin(pluginURL,update=false,comment="",requires="") {
|
function installPlugin(pluginURL,update=false,comment="",requires="") {
|
||||||
@ -1451,7 +1462,7 @@ function actionCentre() {
|
|||||||
getPrevApps("action");
|
getPrevApps("action");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1483,7 +1494,7 @@ function getPrevApps(installed,filter,dontClear) {
|
|||||||
$("#Category").html(msg);
|
$("#Category").html(msg);
|
||||||
changeSortOrder(null,null,"true");
|
changeSortOrder(null,null,"true");
|
||||||
enableMultiInstall();
|
enableMultiInstall();
|
||||||
|
|
||||||
// saveState();
|
// saveState();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -1850,7 +1861,7 @@ function enableMultiInstall() {
|
|||||||
var selected = getSelectedApps();
|
var selected = getSelectedApps();
|
||||||
var count = selected.plugin.length + selected.docker.length + selected.language.length;
|
var count = selected.plugin.length + selected.docker.length + selected.language.length;
|
||||||
var actionText = $(".multi_installButton").hasClass("actionCenter") ? "Update" : "Install";
|
var actionText = $(".multi_installButton").hasClass("actionCenter") ? "Update" : "Install";
|
||||||
if ( count == 0 ) {
|
if ( count == 0 ) {
|
||||||
$(".multi_install,.multi_installClear").attr("disabled",true);
|
$(".multi_install,.multi_installClear").attr("disabled",true);
|
||||||
$(".multi_deleteButton").css("visibility","hidden");
|
$(".multi_deleteButton").css("visibility","hidden");
|
||||||
$(".multi_installButton").val(tr(actionText + " Selected Applications"));
|
$(".multi_installButton").val(tr(actionText + " Selected Applications"));
|
||||||
@ -2129,7 +2140,7 @@ function updateDisplay(content) {
|
|||||||
var newSize = size - 1;
|
var newSize = size - 1;
|
||||||
if (newSize == 8)
|
if (newSize == 8)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
$(this).css("font-size",newSize+"px");
|
$(this).css("font-size",newSize+"px");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -2144,10 +2155,10 @@ function updateDisplay(content) {
|
|||||||
var newSize = size - 1;
|
var newSize = size - 1;
|
||||||
if (newSize == 0)
|
if (newSize == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
$(this).css("font-size",newSize+"px");
|
$(this).css("font-size",newSize+"px");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if ( $("html").hasClass("translated-ltr") || $("html").hasClass("translated-rtl") || $("head").hasClass("translated-ltr") || $("head").hasClass("translated-rtl") ) {
|
if ( $("html").hasClass("translated-ltr") || $("html").hasClass("translated-rtl") || $("head").hasClass("translated-ltr") || $("head").hasClass("translated-rtl") ) {
|
||||||
data.translationBanner = addBannerWarning("<?=tr("Browser translation detected. Display issues may result")?>");
|
data.translationBanner = addBannerWarning("<?=tr("Browser translation detected. Display issues may result")?>");
|
||||||
} else {
|
} else {
|
||||||
@ -2170,7 +2181,7 @@ function isOverflown(el,type=false){
|
|||||||
return (el.scrollWidth > el.clientWidth);
|
return (el.scrollWidth > el.clientWidth);
|
||||||
else
|
else
|
||||||
return (el.scrollHeight > el.clientHeight);
|
return (el.scrollHeight > el.clientHeight);
|
||||||
|
|
||||||
return (el.scrollHeight > el.clientHeight) || (el.scrollWidth > el.clientWidth)||(el.offsetWidth < el.scrollWidth);
|
return (el.scrollHeight > el.clientHeight) || (el.scrollWidth > el.clientWidth)||(el.offsetWidth < el.scrollWidth);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3048,7 +3059,7 @@ function showRepoPopup(repository) {
|
|||||||
$("body").css("overflow","hidden !important");
|
$("body").css("overflow","hidden !important");
|
||||||
<? if ($unRaid612): ?>
|
<? if ($unRaid612): ?>
|
||||||
$(".nav-user.show").hide();
|
$(".nav-user.show").hide();
|
||||||
<?endif;?>
|
<?endif;?>
|
||||||
|
|
||||||
post({action:'getRepoDescription',repository:repository},function(result) {
|
post({action:'getRepoDescription',repository:repository},function(result) {
|
||||||
$("#sidenavContent").html(result.description);
|
$("#sidenavContent").html(result.description);
|
||||||
@ -3183,7 +3194,7 @@ function setupActionCentre() {
|
|||||||
// only use action centre on 6.12+
|
// only use action centre on 6.12+
|
||||||
<? if ( ! $unRaid612 ) : ?>
|
<? if ( ! $unRaid612 ) : ?>
|
||||||
return;
|
return;
|
||||||
<? endif; ?>
|
<? endif; ?>
|
||||||
// set up action centre - run in background without tying anything up
|
// set up action centre - run in background without tying anything up
|
||||||
var acBanner = false;
|
var acBanner = false;
|
||||||
$.post("/plugins/<?=$plugin?>/include/exec.php",{action:'enableActionCentre'},function(data) {
|
$.post("/plugins/<?=$plugin?>/include/exec.php",{action:'enableActionCentre'},function(data) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
abb05edd9c7754357601fdff36a6238d ./Apps.page
|
2d4665b10d47550f528bb4409b1077ac ./Apps.page
|
||||||
385834d91dc8758bfcd5d34f1c3e530e ./CA_notices.page
|
385834d91dc8758bfcd5d34f1c3e530e ./CA_notices.page
|
||||||
2c2a1b7d148fe51ee38813d1a0e71589 ./ca_settings.page
|
2c2a1b7d148fe51ee38813d1a0e71589 ./ca_settings.page
|
||||||
01ed7990078dee7cecfeda9a4e49377e ./default.cfg
|
01ed7990078dee7cecfeda9a4e49377e ./default.cfg
|
||||||
@ -20,7 +20,7 @@ a1cb6e1930f2ad689ce9e7fc2e39c846 ./scripts/notices.php
|
|||||||
47456eef0760a57a792177ea065358c3 ./scripts/showStatistics.php
|
47456eef0760a57a792177ea065358c3 ./scripts/showStatistics.php
|
||||||
4425f8fd4ef662a7dc65cee01de3e419 ./scripts/updatePLG.sh
|
4425f8fd4ef662a7dc65cee01de3e419 ./scripts/updatePLG.sh
|
||||||
52355989c2bec01cfd55fe619588a033 ./scripts/updatePluginSupport.php
|
52355989c2bec01cfd55fe619588a033 ./scripts/updatePluginSupport.php
|
||||||
5a0516d49f7c195b67e4d61913b12bd5 ./skins/Narrow/css.php
|
a5f4bb693e7e2329dd36982447ecc0ed ./skins/Narrow/css.php
|
||||||
269e66607463412a75aca9e7d48b0325 ./skins/Narrow/skin.html
|
269e66607463412a75aca9e7d48b0325 ./skins/Narrow/skin.html
|
||||||
94d6cdbb0833a08f31457c4d92313630 ./skins/Narrow/skin.php
|
94d6cdbb0833a08f31457c4d92313630 ./skins/Narrow/skin.php
|
||||||
c26b187a50c966adff7bfb9cab6fca16 ./event/disks_mounted
|
c26b187a50c966adff7bfb9cab6fca16 ./event/disks_mounted
|
||||||
|
Loading…
x
Reference in New Issue
Block a user