parent
0f13bd7c4f
commit
d289b422f3
@ -29,6 +29,7 @@ if ($setting->getValue('disable_notifications') == 1) {
|
|||||||
$monitoring->endCronjob($cron_name, 'E0009', 0, true, false);
|
$monitoring->endCronjob($cron_name, 'E0009', 0, true, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($setting->getValue('notifications_disable_idle_worker') != 1) {
|
||||||
$log->logDebug(" IDLE Worker Notifications ...");
|
$log->logDebug(" IDLE Worker Notifications ...");
|
||||||
// Find all IDLE workers
|
// Find all IDLE workers
|
||||||
$aWorkers = $worker->getAllIdleWorkers();
|
$aWorkers = $worker->getAllIdleWorkers();
|
||||||
@ -71,6 +72,7 @@ if (!empty($aNotifications)) {
|
|||||||
} else {
|
} else {
|
||||||
$log->logDebug(" no active IDLE worker notifications");
|
$log->logDebug(" no active IDLE worker notifications");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
require_once('cron_end.inc.php');
|
require_once('cron_end.inc.php');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -425,3 +425,10 @@ $aSettings['notifications'][] = array(
|
|||||||
'name' => 'notifications_disable_block', 'value' => $setting->getValue('notifications_disable_block'),
|
'name' => 'notifications_disable_block', 'value' => $setting->getValue('notifications_disable_block'),
|
||||||
'tooltip' => 'Enable/Disable block notifications globally. Will remove the user option too.'
|
'tooltip' => 'Enable/Disable block notifications globally. Will remove the user option too.'
|
||||||
);
|
);
|
||||||
|
$aSettings['notifications'][] = array(
|
||||||
|
'display' => 'Disable IDLE Worker Notifications', 'type' => 'select',
|
||||||
|
'options' => array( 0 => 'No', 1 => 'Yes'),
|
||||||
|
'default' => 0,
|
||||||
|
'name' => 'notifications_disable_idle_worker', 'value' => $setting->getValue('notifications_disable_idle_worker'),
|
||||||
|
'tooltip' => 'Enable/Disable IDLE worker notifications globally. Will remove the user option too.'
|
||||||
|
);
|
||||||
|
|||||||
@ -24,6 +24,7 @@ if ($user->isAuthenticated()) {
|
|||||||
|
|
||||||
// Fetch global settings
|
// Fetch global settings
|
||||||
$smarty->assign('DISABLE_BLOCKNOTIFICATIONS', $setting->getValue('notifications_disable_block'));
|
$smarty->assign('DISABLE_BLOCKNOTIFICATIONS', $setting->getValue('notifications_disable_block'));
|
||||||
|
$smarty->assign('DISABLE_IDLEWORKERNOTIFICATIONS', $setting->getValue('notifications_disable_idle_worker'));
|
||||||
|
|
||||||
// Fetch user notification settings
|
// Fetch user notification settings
|
||||||
$aSettings = $notification->getNotificationSettings($_SESSION['USERDATA']['id']);
|
$aSettings = $notification->getNotificationSettings($_SESSION['USERDATA']['id']);
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
<th align="left">Type</th>
|
<th align="left">Type</th>
|
||||||
<th align="center">Active</th>
|
<th align="center">Active</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
{if $DISABLE_IDLEWORKERNOTIFICATIONS|default:"" != 1}
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left">IDLE Worker</td>
|
<td align="left">IDLE Worker</td>
|
||||||
<td>
|
<td>
|
||||||
@ -25,6 +26,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
{/if}
|
||||||
{if $DISABLE_BLOCKNOTIFICATIONS|default:"" != 1}
|
{if $DISABLE_BLOCKNOTIFICATIONS|default:"" != 1}
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left">New Blocks</td>
|
<td align="left">New Blocks</td>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user