Created
February 10, 2016 17:32
-
-
Save rashidkpc/e89de8e7317fe6f315cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import _ from 'lodash'; | |
import FieldFormatProvider from 'ui/index_patterns/_field_format/FieldFormat'; | |
import fieldFormatsRegistry from 'ui/registry/field_formats'; | |
import KibanaPlugin from 'somewhere/in/there' | |
module.exports = new KibanaPlugin('myPluginName', { | |
type: 'fieldFormat', | |
init: function () { | |
fieldFormatsRegistry.register(function UrlFormatProvider(Private) { | |
const FieldFormat = Private(FieldFormatProvider); | |
return class MyFieldFormat extends FieldFormat { | |
static id = 'lowercase'; | |
static title = 'lowercase'; | |
static fieldType = '*'; | |
static editor = null; | |
static paramDefaults = {}; | |
_convert(value) { | |
return String(value).toLowerCase(); | |
} | |
}; | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment