Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script field formatters #3585

Closed
rashidkpc opened this issue Apr 13, 2015 · 2 comments
Closed

Script field formatters #3585

rashidkpc opened this issue Apr 13, 2015 · 2 comments
Labels

Comments

@rashidkpc
Copy link
Contributor

After some discussion about how to implement some of the more advanced field formatters we'd like to implement the ability to use custom scripts to do formatting. The problem becomes, how do we do it safely?

  1. All the user to type scripts into the web interface. Pros: Nice, simple, quick. Cons: Excessively unsafe. If there's a way to do this safely I've never seen it.
  2. Require scripts be stored server side. Probably the right way to go. Pros: If you don't have access to the server, you can't add scripts. That's also the Con.

In theory this will already be possible due to #2731. The entirety of this ticket may involve adding a server API endpoint to list the available script formatters and make them available via a drop down in the UI

We need to spec out what the function should take, and if it should be angular-y. There are some issue with bringing in too much functionality here. For example if we allow it to inject html, or get ahold of the element containing the value we're going to have a hard time implementing server side chart rendering without something like PhantomJS.

@rashidkpc rashidkpc changed the title Custom script formatters Script field formatters Apr 13, 2015
@rashidkpc rashidkpc added v4.3.0 and removed v4.2.0 labels Jun 10, 2015
@rashidkpc rashidkpc added v4.4.0 and removed v4.3.0 labels Jul 23, 2015
@rashidkpc rashidkpc removed the v4.4.0 label Nov 23, 2015
@cjcenizal
Copy link
Contributor

@rashidkpc Can you give some examples of the scripts you had in mind and the use cases for them?

@rashidkpc
Copy link
Contributor Author

I think this is already done, someone should just document it. @timroes did a writeup of it for Kibana 4: https://www.timroes.de/2016/02/17/writing-kibana-4-plugins-field-formatters/

@botelastic botelastic bot added the needs-team Issues missing a team label label Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants