## Summary Closes https://github.com/elastic/security-team/issues/11270. ### Screenshots <details><summary>Current state</summary> <img width="1486" alt="Screenshot 2025-01-15 at 17 28 42" src="https://github.com/user-attachments/assets/1a39ae67-406c-464d-849b-0fba3380e982" /> </details> <details><summary>Current state + RiskBadge + Criticality + SearchBar (implemented in separate PRs)</summary> <img width="1752" alt="Screenshot 2025-01-13 at 16 34 10" src="https://github.com/user-attachments/assets/bca30c71-dba3-4505-aba6-a3787ba7f6b1" /> </details> ### Definition of done > [!NOTE] > For now it only works with static data until backend is ready - [x] Implement DataGrid using the `<UnifiedDataTable>` component, based on [[EuiDataGrid](https://eui.elastic.co/#/tabular-content/data-grid)](https://eui.elastic.co/#/tabular-content/data-grid), ensuring consistency with Kibana standards. - [x] Configure columns as follows: - **Action column**: No label; includes a button in each row to expand the `EntityFlyout`. - **Risk**: Numerical indicators representing the asset's risk. - **Name**: The name or identifier of the asset. - **Criticality**: Displays priority or severity levels (e.g., High, Medium, Low). Field `asset.criticality` - **Source**: Represents the asset source (e.g., Host, Storage, Database). `asset.source` - **Last Seen**: Timestamp indicating the last observed data for the asset. - [x] Add static/mock data rows to display paginated asset data, with each row including: - Buttons/icons for expanding the `EntityFlyout`. - [x] Include the following interactive elements: - [x] Multi-sorting: Allow users to sort by multiple columns (e.g., Risk and Criticality). **This only works if fields are added manually to the DataView** - [x] Columns selector: Provide an option for users to show/hide specific columns. - [x] Fullscreen toggle: Allow users to expand the DataGrid to fullscreen mode for enhanced visibility. - [x] Pagination controls: Enable navigation across multiple pages of data. - [x] Rows per page dropdown: Allow users to select the number of rows displayed per page (10, 25, 50, 100, 250, 500). - [x] Enforce constraints: - Limit search results to 500 at a time using `UnifiedDataTable`'s pagination helper for loading more data once the limit is reached. ### Out of scope - Risk score colored badges (implemented in follow-up PR) - Group-by functionality or switching between grid and grouped views - Field selector implementation - Flyout rendering ### Duplicated files > [!CAUTION] > As of now, `<UnifiedDataTable>` is a complex component that needs to be fed with multiple props. For that, we need several components, hooks and utilities that currently exist within the CSP plugin and are too coupled with it. It's currently not possible to reuse all this logic unless we move that into a separate @kbn-package so I had to temporarily duplicate a bunch of files. This is the list to account them for: - `hooks/` - `use_asset_inventory_data_table/` - `index.ts` - `use_asset_inventory_data_table.ts` - `use_base_es_query.ts` - `use_page_size.ts` - `use_persisted_query.ts` - `use_url_query.ts` - `utils.ts` - `data_view_context.ts` - `use_fields_modal.ts` - `use_styles.ts` - `components/` - `additional_controls.tsx` - `empty_state.tsx` - `fields_selector_modal.tsx` - `fields_selector_table.tsx` This ticket will track progress on this task to remove duplicities and refactor code to have a single source of truth reusable in both Asset Inventory and CSP plugins: - https://github.com/elastic/security-team/issues/11584 ### How to test 1. Open the Index Management page in `http://localhost:5601/kbn/app/management/data/index_management` and click on "Create index". Then type `asset-inventory-logs` in the dialog's input. 2. Open the DataViews page in `http://localhost:5601/kbn/app/management/kibana/dataViews` and click on "Create Data View". 3. Fill in the flyout form typing the following values before clicking on the "Save data view to Kibana" button: - `asset-inventory-logs` in "name" and "index pattern" fields. - `@timestamp` is the value set on the "Timestamp field". - Click on "Show advanced settings", then type `asset-inventory-logs-default` in the "Custom data view ID" field. 4. Open the Inventory page from the Security solution in `http://localhost:5601/kbn/app/security/asset_inventory`. <details><summary>Data View Example</summary> <img width="894" alt="Screenshot 2025-01-10 at 11 09 00" src="https://github.com/user-attachments/assets/9a20f504-e602-4b67-a24e-0341f447878e" /> </details> ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [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/src/platform/packages/shared/kbn-i18n/README.md) - [x] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ### Risks No risks at all. |
||
---|---|---|
.buildkite | ||
.devcontainer | ||
.github | ||
api_docs | ||
config | ||
dev_docs | ||
docs | ||
examples | ||
kbn_pm | ||
legacy_rfcs | ||
licenses | ||
oas_docs | ||
packages | ||
plugins | ||
scripts | ||
src | ||
test | ||
typings | ||
x-pack | ||
.backportrc.json | ||
.bazelignore | ||
.bazeliskversion | ||
.bazelrc | ||
.bazelrc.common | ||
.bazelversion | ||
.browserslistrc | ||
.editorconfig | ||
.eslintignore | ||
.eslintrc.js | ||
.gitattributes | ||
.gitignore | ||
.i18nrc.json | ||
.node-version | ||
.npmrc | ||
.nvmrc | ||
.prettierignore | ||
.prettierrc | ||
.puppeteerrc | ||
.stylelintignore | ||
.stylelintrc | ||
.telemetryrc.json | ||
.yarnrc | ||
BUILD.bazel | ||
catalog-info.yaml | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
FAQ.md | ||
fleet_packages.json | ||
github_checks_reporter.json | ||
kibana.d.ts | ||
LICENSE.txt | ||
NOTICE.txt | ||
package.json | ||
preinstall_check.js | ||
README.md | ||
renovate.json | ||
RISK_MATRIX.mdx | ||
run_fleet_setup_parallel.sh | ||
SECURITY.md | ||
sonar-project.properties | ||
STYLEGUIDE.mdx | ||
tsconfig.base.json | ||
tsconfig.browser.json | ||
tsconfig.browser_bazel.json | ||
tsconfig.json | ||
TYPESCRIPT.md | ||
updatecli-compose.yaml | ||
versions.json | ||
WORKSPACE.bazel | ||
yarn.lock |
Kibana
Kibana is your window into the Elastic Stack. Specifically, it's a browser-based analytics and search dashboard for Elasticsearch.
- Getting Started
- Documentation
- Version Compatibility with Elasticsearch
- Questions? Problems? Suggestions?
Getting Started
If you just want to try Kibana out, check out the Elastic Stack Getting Started Page to give it a whirl.
If you're interested in diving a bit deeper and getting a taste of Kibana's capabilities, head over to the Kibana Getting Started Page.
Using a Kibana Release
If you want to use a Kibana release in production, give it a test run, or just play around:
- Download the latest version on the Kibana Download Page.
- Learn more about Kibana's features and capabilities on the Kibana Product Page.
- We also offer a hosted version of Kibana on our Cloud Service.
Building and Running Kibana, and/or Contributing Code
You might want to build Kibana locally to contribute some code, test out the latest features, or try out an open PR:
- CONTRIBUTING.md will help you get Kibana up and running.
- If you would like to contribute code, please follow our STYLEGUIDE.mdx.
- For all other questions, check out the FAQ.md and wiki.
Documentation
Visit Elastic.co for the full Kibana documentation.
For information about building the documentation, see the README in elastic/docs.
Version Compatibility with Elasticsearch
Ideally, you should be running Elasticsearch and Kibana with matching version numbers. If your Elasticsearch has an older version number or a newer major number than Kibana, then Kibana will fail to run. If Elasticsearch has a newer minor or patch number than Kibana, then the Kibana Server will log a warning.
Note: The version numbers below are only examples, meant to illustrate the relationships between different types of version numbers.
Situation | Example Kibana version | Example ES version | Outcome |
---|---|---|---|
Versions are the same. | 7.15.1 | 7.15.1 | 💚 OK |
ES patch number is newer. | 7.15.0 | 7.15.1 | ⚠️ Logged warning |
ES minor number is newer. | 7.14.2 | 7.15.0 | ⚠️ Logged warning |
ES major number is newer. | 7.15.1 | 8.0.0 | 🚫 Fatal error |
ES patch number is older. | 7.15.1 | 7.15.0 | ⚠️ Logged warning |
ES minor number is older. | 7.15.1 | 7.14.2 | 🚫 Fatal error |
ES major number is older. | 8.0.0 | 7.15.1 | 🚫 Fatal error |
Questions? Problems? Suggestions?
- If you've found a bug or want to request a feature, please create a GitHub Issue. Please check to make sure someone else hasn't already created an issue for the same topic.
- Need help using Kibana? Ask away on our Kibana Discuss Forum and a fellow community member or Elastic engineer will be glad to help you out.