display API in the list of features the customer is allowed to use; display total diskspace used by customer (web, mail and mysql) on customers dashboard, fixes #733
Signed-off-by: Michael Kaufmann <michael.kaufmann@aixit.com>
This commit is contained in:
@@ -98,10 +98,12 @@ if ($page == 'overview') {
|
|||||||
$userinfo['diskspace_used'] = round($usages['webspace'] / 1024, Settings::Get('panel.decimal_places'));
|
$userinfo['diskspace_used'] = round($usages['webspace'] / 1024, Settings::Get('panel.decimal_places'));
|
||||||
$userinfo['mailspace_used'] = round($usages['mail'] / 1024, Settings::Get('panel.decimal_places'));
|
$userinfo['mailspace_used'] = round($usages['mail'] / 1024, Settings::Get('panel.decimal_places'));
|
||||||
$userinfo['dbspace_used'] = round($usages['mysql'] / 1024, Settings::Get('panel.decimal_places'));
|
$userinfo['dbspace_used'] = round($usages['mysql'] / 1024, Settings::Get('panel.decimal_places'));
|
||||||
|
$userinfo['total_used'] = round(($usages['webspace'] + $usages['mail'] + $usages['mysql']) / 1024, Settings::Get('panel.decimal_places'));
|
||||||
} else {
|
} else {
|
||||||
$userinfo['diskspace_used'] = 0;
|
$userinfo['diskspace_used'] = 0;
|
||||||
$userinfo['mailspace_used'] = 0;
|
$userinfo['mailspace_used'] = 0;
|
||||||
$userinfo['dbspace_used'] = 0;
|
$userinfo['dbspace_used'] = 0;
|
||||||
|
$userinfo['total_used'] = 0;
|
||||||
}
|
}
|
||||||
$userinfo['diskspace'] = round($userinfo['diskspace'] / 1024, Settings::Get('panel.decimal_places'));
|
$userinfo['diskspace'] = round($userinfo['diskspace'] / 1024, Settings::Get('panel.decimal_places'));
|
||||||
$userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), Settings::Get('panel.decimal_places'));
|
$userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), Settings::Get('panel.decimal_places'));
|
||||||
@@ -120,6 +122,8 @@ if ($page == 'overview') {
|
|||||||
$se[] = "PHP";
|
$se[] = "PHP";
|
||||||
if ($userinfo['perlenabled'] == '1')
|
if ($userinfo['perlenabled'] == '1')
|
||||||
$se[] = "Perl/CGI";
|
$se[] = "Perl/CGI";
|
||||||
|
if ($userinfo['api_allowed'] == '1')
|
||||||
|
$se[] = '<a href="customer_index.php?s='.$s.'&page=apikeys">API</a>';
|
||||||
$services_enabled = implode(", ", $se);
|
$services_enabled = implode(", ", $se);
|
||||||
|
|
||||||
eval("echo \"" . \Froxlor\UI\Template::getTemplate('index/index') . "\";");
|
eval("echo \"" . \Froxlor\UI\Template::getTemplate('index/index') . "\";");
|
||||||
|
|||||||
@@ -2076,3 +2076,4 @@ $lng['serversettings']['default_sslvhostconf']['title'] = 'Default SSL vHost-set
|
|||||||
$lng['serversettings']['includedefault_sslvhostconf'] = 'Include non-SSL vHost-settings in SSL-vHost';
|
$lng['serversettings']['includedefault_sslvhostconf'] = 'Include non-SSL vHost-settings in SSL-vHost';
|
||||||
$lng['admin']['ownsslvhostsettings'] = 'Own SSL vHost-settings';
|
$lng['admin']['ownsslvhostsettings'] = 'Own SSL vHost-settings';
|
||||||
$lng['admin']['ipsandports']['ssl_default_vhostconf_domain'] = 'Default SSL vHost-settings for every domain container';
|
$lng['admin']['ipsandports']['ssl_default_vhostconf_domain'] = 'Default SSL vHost-settings for every domain container';
|
||||||
|
$lng['customer']['total_diskspace'] = 'Total diskspace (MiB)';
|
||||||
|
|||||||
@@ -1723,3 +1723,4 @@ $lng['serversettings']['default_sslvhostconf']['title'] = 'Standard SSL vHost-Ei
|
|||||||
$lng['serversettings']['includedefault_sslvhostconf'] = 'Nicht-SSL vHost-Einstellungen in SSL-vHost inkludieren';
|
$lng['serversettings']['includedefault_sslvhostconf'] = 'Nicht-SSL vHost-Einstellungen in SSL-vHost inkludieren';
|
||||||
$lng['admin']['ownsslvhostsettings'] = 'Eigene SSL vHost-Einstellungen';
|
$lng['admin']['ownsslvhostsettings'] = 'Eigene SSL vHost-Einstellungen';
|
||||||
$lng['admin']['ipsandports']['ssl_default_vhostconf_domain'] = 'Standard SSL vHost-Einstellungen für jeden Domain-Container';
|
$lng['admin']['ipsandports']['ssl_default_vhostconf_domain'] = 'Standard SSL vHost-Einstellungen für jeden Domain-Container';
|
||||||
|
$lng['customer']['total_diskspace'] = 'Gesamtspeicherplatz (MiB)';
|
||||||
|
|||||||
14
templates/Sparkle/customer/index/index.tpl
vendored
14
templates/Sparkle/customer/index/index.tpl
vendored
@@ -7,6 +7,20 @@ $header
|
|||||||
|
|
||||||
<div class="grid-g">
|
<div class="grid-g">
|
||||||
<div class="grid-u-1-2" id="statsbox">
|
<div class="grid-u-1-2" id="statsbox">
|
||||||
|
<if $userinfo['diskspace'] != '0'>
|
||||||
|
<div class="canvasbox">
|
||||||
|
<input type="hidden" id="totalspace" class="circular" data-used="{$userinfo['total_used']}" data-available="{$userinfo['diskspace']}">
|
||||||
|
<canvas id="totalspace-canvas" width="120" height="76"></canvas><br />
|
||||||
|
{$lng['customer']['total_diskspace']}<br />
|
||||||
|
<small>
|
||||||
|
{$userinfo['total_used']} {$lng['panel']['used']}<br />
|
||||||
|
<if $userinfo['diskspace'] != '∞'>
|
||||||
|
{$userinfo['diskspace']} {$lng['panel']['available']}
|
||||||
|
</if>
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
</if>
|
||||||
|
|
||||||
<if $userinfo['subdomains'] != '0'>
|
<if $userinfo['subdomains'] != '0'>
|
||||||
<div class="canvasbox">
|
<div class="canvasbox">
|
||||||
<input type="hidden" id="subdomains" class="circular" data-used="{$userinfo['subdomains_used']}" data-available="{$userinfo['subdomains']}">
|
<input type="hidden" id="subdomains" class="circular" data-used="{$userinfo['subdomains_used']}" data-available="{$userinfo['subdomains']}">
|
||||||
|
|||||||
Reference in New Issue
Block a user