-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Migrate Beats Management UI to KP #65791
Conversation
103ba46
to
5f540a3
Compare
@@ -53,7 +53,7 @@ export const Breadcrumb: React.FC<BreadcrumbProps> = ({ title, path, parentBread | |||
{context => ( | |||
<BreadcrumbManager | |||
text={title} | |||
href={`#${BASE_PATH}${path}`} | |||
href={path ? `#${BASE_PATH}${path}` : `#${BASE_PATH}`} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was broken before and would result in URLs like #/management/beats_managementundefined
services.I18nContext = core.i18n.Context; | ||
services.setBreadcrumbs = params.setBreadcrumbs; | ||
services.dataStart = plugins.data; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the "stateful module" hack here to avoid wiring up all the services into the deeply nested components. Seems an appropriate time to use this since this product is not currently in active development.
@@ -9,4 +9,4 @@ export { INDEX_NAMES } from './index_names'; | |||
export { PLUGIN } from './plugin'; | |||
export { LICENSES, REQUIRED_LICENSES, REQUIRED_ROLES } from './security'; | |||
export { TABLE_CONFIG } from './table'; | |||
export const BASE_PATH = '/management/beats_management'; | |||
export const BASE_PATH = '/management/beats/beats_management'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way the new Management plugin works, this is unavoidable. This PR will change the URL for this UI, however since it's marked "beta" this should be fine.
Pinging @elastic/ingest-management (Team:Ingest Management) |
@@ -0,0 +1,184 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file was moved, but I did delete significant amount of code here around mounting and interfacing with Angular
@joshdover is the goal here to migrate the client first and move the server/common/etc in a follow-up? |
Correct. We need to migrate the UI now in order to unblock migrating the rest of the Management UI that this plugs into. Server will be done in a different release in order to unblock removing the legacy system. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes LGTM. Had a few questions but the app seems to load up ok and I don't see any red flags.
@ph mentioned he'd review the functionality. FWIW I loaded up the app and tried enrolling a beat, but filebeat/metricbeat seem to reject the enroll
command required to register beats. I haven't used these features in quite some time so it's probably better if someone familiar with those beats reviews this functionality anyway.
Please ping me if I can be helpful with the rest of this migration.
settings: this.config, | ||
}; | ||
} catch (e) { | ||
throw new Error(`Unexpected data structure from xpackInfoService, ${JSON.stringify(e)}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't think code in try
can throw
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is valid since it's inside the catch
block. Also this was from the previous implementation, I didn't change anything here except how it reads the license.
} | ||
|
||
public setUISettings = (key: string, value: any) => { | ||
this.adapterService.callOrBuffer(({ config }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a bridge to the legacy angular code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, I didn't touch this (just moved). I'll double check though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly it looks like this code is just broken (and probably has been for some time). The adapter service buffers calls until its $get
method is called, which I cannot find any place where that is called in the legacy implementation.
Not sure if worth fixing this now or not. I'm just too afraid of breaking things here without any tests.
x-pack/plugins/beats_management/public/lib/adapters/framework/kibana_framework_adapter.ts
Outdated
Show resolved
Hide resolved
I believe it only works on 7.x builds? (at least that's what I was using and it worked fine with filebeat 7.3.2). |
Oh ok, that makes sense. I'll re-try this. |
@elasticmachine merge upstream |
I performed another smoke test of this patch and was able to configure a Filebeat to watch logs on my system. |
@elasticmachine merge upstream |
Failing tests are being skipped in #66599 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I have tested the enroll flow, create configuration, edit configuration, listing all works for both metricbeat and filebeat.
👍
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* master: (191 commits) [Maps] Get number of categories from palette (elastic#66454) move oss features registration to KP (elastic#66524) [kbn/plugin-helpers] typescript-ify (elastic#66513) Add kibana-operations as codeowners for .ci/es-snapshots and vars/ (elastic#66746) FTR: move basic services under common folder (elastic#66563) Migrate Beats Management UI to KP (elastic#65791) [CI] Add 20 minutes to overall build timeout lint import from restricted zones for export exressions (elastic#66588) [SIEM][Detection Engine] Add validation for Rule Actions (elastic#63332) KP plugins shouldn't need package.json (elastic#66654) Replace agent metrics link with the new one (elastic#66632) [CI] Add one retry to setup step (elastic#66638) [CI] Add slack alerts to tracked branch jobs, change default channel, change formatting (elastic#66580) [docLinks] Add docLinks to CoreSetup. (elastic#66631) [DOCS] Rename monitoring collection from internal to legacy (elastic#65781) unskip newsfeed tests (elastic#66562) [NP] Migrate uiSettings owned by Kibana app (elastic#64321) [ML] Functional tests - stabilize typing in DFA mml input (elastic#66706) [Map] return bounding box for static feature collection without joins (elastic#66607) remove trailing slash in graph sample data links (elastic#66358) ...
…ine-editor * 'master' of github.com:elastic/kibana: (157 commits) [ML] fix url assertion (#66850) Skip failing lens test(s). #66779 [SOM] Preserve saved object references when saving the object (#66584) Use ES API from start contract (#66157) Reorganize Management apps into Ingest, Data, Alerts and Insights, Security, Kibana, and Stack groups (#65796) [Uptime] Fix flaky navigation to certs page in tests (#66806) [Maps] Do not check count for blended layers when layer is not visible (#66460) [SIEM] Fixes glob patterns from directory changes recently for GraphQL chore(NA): bump static-fs to 1.0.2 (#66775) [Maps] Handle cross cluster index _settings resp (#66797) [SIEM][Lists] Adds 90% of the REST API and client API for exception lists and exception items allow any type for customResponseHeaders config (#66689) [APM] Disable map layout animation (#66763) [ML] Add linking to dataframe from job management tab (#65778) [Maps] Get number of categories from palette (#66454) move oss features registration to KP (#66524) [kbn/plugin-helpers] typescript-ify (#66513) Add kibana-operations as codeowners for .ci/es-snapshots and vars/ (#66746) FTR: move basic services under common folder (#66563) Migrate Beats Management UI to KP (#65791) ... # Conflicts: # x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form.tsx # x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_fields.tsx
Summary
This migrates the Beats Management UI to the new Management framework in the Kibana Platform.
Intentional behavioral changes:
/app/kibana#management/beats_management
to/app/kibana#management/beats/beats_management
.#/management/beats_managementundefined
to#/management/beats/beats_management
Testing
This UI has no automated tests at all⚠️ 😢 (functional or units) so this will require a good amount of manual QA. Unfortunately, I'm not too familiar with the idiosyncrasies of this UI, however comparing to master, this appears to be working. I will recruit a member of the Ingest Management team to assist with testing this PR.
Checklist
Delete any items that are not applicable to this PR.
For maintainers