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) {
|
||||||
|
if ( isConfirm ) {
|
||||||
|
$.cookie("ca_memoryOverride","");
|
||||||
history.back();
|
history.back();
|
||||||
|
} else {
|
||||||
|
$.cookie("ca_memoryOverride","override");
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
<? endif; ?>
|
<? endif; ?>
|
||||||
@ -271,7 +282,7 @@ $(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});
|
||||||
|
|
||||||
|
@ -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