-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Reorganize Management apps into Ingest, Data, Alerts and Insights, Security, Kibana, and Stack groups #65796
Changes from 1 commit
465d813
a66a7e0
7cc3490
25cb6ac
f93aba0
a9fdf54
d3f557e
5c6d09e
6ceed19
3aa1d8f
b1771a1
b4b5b64
accc91e
9d97c23
af06fc5
29fa95e
3e38251
cde5d36
d14f15f
cd6fa5e
f1ddf84
1cf0af1
265373e
68c61fa
64cda1a
58b6e10
68c0eb4
dfccfa5
3554533
79bcbb7
69762fd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,33 @@ | |
import { LegacyManagementSection } from './section'; | ||
import { i18n } from '@kbn/i18n'; | ||
|
||
export const sections = [ | ||
{ | ||
id: 'ingest', | ||
title: 'Ingest', | ||
}, | ||
{ | ||
id: 'data', | ||
title: 'Data', | ||
}, | ||
{ | ||
id: 'insightsAndAlerting', | ||
title: 'Insights and Alerting', | ||
}, | ||
{ | ||
id: 'security', | ||
title: 'Security', | ||
}, | ||
{ | ||
id: 'kibana', | ||
title: 'Kibana', | ||
}, | ||
{ | ||
id: 'stack', | ||
title: 'Stack', | ||
}, | ||
]; | ||
|
||
export class LegacyManagementAdapter { | ||
main = undefined; | ||
init = capabilities => { | ||
|
@@ -33,29 +60,12 @@ export class LegacyManagementAdapter { | |
capabilities | ||
); | ||
|
||
this.main.register('data', { | ||
display: i18n.translate('management.connectDataDisplayName', { | ||
defaultMessage: 'Connect Data', | ||
}), | ||
order: 0, | ||
}); | ||
|
||
this.main.register('elasticsearch', { | ||
display: 'Elasticsearch', | ||
order: 20, | ||
icon: 'logoElasticsearch', | ||
}); | ||
|
||
this.main.register('kibana', { | ||
display: 'Kibana', | ||
order: 30, | ||
icon: 'logoKibana', | ||
}); | ||
|
||
this.main.register('logstash', { | ||
display: 'Logstash', | ||
order: 30, | ||
icon: 'logoLogstash', | ||
sections.forEach(({ id, title, icon }, idx) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't, great spot. My original line of thought was that we'd need to support icons for these buckets but TBH, I think they're unnecessary in terms of UX. I'll remove this from the code and we can always reimplement if we need to. |
||
this.main.register(id, { | ||
display: title, | ||
order: idx, | ||
icon, | ||
}); | ||
}); | ||
|
||
return this.main; | ||
|
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.
I really like this.
One suggestion in case we want to refactor ids whatever reason, it could be useful to have an enum that management exports in public (I can imagine search for 'data' may bring up many results 😄 ). Maybe
Sections.Ingest
for instance.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.
Great idea! Will do.
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.
I'm hoping we'll change how sections are referenced in the near future. I'm 👎 on looking items up by
id
unless necessary and this case is not necessary. We should be exporting the sections as public APIs of the plugins that create them. The current usage creates an implicit dependency and the potential for runtime errors instead of compile time errors.