diff --git a/puppetboard/templates/_macros.html b/puppetboard/templates/_macros.html index acbca9bae..b2ab38856 100644 --- a/puppetboard/templates/_macros.html +++ b/puppetboard/templates/_macros.html @@ -56,6 +56,21 @@ "search": {"regex": true}, // Default sort "order": [[ 0, "desc" ]], + //Sort ip adresses and parse integers where applicable + "columnDefs": [ + + { type: 'ip-address', targets: 1 }, + + {"targets": -1, + "render": function ( data, type, row ) + {if (isNaN(parseInt(data))) + return (data) + else + return parseInt(data)} + }, + ], + // Custom options + // Custom options {% if extra_options %}{% call extra_options() %}Callback to parent defined options{% endcall %}{% endif %} }); diff --git a/puppetboard/templates/layout.html b/puppetboard/templates/layout.html index 5c740a2ba..b3b313a5f 100644 --- a/puppetboard/templates/layout.html +++ b/puppetboard/templates/layout.html @@ -33,6 +33,7 @@ + {% if config.LOCALISE_TIMESTAMP %} {% endif %}