fix broken relationship of local Service ID with SDP Service ID (#10713)

* fix broken relationship of local Service ID with SDP Service ID

* just trigger scruntinizer
This commit is contained in:
Vitali Kari
2019-11-02 13:44:48 +01:00
committed by PipoCanaja
parent 223a5b15dc
commit 76318c8811
3 changed files with 14 additions and 8 deletions

View File

@@ -290,6 +290,7 @@ if ($vars['view'] == 'sdps') {
if ($vars['view'] == 'sdpbinds') {
echo '<tr><th><a title="Device">Device</a></th>
<th><a title="The value of this object specifies the Service identifier. This value should be unique within the service domain">Service Id</a></th>
<th><a title="SDP Binding identifier. SDP identifier : Service identifier">SDP Bind Id</a></th>
<th><a title="This object specifies whether this Service SDP binding is a spoke or a mesh.">Bind Type</a></th>
<th><a title="The value of VC Type is an enumerated integer that specifies the type of virtual circuit (VC) associated with the SDP binding">VC Type</a></th>
@@ -315,7 +316,7 @@ sapDown: The SAP associated with the service is down.">Oper State</a></th>
$i = 0;
foreach (dbFetchRows('SELECT * FROM `mpls_sdp_binds` ORDER BY `sdp_oid`, `svc_oid`') as $sdpbind) {
foreach (dbFetchRows('SELECT b.*, s.svc_oid AS svcId FROM `mpls_sdp_binds` AS b LEFT JOIN `mpls_services` AS s ON `b`.`svc_id` = `s`.`svc_id` ORDER BY `sdp_oid`, `svc_oid`') as $sdpbind) {
$device = device_by_id_cache($sdpbind['device_id']);
if (!is_integer($i / 2)) {
$bg_colour = \LibreNMS\Config::get('list_colour.even');
@@ -337,6 +338,7 @@ sapDown: The SAP associated with the service is down.">Oper State</a></th>
echo "<tr bgcolor=$bg_colour>
<td>" . generate_device_link($device, 0, array('tab' => 'routing', 'proto' => 'mpls')) . '</td>
<td>' . $sdpbind['svcId'] . '</td>
<td>' . $sdpbind['sdp_oid'] . ':' . $sdpbind['svc_oid'] . '</td>
<td>' . $sdpbind['sdpBindType'] . '</td>
<td>' . $sdpbind['sdpBindVcType'] . '</td>