From 89e4329a8068e3631d3f64f6896fa3907c687cf5 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Thu, 08 Jan 2015 09:08:50 -0500
Subject: [PATCH] Layout fix: tab toggle and monitor tables

---
 interface/web/dashboard/dashlets/limits.php |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/interface/web/dashboard/dashlets/limits.php b/interface/web/dashboard/dashlets/limits.php
index 5ffa346..70113f3 100644
--- a/interface/web/dashboard/dashlets/limits.php
+++ b/interface/web/dashboard/dashlets/limits.php
@@ -71,7 +71,7 @@
 
 		$limits[] = array('field' => 'limit_web_aliasdomain',
 			'db_table' => 'web_domain',
-						  'db_where' => "(type = 'alias' OR type = 'vhostalias'");
+						  'db_where' => "(type = 'alias' OR type = 'vhostalias')");
 
 		$limits[] = array('field' => 'limit_ftp_user',
 			'db_table' => 'ftp_user',
@@ -105,7 +105,9 @@
 			'db_table' => 'client',
 			'db_where' => "");
 
-
+		$limits[] = array('field' => 'limit_domain',
+			'db_table' => 'domain',
+			'db_where' => "");
 
 
 		//* Loading Template
@@ -141,10 +143,15 @@
 			}
 			if($value != 0 || $value == $wb['unlimited_txt']) {
 				$value_formatted = ($value == '-1')?$wb['unlimited_txt']:$value;
+				$usage = $this->_get_limit_usage($limit);
+				$percentage = ($value == '-1' || $value == 0 ? 0 : round(100 * $usage / $value));
 				$rows[] = array('field' => $field,
 					'field_txt' => $wb[$field.'_txt'],
 					'value' => $value_formatted,
-					'usage' => $this->_get_limit_usage($limit));
+					'value_raw' => $value,
+					'usage' => $usage,
+					'usage_raw' => $usage,
+					'percentage' => $percentage);
 			}
 		}
 		$tpl->setLoop('rows', $rows);

--
Gitblit v1.9.1