Commit graph

100 commits

Author SHA1 Message Date
renovate[bot]
454ef7f5a3
Update dependency @elastic/charts to v65.1.0 (main) (#184396)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@elastic/charts](https://togithub.com/elastic/elastic-charts) |
[`65.0.0` ->
`65.1.0`](https://renovatebot.com/diffs/npm/@elastic%2fcharts/65.0.0/65.1.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@elastic%2fcharts/65.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@elastic%2fcharts/65.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@elastic%2fcharts/65.0.0/65.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@elastic%2fcharts/65.0.0/65.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>elastic/elastic-charts (@&#8203;elastic/charts)</summary>

###
[`v65.1.0`](https://togithub.com/elastic/elastic-charts/blob/HEAD/CHANGELOG.md#6510-2024-05-28)

[Compare
Source](https://togithub.com/elastic/elastic-charts/compare/v65.0.0...v65.1.0)

##### Bug Fixes

- **deps:** update dependency
[@&#8203;elastic/eui](https://togithub.com/elastic/eui) to ^94.5.0
([#&#8203;2433](https://togithub.com/elastic/elastic-charts/issues/2433))
([b13ded9](b13ded98da))
- **deps:** update dependency
[@&#8203;playwright/test](https://togithub.com/playwright/test) to
^1.44.0
([#&#8203;2434](https://togithub.com/elastic/elastic-charts/issues/2434))
([faf36aa](faf36aaf1e))
- **Metric:** should only show one focus halo on `::focus` event
([#&#8203;2441](https://togithub.com/elastic/elastic-charts/issues/2441))
([96b0779](96b0779cc3))
- react component type errors
([#&#8203;2440](https://togithub.com/elastic/elastic-charts/issues/2440))
([f0b3a00](f0b3a008e7))

##### Features

- **legend:** add legend stats (table view)
([#&#8203;2426](https://togithub.com/elastic/elastic-charts/issues/2426))
([c22f767](c22f7673c8))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/elastic/kibana).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNzcuOCIsInVwZGF0ZWRJblZlciI6IjM3LjM3Ny44IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOlZpc3VhbGl6YXRpb25zIiwiYmFja3BvcnQ6c2tpcCIsInJlbGVhc2Vfbm90ZTpza2lwIl19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-29 16:17:43 -07:00
Nick Partridge
2b344d2797
[FTR] Update getAttribute method return (#179715) 2024-04-10 10:28:03 -07:00
Tre
0515829a9e
[FTR] Move find service to shared location (#173874)
## Summary

Refactoring general ui service to a kbn package.

Resolves an [Appex QA](https://github.com/elastic/appex-qa-team) issue.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-01-04 17:58:17 +00:00
Stratoula Kalafateli
1fcdd3428c
[TSVB] Try to stabilize the test (#169254)
## Summary

Hopefully stabilizes this flakiness

Closes https://github.com/elastic/kibana/issues/167728

Run 100 times:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3593
2023-10-19 17:24:57 +03:00
Stratoula Kalafateli
105935ace5
[TSVB] Stabilize flaky TSVB test (#167848)
## Summary

Closes https://github.com/elastic/kibana/issues/167791

https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3282
Flaky runner (50 times)


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2023-10-03 12:15:34 +03:00
Dzmitry Lemechko
072ad967fc
[FTR] unskip tsvb time series tests for Chrome (#163510)
## Summary

Related to #162995

This PR unskip TSVB tests for Chrome browser since it is proved to be
stable

https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2836
100x passed

https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2835
100x passed
On Firefox the flakiness is related to Terms 2nd aggregation field
sometimes is not selected. I tested it manually in Firefox 116 and was
able to set fields, though I have a feeling that values are not always
selected on click in the drop-down. But I didn't see any errors in
console.

I also returned back retry for dropdown selection I removed in #161202
though flaky-test-runner proves there is no need. Let's have just to
keep logic as before my PR.
2023-08-10 09:17:12 +02:00
Dzmitry Lemechko
8e1d66fab6
[FTR] use xpath locator to find particular element in group by index (#161202)
Related to #158972

I was able to reproduce the failure locally on the latest main with a
small code change:


b3d7b71076/test/functional/page_objects/visual_builder_page.ts (L867-L869)

```
             | debg comboBox.isOptionSelected, value: machine.os.raw
             │ info Taking screenshot "/Users/dmle/github/kibana/test/functional/screenshots/failure/visualize app visual builder Time Series basics Clicking on the chart should cre-a71516dab48cdb296c45e2b439ed3965cfd400204827bba7ce3cf4719afb093b.png"
             │ info Current URL is: http://localhost:5620/app/visualize#/create?type=metrics&_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:%272015-09-19T06:31:44.000Z%27,to:%272015-09-22T18:31:44.000Z%27))&_a=(filters:!(),linked:!f,query:(language:kuery,query:%27%27),uiState:(),vis:(aggs:!(),params:(axis_formatter:number,axis_position:left,axis_scale:normal,drop_last_bucket:1,id:b6ee5181-addb-436f-8190-4f2a178fee7b,index_pattern:(id:%27logstash-*%27),interval:%27%27,isModelInvalid:!f,max_lines_legend:1,series:!((axis_position:right,chart_type:line,color:%2368BC00,fill:0.5,formatter:default,id:%2724f639d7-d16e-44d1-ac0d-f2b590e94e8e%27,line_width:1,metrics:!((id:d4f68ace-b844-4e00-933f-8c3b49e19067,type:count)),override_index_pattern:0,palette:(name:default,type:palette),point_size:1,separate_axis:0,series_drop_last_bucket:0,split_mode:terms,stacked:none,terms_field:!(bytes,machine.os.raw),time_range_mode:entire_time_range)),show_grid:1,show_legend:1,time_field:%27%27,time_range_mode:entire_time_range,tooltip_mode:show_all,truncate_legend:1,type:timeseries,use_kibana_indexes:!t),title:%27%27,type:metrics))
             │ info Saving page source to: /Users/dmle/github/kibana/test/functional/failure_debug/html/visualize app visual builder Time Series basics Clicking on the chart should cre-a71516dab48cdb296c45e2b439ed3965cfd400204827bba7ce3cf4719afb093b.html
             └- ✖ fail: visualize app visual builder Time Series basics Clicking on the chart should create a filter for series with multiple split by terms fields one of which has formatting
             │      StaleElementReferenceError: stale element reference: stale element not found
             │   (Session info: chrome=114.0.5735.198)
             │       at Object.throwDecodedError (node_modules/selenium-webdriver/lib/error.js:524:15)
             │       at parseHttpResponse (node_modules/selenium-webdriver/lib/http.js:601:13)
             │       at Executor.execute (node_modules/selenium-webdriver/lib/http.js:529:28)
             │       at runMicrotasks (<anonymous>)
             │       at processTicksAndRejections (node:internal/process/task_queues:96:5)
             │       at Task.exec (prevent_parallel_calls.ts:28:20)
```

### Do we have any service to help with StaleElementReferenceError
handling in FTR?

We do. `WebElementWrapper` object have internal mechanism to handle it:
we wrap most of the actions (click, type, getAttribute, etc.) with
`retryCall` function, which execute command up to RETRY_MAX_ATTEMPTS
times (3 by default) and check for errors. So if we try to click element
that is no longer in the DOM, this mechanism will try to find the
element in the DOM again, assuming it is still there but referenceId was
changed due to page updates. And repeat the click.

https://github.com/elastic/kibana/blob/main/test/functional/services/lib/web_element_wrapper/web_element_wrapper.ts#L107-L140

You might notice a warning during timePicker dates selection
```
           │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
           │ warn WebElementWrapper.click: StaleElementReferenceError: stale element reference: stale element not found
           │        (Session info: chrome=114.0.5735.198)
           │ debg Searching again for the element 'By(css selector, [data-test-subj="superDatePickerAbsoluteTab"])',
           | 2 attempts left
```
It is helping a lot to minimize the flakiness.

### Why does FTR still fails with StaleElementReferenceError in
Visualize tests?
Because most methods use the same pattern for searching elements in the
DOM: get all elements and then pick one by index.

```
const byFields = await this.testSubjects.findAll('fieldSelectItem');
const selectedByField = byFields[byFields.length - 1];
await this.comboBox.setElement(selectedByField, field);
```

The problem is that WebElementWrapper retry mechanism relies on having
`locator` property defined and it is _only_ defined if you search for a
single element, e.g. `testSubjects.find` or `by.byCssSelector`. This
property is set to `null` for each `WebElementWrapper` object in array
you get from `await this.testSubjects.findAll('fieldSelectItem')`;
So when we pass this object in `this.comboBox.setElement` and go through
a list of actions, it will fail on the first StaleElementReferenceError
occurrence.

The devil is in the detail: usually searching for multiple elements and
doing actions on some of it is totally fine. But comboBox selection has
quite many actions with different child elements, that can be updated in
DOM and lead to the error. Wrapping things with classical `retry`
service only hides the issue, but does not actually solve it.

### Proposed solution
Afaik CSS locators does not support searching for elements and picking
up one by index (I looked at `:nth-child()
`, but it is not what we need).
But we can use xpath locators for this purpose. 
```
const selectedByField = await this.find.byXPath(`(//*[@data-test-subj='fieldSelectItem'])[last()]`);
await this.comboBox.setElement(selectedByField, field);
```

This way `selectedByField` has locator property defined and internal
mechanism will be able to retry actions.

#### Why don't we store `locator` for multiple elements search.
We can, but it means every element in array has the same locator and
while retrying to find it WebDriver will return the first one in the DOM
ignoring the element index. Using xpath locator is basically the simpler
version of storing element index in WebElementWrapper object.

Flaky test runner: 50x for visualize/group1..5/config.ts
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2554

100x for group5
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2596#0189403c-ccd2-4186-a83e-af21fe88018c

100x flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2794
2023-08-07 04:39:29 -07:00
Marco Liberati
e325d4102b
[Lens] Add feature to ignore global filters at layer level (#159248)
## Summary

Fixes #143493

* Add the switch control in Layer Settings
  * [x] Make sure it does not duplicate on Annotation Layer Settings 
  * [x] Data Layers
  * [x] Reference line layers
  * [x] Extended dataView picker to support multiple icons
    * [x] Added unit tests 
  * [x] Functional tests

<img width="351" alt="Screenshot 2023-06-07 at 15 28 19"
src="00dc5523-0bec-4e9c-b1d0-4d36804b29f9">
<img width="340" alt="Screenshot 2023-06-07 at 15 31 31"
src="d36ca147-5d8c-4123-9be3-2932844cbd15">
<img width="331" alt="Screenshot 2023-06-07 at 15 28 25"
src="c7d4f166-b8ab-4439-a83c-debf82b913ad">
<img width="324" alt="Screenshot 2023-06-07 at 15 27 59"
src="3738a7e0-6e49-4e22-b857-965a953b4b84">
<img width="323" alt="Screenshot 2023-06-07 at 15 27 53"
src="5965bf1c-0e25-4c0e-b54f-fa315157fd44">


*  Create `IgnoreGlobalFilter` shared component folder
   * [x] Layer setting control component
   * [x] Info badge component
   
 * Extends `esaggs_fn` to support the flag
   * [x] Avoid to pass the filter to the handler if set
   * [x] Add unit tests

* Notification badges
* [x] Extends the badge component in Embeddable to support grouped
messages
    * [x] Added unit tests
  
<img width="750" alt="Screenshot 2023-06-07 at 15 31 39"
src="01bf8203-9133-4429-9b79-17ec67613c7e">
<img width="828" alt="Screenshot 2023-06-07 at 15 30 57"
src="9acb78f2-d061-4225-a4af-b3a66e7454fc">
<img width="756" alt="Screenshot 2023-06-07 at 15 27 43"
src="b9f79aed-7c02-4060-9c0f-61f438dc031d">


* Add support for Open in Lens
  * [x] Add unit tests for each converter
  * [x] Functional tests


### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2023-06-09 17:55:47 +02:00
Stratoula Kalafateli
589e21b0d2
[TSVB] Remove all usages of resetPage from tests (#156785)
## Summary

Closes https://github.com/elastic/kibana/issues/156705
Closes https://github.com/elastic/kibana/issues/156796

Removes all the visualBuilder.resetPage() usages as they are flaky.
2023-05-05 16:47:50 +03:00
Stratoula Kalafateli
e5f6f96e9c
[TSVB] Remove flakiness on resetPage (#156484)
## Summary

Closes https://github.com/elastic/kibana/issues/156457
Closes https://github.com/elastic/kibana/issues/156452
Closes https://github.com/elastic/kibana/issues/156439
Closes https://github.com/elastic/kibana/issues/156400
Closes https://github.com/elastic/kibana/issues/156599
Closes https://github.com/elastic/kibana/issues/156502
Closes https://github.com/elastic/kibana/issues/156501

the resetPage function is creating this flakiness. I cant figure out why
but is on the navigateToUrl function. Sometimes it reports #create and
sometimes without the hash. The navigateToUrl is not needed as it is
already done on another function. The only thing that is needed is the
setTimePicker function.

Flaky runer (100 times)
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2210
2023-05-04 12:33:29 +03:00
Stratoula Kalafateli
ba67a6630c
[TSVB] Unskips functional tests and fixes flakiness (#145804)
## Summary

Closes https://github.com/elastic/kibana/issues/145563
Closes https://github.com/elastic/kibana/issues/145562
Closes https://github.com/elastic/kibana/issues/145561
Closes https://github.com/elastic/kibana/issues/145560
Closes https://github.com/elastic/kibana/issues/145644
Closes https://github.com/elastic/kibana/issues/139096
Closes https://github.com/elastic/kibana/issues/145564

They also fail for the same reason in FF. They started fail when a
change made by the operations team.

For some reason while the list appears on the DOM the click by mouse
doesn't work for the FF tests. I changed the helper a bit to not use it.

![image](https://user-images.githubusercontent.com/17003240/202997107-1ddcfd69-c935-4d0a-891f-1feb9d00ebb5.png)

Runner for tests (50 times) to ensure that nothing has broken
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1577#_

I couldn't run the firefox tests on the flaky runner (I get an error
when initializing it) but these tests were failing every time we run
them on FF locally I am quite optimistic that this change will stabilize
them in FF too.
2022-11-21 11:47:55 +02:00
Uladzislau Lasitsa
c31c38c3d1
[Lens][TSVB] Navigate to Lens TSVB Table. (#143946)
* Added convert to lens support for tsvb table

* Added unit tests

* Added functional tests

* Some refactoring of table metric option config

* Fixed imports

* Some small refactoring

* Fix flaky test

* Fixed test

* Some small fixes

* Fixed test
2022-10-26 17:30:01 +03:00
Yaroslav Kuznietsov
ee313b34c2
[Lens][TSVB] Navigate to Lens Guage functional tests. (#143214)
* Added tests for converting metric with params, unsupported metrics and not valid panels.

* Added tests for color ranges.

* Added tests for gauge.

* Fixed tests.
2022-10-13 19:00:16 +03:00
Yaroslav Kuznietsov
0980919e24
[Lens][TSVB] Functional tests for converting of Metric. (#143164)
* Added test for metric with params.

* Added test for invalid model.

* Added test for unsupported aggregation.

* Added test for sibling pipeline agg.

* Added parent pipeline agg tests.

* Added functional tests for static value.

* Added tests for converting metric with params, unsupported metrics and not valid panels.

* Added tests for color ranges.
2022-10-13 15:59:17 +03:00
Yaroslav Kuznietsov
7ed906711a
[Lens][TSVB] Functional tests for converting of Timeseries. (#143057)
* Added timeseries test for reference line.

* Fixed tests for the prupose of running separatelly.

* Added test for metric with params.

* Added test for invalid model.

* Added test for unsupported aggregation.

* Added test for sibling pipeline agg.

* Added parent pipeline agg tests.

* Update x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/timeseries.ts

Co-authored-by: Uladzislau Lasitsa <vlad.lasitsa@gmail.com>

* Update x-pack/test/functional/apps/lens/group3/open_in_lens/tsvb/timeseries.ts

Co-authored-by: Uladzislau Lasitsa <vlad.lasitsa@gmail.com>

* Fixed code according to the suggestions.

Co-authored-by: Uladzislau Lasitsa <vlad.lasitsa@gmail.com>
2022-10-12 15:40:20 +03:00
Spencer
5adda1f63b
[ftr/testSubjects/clickOnEnabled] retry on stale-element exceptions (#139964)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-09-06 08:28:09 -07:00
Greg Thompson
2336f33632
Upgrade EUI to v59.0.1 (#133927)
* eui to v59.0.0

* i18n tokens

* update theme var tokens

* mock mouseevent for euiselectable

* mock mouseevent for euiselectable

* update theme var tokens

* [CI] Auto-commit changed files from 'node scripts/precommit_hook.js --ref HEAD~1..HEAD --fix'

* mock mouseevent for euiselectable

* update theme var tokens

* update theme var tokens mocks

* WIP: forwardRef type

* update snapshots

* euiTextColor

* snapshot updates

* jest test updates

* euiTextColor updates

* jest test updates

* update getVisualizeError selector

* euiPaddingSizes

* snapshot update

* WIP: accordion cy.react

* DetailPanelMetadataTab test updates

* eui to v59.0.1

* snapshot updates

* WIP: osquery cypress

* WIP: osquery cypress

* use data-test-subj

* log standard console errors

* snapshot

* paddingSizes update

* euiaccordion class type comment

* snapshots

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-06-21 17:08:15 -05:00
Uladzislau Lasitsa
6c1b6164bf
[TSVB] Editor styles should be loaded independently of VisRenderer (#133224)
* Move import styles inside component which use them

* Remove unnecessary scss

* Fix lint

* Fix CI

* fix remarks

* Fix comments

* Move constants to separate file

* Adds variables

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-15 18:29:11 +03:00
Stratoula Kalafateli
ed70cb1dbe
[TSVB] Wait for viz to be stabilized after changing the timerange mode (#131690)
* [TSVB] Wait for viz to be stabilized after changing the timerange mode

* Address PR comments
2022-05-06 15:40:10 +03:00
Joe Reuter
1fbf477afb
Stabilize VisEditors tests by waiting for the chart to update (#131120)
* add wait for chart calls

* move wait

* fix test
2022-04-28 12:53:26 +02:00
Diana Derevyankina
3dc61c89d7
[TSVB] Apply filter event is not working for formatted fields (#128228)
* [WIP][TSVB] Apply filter event is not working for formatted fields

* Add termsSplitValue that might be as single string for terms as MultiFieldKey for multi terms, that allows to create filters for grouped by multi terms data

* Update tests and fix some nits

* Add couple of functional tests

* Remove flaky test

* Update test to fix flakiness

* Fix some nits

* Shorten a condition

* Fix import

* Wrap setting combo box values into retry.try to get rid of flakiness

* In functional test increase sleep a bit to make sure group by field has appeared

* Refactor some code

* Try again to update test coordinates

* Update test coordinates

* Fix condition for terms value

* Fix export of MultiFieldKey

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-04-07 18:04:41 +03:00
Alexey Antonov
efcdbb66dd
[TSVB] Multi-field group by (#126015)
* fieldSelect

* activate multifield support for table

* update table>pivot request_processor

* fix some tests

* apply some changes

* fix JEST

* push initial logic for series request_processor

* fix some broken cases for Table tab

* update convert_series_to_datatable / convert_series_to_vars

* add some logic

* fix table/terms

* do some logic

* fix some issues

* push some logic

* navigation to Lens

* fix CI

* add excludedFieldFormatsIds param into excludedFieldFormatsIds

* fix ci

* fix translations

* fix some comments

* fix series_agg label

* update labels in lens

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-03-03 15:04:04 +03:00
Joe Reuter
cbca869e8f
retry tab change (#125260) 2022-02-10 18:59:39 +01:00
Diana Derevyankina
110dc8b7cb
[TSVB] Add more functional tests for Timeseries Annotations (#123906)
* [TSVB] Add more functional tests for Timeseries Annotations

* Move common code to beforeEach block

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-29 00:29:04 +03:00
Alexey Antonov
31b805a314
[TSVB] Fix the broken "aggregate function" in TSVB table (#119967)
* [TSVB] Fix the broken "aggregate function" in TSVB table

Closes: #91149

* [TSVB] Table series filter and aggregation function applied at the same time cause an error

# Conflicts:
#	src/plugins/vis_types/timeseries/server/lib/vis_data/request_processors/table/split_by_everything.ts
#	src/plugins/vis_types/timeseries/server/lib/vis_data/request_processors/table/split_by_terms.ts

* some work

* filter terms columns

* fix error message on no pivot_id

* fix CI

* enable aggregation function for entire timerange

* fix PR comments

* update check_aggs

* fix series aggs for table

* unify error messages

* fix pr comment: restrictions: UIRestrictions = DEFAULT_UI_RESTRICTION

* fix i18n translation error

* fixes translations

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-01-04 15:27:46 +03:00
Diana Derevyankina
90df011d9b
[TSVB] Fix reappearing of hidden series on refresh and styles loading (#117311)
* [TSVB] Fix reappearing of hidden series on refresh and styles loading

* Add functional test

* Update condition and move loading component to another file

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-11-09 13:03:01 +03:00
Joe Reuter
2ba7cdcf30
use more robust way of entering value (#116566) 2021-11-03 11:04:04 +01:00
Joe Reuter
515d1c1fb6
make sure string mode popover is actually closed (#116585) 2021-11-02 17:07:27 +01:00
Diana Derevyankina
1459839e37
Failing test: Chrome UI Functional Tests.test/functional/apps/visualize/_tsvb_table·ts - visualize app visualize ciGroup12 visual builder table should display correct values on changing metrics aggregation (#112216)
* Add wait for finish header loading

* Add header waitUntilLoadingHasFinished to visChart waitForVisualizationRenderingStabilized

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-29 09:55:54 +03:00
Stratoula Kalafateli
2fd7f85877
[TSVB] Resolves the flakiness on url drilldowns functional tests (#112809)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-27 12:32:24 +03:00
Diana Derevyankina
abdb7a4c49
[TSVB] Disables the input string mode (#110571)
* [TSVB] Remove the input string mode

* Fix some tests

* Add some functional tests and fix failing CI

* Update telemetry mappings

* Rename useStringIndices to allowStringIndices, move it from TSVB to Data constants and refactor test

* Apply text suggestions from code review

Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>

* Apply formatting and remove unused translations

* Fix labels

* Remove unused import

* Move popover toggling  to checkIndexPatternSelectionModeSwitchIsEnabled function to prevent flakiness

* Update some visual_builder_page functions

* Remove accidentally added newlines

* Move TSVB ui settings to constants, remove tooltip and update popover text

* Handle the case of editing advanced settings is restricted

* Add requiresPageReload to UI setting and condition for the case the setting is already enabled

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
2021-09-22 11:13:53 +03:00
Uladzislau Lasitsa
6e7e5155f5
[TSVB] Doesn't work correctly with pipeline aggregations in "entire time range" mode (#105073)
* Use date_histogram instead of auto_date_histogram in pipeline aggregations

* Fix ci

* Fix eslint

* start disable parent pipeline aggs and show error

* Fix CI

* Fix eslint

* Fix CI

* Add functional tests

* Some fixes

* Fix lint

* Use agg_utils

* Fix lint

* Fix text

* Fix lint

* Fix tests

* Fixed condition

* Fix math aggregation

* math should pass panel type as prop

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-14 14:38:51 +03:00
Diana Derevyankina
33cfc4183a
[TSVB] Support custom field format (#101245)
* [TSVB] Support custom field format

Add format_label response processor for series vis data and bucket key formatting to process_bucket for table vis data

* Add ignore_field_formatting for series to support value formatting for all panel types except markdown

* Fix type issue for visData and rename getCustomFieldFormatter to createCustomFieldFormatter

* Update vis.test to cover custom field formats logic and add a migration script to set ignore_field_formatting to true for the series

* Move createCustomFieldFormatter to a separate file, make formatting respect only active metrics field name, refactor vis files and fix label formatting only for grouped by terms series

* Remove services, add getFieldFormatsService  to use it in format_label and get_table_data, replace getCustomFieldFormatter with createCustomFieldFormatter

* Update plugin.ts

* Update start for plugin.ts

* Add formatting for annotations and markdown values

* Refactor some code

* Update some naming and conditions

* Fix formatting of data type labels

* In process_bucket fix case for no getFieldFormatByName

* Add field formatting functional tests for all panel types

* Update tests to make them run correctly for firefox

* Update _tsvb_markdown test setup

* Move series ignoreFieldFormatting check to a separate file, change convertSeriesToVars signature, update migration script and refactor a bit functional tests

* Fix type check for timeseries_visualization.tsx

* Update migrations.js test expected version to 7.15

* Fix tests in _tsvb_chart.ts

* Fix merge conflict remove process_bucket.js

* Update process_bucket.test.ts

* Fix markdown labels formatting

* Add ignore_field_formatting for annotations, enhanced migration script to set that flag to true, refactor data_format_picker

* Fix migration script and add disabling for ignore component when string index pattern is used

* Add supporting URL and color formatters in tsvb table

* Fix eslint

* Remove ignore formatting component, add field formatting option to TSVB data format picker and make it default, remove migration script, update tests and refactor some files

* Fix failing tests, refactor create_field_formatter and add test to it, update some other files

* Fix series formatting for top hit when it has not numeric result

* Handle no fieldFormatMap case for table/vis.js

* Remove "Default" option form DataFormatPicker when index pattern is string, fix markdown variables issue and refactor some code

* Chore(TSVB): Replace aggregations lookup with map

* Fix types, update test expected data and remove unused translations

* Fix i18 check and useEffect in agg.tsx

* Handle aggregations field formatting case

* Fix agg_utils, vis and check_if_numeric_metric tests

* Correct typo and refactor condition in std_metric

* Fix type check

* Get rid of IFieldType

* Add URL and color formatting for topN and metric tabs, fix setting initial custom formatter and switching formatter in agg.tsx

* Update tsvb.asciidoc

* Remove link icon from Date format field help text, update click logic for top N in case of custom field format and fix CI

* Remove unused import

* Revert top N bar extra logic for click

* Refactor some code in agg.tsx

* Add URL and color formatting to Gauge

* Fix bug with terms formatting, refactor some code, update create_field_formatter

* Add comments to _gauge.scss

* Remove unnecessary await

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Uladzislau Lasitsa <Uladzislau_Lasitsa@epam.com>
2021-09-13 11:51:32 +03:00
Stratoula Kalafateli
6f4d8a52dc
[Vislib] Removes old implementation of xy chart (#110786)
* [Vislib] Remove xy chart

* Update i18n

* Remove uncecessary file

* Fix types

* More fixes

* Fix functional tests part 1

* Fix functional tests part 2

* Fix bug with shard-delay

* Fix functional tests part 3

* fix functional tests part4

* Fix async_serch FT

* Fix functional dashboard async test

* REplace screenshot area chart image

* Cleanup vislib from xy charts

* Remove unused fixtures

* Address PR comments

* Remove miaou :D

* Address PR comments

* Fix i18n

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-08 18:35:51 +03:00
Diana Derevyankina
d810c51aab
Failing test: Chrome UI Functional Tests.test/functional/apps/visualize/_tsvb_markdown·ts - visualize app visualize ciGroup12 visual builder markdown should render mustache list (#108651)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-18 11:27:00 +03:00
Stratoula Kalafateli
12c8d2dfcb
[TSVB] Fixes firefox flakiness on index pattern mode functional test (#106825) 2021-07-27 16:51:05 +03:00
Diana Derevyankina
fa7fd32e24
[TSVB] Add more functional tests for Timeseries (#106100)
* [TSVB] Add more functional tests for Timeseries

* Fix failing test for timeseries

* Refactor visual_builder_page and _tsvb_time_series

* Add getChartItems to visual_builder_page

* Remove generic from getChartItems function
2021-07-27 09:51:11 +03:00
Diana Derevyankina
2e0fddad45
[TSVB] Add more functional tests for Gauge and TopN (#105361)
* [TSVB] Add more functional tests for Gauge and TopN

* Update visual_builder_page.ts

* Update functions related to gauge color and filter ratio numerator in visual_builder_page

* Update visual_builder_page and add some more test subjects

* Update _tsvb_chart.ts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-21 15:59:34 +03:00
Diana Derevyankina
ca87cd7a73
[TSVB] Add more functional tests for Table (#105060)
* [TSVB] Add more functional tests for Table

* Update filter ratio setting numerator denominator function

* Refactor set filter ratio numerator and denominator functions in visual_builder_page.ts

* Update setFilterRatioOption function
2021-07-20 16:13:18 +03:00
Diana Derevyankina
87066e06b3
[TSVB] Top_hit supports runtime fields (#103401)
* [TSVB] Refactor top-hit aggregation to work with fields instead of _source

* Allow select date strings for top_hit aggregation in table, metric, and markdown

* Fix agg_with handling for top_hit and add some tests

* Refactor get_agg_value and fix type check for _tsvb_chart

* Refactor top_hit.js

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-12 17:25:52 +03:00
Alexey Antonov
ef991b7c2b
[TSVB] fix include/exclude fields appear to migrated TSVB visualization when using Group by Terms (#104848)
* [TSVB] Include/exclude fields appear to migrated TSVB visualization when using Group by Terms

Closes: #104829

* add functional test

* fix JEST
2021-07-09 09:53:48 -04:00
Alexey Antonov
4806cf3fd6
[TSVB] Table view - fix display of item urls (#105051) 2021-07-09 09:46:56 -04:00
Stratoula Kalafateli
b97d0d468b
[TSVB] Add retry to remove flakiness (#104046)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-07-05 11:39:07 +03:00
Greg Thompson
136d361703
Upgrade EUI to v34.3.0 (#101334)
* eui to v34.1.0

* styled-components types

* src snapshot updates

* x-pack snapshot updates

* eui to v34.2.0

* styled-components todo

* src snapshot updates

* x-pack snapshot updates

* jest test updates

* collapsible_nav

* Hard-code global nav width for bottom bar’s (for now)

* Update to eui v34.3.0

* flyout unmock

* src flyout snapshots

* remove duplicate euioverlaymask

* xpack flyout snapshots

* remove unused import

* sidenavprops

* attr updates

* trial: flyout ownfocus

* remove unused

* graph selector

* jest

* jest

* flyout ownFocus

* saved objects flyout

* console welcome flyout

* timeline flyout

* clean up

* visible

* colorpicker data-test-subj

* selectors

* selector

* ts

* selector

* snapshot

* Fix `use_security_solution_navigation` TS error

* cypress

Co-authored-by: cchaos <caroline.horn@elastic.co>
Co-authored-by: Chandler Prall <chandler.prall@gmail.com>
2021-06-23 15:10:34 -05:00
Yaroslav Kuznietsov
a7444835dd
[TSVB] Replaces EuiCodeEditor 👉 Monaco editor (#100684)
* Сhanged EuiCodeEditor to CodeEditor (monaco) at markdown_editor.js

* Added css lang support for monaco-editor.

* Added .d.ts for css lang import directly from monaco.

* Moved handlebars_url language to the code_editor.

Moved handlebars_url language registration to the code_editor.
Changed the way of registration of languages.

* Added merge for markdown_handlebars lang.

* Changed to simple markdown syntax.

Handlebars syntax breaks highlighting of special chars in markdown syntax.

* Removed useless mergeConfig function.

* Removed legacy import.

* Refactor export from monaco-editor.

* Fixed 'Could not find a declaration file for module'

* Fixed tests.

* Fixed typings errors.

* Added comment to typings.

* Fixed clearMarkdown for Monaco editor.

* Made changes based on suggestions.

* Fixed types errors.

* Fixed function tests types errors.

* Fixes, based on nits.

* Fixes based on nits.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-06-18 21:25:11 +03:00
Spencer
090d0abd11
[ts] migrate root test dir to project refs (#99148)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-04 13:17:00 -04:00
Spencer
111e15a054
[ftr] implement FtrService classes and migrate common services (#99546)
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-25 09:25:09 -07:00
Diana Derevyankina
78b16fd5d3
[TSVB] Show an indicator when using Last Value mode (#91977)
* [TSVB] Show an indicator when using Last Value mode

* Extended some TSVB types, remove unused translations and do some refactoring

* Fix some functional tests and label displaying for Last value

* Fix some functional tests and label displaying for Last value

* Refactor data_time_range_mode_label and change some types

* fix CI

* Refactor timeseries_visualization seriesData

* Remove unused re export

* Replace "href" prop with "onClick" in EuiLink and refactor tooltip content

* Change link to text and add pointer style to it

* FIx import in kibana_framework_adapter

* Remove label for entire time range mode and add an icon for last value mode label

* Add action to show last value label for TSVB embeddables

* Fix TimeseriesVisParams import

* Revert "Add action to show last value label for TSVB embeddables"

This reverts commit 15f16d6f72.

* Put the "Last value" badge on the top of visualization and add an option to hide it

* Fix failing _tsvb_markdown test and refactor timeseries_visualization

* Move I18nProvider frim timeseries_visualization to timeseries_vis_renderer

* Add condition to hide gear button when entire time range mode is enabled, fix gauge scroll issue

* Change text in the popover, add condition to indicator if series data is empty, create migration script to hide last value label for previously created visualizations and a test for that

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
2021-03-30 19:41:52 +03:00
Uladzislau Lasitsa
0e40b94348
[TSVB] Change the default mode from last value to entire timerange (#93608)
* Make 'enter time range' value as default and add telemetry for 'last value' mode

* Fix telemetry schema

* Fix test

* Add possibility count timeseries created from dashboard

* Fix remark

* Fix remark

* Fix problem with time_range_mode

* Fix tests

* Fix tests

* Fix tests for markdown and table

* exclude TSVB which have type as timeseries

* Add description for field in schema in telemetry

* Fix telemetry schema

* Fix some remarks

* Added check for hits

* fix CI

* fix CI

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
2021-03-29 17:31:01 +03:00
Alexey Antonov
4342f26eaf
[TSVB] Enable dual mode, support index patterns and strings (#92812)
* [TSVB] Enable `dual mode`, support index patterns and strings

* modify UI

* add migration script

* refactoring

* fix CI

* prefill the index pattern name

* modify UI

* modify UI

* update UI

* fix functional test

* some work

* remove callouts

* fix rollup test

* update UI

* fix typo

* add some unit tests

* add functional test

* fix CI

* correct labels

* fix ci group 12

* cleanup interface

* fix CI

* cleanup API

* fix some of PR comments

* move index patterns into so references

* remove wrong logic

* fix JEST

* fix some ui issues

* update sample data

* indexPatternObject -> indexPatternValue

* fix comments

* I have a dashboard with two TSVB viz. One with the default (haven't applied it to the combobox) and one with the logs. The filter contains fields only from the logs index pattern

* When I am on the string mode and try to write my index, sometimes some of the chars are not added or they are deleted while typing, something with the denounce maybe?

* fix merge conflicts

* Does this PR also supports runtime fields? I created one from the editor and I see that I can select it

* fix UI issue

* If I create a viz with the string mode and a wildcard e.g. kibana_sample*, the index patterns are not communicated correctly to the dashboard.

* fix import/export refs for dashboard

* remove MigrationPopover

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-29 04:32:01 -04:00