1 | <?php |
||
2 | |||
3 | use App\Models\IsisAdjacency; |
||
4 | |||
5 | echo ' |
||
6 | <div> |
||
7 | <div class="panel panel-default"> |
||
8 | <div class="panel-body"> |
||
9 | <table class="table table-condensed table-hover" style="border-collapse:collapse;"> |
||
10 | <thead> |
||
11 | <tr> |
||
12 | <th> </th> |
||
13 | <th>Local Device</th> |
||
14 | <th>Local Interface</th> |
||
15 | <th>Adjacent</th> |
||
16 | <th>System ID</th> |
||
17 | <th>Area</th> |
||
18 | <th>System Type</th> |
||
19 | <th>Admin</th> |
||
20 | <th>State</th> |
||
21 | <th>Last Uptime</th> |
||
22 | </tr> |
||
23 | </thead>'; |
||
24 | |||
25 | foreach (IsisAdjacency::where('device_id', $device['device_id'])->with('port')->get() as $adj) { |
||
26 | if ($adj->isisISAdjState == 'up') { |
||
27 | $color = 'green'; |
||
28 | } else { |
||
29 | $color = 'red'; |
||
30 | } |
||
31 | $interface_name = $adj->port->ifName; |
||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
32 | |||
33 | echo ' |
||
34 | <tbody> |
||
35 | <tr> |
||
36 | <td></td> |
||
37 | <td>' . generate_device_link($device, 0, ['tab' => 'routing', 'proto' => 'isis']) . '</td> |
||
38 | <td>' . \LibreNMS\Util\Url::portLink($adj->port) . '</td> |
||
39 | <td>' . $adj->isisISAdjIPAddrAddress . '</td> |
||
40 | <td>' . $adj->isisISAdjNeighSysID . '</td> |
||
41 | <td>' . $adj->isisISAdjAreaAddress . '</td> |
||
42 | <td>' . $adj->isisISAdjNeighSysType . '</td> |
||
43 | <td>' . $adj->isisCircAdminState . '</td> |
||
44 | <td><strong><span style="color: ' . $color . ';">' . $adj->isisISAdjState . '</span></strong></td> |
||
45 | <td>' . \LibreNMS\Util\Time::formatInterval($adj->isisISAdjLastUpTime) . '</td> |
||
46 | </tr> |
||
47 | </tbody>'; |
||
48 | } |
||
49 | echo '</table> |
||
50 | </div> |
||
51 | </div> |
||
52 | </div>'; |
||
53 |