From 82c6543d0eb35a1740018cd9403902e143b56008 Mon Sep 17 00:00:00 2001 From: spezialist1 Date: Wed, 15 Sep 2021 20:31:04 +0300 Subject: [PATCH] Adjusting the correct calculation of U-space Adjusting the correct calculation of U-space. --- classes/DataCenter.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/DataCenter.class.php b/classes/DataCenter.class.php index 1a9d4e71b..2df9fe82d 100644 --- a/classes/DataCenter.class.php +++ b/classes/DataCenter.class.php @@ -547,12 +547,12 @@ function GetDCStatistics(){ // Count the U used up by devices that are (a) not chassis cards; (b) in a cabinet in the data center; (c) not a server or array; and (d) not in the Storage Room (Cabinet=-1) $sql="SELECT SUM(a.Height) as TotalU FROM fac_Device a,fac_Cabinet b WHERE a.Cabinet=b.CabinetID AND b.DataCenterID=$this->DataCenterID AND ParentDevice=0 AND - a.DeviceType NOT IN ('Server','Storage Array') and a.Status NOT IN ('Reserved', 'Salvage') and a.Cabinet>0;"; + a.DeviceType NOT IN ('Server','Appliance','Storage Array','Switch') and a.Status NOT IN ('Reserved', 'Salvage') and a.Cabinet>0;"; $dcStats["Infrastructure"]=($test=$this->query($sql)->fetchColumn())?$test:0; $sql="SELECT SUM(a.Height) as TotalU FROM fac_Device a,fac_Cabinet b WHERE a.Cabinet=b.CabinetID AND b.DataCenterID=$this->DataCenterID AND ParentDevice=0 AND - a.Status not in ('Reserved', 'Salvage') AND a.DeviceType IN ('Server', 'Storage Array') and a.Cabinet>0;"; + a.Status not in ('Reserved', 'Salvage') AND a.DeviceType IN ('Server','Appliance','Storage Array','Switch') and a.Cabinet>0;"; $dcStats["Occupied"]=($test=$this->query($sql)->fetchColumn())?$test:0; // There should never be a case where a device marked as reserved ends up in the Storage Room, but S.U.T. #44