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

Create the "Asset Inventory" Kibana Plugin #202291

Merged
merged 30 commits into from
Dec 3, 2024

Conversation

albertoblaz
Copy link
Contributor

@albertoblaz albertoblaz commented Nov 29, 2024

Summary

Closes #201704.

Create an empty "Asset Inventory" plugin with the minimal boilerplate required to set it up, install it and run it on Kibana with a blank slate.

I generated the files using the node scripts/generate_plugin <NAME> script as per this documentation page.

Screenshots

Main page (Sample page) Screenshot 2024-11-29 at 14 20 57

Implementation details

  • Generated a new Kibana plugin with minimal boilerplate and zero dependencies
  • Use Cloud Security Posture plugin as configuration reference
  • Render "Inventory" title on the main page
  • Ensure the plugin is properly integrated into Kibana's build and can be loaded without errors
  • Place the plugin under the x-pack/plugins directory
  • Include Readme file
  • Introduce placeholders for initialization of pipelines and transforms following Cloud Security Posture plugin initialize function.

PR Checklist

  • No docs for now Documentation was added for features that require explanation or tutorials
  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines

Risks

No risks at all since this is totally green-field and will be hidden by a feature toggle.

@albertoblaz albertoblaz added release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) backport:version Backport to applied version labels v8.18.0 labels Nov 29, 2024
@albertoblaz albertoblaz self-assigned this Nov 29, 2024
@albertoblaz albertoblaz force-pushed the asset-inventory-empty-plugin branch from 2c5c68d to 4df3e74 Compare November 29, 2024 13:25
@albertoblaz albertoblaz requested review from romulets and a team November 29, 2024 14:07
Comment on lines +19 to +20
// TODO initialize transforms here
// await initializeTransform(esClient, <TRANSFORM_HERE>, logger);
Copy link
Contributor Author

@albertoblaz albertoblaz Nov 29, 2024

Choose a reason for hiding this comment

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

NOTE: Placeholder for transforms initialization. Please let me know if this is enough or if I should uncomment the line and add some specific transforms

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file was copy-pasted from x-pack/plugins/cloud_security_posture/server/create_transforms/create_transforms.ts. Let me know if we should reuse it somehow instead

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO it would be better to add this when you know you need it so it is not forgotten.

🤔 Asset Inventory likely needs transformers, however, are the changes for asset inventory minimal? Maybe we should consider creating a shared transformer package

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should consider creating a shared transformer package

I think that's a great idea, the transform methods can be adapted to be more general, and we can also leverage our team package where we see fit.

If you prefer that can be done on a follow-up PR, we can keep this file for now and create a follow-up Github issue to move to the shared package.

Comment on lines +37 to +44
// TODO Invoke initialize() when it's due
// this.initialize(core).catch(() => {});
Copy link
Contributor Author

@albertoblaz albertoblaz Nov 29, 2024

Choose a reason for hiding this comment

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

NOTE: Uncomment this line to initialize transforms on start

x-pack/plugins/asset_inventory/translations/ja-JP.json Outdated Show resolved Hide resolved
"public/**/*.json",
"server/**/*.ts",
"server/**/*.json",
// "../../typings/**/*",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To-do: Remove comment

Copy link
Contributor

Choose a reason for hiding this comment

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

Just thinking if it would be easier to exclude. 🤔

Copy link
Contributor

@seanrathier seanrathier left a comment

Choose a reason for hiding this comment

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

Overall LGTM, there are some project files I think we should not need, but the code looks good to go except for 1 suggestion.

x-pack/plugins/asset_inventory/.eslintrc.js Outdated Show resolved Hide resolved
x-pack/plugins/asset_inventory/.gitignore Outdated Show resolved Hide resolved
x-pack/plugins/asset_inventory/.i18nrc.json Outdated Show resolved Hide resolved
x-pack/plugins/asset_inventory/common/index.ts Outdated Show resolved Hide resolved
x-pack/plugins/asset_inventory/kibana.jsonc Outdated Show resolved Hide resolved
showSearchBar={true}
useDefaultBehaviors={true}
/>
<EuiPageTemplate restrictWidth="1000px">
Copy link
Contributor

@seanrathier seanrathier Nov 29, 2024

Choose a reason for hiding this comment

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

Why are we restricting the width to 1000px?

🤔 Should we use break points here?
https://eui.elastic.co/#/theming/breakpoints/values

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was auto-generated by the script. I agree we should change it but the UI is not relevant at this point. We just wanted to have an empty plugin to start working upon it

Copy link
Contributor

Choose a reason for hiding this comment

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

IMO it would be better to add this when you know you need it so it is not forgotten.

🤔 Asset Inventory likely needs transformers, however, are the changes for asset inventory minimal? Maybe we should consider creating a shared transformer package

x-pack/plugins/asset_inventory/server/plugin.ts Outdated Show resolved Hide resolved
x-pack/plugins/asset_inventory/translations/ja-JP.json Outdated Show resolved Hide resolved
"public/**/*.json",
"server/**/*.ts",
"server/**/*.json",
// "../../typings/**/*",
Copy link
Contributor

Choose a reason for hiding this comment

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

Just thinking if it would be easier to exclude. 🤔

@seanrathier
Copy link
Contributor

One thing that I did see in the Fleet plugin was that they had their Cypress test in the plugin directory, which is WAY more convenient than having them in x-pack/test/asset-inventory or x-pack/test/test_serverless/.../asset_inventory

I am not saying we should use Cypress or Selinium, but keeping the integration tests local would make more sense if we can.

@albertoblaz
Copy link
Contributor Author

One thing that I did see in the Fleet plugin was that they had their Cypress test in the plugin directory, which is WAY more convenient than having them in x-pack/test/asset-inventory or x-pack/test/test_serverless/.../asset_inventory

I am not saying we should use Cypress or Selinium, but keeping the integration tests local would make more sense if we can.

Yeah, 100% agree. I prefer having source code and tests next to each other rather than in a totally different folder. I haven't created any test folder so far, but I think we should follow that convention 👍

@albertoblaz albertoblaz force-pushed the asset-inventory-empty-plugin branch from 98c00bb to 031a4fc Compare November 29, 2024 17:40
@albertoblaz albertoblaz marked this pull request as ready for review November 29, 2024 17:42
@albertoblaz albertoblaz requested a review from a team as a code owner November 29, 2024 17:42
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)

x-pack/plugins/asset_inventory/.i18nrc.json Outdated Show resolved Hide resolved
x-pack/plugins/asset_inventory/common/index.ts Outdated Show resolved Hide resolved
x-pack/plugins/asset_inventory/kibana.jsonc Outdated Show resolved Hide resolved
x-pack/plugins/asset_inventory/package.json Outdated Show resolved Hide resolved
"xpack",
"assetInventory"
],
"requiredPlugins": ["navigation"],
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's ok as it is to get started with the plugin, and then we add the required plugins as needed

I am pretty sure that we need the security if the plugin falls in the Security section of Kibana.

security is actually not related to the security solution, it's a plugin that exposes authorization and authentication services. Not needed at the moment as there's no server-side API implemented.

x-pack/plugins/asset_inventory/.i18nrc.json Outdated Show resolved Hide resolved
x-pack/plugins/asset_inventory/public/types.ts Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should consider creating a shared transformer package

I think that's a great idea, the transform methods can be adapted to be more general, and we can also leverage our team package where we see fit.

If you prefer that can be done on a follow-up PR, we can keep this file for now and create a follow-up Github issue to move to the shared package.

x-pack/plugins/asset_inventory/translations/ja-JP.json Outdated Show resolved Hide resolved
x-pack/plugins/asset_inventory/public/components/app.tsx Outdated Show resolved Hide resolved
@albertoblaz albertoblaz requested a review from a team as a code owner December 2, 2024 10:51
@albertoblaz albertoblaz requested a review from a team as a code owner December 2, 2024 16:01
@opauloh opauloh removed the request for review from a team December 3, 2024 04:47
Copy link
Contributor

@opauloh opauloh left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks for providing a great starter for the asset inventory plugin

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
assetInventory - 16 +16

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
assetInventory - 6 +6

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
assetInventory - 1.2KB +1.2KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
assetInventory - 3.1KB +3.1KB
Unknown metric groups

API count

id before after diff
assetInventory - 6 +6

async chunk count

id before after diff
assetInventory - 1 +1

ESLint disabled line counts

id before after diff
assetInventory - 5 +5

References to deprecated APIs

id before after diff
assetInventory - 1 +1

Total ESLint disabled count

id before after diff
assetInventory - 5 +5

History

cc @albertoblaz

Copy link
Contributor

@gsoldevila gsoldevila left a comment

Choose a reason for hiding this comment

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

LGTM!

@albertoblaz albertoblaz merged commit e5b1773 into elastic:main Dec 3, 2024
8 checks passed
@albertoblaz albertoblaz deleted the asset-inventory-empty-plugin branch December 3, 2024 10:30
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12137753913

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

You might need to backport the following PRs to 8.x:
- [Security Solution] - Update codeowners (#202046)
- [Discover / Logs] Add new "Saved Search component" (#199787)
- [Infra] Unskip infra serverless tests (#202146)

Manual backport

To create the backport manually run:

node scripts/backport --pr 202291

Questions ?

Please refer to the Backport tool documentation

@albertoblaz
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

albertoblaz added a commit that referenced this pull request Dec 4, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [Create the "Asset Inventory" Kibana Plugin
(#202291)](#202291)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Alberto
Blázquez","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-12-03T10:29:53Z","message":"Create
the \"Asset Inventory\" Kibana Plugin (#202291)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/201704.\r\n\r\nCreate an empty
\"Asset Inventory\" plugin with the minimal boilerplate\r\nrequired to
set it up, install it and run it on Kibana with a
blank\r\nslate.\r\n\r\nI generated the files using the `node
scripts/generate_plugin <NAME>`\r\nscript as per [this
documentation\r\npage](https://docs.elastic.dev/kibana-dev-docs/getting-started/hello-world-app#2-option-2---use-the-automatic-plugin-generator).\r\n\r\n###
Screenshots\r\n\r\n\r\n<details><summary>Main page (Sample
page)</summary>\r\n<img width=\"2498\" alt=\"Screenshot 2024-11-29 at 14
20
57\"\r\nsrc=\"https://github.com/user-attachments/assets/9d8a3751-519b-4661-bc90-cbb1e836b111\">\r\n</details>
\r\n\r\n### Implementation details\r\n\r\n- [x] Generated a new Kibana
plugin with minimal boilerplate and zero\r\ndependencies\r\n- [x] Use
[Cloud
Security\r\nPosture](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture)\r\nplugin
as configuration reference\r\n- [x] Render \"Inventory\" title on the
main page\r\n- [x] Ensure the plugin is properly integrated into
Kibana's build and\r\ncan be loaded without errors\r\n- [x] Place the
plugin under the `x-pack/plugins` directory\r\n- [x] Include Readme
file\r\n- [x] Introduce placeholders for initialization of pipelines
and\r\ntransforms following [Cloud
Security\r\nPosture](https://github.com/elastic/kibana/blob/main/x-pack/plugins/cloud_security_posture/server/plugin.ts)\r\nplugin
initialize function.\r\n\r\n### PR Checklist\r\n\r\n- [ ] No docs for
now\r\n~~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials~~\r\n- [x] The
PR description includes the appropriate Release Notes section,\r\nand
the correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Risks\r\n\r\nNo risks at all since this is totally green-field and will
be hidden by\r\na feature
toggle.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Paulo Silva
<[email protected]>","sha":"e5b1773971656ad9529935832675b5f9c1849594","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Cloud
Security","backport:prev-minor","backport:version","v8.18.0"],"number":202291,"url":"https://github.com/elastic/kibana/pull/202291","mergeCommit":{"message":"Create
the \"Asset Inventory\" Kibana Plugin (#202291)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/201704.\r\n\r\nCreate an empty
\"Asset Inventory\" plugin with the minimal boilerplate\r\nrequired to
set it up, install it and run it on Kibana with a
blank\r\nslate.\r\n\r\nI generated the files using the `node
scripts/generate_plugin <NAME>`\r\nscript as per [this
documentation\r\npage](https://docs.elastic.dev/kibana-dev-docs/getting-started/hello-world-app#2-option-2---use-the-automatic-plugin-generator).\r\n\r\n###
Screenshots\r\n\r\n\r\n<details><summary>Main page (Sample
page)</summary>\r\n<img width=\"2498\" alt=\"Screenshot 2024-11-29 at 14
20
57\"\r\nsrc=\"https://github.com/user-attachments/assets/9d8a3751-519b-4661-bc90-cbb1e836b111\">\r\n</details>
\r\n\r\n### Implementation details\r\n\r\n- [x] Generated a new Kibana
plugin with minimal boilerplate and zero\r\ndependencies\r\n- [x] Use
[Cloud
Security\r\nPosture](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture)\r\nplugin
as configuration reference\r\n- [x] Render \"Inventory\" title on the
main page\r\n- [x] Ensure the plugin is properly integrated into
Kibana's build and\r\ncan be loaded without errors\r\n- [x] Place the
plugin under the `x-pack/plugins` directory\r\n- [x] Include Readme
file\r\n- [x] Introduce placeholders for initialization of pipelines
and\r\ntransforms following [Cloud
Security\r\nPosture](https://github.com/elastic/kibana/blob/main/x-pack/plugins/cloud_security_posture/server/plugin.ts)\r\nplugin
initialize function.\r\n\r\n### PR Checklist\r\n\r\n- [ ] No docs for
now\r\n~~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials~~\r\n- [x] The
PR description includes the appropriate Release Notes section,\r\nand
the correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Risks\r\n\r\nNo risks at all since this is totally green-field and will
be hidden by\r\na feature
toggle.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Paulo Silva
<[email protected]>","sha":"e5b1773971656ad9529935832675b5f9c1849594"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/202291","number":202291,"mergeCommit":{"message":"Create
the \"Asset Inventory\" Kibana Plugin (#202291)\n\n##
Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/201704.\r\n\r\nCreate an empty
\"Asset Inventory\" plugin with the minimal boilerplate\r\nrequired to
set it up, install it and run it on Kibana with a
blank\r\nslate.\r\n\r\nI generated the files using the `node
scripts/generate_plugin <NAME>`\r\nscript as per [this
documentation\r\npage](https://docs.elastic.dev/kibana-dev-docs/getting-started/hello-world-app#2-option-2---use-the-automatic-plugin-generator).\r\n\r\n###
Screenshots\r\n\r\n\r\n<details><summary>Main page (Sample
page)</summary>\r\n<img width=\"2498\" alt=\"Screenshot 2024-11-29 at 14
20
57\"\r\nsrc=\"https://github.com/user-attachments/assets/9d8a3751-519b-4661-bc90-cbb1e836b111\">\r\n</details>
\r\n\r\n### Implementation details\r\n\r\n- [x] Generated a new Kibana
plugin with minimal boilerplate and zero\r\ndependencies\r\n- [x] Use
[Cloud
Security\r\nPosture](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture)\r\nplugin
as configuration reference\r\n- [x] Render \"Inventory\" title on the
main page\r\n- [x] Ensure the plugin is properly integrated into
Kibana's build and\r\ncan be loaded without errors\r\n- [x] Place the
plugin under the `x-pack/plugins` directory\r\n- [x] Include Readme
file\r\n- [x] Introduce placeholders for initialization of pipelines
and\r\ntransforms following [Cloud
Security\r\nPosture](https://github.com/elastic/kibana/blob/main/x-pack/plugins/cloud_security_posture/server/plugin.ts)\r\nplugin
initialize function.\r\n\r\n### PR Checklist\r\n\r\n- [ ] No docs for
now\r\n~~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials~~\r\n- [x] The
PR description includes the appropriate Release Notes section,\r\nand
the correct `release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n###
Risks\r\n\r\nNo risks at all since this is totally green-field and will
be hidden by\r\na feature
toggle.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<[email protected]>\r\nCo-authored-by:
Paulo Silva
<[email protected]>","sha":"e5b1773971656ad9529935832675b5f9c1849594"}},{"branch":"8.x","label":"v8.18.0","labelRegex":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <[email protected]>
hop-dev pushed a commit to hop-dev/kibana that referenced this pull request Dec 5, 2024
## Summary

Closes elastic#201704.

Create an empty "Asset Inventory" plugin with the minimal boilerplate
required to set it up, install it and run it on Kibana with a blank
slate.

I generated the files using the `node scripts/generate_plugin <NAME>`
script as per [this documentation
page](https://docs.elastic.dev/kibana-dev-docs/getting-started/hello-world-app#2-option-2---use-the-automatic-plugin-generator).

### Screenshots


<details><summary>Main page (Sample page)</summary>
<img width="2498" alt="Screenshot 2024-11-29 at 14 20 57"
src="https://github.com/user-attachments/assets/9d8a3751-519b-4661-bc90-cbb1e836b111">
</details> 

### Implementation details

- [x] Generated a new Kibana plugin with minimal boilerplate and zero
dependencies
- [x] Use [Cloud Security
Posture](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture)
plugin as configuration reference
- [x] Render "Inventory" title on the main page
- [x] Ensure the plugin is properly integrated into Kibana's build and
can be loaded without errors
- [x] Place the plugin under the `x-pack/plugins` directory
- [x] Include Readme file
- [x] Introduce placeholders for initialization of pipelines and
transforms following [Cloud Security
Posture](https://github.com/elastic/kibana/blob/main/x-pack/plugins/cloud_security_posture/server/plugin.ts)
plugin initialize function.

### PR Checklist

- [ ] No docs for now
~~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~~
- [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 since this is totally green-field and will be hidden by
a feature toggle.

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Paulo Silva <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 9, 2024
## Summary

Closes elastic#201704.

Create an empty "Asset Inventory" plugin with the minimal boilerplate
required to set it up, install it and run it on Kibana with a blank
slate.

I generated the files using the `node scripts/generate_plugin <NAME>`
script as per [this documentation
page](https://docs.elastic.dev/kibana-dev-docs/getting-started/hello-world-app#2-option-2---use-the-automatic-plugin-generator).

### Screenshots


<details><summary>Main page (Sample page)</summary>
<img width="2498" alt="Screenshot 2024-11-29 at 14 20 57"
src="https://github.com/user-attachments/assets/9d8a3751-519b-4661-bc90-cbb1e836b111">
</details> 

### Implementation details

- [x] Generated a new Kibana plugin with minimal boilerplate and zero
dependencies
- [x] Use [Cloud Security
Posture](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture)
plugin as configuration reference
- [x] Render "Inventory" title on the main page
- [x] Ensure the plugin is properly integrated into Kibana's build and
can be loaded without errors
- [x] Place the plugin under the `x-pack/plugins` directory
- [x] Include Readme file
- [x] Introduce placeholders for initialization of pipelines and
transforms following [Cloud Security
Posture](https://github.com/elastic/kibana/blob/main/x-pack/plugins/cloud_security_posture/server/plugin.ts)
plugin initialize function.

### PR Checklist

- [ ] No docs for now
~~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~~
- [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 since this is totally green-field and will be hidden by
a feature toggle.

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Paulo Silva <[email protected]>
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Dec 12, 2024
## Summary

Closes elastic#201704.

Create an empty "Asset Inventory" plugin with the minimal boilerplate
required to set it up, install it and run it on Kibana with a blank
slate.

I generated the files using the `node scripts/generate_plugin <NAME>`
script as per [this documentation
page](https://docs.elastic.dev/kibana-dev-docs/getting-started/hello-world-app#2-option-2---use-the-automatic-plugin-generator).

### Screenshots


<details><summary>Main page (Sample page)</summary>
<img width="2498" alt="Screenshot 2024-11-29 at 14 20 57"
src="https://github.com/user-attachments/assets/9d8a3751-519b-4661-bc90-cbb1e836b111">
</details> 

### Implementation details

- [x] Generated a new Kibana plugin with minimal boilerplate and zero
dependencies
- [x] Use [Cloud Security
Posture](https://github.com/elastic/kibana/tree/main/x-pack/plugins/cloud_security_posture)
plugin as configuration reference
- [x] Render "Inventory" title on the main page
- [x] Ensure the plugin is properly integrated into Kibana's build and
can be loaded without errors
- [x] Place the plugin under the `x-pack/plugins` directory
- [x] Include Readme file
- [x] Introduce placeholders for initialization of pipelines and
transforms following [Cloud Security
Posture](https://github.com/elastic/kibana/blob/main/x-pack/plugins/cloud_security_posture/server/plugin.ts)
plugin initialize function.

### PR Checklist

- [ ] No docs for now
~~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials~~
- [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 since this is totally green-field and will be hidden by
a feature toggle.

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Paulo Silva <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create the "Asset Inventory" Kibana Plugin
7 participants