Merge pull request #2297 from MPOS/dashboard-global-api-disabled
[FIX] Disable API calls if not enabled
This commit is contained in:
commit
f58db4f032
@ -52,6 +52,7 @@ if ($user->isAuthenticated()) {
|
||||
$smarty->assign('BLOCKSFOUND', $aLastBlocks);
|
||||
$smarty->assign('DISABLED_DASHBOARD', $setting->getValue('disable_dashboard'));
|
||||
$smarty->assign('DISABLED_DASHBOARD_API', $setting->getValue('disable_dashboard_api'));
|
||||
$smarty->assign('DISABLED_API', $setting->getValue('disable_api'));
|
||||
$smarty->assign('ESTIMATES', array('shares' => $iEstShares, 'percent' => $dEstPercent));
|
||||
$smarty->assign('NETWORK', array('difficulty' => $dDifficulty, 'block' => $iBlock, 'EstNextDifficulty' => $dEstNextDifficulty, 'EstTimePerBlock' => $dExpectedTimePerBlock, 'BlocksUntilDiffChange' => $iBlocksUntilDiffChange));
|
||||
$smarty->assign('INTERVAL', $interval / 60);
|
||||
|
||||
@ -16,7 +16,9 @@
|
||||
{include file="dashboard/overview/default.tpl"}
|
||||
{include file="dashboard/round_statistics/$PAYOUT_SYSTEM/default.tpl"}
|
||||
{include file="dashboard/account_data/default.tpl"}
|
||||
{if !$DISABLED_API}
|
||||
{include file="dashboard/worker_information/default.tpl"}
|
||||
{/if}
|
||||
{include file="dashboard/blocks/default.tpl"}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -178,7 +178,7 @@ $(document).ready(function(){
|
||||
return;
|
||||
}
|
||||
if (blocks[0].height > lastBlock) {
|
||||
if(canCreateSoundJS) {
|
||||
if(canCreateSoundJS) {
|
||||
createjs.Sound.play('ding');
|
||||
}
|
||||
lastBlock = blocks[0].height;
|
||||
@ -234,6 +234,7 @@ $(document).ready(function(){
|
||||
});
|
||||
})();
|
||||
|
||||
{/literal}{if !$DISABLED_API}{literal}
|
||||
// Worker process to update active workers in the account details table
|
||||
(function worker2() {
|
||||
$.ajax({
|
||||
@ -250,7 +251,9 @@ $(document).ready(function(){
|
||||
}
|
||||
});
|
||||
})();
|
||||
{/literal}{/if}{literal}
|
||||
|
||||
{/literal}{if !$DISABLED_API}{literal}
|
||||
// Worker process to update user account balances
|
||||
// Our worker process to keep worker information updated
|
||||
(function worker3() {
|
||||
@ -265,7 +268,8 @@ $(document).ready(function(){
|
||||
}
|
||||
});
|
||||
})();
|
||||
|
||||
{/literal}{/if}{literal}
|
||||
|
||||
// Mute Button
|
||||
$('#muteButton').click(function(){
|
||||
if(muteFlag == 2) {
|
||||
@ -280,8 +284,6 @@ $(document).ready(function(){
|
||||
$(this).find($(".fa")).removeClass('fa-volume-up').addClass('fa-volume-off');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
{/literal}
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user