Prima gestione vendors con icone
This commit is contained in:
parent
0fca421b77
commit
892783e83f
|
@ -0,0 +1,3 @@
|
||||||
|
td.vendor-img > img{
|
||||||
|
width: 40px;
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
Binary file not shown.
After Width: | Height: | Size: 8.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 7.1 KiB |
|
@ -32,7 +32,7 @@ function leggi_devices(interval){
|
||||||
if( $('#devices-table > tbody').find('tr[data-id="' + row_id + '"]').length == 0 ){
|
if( $('#devices-table > tbody').find('tr[data-id="' + row_id + '"]').length == 0 ){
|
||||||
$('#devices-table > tbody').prepend(
|
$('#devices-table > tbody').prepend(
|
||||||
'<tr data-id="' + row_id + '">' +
|
'<tr data-id="' + row_id + '">' +
|
||||||
'<td></td>' +
|
'<td class="vendor-img"><img title="' + result.records[i].vendor + '" src="vendor.php?name=' + result.records[i].vendor + '"></td>' +
|
||||||
'<td>' + device + '</td>' +
|
'<td>' + device + '</td>' +
|
||||||
'<td>' + result.records[i].ssid + '</td>' +
|
'<td>' + result.records[i].ssid + '</td>' +
|
||||||
'<td><time class="timeago" title="' + moment(result.records[i].received_at).format('DD/MM/YYYY H:mm:ss') + '" datetime="' + result.records[i].received_at + '"></time></td>' +
|
'<td><time class="timeago" title="' + moment(result.records[i].received_at).format('DD/MM/YYYY H:mm:ss') + '" datetime="' + result.records[i].received_at + '"></time></td>' +
|
||||||
|
|
|
@ -16,6 +16,7 @@ $config = parse_ini_file('../config.ini');
|
||||||
|
|
||||||
<!-- Custom styles for this template-->
|
<!-- Custom styles for this template-->
|
||||||
<link href="css/sb-admin-2.min.css" rel="stylesheet">
|
<link href="css/sb-admin-2.min.css" rel="stylesheet">
|
||||||
|
<link href="css/wpa.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- Bootstrap core JavaScript-->
|
<!-- Bootstrap core JavaScript-->
|
||||||
<script src="vendor/jquery/jquery.min.js"></script>
|
<script src="vendor/jquery/jquery.min.js"></script>
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
header('Content-Type: image/png');
|
||||||
|
|
||||||
|
$docroot = realpath(__DIR__);
|
||||||
|
$vendor_name = preg_replace( '/([^a-z0-9\.\-\(\)\s]+)/i', '', $_GET['name'] );
|
||||||
|
|
||||||
|
$vendor_img = $docroot.'/img/vendors/'.$vendor_name.'.png';
|
||||||
|
|
||||||
|
if( file_exists($vendor_img) ){
|
||||||
|
echo file_get_contents($docroot.'/img/vendors/'.$vendor_name.'.png');
|
||||||
|
} else {
|
||||||
|
echo file_get_contents($docroot.'/img/vendors/unknown.png');
|
||||||
|
}
|
Loading…
Reference in New Issue