Skip to content

Commit 856ef22

Browse files
committed
Grouped features for space management
1 parent dcd119c commit 856ef22

File tree

61 files changed

+753
-243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+753
-243
lines changed

examples/alerting_example/server/plugin.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import { Plugin, CoreSetup } from 'kibana/server';
2121
import { i18n } from '@kbn/i18n';
22+
import { DEFAULT_APP_CATEGORIES } from '../../../src/core/server';
2223
import { PluginSetupContract as AlertingSetup } from '../../../x-pack/plugins/alerts/server';
2324
import { PluginSetupContract as FeaturesPluginSetup } from '../../../x-pack/plugins/features/server';
2425

@@ -47,6 +48,7 @@ export class AlertingExamplePlugin implements Plugin<void, void, AlertingExample
4748
management: {
4849
insightsAndAlerting: ['triggersActions'],
4950
},
51+
category: DEFAULT_APP_CATEGORIES.management,
5052
alerting: [alwaysFiringAlert.id, peopleInSpaceAlert.id, INDEX_THRESHOLD_ID],
5153
privileges: {
5254
all: {

src/core/public/chrome/ui/header/__snapshots__/collapsible_nav.test.tsx.snap

Lines changed: 27 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/public/public.api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ export const DEFAULT_APP_CATEGORIES: Readonly<{
477477
id: string;
478478
label: string;
479479
order: number;
480+
euiIconType: string;
480481
};
481482
}>;
482483

src/core/server/server.api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,7 @@ export const DEFAULT_APP_CATEGORIES: Readonly<{
537537
id: string;
538538
label: string;
539539
order: number;
540+
euiIconType: string;
540541
};
541542
}>;
542543

src/core/utils/default_app_categories.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,6 @@ export const DEFAULT_APP_CATEGORIES = Object.freeze({
5959
defaultMessage: 'Management',
6060
}),
6161
order: 5000,
62+
euiIconType: 'managementApp',
6263
},
6364
});

x-pack/plugins/actions/server/feature.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import { i18n } from '@kbn/i18n';
88
import { ACTION_SAVED_OBJECT_TYPE, ACTION_TASK_PARAMS_SAVED_OBJECT_TYPE } from './saved_objects';
9+
import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/server';
910

1011
export const ACTIONS_FEATURE = {
1112
id: 'actions',
@@ -14,6 +15,7 @@ export const ACTIONS_FEATURE = {
1415
}),
1516
icon: 'bell',
1617
navLinkId: 'actions',
18+
category: DEFAULT_APP_CATEGORIES.management,
1719
app: [],
1820
management: {
1921
insightsAndAlerting: ['triggersActions'],

x-pack/plugins/alerting_builtins/server/feature.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import { i18n } from '@kbn/i18n';
88
import { ID as IndexThreshold } from './alert_types/index_threshold/alert_type';
99
import { BUILT_IN_ALERTS_FEATURE_ID } from '../common';
10+
import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/server';
1011

1112
export const BUILT_IN_ALERTS_FEATURE = {
1213
id: BUILT_IN_ALERTS_FEATURE_ID,
@@ -15,6 +16,7 @@ export const BUILT_IN_ALERTS_FEATURE = {
1516
}),
1617
icon: 'bell',
1718
app: [],
19+
category: DEFAULT_APP_CATEGORIES.management,
1820
management: {
1921
insightsAndAlerting: ['triggersActions'],
2022
},

x-pack/plugins/alerts/server/authorization/alerts_authorization.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ function mockFeature(appName: string, typeName?: string) {
4848
id: appName,
4949
name: appName,
5050
app: [],
51+
category: { id: 'foo', label: 'foo' },
5152
...(typeName
5253
? {
5354
alerting: [typeName],
@@ -91,6 +92,7 @@ function mockFeatureWithSubFeature(appName: string, typeName: string) {
9192
id: appName,
9293
name: appName,
9394
app: [],
95+
category: { id: 'foo', label: 'foo' },
9496
...(typeName
9597
? {
9698
alerting: [typeName],

x-pack/plugins/alerts/server/plugin.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ function mockFeatures() {
164164
id: 'appName',
165165
name: 'appName',
166166
app: [],
167+
category: { id: 'foo', label: 'foo' },
167168
privileges: {
168169
all: {
169170
savedObject: {

x-pack/plugins/apm/server/feature.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66

77
import { i18n } from '@kbn/i18n';
88
import { AlertType } from '../common/alert_types';
9+
import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/server';
910

1011
export const APM_FEATURE = {
1112
id: 'apm',
1213
name: i18n.translate('xpack.apm.featureRegistry.apmFeatureName', {
1314
defaultMessage: 'APM',
1415
}),
1516
order: 900,
17+
category: DEFAULT_APP_CATEGORIES.observability,
1618
icon: 'apmApp',
1719
navLinkId: 'apm',
1820
app: ['apm', 'csm', 'kibana'],

0 commit comments

Comments
 (0)