Merge pull request #255 from csware/quota-level

Make quota levels configurable
pull/294/head
David Goodwin 6 years ago committed by GitHub
commit 684cf3d829
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -344,6 +344,10 @@ $CONF['quota'] = 'NO';
$CONF['domain_quota'] = 'YES';
// You can either use '1024000' or '1048576'
$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
// If you want to define additional transport options for a domain set this to 'YES'.

@ -60,9 +60,9 @@
{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"}
{elseif $divide_quota.quota_width[$i]>55}
{elseif $divide_quota.quota_width[$i] > $conf.quota_level_med_pct}
{assign var="quota_level" value="mid"}
{else}
{assign var="quota_level" value="low"}

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

Loading…
Cancel
Save