mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Add ip field formatter
This commit is contained in:
parent
7f8afe6ab7
commit
2cd01ca31f
1 changed files with 11 additions and 1 deletions
|
@ -68,6 +68,16 @@ define(function (require) {
|
|||
return moment(val).format(config.get('dateFormat'));
|
||||
}
|
||||
},
|
||||
{
|
||||
types: [
|
||||
'ip'
|
||||
],
|
||||
name: 'ip',
|
||||
convert: function (ip) {
|
||||
if (!isFinite(ip)) return ip;
|
||||
return [ip >>> 24, ip >>> 16 & 0xFF, ip >>> 8 & 0xFF, ip & 0xFF].join('.');
|
||||
}
|
||||
},
|
||||
{
|
||||
types: [
|
||||
'number'
|
||||
|
@ -92,7 +102,7 @@ define(function (require) {
|
|||
number: formats.byName.string,
|
||||
date: formats.byName.date,
|
||||
boolean: formats.byName.string,
|
||||
ip: formats.byName.string,
|
||||
ip: formats.byName.ip,
|
||||
attachment: formats.byName.string,
|
||||
geo_point: formats.byName.string,
|
||||
geo_shape: formats.byName.string,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue