Anyone had luck creating a formatFields plugin for Kibana 5.x?

My plugin worked under 4.x but doesn't work in 5.x (it doesn't show up in the field list).

I updated it based on the changes I've seen in plugins that have been modified to work with 5.x but no dice. I can't find a single example of a third-party formatFields plugin.

Source here, it's incredibly short:

import fieldFormats from 'ui/registry/field_formats';

field_formats exports a provider .... so

import fieldFormatsProvider from 'ui/registry/field_formats';
...
const fieldFormats = Private(fieldsFormatProvider);

will try this now!

is there a reason it has to be done this way though, when Kibana itself uses it directly?

also this doesn't make sense since to use Private the usage would have to happen inside of the definition of the HTMLFormatProvider, which never gets called because it isn't registered... so I think you're wrong, unfortunately :frowning:

another wrinkle:

if I import ui/stringify/register in my file then I see that all of the field types appear in the list on the field editor page twice, but mine still doesn't.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.