8000 Optionally split array field in multiple instances by RubieV · Pull Request #107 · sirensolutions/kibi_timeline_vis · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Oct 30, 2021. It is now read-only.

Optionally split array field in multiple instances #107

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

RubieV
Copy link
@RubieV RubieV commented Jan 17, 2017

Based on patch-1, adds the option to split array field into multiple instances, instead of joining on ', '. Integration tests have not been added.

visualize - kibana - google chrome 17-1-2017 18_11_19

visualize - kibana - google chrome 17-1-2017 18_11_57

RubieV and others added 8 commits January 16, 2017 23:37
This adds the feature to get arrays from the es result document, by reusing kibiUtils.getValuesAtPath with .split('.'). This feature might be implemented on a higher level of abstraction, to get rid of params.labelFieldSequence statements altogether.
@sindicetech-jenkins
Copy link

Can one of the admins verify this patch?

name="splitOnArray"
ng-model="group.splitOnArray">
Show values in array field as seperate instances
<kbn-info info="Show seperate instances for every field in an field with multiple values. When unchecked, the values will be combined by a comma."></kbn-info>
Copy link
Contributor

Choose a reason for hiding this comment

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

for every field in an field with multiple values

for every value in a multi-valued field

Copy link
Author
@RubieV RubieV Jan 23, 2017

Choose a reason for hiding this comment

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

Thanks, added commit that fixes the typo de27891

if (startFieldValue && startFieldValue.constructor !== Array) {
startFieldValue = [ startFieldValue ];
}
if (labelValues.constructor !== Array) {
Copy link
Contributor

Choose a reason for hiding this comment

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

could you merge this with the previous condition ? labelValues.constructor !== Array is repeated

Copy link
Author

Choose a reason for hiding this comment

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

As the constructor changes in the condition preceding the condition that creates an array, that is not preferable.

@@ -394,3 +401,4 @@ define(function (require) {
} // end of link function
});
});

Copy link
Contributor

Choose a reason for hiding this comment

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

remove extra whitespace

Copy link
Author

Choose a reason for hiding this comment

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

The nesting in the loop requires the 2 spaces additional indentation for readability.

@CLAassistant
Copy link
CLAassistant commented Jan 23, 2017

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor
@scampi scampi left a comment

Choose a reason for hiding this comment

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

It seems some comments I made last time didn't go through somehow, sorry about that.

Please remove target/kibi_timeline_vis-4.6.3.zip from the PR.

I'll give this PR a last run test and it should be good to go.

field = _.get(hit._source, params.labelField);
} else { // create kibi path property from ES path by splitting on .
const kibanaSplit = params.labelField.split('.');
const kibanaSequence = Array.isArray(kibanaSplit) ? kibanaSplit : Array.of(kibanaSplit);
Copy link
Contributor

Choose a reason for hiding this comment

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

The variable kibanaSplit is always an array, isn't it ? If so, why is the check Array.isArray needed ?

RubieV and others added 2 commits January 23, 2017 14:29
@szydan
Copy link
Contributor
szydan commented Jan 27, 2017

@RubieV please rebase on master to resolve conflicts

@mikehug
Copy link
mikehug commented Jul 9, 2018

@scampi is this related to anything we have worked on recently, is it worth merging?

@scampi
Copy link
Contributor
scampi commented Jul 9, 2018

@mikehug not recently, this is a feature that was pushed for by OP to improve readability imo of an event with multiple label.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0