diff --git a/classes/Device.class.php b/classes/Device.class.php index 64c1e4e67..63f3232e0 100644 --- a/classes/Device.class.php +++ b/classes/Device.class.php @@ -755,6 +755,17 @@ function UpdateDevice() { } } + // SUT #1179 - User somehow managed to set the position to 0 while leaving + // a height set and the way we build the rack specifically to not show + // position zero these devices won't show on the rack so shove this up above + // the rack and make them fix it + if($this->Position==0 && $this->Height==0){ + $cab=new Cabinet(); + $cab->CabinetID=$this->Cabinet; + $cab->GetCabinet(); + $this->Position=$cab->CabinetHeight+1; + } + // Force all uppercase for labels $this->Label=transform($this->Label); $this->SerialNo=transform($this->SerialNo); diff --git a/config.inc.php b/config.inc.php index 98204bed5..219096813 100644 --- a/config.inc.php +++ b/config.inc.php @@ -46,13 +46,19 @@ function UpdateConfig(){ } $sql='update fac_Config set Value=\''.sanitize($valueStr).'\' where Parameter=\''.$key.'\''; - $dbh->query( $sql ); + if(!$dbh->query($sql)){ + $info=$dbh->errorInfo(); + error_log("UpdateConfig::PDO Error: {$info[2]} SQL=$sql"); + } }else{ if(preg_match('/[m|w]Date/',$key)){ if($value!='now'){$value='blank';} // if someone puts a weird value in default it back to blank } $sql="update fac_Config set Value=\"".sanitize($value)."\" where Parameter=\"$key\";"; - $dbh->query($sql); + if(!$dbh->query($sql)){ + $info=$dbh->errorInfo(); + error_log("UpdateConfig::PDO Error: {$info[2]} SQL=$sql"); + } } } return; @@ -68,6 +74,8 @@ static function UpdateParameter($parameter,$value){ if($dbh->query($sql)){ return true; }else{ + $info=$dbh->errorInfo(); + error_log("UpdateParamter::PDO Error: {$info[2]} SQL=$sql"); return false; } } diff --git a/css/inventory.php b/css/inventory.php index 8c2652813..06174aa3f 100644 --- a/css/inventory.php +++ b/css/inventory.php @@ -1069,7 +1069,7 @@ .device .table.style > div:nth-child(2n+1) > div:first-child {background-color: lightGray;border-left: 1px solid grey;} .device .table > div > div {min-width: 100px;} .device .caption {margin-top: 2em;} -.device .table .table .table, .right .table + .table {background-color: white;width: 100%;} +.device .table .table .table, .right .table + .table {background-color: white;width: 100%; height: 100%;} .device .table .table .table > div > div {padding: 3px;} .right .table + .table {margin-top: 1em;} diff --git a/devices.php b/devices.php index 3a8951b3d..f2516522a 100644 --- a/devices.php +++ b/devices.php @@ -954,7 +954,7 @@ function buildCustomAttributes($template, $device) { } else if ($cvtype=="set") { echo '
'; @@ -988,7 +988,7 @@ function buildCustomAttributes($template, $device) { - + @@ -2470,7 +2470,7 @@ function setPreferredLayout() {\n\t\t\n\t\n"; } ?> -
+
 
DeviceID >0){ @@ -2490,7 +2490,8 @@ function setPreferredLayout() { -
+
+
@@ -2673,6 +2674,12 @@ function linkifyolog(){ } }); + // Safari is garbage + // This is a hack to correct a problem with safari not rendering the table caption + // correctly. Instead I am putting a blank row at the bottom of the device connection + // table then using css to center it but it has to have the element set to the width + // of the table + $('#buttonbar').width($('#pandn').width()); });