Expand Up
@@ -86,13 +86,17 @@
},
formatters: {
" macformatter" : function (column, row) {
let mac = ' <span class="overflow">' + row.mac + ' </span>' ;
if (row.man != ' ' ) {
return row. mac + ' <br/>' + ' <small><i>' + row.man + ' </i></small>' ;
mac = mac + ' <br/>' + ' <small><i>' + row.man + ' </i></small>' ;
}
return row.mac;
return mac;
},
" overflow" : function (column, row) {
return ' <span class="overflow">' + row[column.id] + ' </span><br/>'
},
" statusformatter" : function (column, row) {
let connected = row.status == ' offline ' ? ' text-danger ' : ' text-success ' ;
let connected = row.status == ' online ' ? ' text-success ' : ' text-danger ' ;
return ' <i class="fa fa-plug ' + connected + ' " title="' + row.status + ' " data-toggle="tooltip"></i>'
},
" commands" : function (column, row) {
Expand Down
Expand Up
@@ -124,6 +128,8 @@
}
}
}
}).on(" loaded.rs.jquery.bootgrid" , function (e) {
$(" .lease-tooltip" ).tooltip({placement: " auto left" });
});
$(" #grid-prefixes" ).UIBootgrid({
Expand All
@@ -143,6 +149,14 @@
});
< / script>
< style>
.overflow {
text- overflow: clip;
white- space: normal;
word- break : break - word;
}
< / style>
< ul class =" nav nav-tabs" data- tabs=" tabs" id=" maintabs" >
< li>< a data- toggle=" tab" href=" #leases" id=" leases_tab" > {{ lang._(' Leases' ) }}< / a>< / li>
< li>< a data- toggle=" tab" href=" #prefixes" id=" prefixes_tab" > {{ lang._(' Delegated Prefixes' ) }}< / a>< / li>
Expand All
@@ -163,14 +177,14 @@
< tr>
< thead>
< tr>
< th data- column- id=" if_descr" data- type=" string" > {{ lang._(' Interface' ) }}< / th>
< th data- column- id=" address" data- identifier=" true" data- type= " string " > {{ lang._(' IP Address' ) }}< / th>
< th data- column- id=" iaid" data- type=" number" > {{ lang._(' IAID' ) }}< / th>
< th data- column- id=" duid" data- type=" string" data- width= " 15em " > {{ lang._(' DUID' ) }}< / th>
< th data- column- id=" mac" data- type=" string" data- formatter=" macformatter" > {{ lang._(' MAC Address' ) }}< / th>
< th data- column- id=" descr" data- type=" string" > {{ lang._(' Description' ) }}< / th>
< th data- column- id=" cltt" data- type=" string" > {{ lang._(' Last Transaction Time' ) }}< / th>
< th data- column- id=" ends" data- type=" string" > {{ lang._(' End' ) }}< / th>
< th data- column- id=" if_descr" data- type=" string" data - formatter= " overflow " > {{ lang._(' Interface' ) }}< / th>
< th data- column- id=" address" data- identifier=" true" data- width= " 12em " data - formatter= " overflow " > {{ lang._(' IP Address' ) }}< / th>
< th data- column- id=" iaid" data- type=" number" data - formatter= " overflow " > {{ lang._(' IAID' ) }}< / th>
< th data- column- id=" duid" data- type=" string" data- formatter= " overflow " > {{ lang._(' DUID' ) }}< / th>
< th data- column- id=" mac" data- type=" string" data- width= " 9em " data - formatter=" macformatter" > {{ lang._(' MAC Address' ) }}< / th>
< th data- column- id=" descr" data- type=" string" data - formatter= " overflow " > {{ lang._(' Description' ) }}< / th>
< th data- column- id=" cltt" data- type=" string" data - formatter= " overflow " > {{ lang._(' Last Transaction Time' ) }}< / th>
< th data- column- id=" ends" data- type=" string" data - formatter= " overflow " > {{ lang._(' End' ) }}< / th>
< th data- column- id=" status" data- type=" string" data- formatter=" statusformatter" > {{ lang._(' Status' ) }}< / th>
< th data- column- id=" state" data- type=" string" > {{ lang._(' State' ) }}< / th>
< th data- column- id=" type" data- type=" string" > {{ lang._(' Lease Type' ) }}< / th>
Expand Down