Extending Existing Kibana Visualization Plugin

I'm looking for advice on how to make a plugin that would be very similar to the core plugin Data Table, except that it would show red or green dots instead of "true" or "false" for boolean values.

My first thought was to duplicate the code of the Data Table, and modify tiny bits of it to fit the need of the new plugin. I don't like this approach though; duplicating lots of code is rarely a good idea.

So my question is: Is there any way I could "extend" the Data Table plugin, and "override" only the row HTML generation behavior (without copying too much code)? I'm from an Object-Oriented Programming background, so I'm not sure what I'm asking makes sense in Angular.

Any advice or code snippets to help me achieve this would be appreciated.

I'm using Kibana 5.2.1. Thanks in advance!

Hi Vincent,

Maybe you don't need to make a plugin at all. You could use the color field format.

Here I've gone into Management > Index Patterns and selected my index, then clicked on the pencil to edit the field. I've set the Format to Color. In my case this type only has 2 values in the data and I added each with a different foreground and background color. (if you just wanted a block of color you could set them to be the same)

Then I created a simple Data Table based on that field;

If you still want to do a plugin let me know and I'll try to help you on that too.


Hi Lee,

Thanks for your answer :slight_smile: and sorry for my slow response.

Unfortunately, the color field format will not work for me. I want something that looks like this, as it mimics the format of another program my client is used to.

This is my plugin in Kibana 4, developed by copying and modifying all the code of the data table plugin, an approach I would rather avoid this time.

I should also mention that having green and red dots for booleans is not the only modification I want to make. I would also like to remove the Metric column (e.g. "Count), so that I only show the raw data.

So you can see my question as a more generic one: how can build a plugin that is based on an existing core plugin, without copying the code of the core plugin?

Thanks again!

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