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

Color field format #4594

Merged
merged 16 commits into from
Oct 12, 2015
Merged

Color field format #4594

merged 16 commits into from
Oct 12, 2015

Conversation

jbudz
Copy link
Member

@jbudz jbudz commented Aug 5, 2015

Adds a number field formatter that lets you to specify colors within defined ranges. Closes #1726.

image

@gigi81
Copy link

gigi81 commented Aug 20, 2015

This is a really nice feature. Can't wait to play with it! Well done.

@bertol83
Copy link

+1

@altoic
Copy link

altoic commented Aug 27, 2015

I am not sure if I am trying to do something similar. But are you trying to add some highlight or change the color of the table during discovery? i.e. each message type has their own color? That way you can easily identify the type of logs when looking at the table. +1

@stormpython
Copy link
Contributor

LGTM! Needs a merge with master.

@stormpython stormpython assigned jbudz and unassigned stormpython Aug 27, 2015
@jbudz
Copy link
Member Author

jbudz commented Aug 27, 2015

@MichaelLiZhou Yep, although this only covers numbers.

@altoic
Copy link

altoic commented Aug 27, 2015

Any advice on trying to highlight the entire row of the discovery table? Or in the dashboard tables? I want to try and add some colors to them.

@jbudz
Copy link
Member Author

jbudz commented Aug 28, 2015

Nothing that I know of to highlight entire rows currently. You can draw attention to specific fields by writing your own field formatters similar to this, https://www.elastic.co/blog/kibana-custom-field-formatters should be able to help.

@jbudz jbudz assigned spalger and BigFunger and unassigned jbudz and spalger Aug 28, 2015
@BigFunger
Copy link
Contributor

Found some strange behavior:

  1. Edit a number field and change its format to Color and define a few ranges/colors.
  2. Save the field.
  3. Edit another number field and change its format to Color. Notice the values that you defined in step 1 show up for this new field.

@BigFunger BigFunger assigned jbudz and unassigned BigFunger Aug 31, 2015
@jbudz jbudz assigned BigFunger and unassigned jbudz Sep 1, 2015
@jbudz
Copy link
Member Author

jbudz commented Sep 16, 2015

@BigFunger I addressed 1, 2, and 3. I'm more in favor of validation as a separate issue with consistency across the other formatters if desired. Currently the behavior similar to bytes, number, percentages formatters where gibberish formats are accepted. Open to changing it still if you think it's an issue, let me know.

@jbudz jbudz assigned BigFunger and unassigned jbudz Sep 16, 2015
@BigFunger
Copy link
Contributor

screenshot

I should be able to delete any of the items. By default, I am unable to delete the top item.

var _ = require('lodash');
var FieldFormat = Private(require('ui/index_patterns/_field_format/FieldFormat'));

require('ui/field_format_editor/samples/samples');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line isn't needed anymore since you've changed the way you're displaying samples.

@BigFunger
Copy link
Contributor

With the exception of the unnecessary require statement, LGTM!

@BigFunger BigFunger assigned jbudz and unassigned BigFunger Oct 8, 2015
@jbudz jbudz assigned panda01 and unassigned jbudz Oct 8, 2015
@@ -0,0 +1,58 @@
define(function (require) {
return function _StringProvider(Private) {
var _ = require('lodash');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Const?

@panda01
Copy link
Contributor

panda01 commented Oct 8, 2015

colors weird
Found some issues while running it.
For one it doesn't indicate that the value you put in is incorrect.
Also when you go to discover, it's empty.

@panda01 panda01 assigned jbudz and unassigned panda01 Oct 8, 2015
@jbudz
Copy link
Member Author

jbudz commented Oct 9, 2015

Discussed with @panda01 offline, validation was opened as a separate issue.

@jbudz jbudz assigned panda01 and unassigned jbudz Oct 9, 2015
@panda01
Copy link
Contributor

panda01 commented Oct 9, 2015

LGTM!

@panda01 panda01 assigned jbudz and unassigned panda01 Oct 9, 2015
jbudz added a commit that referenced this pull request Oct 12, 2015
@jbudz jbudz merged commit 935b3d9 into elastic:master Oct 12, 2015
@tbragin tbragin mentioned this pull request Nov 3, 2015
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants