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

EUIify Discover sidebar #16677

Closed
nreese opened this issue Feb 12, 2018 · 0 comments
Closed

EUIify Discover sidebar #16677

nreese opened this issue Feb 12, 2018 · 0 comments
Labels
Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@nreese
Copy link
Contributor

nreese commented Feb 12, 2018

discFieldChooser angular directive needs to be replaced by React component's that utilize EUI.

DiscoverSidebar component

props

  • indexPatternList - array of index pattern titles and ids pairs
  • selectedIndexPattern - selected IndexPattern instance
  • selectedFields - array of selected field name strings (called 'columns' in angular directive)
  • onChangeIndexPattern - callback function that takes new index pattern id
  • onAddField - callback function that takes field name string
  • onRemoveField - callback function that takes field name string
  • onAddFilter - callback function
  • hits - array of Elasticsearch hit documents

render

render IndexPatternSelect

// use selectedFields and indexPattern.fields to create selected fieldsList
render SelectedFields

// use selectedFields, indexPattern.fields, and hits to create unselected fieldsList
render AvailableFields

IndexPatternSelect component

screen shot 2018-02-12 at 10 20 29 am

props

  • indexPatternList - array of index pattern titles and ids pairs
  • selectedIndexPatternId - id of selected index pattern
  • onChangeIndexPattern - callback function that takes new index pattern id

render

if single index pattern in indexPatternList
  render index pattern title
else
  render index pattern select input

SelectedFields component

screen shot 2018-02-12 at 11 34 42 am

props

  • fieldsList - array of selected Field object instances
  • getFieldDetails - function that returns an object with the following properties
  • onAddField - callback function that takes field name string
  • onRemoveField - callback function that takes field name string
  • onAddFilter - callback function

render

render DiscoverField for each item in fieldsList

AvailableFields component

screen shot 2018-02-12 at 11 11 29 am

props

  • fieldsList - array of un-selected Field object instances
  • getFieldDetails - function that returns an object with the following properties
  • onAddField - callback function that takes field name string
  • onRemoveField - callback function that takes field name string
  • onAddFilter - callback function

state

  • isFieldFilterVisible
  • fieldFilter
    • aggregatable - undefined, true, or false. Filter fields by aggregatable property when set. Unset value is undefined.
    • hideMissingFields - boolean. true be default
    • name - string. Undefined by default. Filter fields by name property. Remove fields that do not contain name substring.
    • searchable - undefined, true, or false. Filter fields by searchable property when set. Unset value is undefined.
    • type - 'any', 'string', 'date', 'number', '_source', 'ip', 'geo_point', 'unknown'. Filter fields by type property when set. Unset value is any

render

render FieldFilter visibility toggle button
if state.isFieldFilterVisible
  render FieldFilter

// filter fieldsList by state.filter

// group fieldsList into popular and un-popular lists
render DiscoverField for each item in popularList
render DiscoverField for each item in unpopularList

FieldFilter component

screen shot 2018-02-12 at 11 41 51 am

props

  • aggregatable
  • hideMissingFields
  • nameFilter
  • searchable
  • type
  • onFilterPropChange - callback function that takes filter property name and new value

Render

render filter form

DiscoverField component

screen shot 2018-02-12 at 10 34 58 am

props

  • field - Field instance
  • isSelected - boolean
  • onAddField - callback function that takes field name string
  • onRemoveField - callback function that takes field name string
  • onAddFilter - callback function
  • getFieldDetails - function that returns an object with the following properties. Note: Field details are not passed directly into props because it is expensive to calculate and only want to calculate on demand.
    • buckets - array of objects
      • count
      • display
      • percent
      • value
    • exists
    • missing
    • total
    • visualizeUrl

state
fieldDetails - fetched by calling props.getFieldDetails when field name is clicked

render

render field name
if isSelected
  render remove button
if !isSelected
  render add button
if state.fieldDetails
  render field details
@chrisronline chrisronline mentioned this issue Feb 13, 2018
47 tasks
@rayafratkina rayafratkina changed the title EUIify Discover sidebar [Discover] EUIify Discover sidebar Jun 15, 2018
@rayafratkina rayafratkina changed the title [Discover] EUIify Discover sidebar EUIify Discover sidebar Jun 15, 2018
@timroes timroes added Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed :Discovery labels Sep 16, 2018
@nreese nreese closed this as completed Oct 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

3 participants