Resolves https://github.com/elastic/kibana/issues/182229
## Release Note
Remove Logs Explorer
## Summary
- Removes the Discover/Logs Explorer tabs in the top nav
- Changes all links to Logs Explorer in other applications to Discover
- Removes all APIs exposed by Logs Explorer
Note: This does not remove Logs Explorer from the codebase. There will
be a follow up for that work.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Fixes https://github.com/elastic/kibana/issues/192804
This PR updates the nav hierarchy on serverless and changes the
`accordion` to `panelOpener`. The menu items have been updated according
to the [Figma
file](https://www.figma.com/design/IAR7FjBaSCDWypNYL83fzy/Observability-Navigation?node-id=1232-10087&node-type=frame&t=AMlUqaK2UhhiyqGi-0).
Here's a Video of how nav hierarchy looks like on serverless with the
new changes:
https://github.com/user-attachments/assets/55d04969-379e-4cd1-8e25-d50382cf51e0
## What was changed
- AI & ML menu is removed and split into
- `AI Assistant`
- `Machine learning`
- `Applications` now opens a `panelOpener` instead of an `accordion`
- `Service Inventory` was renamed to `Service inventory` to meet the use
of sentence-case requirement
- Synthetics was moved to a new section
- `Infrastructure`
- `Infrastructure Inventory` was renamed to `Infrastructure inventory`
to match the sentence-case requirement
- `Machine learning`: this menu was not present at all on serverless
## Notes for the Reviewer
- `Stack Management` on security and search don't use any `panelOpener`,
they use a landing page instead. In order to be consistent with the rest
solutions, I kept Stack Management as is.
- `Machine Learning` menu item was not present at all on serverless. I
need a confirmation, that it is fine to bring it in as it is from
stateful cc @vinaychandrasekhar
---------
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Closes#193321
## Summary
The PR adds the redirection point when "Discover" menu item is clicked
on the sidenav in serverless (or solution nav on stateful). Based on
what tab between "Discover" or "Logs Explorer" the user clicked
recently, "Discover" will point to that app/tab. Previously, "Discover"
would always point to "Logs Explorer" on serverless and to "Discover" on
stateful.
In order to implement this, a temporary app `last-used-logs-viewer` is
registered in `observability-logs-explorer` plugin whose only job is to
read the last stored value in local storage and perform the redirection.
Doing the redirection from a temporary app should help prevent
triggering unnecessary telemetry and history entries. And it should be
fairly easy to undo once context aware redirection is in place.
~With this implementation, only the behavior of user clicking "Discover"
on the sidenav and clicking the tabs is affected and any deeplinks from
other apps or direct links should work as is.~ The tab choice will be
updated even if the apps are visited via url.
https://github.com/user-attachments/assets/8a0308db-9ddb-47b6-b1a5-8ed70662040d
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Currently the breadcrumb of the parent navigation item isn't a link:
<img width="339" alt="Screenshot 2024-05-10 at 2 06 42 PM"
src="1471125f-59d7-468e-8ede-3a3c3c3e42dc">
This change makes it so the breadcrumb of parent navigation item is
linkable:
<img width="293" alt="Screenshot 2024-05-10 at 2 21 27 PM"
src="aad5e650-33e1-419d-b866-0b7ec70e1f42">
The links will go to the first item in the list of child links.
The merging of this PR depends on
https://github.com/elastic/kibana/pull/183508 allows for this
functionality to work without making the left side parent collapsible
link, also a href link - only the breadcrumb.
## Testing
- Start a serverless kibana instance
- Navigate to a child link of an accordion using the left side
navigation
<img width="589" alt="Screenshot 2024-05-15 at 11 26 24 AM"
src="d225967d-37d1-4f19-b3f5-856fcc1bce68">
- The breadcrumb should of this page should be a link and link you to
the first child link of the accordion
- Renames test subjects and page objects
- Renames test folders from `observability_log_explorer` to
`observability_logs_explorer`
- Changes app url from `observability-log-explorer` to
`observability-logs-explorer` and adds another app for redirects
Related to https://github.com/elastic/kibana/issues/171991
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
This PR adds tabs to navigate between Discover and Log Explorer in
serverless O11y projects. The Discover top nav should remain unchanged
in stateful deployments and all other serverless project types:

> [!IMPORTANT]
> While writing tests for this, I encountered a few issues we'll
probably want to discuss and make decisions for before merging this PR.
1. When there are no data views in Kibana and a user navigates to
Discover, they are prevented from accessing it and shown a no data
screen. So if a user navigates to Discover in a serverless O11y project
in order to get to Log Explorer but there are no existing data views,
they will be unable to access the tabs since they will be blocked by the
no data screen. Is this a realistic scenario in serverless O11y that we
need to solve for, or will there always be at least one data view by
default?
2. When navigating from the Log Explorer tab to the Discover tab, we
convert the current dataset to an ad hoc data view to use in Discover.
This doesn't work in reverse since Log Explorer can't load an arbitrary
data view that might be selected in Discover, so instead I'm using the
"all logs" locator. I'll leave it to the O11y team to decide if this is
ok or if we need to take another approach here.
3. Since we are passing state between Discover and Log Explorer when a
user switches between tabs, the default columns in Log Explorer will be
overwritten by the current Discover grid columns (even if it's just the
Document column). I imagine the O11y team doesn't want this, but how
should we solve it? Should we avoid passing columns (and any other state
that might overwrite defaults) when navigating from Discover to Log
Explorer, or take another approach?
## Notes
- The sidebar navigation link has been changed from "Log Explorer" to
"Discover" and defaults to the Discover tab.
- "Log Explorer" has been renamed to "Logs Explorer" in the UI.
- The mockups used "Data Views" for the Discover tab title, but this was
later decided against, so the implementation uses "Discover".
- All of the same state that used to be passed from Log Explorer to
Discover through the top nav button is still being passed, but I also
added support for passing `sort` as well (I can revert this if it's
unwanted).
- In order to add tabs to the left side of the Discover top nav in
serverless, we had to stop relying on Unified Search for rendering the
top nav (in serverless only, stateful still uses it). Instead we are now
rendering the top nav directly in Discover in serverless, similar to
what Log Explorer does. This also required access to some of the
internal navigation plugin components we rely on for the Discover top
nav, so I exported them from the plugin since I figured it was better
than duplicating them.
Part of #169964. **In order to fully resolve this issue, there is still
a remaining task to remove the "Data Views" tab from the Log Explorer
dataset selector.**
Part of #171386. **In order to fully resolve this issue, it looks like
there may be some documentation work to do (especially since "Log
Explorer" has been named to "Logs Explorer" in the UI).**
### 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
- [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/))
- [ ] 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))
- [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>
## Summary
fix https://github.com/elastic/kibana/issues/1665932569007b-92b6-47d0-a893-8747fbf17d2b
- "Projects" link removed, now it is part of breadcrumb. This also makes
the header more responsive as we get the flexibility from the
breadcrumbs.
- Added "View all projects"
- Added "Manage project" link
## Summary
Close https://github.com/elastic/kibana/issues/161447
This fixes deeper context breadcrumbs in serverless observability
project for alerts and slos apps.
This builds on top of https://github.com/elastic/kibana/pull/169513
where we added merging of navigational project breadcrumbs with deeper
context breadcrumbs set by `chrome.setBreadcrumbs`. The merging is based
on deepLinkId, so we're adding it to base breadcrumbs. The deepLinkId is
type checked.


## Summary
This fixes deeper context breadcrumbs in serverless navigation for fleet
and integration apps.
This builds on top of https://github.com/elastic/kibana/pull/169513
where we added merging of navigational project breadcrumbs with deeper
context breadcrumbs set by `chrome.setBreadcrumbs`. The merging is based
on `deepLinkId`, so we're adding it to base breadcrumbs. The
`deepLinkId` is type checked.
Example Before/After:
Before:


After:


## Summary
close https://github.com/elastic/kibana/issues/167337
It introduces a new way to automatically set the deeper context
breadcrumbs in serverless navigation. Instead of using the
`serverless.setBreadcrumbs` for setting deeper context breadcrumbs in
serverless, the project navigation service merges navigational
breadcrumbs with regular chrome's breadcrumbs by deepLinkId
## Summary
This PR makes the following changes to the nav for serverless
observerability left nav;
- Move _Visualizations_ up under _Dashboards_
- Rename Add data to Get started and move to footer
- Move Cases up under Alerts
##### Visual Change
<img width="263" alt="Screenshot 2023-10-11 at 10 14 56"
src="47782bbb-05c7-41e1-85be-825032e4ec76">
<!-- ### 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)
### 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—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—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)
-->
## Summary
fixes https://github.com/elastic/kibana/issues/160337
This PR
- hides cases in the serverless Elasticsearch project, cases APIs throw
error
- throws 403 from API when `owner=cases` for security or observability
serverless mode
- verifies the behaviour in serverless functional as well as
api_integration tests
**How to test**
- Boot up `es` serverless solution and make sure that `cases` from the
navbar is hidden and cannot not be accessible through url as well
- Boot up `observability` or `security` serverless solutions and make
sure that `cases` is available in the navbar and works fine
- Boot up classic kibana and make sure that the left navbar has the same
menu entries it always had.
### Checklist
Delete any items that are not applicable to this PR.
- [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
20c1974e-44f0-45b0-80aa-e644fec148ff
### For maintainers
- [x] 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>
## Summary
close https://github.com/elastic/kibana/issues/160011
This PR adds helpers for testing serverless specific navigation. There
are helpers for sidenav, breadcrumbs, global search, recent items, logo,
checking that no page reload happened during nav.
This PR also adds some serverless specific navigation tests. The should
serve as a navigation smoke check and testing helpers example. Solution
teams can improve them as they see fit.