Commit graph

74 commits

Author SHA1 Message Date
Eyo O. Eyo
690690ea21
Simplify workflow for dashboard copy creation in both view and edit interaction modes (#180938)
## Summary

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

- Removes the `save as` top nav menu button
- Also renames nav menu item `clone` to `duplicate` and make it
available in edit mode.
- The save dashboard modal no longer displays and open to save the
dashboard in context as new, given that we've chosen to explicitly
create a copy of the dashboard in context when either of the the
`duplicate` or `saveas` menu option is selected.
- includes bug fix for an issue where clicking the dashboard modal
scrolled the user to the content bottom, see
https://github.com/elastic/kibana/pull/180938#issuecomment-2117586572

## Before
### View mode
<img width="1728" alt="Screenshot 2024-04-16 at 15 59 10"
src="48dc4565-1f75-4f46-839c-8d76f4fedefe">

### Edit mode
<img width="1725" alt="Screenshot 2024-04-16 at 15 59 00"
src="1ac743ac-33b4-4f68-ab59-ad19ab58fa1c">

## After

#### Managed Dashboard

5072a501-8d16-4f25-9575-6f11fed6e580

#### View mode

610d0952-97f0-46b8-a0ea-1546a799d387

#### Edit mode

4f596c07-7bd1-4c5a-9131-0c78731cb113



<!-- ### Checklist

Delete any items that are not applicable to this PR.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-05-29 11:46:23 +02:00
Nick Partridge
382ee2d076
Fix reset UX for panel title and description (#182986)
## Summary

Updates to the panel title flyout behavior to be more strict about changes to the title, including...

- Input defaults to the actual title when empty (`""`), no longer fills
with default viz `title`/`description`.
- Uses the default title/description when the value is `undefined`, such
that the value has never been set.
- Adds a clear button to the `title` input.
- `Reset` wording replaced with `Reset to default`, for `title` and
`description`.
- Only shows reset if there is a `default` non-empty
`title`/`description` to reset to, applies mostly to by-value viz.
- Changes the inspect panel `title` to always match the panel `title`
and show `"[No Title]"` when empty.
2024-05-14 10:15:10 -07:00
Hannah Mudge
a41177f32c
[Dashboard] Default to saved object description when panel description is not provided (#181177)
Closes https://github.com/elastic/kibana/issues/181172

## Summary

This PR fixes a bug where panels were not showing descriptions from
library items - this is because (1) we weren't providing the
`defaultPanelDescription` as part of the default embeddable API and (2)
the panel header was not defaulting to the `defaultPanelDescription`
when a panel description was not provided.

Because of (1), the panel settings flyout showed a blank description
**despite** having the correct logic for defaulting to the default panel
description - that is why the tests in `customize_panel_editor.test.tsx`
passed but it didn't work in production.

### 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


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2024-04-22 07:52:46 -07:00
Nick Partridge
2b344d2797
[FTR] Update getAttribute method return (#179715) 2024-04-10 10:28:03 -07:00
Dzmitry Lemechko
65b5298a85
[ftr] services/page objects cleanup (#179560)
## Summary

@dej611 shared with me a way to look for code duplication in Kibana repo
and I did a quick check in FTR page objects / services
```
npx jscpd  --ignore '**/target/**,**/*.d.ts,*.json,**/*spec*,**/test_suites/**' **/test*/**/page_objects/**  -r html
npx jscpd  --ignore '**/target/**,**/*.d.ts,*.json,**/*spec*,**/test_suites/**' **/test*/**/services/**  -r html`
```

I was able to find not only easy to fix duplications, but also
non-longer used service and functions. This PR just a small cleanup :)

---------

Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
2024-04-06 09:24:22 +02:00
Hannah Mudge
235c4d5ad7
[Controls] Add "Apply" button (#174714)
Closes https://github.com/elastic/kibana/issues/170396
Closes https://github.com/elastic/kibana/issues/135459

## Summary

This PR adds the option to **stop** selections from being auto-applied -
instead, authors can make it so that their selections are only applied
once the new apply button is clicked:



d785631c-0aa5-4e3f-81f9-2d1d0f582b70

### Brief Summary of Changes

- **Publishing Filters**
We used to publish the control group filters as soon as **any** child
changed its output - however, if the apply button is enabled, this logic
no longer works. So, we added an extra step to the publishing of
filters:

1. When a child's output changes, we check if the apply button is
enabled
2. If it is disabled, we publish the filters to the control group output
right away (like we used to); otherwise, we push the new filters to the
`unpublishedFilters` array.
3. Clicking the apply button will publish the `unpublishedFilters`
array.

- **Unsaved Changes**
We used to publish control group unsaved changes whenever **anything**
about the children panels' persistable input changed - however, this no
longer works with the apply button because we **don't** want selections
to trigger unsaved changes when it is enabled.
   
To get around this, we **no longer** take into account selections when
checking for unsaved changes - instead, we compare the **output
filters** from the control group to determine whether anything about the
children changed. As described above, if the control group has
"auto-apply selections" turned off, the control group waits to change
its output until the apply button is clicked - therefore, unsaved
changes will **also** not be triggered until the apply button is
clicked. This unsaved changes logic works **regardless** of if the apply
button is enabled or not.

- **Saved Object**
This required changes to the **dashboard** saved object because of how
we store the control group input as part of the dashboard SO - so, we
are now on a second version for the Dashboard SO. I've also made this
version **slightly less strict** by allowing unknown attributes in the
schema - that way, unknown attributes will no longer throw an error (as
they do on version 1).

### Checklist

- [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] [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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Nick Peihl <nick.peihl@elastic.co>
2024-03-12 12:22:39 -06:00
Tre
986116133f
[FTR] Refactor toasts svc (#174222)
### Summary

Refactoring general ui service (test helpers), to a kbn package.
  - Optimize methods and drop some code duplication.
  
### Why 

  - Makes the service easily available from multiple code areas. 
- This is a preparation to potentially moving tests to plugins /
packages, where they would no longer be able to import thing from test
or x-pack/test but only from a package.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-02-14 09:24:20 +00:00
Nathan Reese
d3a8699f65
fix Failing test: X-Pack Saved Object Tagging Functional Tests.x-pack/test/saved_object_tagging/functional/tests/dashboard_integration·ts (#172395)
Fixes https://github.com/elastic/kibana/issues/160583

Test failed because combobox trying to select already selected tag. PR
fixes test by using combobox service to set element. Combobox service
includes logic to only select value when not selected.


![image](e4d04854-b147-4d88-a7e5-5a7bc5fa3f38)

```
[00:07:27]           │ debg Find.clickByCssSelector('[data-test-subj="savedObjectTagSelector"]') with timeout=10000
[00:07:27]           │ debg Find.findByCssSelector('[data-test-subj="savedObjectTagSelector"]') with timeout=10000
[00:07:27]           │ debg TestSubjects.click(tagSelectorOption-tag-1)
[00:07:27]           │ debg Find.clickByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:07:27]           │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:07:37]           │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:07:37]           │      Wait timed out after 10003ms
[00:07:38]           │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:07:48]           │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:07:48]           │      Wait timed out after 10038ms
[00:07:48]           │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:07:58]           │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:07:58]           │      Wait timed out after 10054ms
[00:07:59]           │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:08:09]           │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:08:09]           │      Wait timed out after 10013ms
[00:08:09]           │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:08:19]           │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:08:19]           │      Wait timed out after 10038ms
[00:08:20]           │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:08:30]           │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:08:30]           │      Wait timed out after 10005ms
[00:08:30]           │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:08:40]           │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:08:40]           │      Wait timed out after 10034ms
[00:08:41]           │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:08:51]           │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:08:51]           │      Wait timed out after 10037ms
[00:08:51]           │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:09:01]           │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:09:01]           │      Wait timed out after 10007ms
[00:09:02]           │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:09:12]           │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:09:12]           │      Wait timed out after 10054ms
[00:09:13]           │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:09:23]           │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:09:23]           │      Wait timed out after 10037ms
[00:09:23]           │ debg Find.findByCssSelector('[data-test-subj="tagSelectorOption-tag-1"]') with timeout=10000
[00:09:33]           │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:09:33]           │      Wait timed out after 10042ms
[00:09:34]           │ debg --- retry.try error: retry.try timeout: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:09:34]           │      Wait timed out after 10042ms
[00:09:34]           │          at /var/lib/buildkite-agent/builds/kb-n2-4-spot-ee2d6153f1c6deeb/elastic/kibana-on-merge/kibana/node_modules/selenium-webdriver/lib/webdriver.js:929:17
[00:09:34]           │          at processTicksAndRejections (node:internal/process/task_queues:95:5)
[00:09:34]           │ info Taking window screenshot "/var/lib/buildkite-agent/builds/kb-n2-4-spot-ee2d6153f1c6deeb/elastic/kibana-on-merge/kibana/x-pack/test/saved_object_tagging/functional/screenshots/failure/saved objects tagging - functional tests dashboard integration creating allows t-29814279444f4d298f24b012c2e451886d9c481ab2ec65240025329c4f56ba13.png"
[00:09:34]           │ info Current URL is: http://localhost:5620/app/dashboards#/create?_g=(filters:!(),refreshInterval:(pause:!t,value:60000),time:(from:now-15m,to:now))
[00:09:34]           │ info Saving page source to: /var/lib/buildkite-agent/builds/kb-n2-4-spot-ee2d6153f1c6deeb/elastic/kibana-on-merge/kibana/x-pack/test/saved_object_tagging/functional/failure_debug/html/saved objects tagging - functional tests dashboard integration creating allows t-29814279444f4d298f24b012c2e451886d9c481ab2ec65240025329c4f56ba13.html
[00:09:34]           └- ✖ fail: saved objects tagging - functional tests dashboard integration creating allows to select tags for a new dashboard
[00:09:34]           │      Error: retry.try timeout: Error: retry.try timeout: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="tagSelectorOption-tag-1"])
[00:09:34]           │ Wait timed out after 10042ms
[00:09:34]           │     at /var/lib/buildkite-agent/builds/kb-n2-4-spot-ee2d6153f1c6deeb/elastic/kibana-on-merge/kibana/node_modules/selenium-webdriver/lib/webdriver.js:929:17
[00:09:34]           │     at processTicksAndRejections (node:internal/process/task_queues:95:5)
[00:09:34]           │     at onFailure (retry_for_success.ts:17:9)
[00:09:34]           │     at retryForSuccess (retry_for_success.ts:59:13)
[00:09:34]           │     at RetryService.try (retry.ts:31:12)
[00:09:34]           │     at Proxy.clickByCssSelector (find.ts:417:5)
[00:09:34]           │     at TestSubjects.click (test_subjects.ts:164:5)
[00:09:34]           │     at DashboardPageObject.selectDashboardTags (dashboard_page.ts:560:7)
[00:09:34]           │     at DashboardPageObject.enterDashboardTitleAndClickSave (dashboard_page.ts:544:7)
[00:09:34]           │     at dashboard_page.ts:481:7
[00:09:34]           │     at runAttempt (retry_for_success.ts:29:15)
[00:09:34]           │     at retryForSuccess (retry_for_success.ts:68:21)
[00:09:34]           │     at RetryService.try (retry.ts:31:12)
[00:09:34]           │     at DashboardPageObject.saveDashboard (dashboard_page.ts:480:5)
[00:09:34]           │     at Context.<anonymous> (dashboard_integration.ts:87:9)
[00:09:34]           │     at Object.apply (wrap_function.js:73:16)
[00:09:34]           │       at onFailure (retry_for_success.ts:17:9)
[00:09:34]           │       at retryForSuccess (retry_for_success.ts:59:13)
[00:09:34]           │       at RetryService.try (retry.ts:31:12)
[00:09:34]           │       at DashboardPageObject.saveDashboard (dashboard_page.ts:480:5)
[00:09:34]           │       at Context.<anonymous> (dashboard_integration.ts:87:9)
[00:09:34]           │       at Object.apply (wrap_function.js:73:16)
[00:09:34]           │ 
[00:09:34]           │ 
```
2023-12-01 15:12:57 -07:00
Nick Partridge
0f1a6e397c
[Lens] Add serverless functional tests (#164798)
## Summary

This PR copies, with limited modifications, functional test suites from
`test/functional` and `x-pack/test/functional`

## Lens Smoke tests
- [x] Smokescreen tests
(x-pack/test/functional/apps/lens/group1/smokescreen.ts)
- [x] Basic vega tests
(test/functional/apps/visualize/group6/_vega_chart.ts)
- [x] Sanity checks for TSDB functionality in Lens
x-pack/test/functional/apps/lens/group4/tsdb.ts

## Convert to Lens

These tests outside of serverless, assume the following vis types are
accessible via the **Visualize editor**, however all the following types
are designated **readonly** in serverless and thus the fn tests fail.

In place of these tests I created the identical visualizations, added
them to a dashboard and exported the SOs. These dashboard and dependent
visualizations are loaded in each respective test, and the assertions
are run on the `Convert to Lens` option from the dashboard. All
assertions are mostly unchanged or achieve the same effect.

-  Agg based -
`x-pack/test/functional/apps/lens/open_in_lens/agg_based`
-  TSVB - `x-pack/test/functional/apps/lens/open_in_lens/tsvb`
-  Dashboard -
`x-pack/test/functional/apps/lens/open_in_lens/dashboard/config.ts`
  - Not applicable to serverless env and/or duplicate of other tests.

Closes #162346

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2023-10-04 13:33:03 -07:00
Hannah Mudge
4d1bd84309
[Dashboard] Fix flaky pluggable actions test (#167926)
Closes https://github.com/elastic/kibana/issues/136460

## Summary

Similar to https://github.com/elastic/kibana/pull/167836, navigation
through `header.clickDashboard()` was flaky in the attached test because
the same `data-test-subj` was re-used for both the application-specific
top navigation **and** the reusable application listing page component:


8b6ba3d15f/src/plugins/navigation/public/top_nav_menu/top_nav_menu.tsx (L120-L124)


8b6ba3d15f/packages/content-management/table_list_view/src/table_list_view.tsx (L91-L96)

This meant that, when the referenced flaky test tried to navigation from
the Visualization listing page to the dashboard app in
`clearSavedObjectsFromAppLinks` via the header page object's
`clickDashboard` method, it wasn't actually waiting to navigate to the
dashboard app because it detected the `top-nav` data test subject from
the **visualization** listing page **and not** from the dashboard app.

Therefore, instead of navigating through the `header` method, I switched
to the new `navigateToAppFromAppsMenu`, which relies on the URL to
update to ensure navigation has occured rather than the `top-nav` data
test subject. I also added logic to close the flyout as part of the test
cleanup, since it was remaining open even after navigating to the
Visualizations listing page, which was getting in the way of the failure
screenshot.


### Flaky Test Runner

- Without closing of flyout:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3323


![image](628f0da9-1e2a-45a9-b58b-dab92e345118)

- With closing of flyout:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3336
    

![image](3456db1a-9cee-4db9-a28d-4c0d1520a5ec)


### 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

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-10-04 11:21:02 -06:00
Nathan Reese
f17b2ab8c0
unskip Failing test: Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/dashboard/group1/preserve_url·ts (#167836)
closes https://github.com/elastic/kibana/issues/166900

Flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3295

Flaky test because `await appsMenu.clickLink('Dashboard', { category:
'kibana' });` is opening dashboard application. Looking at the screen
shot, kibana stays on home page. Looking at the logs, the context menu
is opened and Dashboard link is clicked. PR resolves flakiness by adding
retry around appsMenu.clickLink.

<img width="600" alt="Screenshot 2023-10-02 at 3 52 19 PM"
src="5f3535c0-94d2-48c4-8d9b-15c4433bfe81">

<img width="600" alt="Screenshot 2023-10-02 at 3 52 42 PM"
src="9fc890e2-9f98-4078-87a1-d5cec8cee0e6">

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-10-03 17:01:37 -06:00
Devon Thomson
8ffa8d8ee4
[Dashboard] Store view mode in local storage (#166523)
Moves the Dashboard view mode from session storage to local storage. This means that users will only need to enter edit mode **once** if they are an editor, and any subsequent Dashboards they open will already be in edit mode.
2023-09-29 19:46:18 -04:00
Hannah Mudge
9e8312f2e4
[Dashboard Navigation] Make links panel available under technical preview (#166896)
## Summary
This PR wraps up the work the @elastic/kibana-presentation team has done
to finish the MVP of [Phase
1](https://github.com/elastic/kibana/issues/154354) of the `Link`
embeddable, which enables users to add panels to their dashboard that
contain links to other dashboards + external links - with respect to
dashboard links, we give the author control over which pieces of context
should be kept across dashboards so that things like filter pills,
queries, and time ranges are not lost. This marks a huge improvement in
dashboard navigation overall, which was previously only available via a
variety of different workarounds including (but not limited to):
- Creating (essentially) a `noop` dashboard-to-dashboard drilldown 
- Using markdown panels with hard Dashboard links, which are prone to
break across updates
- Avoiding navigation all together, which resulted in large,
slow-to-load dashboards.

As an added benefit, because these panels contain **references** to each
dashboard rather than hard links, (1) unlike markdown links, they should
not break after updates and (2) if a links panel is exported and
imported into another space or instance, all of the dashboards it links
to will also be imported.



1a86b713-47e7-4db9-8a04-29d41b13681a

> **Note**
> 🔉 The above video has audio! Turn on your sound for the best
experience.

### Note about this PR
- A majority of this work was done on a feature branch, with thorough
reviews from @andreadelrio on behalf of @elastic/kibana-design along the
way. Therefore, while feedback on the design is encouraged, any large
concerns brought up in this PR should be filed as separate issues and
addressed in follow-up PRs.
- This PR contains work for giving embeddables control over their own
panel size / default positioning on the dashboard. This was especially
important for the links panel, since we assume that (a) most links
panels would be located somewhere near the top of the dashboard and (b)
the horizontal links panel should have a different default "shape"
(longer than it is tall) than the vertical panel (taller than it is
long).
- This PR also contains work for caching dashboard saved objects, which
makes navigation much more seamless.

### Flaky Test Runner
-
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/3251


![image](7616443e-0cb0-43ce-a1d0-41f8bee6cbfc)


### Checklist

- [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)
- [ ]
~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~ This will
be addressed in a follow up:
https://github.com/elastic/kibana/issues/166750
- [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 - ~Units tests
are added, functional tests are forthcoming~ Edit: All tests are in.
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: Nick Peihl <nick.peihl@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Andrea Del Rio <delrio.andre@gmail.com>
Co-authored-by: Devon Thomson <devon.thomson@elastic.co>
Co-authored-by: Nick Peihl <nickpeihl@gmail.com>
Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
2023-09-29 08:25:51 -06:00
Devon Thomson
d8c112e9b7
[Serverless] Unify Dashboard app IDs in functional tests (#166377)
Removes all usages of `PageObjects.common.navigateToApp('dashboard')` in favour of a Dashboard page method.
2023-09-18 11:41:12 -04:00
Devon Thomson
217c118caa
[Dashboard] Run Smoke tests in Serverless (#164992)
Add Dashboard functional test coverage to the Serverless ES project.
2023-08-31 12:55:12 -04:00
Catherine Liu
938716e58a
[Dashboard] Redesign clone experience (#159752)
## Summary

Closes #154500. 
Closes https://github.com/elastic/kibana/issues/114206.

This updates the UX around cloning dashboards. I removed the clone
confirm model, so cloning a dashboard is just a one click action now.
This aligns with how other apps like ML handle cloning. I've also made
the dashboard title breadcrumb a button in edit mode that opens the
dashboard settings flyout for better discoverability.


4f5ea117-a5e4-4ec5-9113-8b09fd8c84a1

I also changed the pattern for cloned dashboard title from `Dashboard
Title Copy` to `Dashboard Title (#)`.
<img width="1226" alt="Screenshot 2023-06-30 at 1 03 35 PM"
src="b50ba5c6-dc95-4aab-a320-b1a78b74c1b6">
2023-06-30 20:45:39 -07:00
Nathan Reese
ef7fda2d24
fix Failing test: X-Pack Saved Object Tagging Functional Tests.x-pack/test/saved_object_tagging/functional/tests/dashboard_integration·ts - saved objects tagging - functional tests dashboard integration creating allows to select tags for a new dashboard (#160687)
Closes https://github.com/elastic/kibana/issues/160583

flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2513

Harden `dashboard_page.enterDashboardTitleAndClickSave` for retry loops
so does not try to open save dialog when its already open from first
save attempt failure.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-06-28 10:14:50 -06:00
Hannah Mudge
9c0b7bc37a
[Dashboard] Fix flaky time picker tests (#156761)
Closes https://github.com/elastic/kibana/issues/155603

## Summary

For the test that failed above, the failure screenshot shows that we
weren't waiting long enough for the pie chart to load before calling
`expectEmptyPieChart`:


![image](https://user-images.githubusercontent.com/8698078/236501367-290f481c-d17b-4d0a-a696-f50020fbd605.png)

Rather than adding a `wait` for just the single failing test, I figured
we should probably **always** wait for the page and visualizations to
load when adding visualizations - so, I added
`dashboard.waitForRenderComplete` to any methods I could find in the
Dashboard page object and the Dashboard visualizations service where
panels were being added.

Note that, if adding a given visualization also requires navigating to
and from the Dashboard app, I also added
`header.waitUntilLoadingHasFinished` before
`dashboard.waitForRenderComplete` so that we can wait for the Dashboard
app to load first before ensuring the visualizations have also loaded.
This should hopefully prevent any **other** tests that rely on adding a
visualization to be less flaky.

### Flaky Test Runner

<a
href="https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2228"><img
src="https://user-images.githubusercontent.com/8698078/236513873-d97f7c61-e8ee-4f5f-b76d-13998e62dadc.png"/></a>

### 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

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-05-05 13:08:52 -07:00
Hannah Mudge
29ffa177c1
[Dashboard] Add reset button (#154872)
Closes https://github.com/elastic/kibana/issues/132457

## Summary

This PR adds a reset button to the dashboard top navigation in both edit
and view mode - when clicked, if the dashboard has unsaved changes, it
will revert the dashboard to the last saved state:



https://user-images.githubusercontent.com/8698078/232918433-97bac4b0-7472-49e9-9eb3-2cb7c9e6edf6.mov

> **Note**
> The above video contains some old copy for the modals. Please refer to
"All copy changes" below to see the updated copy.

Note that, by adding more buttons to the top nav bar, we are increasing
the risk of someone hitting [this accessibility
issue](https://github.com/elastic/kibana/issues/154414) (where the
breadcrumbs get completely overlapped before the browser is small enough
for the navigation to collapse) - this will either be addressed on the
Shared UX side or will be addressed as part of our [nav bar
redesign](https://github.com/elastic/kibana/issues/154945) 👍


### All Copy Changes

- **Listing Page** 

  | Before | After |
  |--------|-------|
| ![Screenshot 2023-04-18 at 4 29 10
PM](https://user-images.githubusercontent.com/8698078/232919138-7be86e97-ebb4-48a9-b8b1-0b970131aa37.png)
|
![image](https://user-images.githubusercontent.com/8698078/232919166-b7bc7b55-5074-485d-ad0a-2fb695367538.png)
|
|
![image](https://user-images.githubusercontent.com/8698078/232920038-6c8c463e-0c7d-49e7-99c8-86b2ae611844.png)
|
![image](https://user-images.githubusercontent.com/8698078/233412233-a785d99d-9d07-4ee5-a121-646bbd839f7c.png)
|

- **Dashboard - _Edit Mode_** 

  | Before | After |
  |--------|-------|
|
![image](https://user-images.githubusercontent.com/8698078/232920992-2d1b61f4-dff2-4bdd-854b-9cd6fcae07ce.png)
|
![image](https://user-images.githubusercontent.com/8698078/233412732-254a9503-5526-44bc-a2e0-067f8800ad26.png)
|





- **Dashboard - _View Mode_** 

  | Before | After |
  |--------|-------|
| N/A since you couldn't discard changes from view mode previously |
![image](https://user-images.githubusercontent.com/8698078/233413029-9a6b4256-3002-48c5-8620-7596d8f08153.png)
|


###  Flaky Test Runner
- `test/functional/apps/dashboard/group1/dashboard_unsaved_state.ts`
<a
href="https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2144"><img
src="https://user-images.githubusercontent.com/8698078/232622312-8532bc7e-a699-45ee-862d-739d116c5dba.png"></a>
-
`test/functional/apps/dashboard_elements/controls/options_list/options_list_dashboard_interaction.ts`
<a
href="https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2143"><img
src="https://user-images.githubusercontent.com/8698078/232615061-f01439e8-3a69-4190-8b6f-1926e1fa776a.png"></a>


### Checklist

- [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] [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] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
(Refer above)
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-04-21 09:30:13 -06:00
Nick Peihl
b692e347f4
[Dashboard Usability] Unified dashboard settings (#153862)
## Summary

Adds flyout for changing individual dashboard settings such as title,
description, tags, and save time with dashboard. This also moves the
existing dashboard options (show panel titles, sync colors, use margins,
sync cursor, and sync tooltips) into the flyout.

Fixes #144532

[Flaky test
runner](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2055)

### 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] [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] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2023-03-31 09:52:51 -04:00
Devon Thomson
6d0e600ca1
[Unskip] Refactor Create & Add Drilldowns Test (#152927)
Unskip and refactor create and add drilldown tests
2023-03-09 10:46:28 -05:00
Catherine Liu
1f03570126
[Dashboard Usability] Moves scrollbar to panel section (#145628)
## Summary

Closes https://github.com/elastic/kibana/issues/145404.
Closes #134257.

Cloud deployment for testing:
https://kibana-pr-145628.kb.us-west2.gcp.elastic-cloud.com:9243
User: `elastic`
Password: `zuIno5Tuy4lVmhMwbt2C6NyY`

This moves the scrollbar from the entire app to only the panel section
of the dashboard app. The search/filter bar and editor toolbar will
remain at the top while controls and panels scroll. The controls
floating actions were extracted out into their own component for future
use for panel actions.

#### Before
![Nov-17-2022
12-53-43](https://user-images.githubusercontent.com/1697105/202557972-6963b9d3-4eb0-40a4-963d-19e16e652d95.gif)


#### After
![Nov-17-2022
12-41-29](https://user-images.githubusercontent.com/1697105/202557993-251a984e-8bce-4b50-94c7-a7a39410a624.gif)


### Checklist

Delete any items that are not applicable to this PR.

- [ ] 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)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [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
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-02-09 11:10:54 -07:00
Hannah Mudge
53582e403d
[Controls] [Dashboard] Use EuiSelectable for options list suggestions (#148420)
Closes https://github.com/elastic/kibana/issues/147624
Closes https://github.com/elastic/kibana/issues/135470

## Summary
Previously, the suggestions/available options for the options list
control were manually built via individual `EuiFilterSelectItem`
components. While this worked well enough, it had a major `a11y` pitfall
- suggestions could only be navigated using `tab` rather than the up and
down arrow keys as expected.

This PR changes this behaviour to use `EuiSelectable` for managing and
displaying the suggestions instead, which has the following benefits:
1. Most importantly, `a11y` is significantly improved by allowing
navigation using the keyboard
2. A scrollbar is added to the options list popover - this makes it a
lot easier to manage since, between adding the footer to the popover and
adding the `exists` option, the popover was getting... rather unruly

![BeforeAndAfterVirtualization](https://user-images.githubusercontent.com/8698078/210903704-199f2953-e1e8-49c2-864d-4334f1da62a0.png)
3. The resulting `options_list_popover_suggestions.tsx` code is, in my
opinion, a bit easier to follow

This PR also fixes three small bugs:
1. The loading state was set to `false` for rejected requests, which
caused an early return of `No results` when typing quickly into the
search bar - see
https://github.com/elastic/kibana/pull/148420#discussion_r1064986896 for
more details.
2. When `singleSelect` was `true`, selecting `Exists` followed by a
different selection would not unselect `Exists`.
3. When `singleSelect` was `true`, selections could not be undone unless
`showOnlySelected` was `true`.

### Video of Keyboard Controls


https://user-images.githubusercontent.com/8698078/211362869-0b5f90ec-4784-4744-8de9-5c2881bfa7a9.mov


### Flaky Test Runners

-
`test/functional/apps/dashboard_elements/controls/options_list/options_list_dashboard_integration.ts`<br>
<a
href="https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1733"><img
src="https://user-images.githubusercontent.com/8698078/212110506-f05ba031-7328-4995-b929-d56c72d694ff.png"/></a>
This was the offending test suite that was causing all sorts of
flakiness, so I wanted to test it both on its own and as part of the
other controls tests - so, in combination with the below flaky test run,
this test suite was run 200 times successfully. Should **hopefully**
mean this thing is no longer flaky 🤞

- `test/functional/apps/dashboard_elements/controls/options_list/*`<br>
<a
href="https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1741"><img
src="https://user-images.githubusercontent.com/8698078/212143963-28856da0-d1ae-4b3f-801a-c96f8780e48b.png"/></a>

-
`test/functional/apps/dashboard_elements/controls/control_group_chaining.ts`<br>
<a
href="https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/1744"><img
src="https://user-images.githubusercontent.com/8698078/212158041-a381ddb4-8b79-42b6-8b64-edd96cda262e.png"/></a>


### 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
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))

![BeforeAfterAxeFailures](https://user-images.githubusercontent.com/8698078/211360345-e9dea3c8-1068-41f7-bea3-921c9119afc2.png)
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-01-16 11:25:28 -07:00
Devon Thomson
51b11c0fb8
[Dashboard][Portable Dashboards] Unskip Unsaved Listing Tests (#147820)
## Summary
Fixes a race condition that resulted in CI flakiness when checking for
Dashboard unsaved changes:
2023-01-03 13:00:21 -05:00
Uladzislau Lasitsa
a068b2ec53
[Dashboard][Lens] Add "convert to lens" action to dashboard (#146363)
## Summary

Closes https://github.com/elastic/kibana/issues/147032
Completes part of: https://github.com/elastic/kibana/issues/144605

Added `convert to lens` action for panel in dashboards.

If legacy visualization can be converted, the notification 'dot' will
shown on context menu.
<img width="828" alt="Снимок экрана 2022-12-02 в 10 50 58"
src="https://user-images.githubusercontent.com/16915480/205253599-3f3f102e-8fdc-497c-9e81-a9e1a146687c.png">

New action looks like this:
<img width="781" alt="Снимок экрана 2022-12-02 в 10 52 42"
src="https://user-images.githubusercontent.com/16915480/205253909-79d65fd8-81d8-4cce-a61a-234d3996cf84.png">

After clicking by that action user will be navigate to lens page and see
the following, where user can replace legacy visualization to lens on
dashboard:
<img width="1347" alt="Снимок экрана 2022-12-02 в 10 53 23"
src="https://user-images.githubusercontent.com/16915480/205254013-6e26b54d-6b92-4da5-be64-01b2876ea847.png">

On save user also can replace panel on dashboard:
<img width="506" alt="Снимок экрана 2022-12-02 в 10 55 22"
src="https://user-images.githubusercontent.com/16915480/205254409-163ebf51-c075-4c9a-a070-cebc7001636d.png">

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2022-12-13 15:36:38 +02:00
Nick Peihl
21d1313e2d
[Dashboard] Use Shared UX ExitFullScreen button (#145388) 2022-11-16 17:13:57 -05:00
Devon Thomson
f5b6a2c43b
[Portable Dashboards] Remove Saved Object Class (#138774)
* Removed dashboard saved object class, replaced with dashboard saved object service
2022-09-28 15:16:51 -04:00
Hannah Mudge
138f2cda0d
[Dashboard] Services abstraction (#139145)
* Service abstraction for data service

* Remove unnecessary files

* Fix jest tests for new data service

* Service abstraction for HTTP service + fix Jest tests

* Services abstraction for visualizations service

* Services abstraction for data views editor service

* Services abstraction for spaces service

* Services abstraction for settings service

* Remove more unnecessary files + clean up imports

* Add theme to new settings service + fix imports

* Services abstraction for overlays service

* Services abstraction for navigation service

* Services abstraction for chrome service

* Services abstraction for embeddable service  + fix Jest tests

* Services abstraction for notifications service

* Services abstraction for dashboard capabilities service

* Remove unecessary context provider

* Services abstraction for screenshot mode service

* Services abstraction for url forwarding service

* Services abstraction for share service

* Services abstraction for usage collection service

* Another round of code cleanup

* Services abstraction for initializer context service

* Clean up more unecessary files

* Services abstraction for application service

* Remove duplicated saved object client service

* Services abstraction for saved objects service

* Services abstraction for saved objects tagging service

* Services abstraction for dashboard session storage service

* Services abstraction for core context service

* Clean up initializer context code

* Refactor to create singular no data page context service

* Create and use dashboard mount context provider

* Clean up + abstraction for docs link service

* Remove dashboard container services

* Temporarily revert back to deprecated fullscreen button

* Remove PlaceholderEmbeddableServices + more code clean up

* More code clean up

* Clean up plugin code

* Investigated possibly flaky test - doesn't actually seem to be flaky

* Update snapshot for new services

* Clean up actions code

* Clean up dashboard container code

* Add to documentation links service to remove type casting

* Address feedback

* Undo move of services in dashboard container factory
2022-09-14 08:09:45 -06:00
Hannah Mudge
00c8cf9e56
[Dashboard] View panel-level filters and queries (#136655)
* Use panel action to show filters

* Switch over to a modal

* Fix how I'm getting data views

* Deserialize and clean filters for getFilters

* Read only filter items

* Fix render of filter pills

* Fix title for read only filter pills + clean up code

* Add i18n support + fix types

* Provide Kibana uiSettings to modal

* Fix how panel titles are grabbed for functional tests

* Add jest tests for badge

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

* Remove focus trap from modal

* Add edit button to modal that redirects to visualize app

* Add tooltip to filter pills

* Add jest tests for modal

* Clean up badge code and move to modal

* Make filter pills focusable

* Add tooltip to readOnly filter pills only

* Add `getFilters` to saved search embeddable

* Add query to filters modal

* Support by reference embeddables - specifically for visualize

* Fix jest tests for modal

* Add i18n support for new form in modal

* Clean up code

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

* Fix jest tests for badge

* Temporarily disable for maps and add TODO comment

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

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Fix styling of modal + i18n of aria label

* Fix bundle size

* Address first round of feedback

* Add comments to public APIs

* Export missing API

* Add comments to public dashboard API

* Fix imports, types, and add more comments

* Fix losing of context

* Add more public API comments

* Add comments to each embeddable/dashboard container

* Add more public API comments

* Fix losing of context for real this time

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

* Fix jest test

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

* Address feedback

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-08-10 11:36:49 -06:00
Lee Drengenberg
73745fedf9
Normalize listing table data-test-subj (#137920)
* don't use es_archiver/empty_kibana, speed up steps

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

* revert change to listing page

* revert this change and do in another PR

* normalize data-test-subjects on landing pages

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

* revert shakespeare from another PR

* re-add missing dts

* found a few more replacements to change

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

* another fix

* add data-test-subj for 'Create your first vis/dash'

* update jest snapshot

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-08-04 09:29:17 -05:00
Hannah Mudge
b31b076b07
[Dashboard] Fix z-index of embPanel__header--floater (#136463)
* Remove panel wrapper element

* Fix functional tests to work without wrapper

* Remove duplicated code

* Re-add classes to right-justify in view mode

* Apply high z-index to children of floating header rather than parent
2022-07-19 18:15:31 +02:00
Hannah Mudge
4f13ea8435
[Dashboard] [Controls] Hide controls callout when the hideAnnouncements setting is true (#136410)
* Make controls callout dependent on new UI setting

* Add functional test
2022-07-14 14:09:39 -06:00
Lee Drengenberg
e02024b56a
cleanup test/functional/fixtures/es_archiver/dashboard/legacy (#133827)
* kbnArchiver es_archiver/dashboard/legacy

* cleanStandardList of saved objects in init, and after

* remove unused files

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-06-08 16:34:34 -05:00
John Dorlus
605020d79c
Migrating Dashboard TimePicker Tests To Use CCS (#130286)
* Migrated_Dashboard_TimePicker_Tests_To_Use_CCS

* Added dashboard to the config file.

* Flipped ccs switch conditional.

* Added CCS test to its own small describe block for readability.

* Added conditional for data.

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

* Fixed CCS dashboard test.

* Removed file that should have been removed via merge.

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2022-05-18 00:11:52 -04:00
Alexey Antonov
fb6f64f5a4
Fix Tests.test/functional/apps/visualize/_tsvb_time_series.ts (#130599)
* Tests.test/functional/apps/visualize/_tsvb_time_series·ts - visualize app visualize

* Update _tsvb_time_series.ts
2022-04-24 06:26:38 -07:00
Bhavya RM
e2e8dbb08f
Rendering imported dashboards in import saved objects between version tests and refactor of multi-space imports test (#129065) 2022-04-04 09:20:47 -04:00
Devon Thomson
ed4c19c692
Use debounce instead of async url update to remove app state from URL (#127083) 2022-03-08 11:04:28 -05:00
Hannah Mudge
6f1a963d1d
[Dashboard] Fix time range and filter state comparisons for dashboard-to-dashboard drilldowns (#124278)
* Remove deprecated references.

* Add timeRange to DashboardState and timeRestore to DashboardContainerInput

* Ignore filters.$state during dashboard diff

* Undo remove deprecated references.

* Conditionally exclude filter state from comparison

* Inject filter.$state for context filters

* Trigger apply filters

* Add save to functional tests

* Remove unused variable

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2022-02-22 10:30:03 -07:00
Hannah Mudge
b6013d14f7
[Dashboard] Fix blank panel save and display issue. (#120815)
* Added special case to panel comparison.

* Fixed panel title behaviour when linking/unlinking to/from the library.

* Added panel title test suite.

* Made the injection of the 'savedSearchId' key conditional on if it is defined when unlinking.

* Adjusted use of 'setValue()' based on feedback from @dmlemeshko

* Refractor test suite.

* Improved code for removal of title on library link.
2021-12-14 17:42:42 -07:00
Devon Thomson
5d5fb3f91c
[Dashboard] Listing Page Callout When New Dashboard In Progress (#117237)
* Added dashboard listing state for when no dashboards are available, but the user has one in progress
2021-11-05 10:21:26 -04:00
Devon Thomson
70632e2a9e
[Dashboard] Retain Tags on Quicksave (#111015)
* fixed missing tags api when loading saved dashboard. Added tests
2021-09-07 14:20:15 -04:00
Nathan Reese
dd9dd52718
[maps] remove tile_map, region_map, and maps_legacy plugins (#105326)
* [maps] remove tile_map plugin

* initial bounds

* update embeddable query context

* start editor

* remove tile_map from tsconfig and i18n cleanup

* implement view in maps button

* tslint

* remove empty lines

* remove tileMap from limits.yml

* remove region_map and maps_legacy plugins

* region_map vis with Map embeddable

* make MapComponent

* lint

* clean up

* shorten text

* lint

* remove region_map from interpreter functional tests

* update docs

* add migration for removing ui_settings

* remove tile_map and region_map functional tests

* tslint

* call handlers.done when layers are loaded

* fix visualize create menu test

* eslint

* add owner comment to ui_settings/saved_objects/migrations.ts

* remove deleted plugins from codeowners

* review feedback

* use correct value for TILE_MAP_RENDER

* down select mapModules for getLayerDescriptors callback

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-08-18 12:51:31 -06:00
Dmitry Tomashevich
328c36dedc
[Discover] Deangularize classic table (#104361)
* [Discover] move angular directives to react compoenents

* [Discover] add support of infiniteScroll

* [Discover] support paginated classic table

* [Discover] refactor docTable component, remove redundant angular code

* [Discover] remove redundant files

* [Discover] fix some functional tests and pgination

* [Discover] fix functionals

* [Discover] code refactoring, adding tests

* [Discover] update tests

* [Discover] fix embeddable view of doc table

* [Discover] update pagination view

* [Discover] remove unused translations

* [Discover] improve readability, fix pagination

* [Discover] adjust isFilterable check

* [Discover] improve doc viewer table row display

* [Discover] clean up implementation, fix functional test

* [Discover] fix skip button

* [Discover] update test snapshot

* [Discover] update test

* [Discover] simplify pagination, update layout in embeddable

* [Discover] fix functional, remove redundant i18n translations

* [Discover] return indexPatternField

* [Discover] add support of fixed footer for embeddable

* [Discover] move doc_table to apps/components folder, update test

* [Discover] fix imports

* [Discover] update imports, beautify code

* Update src/plugins/discover/public/application/apps/main/components/doc_table/doc_table_wrapper.tsx

Co-authored-by: Tim Roes <mail@timroes.de>

* [Discover] remove redundant styles

* [Discover] fix lining

* [Discover] fix discover grid embeddable

* [Discover] fix by comments

* [Discover] return extraWidth, describe the problem

* [Discover] fix unresolved conflicts

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Tim Roes <mail@timroes.de>
2021-08-10 18:21:08 +03:00
Spencer
f466ebf1a3
[esArchiver] drop support for --dir, use repo-relative paths instead (#101345)
Co-authored-by: spalger <spalger@users.noreply.github.com>
2021-06-08 17:37:42 -04:00
Devon Thomson
b3ed014c1a
[Dashboard] Rebuild State Management (#97941)
* Rebuilt dashboard state management system with RTK.
2021-06-07 15:17:24 -04: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
Catherine Liu
9aa7892894
[Dashboard] Fixes dashboard_save functional test (#98830)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-05-17 09:46:54 -07:00
Matthias Wilhelm
a8d4145afb
[Discover] Revert default grid back to legacy (#98508) 2021-04-30 10:29:41 +02:00
Matthias Wilhelm
2ecbca0d8d
[Discover] Enable EuiDataGrid (#89264)
* Now the new EuiDataGrid based document table is the default

* Columns can be sorted by drag and drop

* Column width can be changed by drag and drop

* There's a fullscreen mode

* There's document selection 

* There's document navigation in the flyover of a expanded document

* Sorting is much more user friendly, less confusing and sort order can be changed by drag and drop
2021-04-20 14:43:02 +02:00
Catherine Liu
3b31d81196
[Dashboard] Makes lens default editor for creating new panels (#96181)
* Makes lens default editor in dashboard

Added all editors menu to dashboard panel toolbar

Fixed toggle on editor menu

Removed unnecessary comments

Added data test subjects to editor menu buttons

Populated editor menu with vis types

Removed unused imports

Fixed imports

Adds showCreateNewMenu prop to AddPanelFlyout

Rearranged order of editor menu options

Fixed ts errors

Added groupnig to embeddable factory

Use embeddable state transfer service to redirect to editors

Added showGroups to TypeSelectionState

Fixed add panel flyout test

Fixed data test subjects

Fixed factory groupings

Removed unused import

Fixed page object

Added telemtry to dashboard toolbar

Added telemtry to editor menu

Fix ml embeddable functional tests

Fix lens dashboard test

Fix empty dashboard test

Fixed ts errors

Fixed time to visualize security test

Fixed empty dashboard test

Fixed clickAddNewEmbeddableLink in dashboardAddPanel service

Fixed agg based vis functional tests

Revert test changes

Fixed typo

Fix tests

Fix more tests

Fix ts errors

Fixed more tests

Fixed toolbar sizes and margins to align with lens

Fix tests

Fixed callbacks

Fixed button prop type

New vis modal copy updates

Added savedObjectMetaData to log stream embeddable factory

Addressed feedback

Fixed ts error

Fix more tests

Fixed ts errors

Updated dashboard empty prompt copy

Adds tooltip to log stream embeddable factory saved object meta data

Made icons monochrome in toolbar

Fixed icon colors in dark mode

Cleaned up css

Fixed ts errors

Updated snapshot

Fixed map icon color

* Added tooltips for ML embeddables

* Restored test

* Added empty dashboard panel test

* Fixed i18n id

* Fix dashboard_embedding test

* Removed unused service

* Fixed i18n error

* Added icon and description properties to embeddable factory definition

* Fixed ts errors

* Fixed expected value

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-04-17 22:29:27 -07:00