mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fixed PeeringDB AS Selection table (#9096)
DO NOT DELETE THIS TEXT #### Please note > Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting. - [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/) #### Testers If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926` One note: As bgpLocalAs field in database is a varchar, ordering could be inconsistent with 4-byte asn as it will order using the first char. If you have 2 ASN (203524 and 32137) and your order by ASC (default) you will get: 203524 32137
This commit is contained in:
committed by
Neil Lathwood
parent
fb16560552
commit
24993e7bd3
@@ -36,9 +36,9 @@ $sql = "SELECT `bgpLocalAs` $sql";
|
||||
foreach (dbFetchRows($sql) as $asn) {
|
||||
$astext = get_astext($asn['bgpLocalAs']);
|
||||
$response[] = array(
|
||||
'asn' => $asn['bgpLocalAs'],
|
||||
'bgpLocalAs' => $asn['bgpLocalAs'],
|
||||
'asname' => $astext,
|
||||
'action' => "<a class='btn btn-sm btn-primary' href='" . generate_url(array('page' => 'peering', 'section' => 'ix-list', 'asn' => $asn['bgpLocalAs'])) . "' role='button'>Show connectd IXes</a>",
|
||||
'action' => "<a class='btn btn-sm btn-primary' href='" . generate_url(array('page' => 'peering', 'section' => 'ix-list', 'bgpLocalAs' => $asn['bgpLocalAs'])) . "' role='button'>Show connectd IXes</a>",
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -33,8 +33,8 @@ echo "<div class='alert alert-info' role='alert'>Cached date: $cache_date</div>"
|
||||
<table id="asn" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-column-id="asn">ASN</th>
|
||||
<th data-column-id="asname" data-searchable="false">AS Name</th>
|
||||
<th data-column-id="bgpLocalAs">ASN</th>
|
||||
<th data-column-id="asname" data-searchable="false" data-sortable="false">AS Name</th>
|
||||
<th data-column-id="action" data-sortable="false"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
Reference in New Issue
Block a user