Merge branch 'devbyspi' into 'master'
Devices OLT Kunden Update See merge request fronk/thetool!126
This commit is contained in:
@@ -142,39 +142,18 @@ class DeviceModel
|
||||
{
|
||||
$items = [];
|
||||
$db = FronkDB::singleton();
|
||||
// $sql = "SELECT Patching.id,lastname,firstname,customer_number,company,device_name,device_port FROM `Patching`
|
||||
//LEFT JOIN OrderProduct ON (Patching.termination_id=OrderProduct.termination_id)
|
||||
//LEFT JOIN `Order` ON (`Order`.id=OrderProduct.order_id)
|
||||
//LEFT JOIN Address ON Address.id=`Order`.owner_id
|
||||
//WHERE Patching.`device_name` LIKE '".$ip."%'";
|
||||
// $res = $db->query($sql);
|
||||
// if ($db->num_rows($res)) {
|
||||
// while ($data = $db->fetch_array($res)) {
|
||||
// $devicePort = str_replace($ip, "", $data['device_name']);
|
||||
// $devicePort=trim($devicePort);
|
||||
// $devicePort=ltrim($devicePort,"/");
|
||||
// $devicePort=ltrim($devicePort,"-");
|
||||
// $devicePort=$devicePort."/".$data['device_port'];
|
||||
// $devicePort=str_replace("/","-",$devicePort);
|
||||
// $devicePort=rtrim($devicePort,"-");
|
||||
// $items[$devicePort] = $data;
|
||||
//
|
||||
//
|
||||
// }
|
||||
// }
|
||||
$sql = "Select Patching.id,lastname,firstname,customer_number,company,device_name,device_port,value_string FROM Workflowvalue
|
||||
LEFT JOIN Termination ON Termination.id=Workflowvalue.object_id
|
||||
LEFT JOIN Patching ON Termination.id = Patching.termination_id
|
||||
LEFT JOIN OrderProduct ON (Patching.termination_id=OrderProduct.termination_id)
|
||||
LEFT JOIN `Order` ON (`Order`.id=OrderProduct.order_id)
|
||||
LEFT JOIN Address ON Address.id=`Order`.owner_id
|
||||
WHERE `item_id` = '55'";
|
||||
$sql = "Select Patching.id,lastname,firstname,customer_number,company,device_name,device_port,value_string,Building.`street`,Building.`zip`, Building.`city` FROM Workflowvalue
|
||||
LEFT JOIN Termination ON Termination.id=Workflowvalue.object_id LEFT JOIN Patching ON Termination.id = Patching.termination_id
|
||||
LEFT JOIN OrderProduct ON (Patching.termination_id=OrderProduct.termination_id)
|
||||
LEFT JOIN `Order` ON (`Order`.id=OrderProduct.order_id)
|
||||
LEFT JOIN Address ON Address.id=`Order`.owner_id
|
||||
LEFT JOIN Building ON Building.id=Termination.building_id
|
||||
WHERE `item_id` = '55' ";
|
||||
$res = $db->query($sql);
|
||||
if ($db->num_rows($res)) {
|
||||
while ($data = $db->fetch_array($res)) {
|
||||
$ontSn=$data['value_string'];
|
||||
$ontSn= str_replace("HWTC","48575443",$ontSn);
|
||||
|
||||
$items[$ontSn] = $data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,6 +143,7 @@ class PoprackController extends mfBaseController
|
||||
$extTextspan="";
|
||||
foreach ($module['slots'] as $slots) {
|
||||
$extText = "";
|
||||
$title=$slots['modulname'];
|
||||
if ($slots['type'] == '0') {
|
||||
$color = '#9fff6e';
|
||||
$colorclass = "rack-color-lwl";
|
||||
@@ -152,7 +153,7 @@ class PoprackController extends mfBaseController
|
||||
$extTextspan = "<span style='font-size: 12px;font-weight: 400'>".$extText."</span>";
|
||||
}
|
||||
} else if ($slots['type'] == '1') {
|
||||
|
||||
$slots['modulname']='<a style="color: #000000;text-decoration: underline;" target="_self" href="'.self::getUrl("Device", "detail", ["id" => $slots['device_id']]).'">'.$slots['modulname'].'</a>';
|
||||
$color = '#b6c6ff';
|
||||
$colorclass = "rack-color-device";
|
||||
} else if ($slots['type'] == '2') {
|
||||
@@ -198,7 +199,7 @@ class PoprackController extends mfBaseController
|
||||
$position++;
|
||||
$calcwidth = $calcwidth + $slots['width'];
|
||||
}
|
||||
echo '<td title="' . $slots['modulname'] . $extText . '" colspan="' . $slots['width'] . '" class="text-center border-top border-bottom border-right text-nowrap text-truncate pl-1 pr-1 ' . $colorclass . '" data-id="' . $slots['moduleid'] . '" data-type="' . $slots['type'] . '" data-name="' . $slots['modulname'] . '" data-starthe="' . $module['start_he'] . '" data-ports="' . $slots['ports'] . '" data-plug="' . $slots['plug'] . '" rowspan="' . $modulelenght . '" style="width: ' . $width . '; background-color: ' . $color . ';border-color: #797979 !important; white-space: nowrap; text-overflow: ellipsis;max-width: ' . $maxwidth . 'px;"><span></span> ' . $slots['modulname'] . $extTextspan . '</td>';
|
||||
echo '<td title="' . $title . $extText . '" colspan="' . $slots['width'] . '" class="text-center border-top border-bottom border-right text-nowrap text-truncate pl-1 pr-1 ' . $colorclass . '" data-id="' . $slots['moduleid'] . '" data-type="' . $slots['type'] . '" data-name="' . $title . '" data-starthe="' . $module['start_he'] . '" data-ports="' . $slots['ports'] . '" data-plug="' . $slots['plug'] . '" rowspan="' . $modulelenght . '" style="width: ' . $width . '; background-color: ' . $color . ';border-color: #797979 !important; white-space: nowrap; text-overflow: ellipsis;max-width: ' . $maxwidth . 'px;"><span></span> ' . $slots['modulname'] . $extTextspan . '</td>';
|
||||
$position++;
|
||||
$calcwidth = $calcwidth + $slots['width'];
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ class PoprackmoduleModel
|
||||
{
|
||||
$items = [];
|
||||
$db = FronkDB::singleton();
|
||||
$sql = "SELECT `id`, `name`, `start_he`,`end_he` FROM `Poprackmodule` WHERE `poprack_id`='" . $poprack_id . "' AND type ='0' ORDER by name";
|
||||
$sql = "SELECT `id`, `name`, `start_he`,`end_he`,`plug`,`ports` FROM `Poprackmodule` WHERE `poprack_id`='" . $poprack_id . "' AND type ='0' ORDER by start_he";
|
||||
|
||||
$res = $db->query($sql);
|
||||
if ($db->num_rows($res)) {
|
||||
|
||||
Reference in New Issue
Block a user