Make quota levels configurable

Signed-off-by: Sven Strickroth <email@cs-ware.de>
pull/255/head
Sven Strickroth 6 years ago
parent 852a09f138
commit 56395709f3

@ -344,6 +344,10 @@ $CONF['quota'] = 'NO';
$CONF['domain_quota'] = 'YES'; $CONF['domain_quota'] = 'YES';
// You can either use '1024000' or '1048576' // You can either use '1024000' or '1048576'
$CONF['quota_multiplier'] = '1024000'; $CONF['quota_multiplier'] = '1024000';
// fill state threshold (in per cent) for medium level (displayed as orange)
$CONF['quota_level_med_pct'] = 55;
// fill state threshold (in per cent) for high level (displayed as red)
$CONF['quota_level_high_pct'] = 90;
// Transport // Transport
// If you want to define additional transport options for a domain set this to 'YES'. // If you want to define additional transport options for a domain set this to 'YES'.

@ -60,9 +60,9 @@
{if $boolconf_used_quotas} {if $boolconf_used_quotas}
{if $divide_quota.quota_width[$i]>90} {if $divide_quota.quota_width[$i] > $conf.quota_level_high_pct}
{assign var="quota_level" value="high"} {assign var="quota_level" value="high"}
{elseif $divide_quota.quota_width[$i]>55} {elseif $divide_quota.quota_width[$i] > $conf.quota_level_med_pct}
{assign var="quota_level" value="mid"} {assign var="quota_level" value="mid"}
{else} {else}
{assign var="quota_level" value="low"} {assign var="quota_level" value="low"}

@ -91,9 +91,9 @@
{elseif $field.type == 'quot'} {elseif $field.type == 'quot'}
{assign "tmpkey" "_{$key}_percent"} {assign "tmpkey" "_{$key}_percent"}
{if $item[$tmpkey]>90} {if $item[$tmpkey] > $conf.quota_level_high_pct}
{assign var="quota_level" value="high"} {assign var="quota_level" value="high"}
{elseif $item[$tmpkey]>55} {elseif $item[$tmpkey] > $conf.quota_level_med_pct}
{assign var="quota_level" value="mid"} {assign var="quota_level" value="mid"}
{else} {else}
{assign var="quota_level" value="low"} {assign var="quota_level" value="low"}

Loading…
Cancel
Save