Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle switch to space experience for Spaces and roles imporvement #10

Conversation

eokoneyo
Copy link

@eokoneyo eokoneyo commented Jun 7, 2024

Summary

Includes change set that;

  • removes the switch to space button when a user is in the currently active space,
  • adds ftr test to verify the switch spaces works
  • also replaces instances of static text to ones provided by i18n util.

Comment on lines -142 to -169
return space.imageUrl != null ? (
<Suspense fallback={<EuiLoadingSpinner />}>
<LazySpaceAvatar
space={{
...space,
initials: space.initials ?? 'X',
name: undefined,
}}
size="xl"
/>
</Suspense>
) : (
return (
<Suspense fallback={<EuiLoadingSpinner />}>
<LazySpaceAvatar
space={{
...space,
name: space.name ?? 'Y',
imageUrl: undefined,
}}
size="xl"
/>
Copy link
Author

Choose a reason for hiding this comment

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

We don't need this conditional, the component itself already contains logic to handle whatever is missing

jbudz and others added 23 commits June 10, 2024 12:31
## Summary

We added a check to ensure that `i18n` is initialized on the browser
before any javascript code uses `i18n`. We need to do the same in the
storybook so it works properly.

To summarize in a couple of pictures 😄 

**Before PR:**

![image](https://github.com/elastic/kibana/assets/6191849/3a598dd9-963d-4f4a-aa2a-d98a3d7f379a)


**After PR:**


![image](https://github.com/elastic/kibana/assets/6191849/e0f0b4a7-69f4-4eb1-b5b6-14bdfa716caf)


cc @petrklapka
## Summary

Previously, the siem query rule loaded the full set of fields for an
index pattern when running a query. This could load 5k fields or more.
Now it only loads the fields necessary for the query.

Changes as part of this PR
- The data plugin exports `queryToFields` which takes a query and
returns a list of the fields required to translate the query to ES DSL.
- `queryToFields` properly handles all filter types, previously expected
unified search bar provided filters.
- `createSecurityRuleTypeWrapper` has been modified to skip field
loading for the siem query rule
- `getFilter` takes an optional `loadFields` arguments which loads only
necessary fields
- `getQueryFilterLoadFields` was created - based on `getQueryFilter` but
also loads necessary fields
PR migrates log stream embeddable from the legacy class based system.

### test instructions
1. Run kibana on a system with o11y data and log streams
2. Create a new dashboard, click "Add panel" => "Log stream"
3. Verify panel behavior has not changed with legacy embeddable
4. Click panel context menu and select "Settings"
5. Set custom title, description and time range. Verify behavior has not
changed with legacy embeddable
6. Import dashboard with log stream panel. Verify behavior has not
changed with legacy embeddable

---------

Co-authored-by: Kibana Machine <[email protected]>
…stic#184954)

**Partially addresses: elastic#184364

## Summary
This PR contains various smaller-scale refactorings for the recently
added `DetectionsRuleClient`.

**Changes**:
- Renamed `DetectionRulesClient` containing directory from
`rule_management` to `detection_rules_client`
- Moved `DetectionRulesClient` methods into the
`detection_rules_client/methods` dir
- Moved the TS interface of `DetectionRulesClient` into a separate file
`detection_rules_client_interface.ts`
- Simplified `importRule` method parameters
- Added memoization to `getDetectionRulesClient`

---------

Co-authored-by: Georgii Gorbachev <[email protected]>
…elastic#184777)

## Summary

Follow up to elastic#180938.

On `Save as`, the suggested title should always be a unique title. I've
added a check for duplicate titles when generating a suggested new
dashboard title. If the dashboards `Dashboard A`, `Dashboard A (1)`, and
`Dashboard A (2)` already exist, the next suggested dashboard title will
be `Dashboard A (3)`. This way the user doesn't end up hitting the
duplicate title warning if they want to quickly clone a dashboard
without updating the title.

![Jun-04-2024
12-27-59](https://github.com/elastic/kibana/assets/1697105/b1f1ae1a-87d3-4dcd-80cd-395bd6ee9800)

### 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: Eyo Okon Eyo <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
…184865)

Use one react-hooks/exhaustive-deps across our Obs plugins, for
consistency reasons.

---------

Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: Carlos Crespo <[email protected]>
Uses the LLM to re-write docs from the `built-docs` repo, that have a
lot of weird technical artifacts, to improve the output from the LLM.
This PR updates the function definitions based on the latest metadata
from Elasticsearch.
Auto-create space if needed when running the evaluation framework with
`--spaceId`.

Co-authored-by: Kibana Machine <[email protected]>
@eokoneyo
Copy link
Author

Close in favour of #11

@eokoneyo eokoneyo closed this Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.