Add host availability percentage

This commit is contained in:
emanuele-f 2020-04-23 16:06:04 +02:00
parent bc154394e9
commit 7bd499adb9
5 changed files with 72 additions and 16 deletions

View file

@ -325,6 +325,21 @@ $(document).ready(function() {
return(data);
}
},
{
data: 'availability',
className: 'text-center',
render: function(data, type, row) {
if(type === 'display' || type === 'filter') {
if(row.availability != "")
return Math.round(row.availability) + "%";
else
return "";
}
// The raw data must be returned here for sorting
return(data);
}
},
{
data: 'last_mesurement_time',
className: 'dt-body-right dt-head-center'