Cleanup feature registration (#80909)

This commit is contained in:
Larry Gregory 2020-10-20 12:53:43 -04:00 committed by GitHub
parent b7ffefb48c
commit bf0f8bbb42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 19 additions and 178 deletions

View file

@ -28,8 +28,6 @@ The API returns the following:
{
"id": "discover",
"name": "Discover",
"icon": "discoverApp",
"navLinkId": "discover",
"app": [
"kibana"
],
@ -73,8 +71,6 @@ The API returns the following:
{
"id": "visualize",
"name": "Visualize",
"icon": "visualizeApp",
"navLinkId": "visualize",
"app": [
"kibana"
],
@ -120,8 +116,6 @@ The API returns the following:
{
"id": "dashboard",
"name": "Dashboard",
"icon": "dashboardApp",
"navLinkId": "dashboards",
"app": [
"kibana"
],
@ -172,8 +166,6 @@ The API returns the following:
{
"id": "dev_tools",
"name": "Dev Tools",
"icon": "devToolsApp",
"navLinkId": "dev_tools",
"app": [
"kibana"
],

View file

@ -59,15 +59,6 @@ of features within the management screens.
|See <<example-3-discover,Example 3>>
|The set of subfeatures that enables finer access control than the `all` and `read` feature privileges. These options are only available in the Gold subscription level and higher.
|`icon`
|`string`
|"discoverApp"
|An https://elastic.github.io/eui/#/display/icons[EUI Icon] to use for this feature.
|`navLinkId`
|`string`
|"sample_app"
|The ID of the navigation link associated with your feature.
|===
==== Privilege definition
@ -100,8 +91,6 @@ public setup(core, { features }) {
features.registerKibanaFeature({
id: 'canvas',
name: 'Canvas',
icon: 'canvasApp',
navLinkId: 'canvas',
category: DEFAULT_APP_CATEGORIES.kibana,
app: ['canvas', 'kibana'],
catalogue: ['canvas'],
@ -160,8 +149,6 @@ public setup(core, { features }) {
name: i18n.translate('xpack.features.devToolsFeatureName', {
defaultMessage: 'Dev Tools',
}),
icon: 'devToolsApp',
navLinkId: 'dev_tools',
category: DEFAULT_APP_CATEGORIES.management,
app: ['kibana'],
catalogue: ['console', 'searchprofiler', 'grokdebugger'],
@ -223,8 +210,6 @@ public setup(core, { features }) {
defaultMessage: 'Discover',
}),
order: 100,
icon: 'discoverApp',
navLinkId: 'discover',
category: DEFAULT_APP_CATEGORIES.kibana,
app: ['kibana'],
catalogue: ['discover'],

View file

@ -13,8 +13,6 @@ export const ACTIONS_FEATURE = {
name: i18n.translate('xpack.actions.featureRegistry.actionsFeatureName', {
defaultMessage: 'Actions and Connectors',
}),
icon: 'bell',
navLinkId: 'actions',
category: DEFAULT_APP_CATEGORIES.management,
app: [],
management: {

View file

@ -20,8 +20,6 @@ export const APM_FEATURE = {
}),
order: 900,
category: DEFAULT_APP_CATEGORIES.observability,
icon: 'apmApp',
navLinkId: 'apm',
app: ['apm', 'ux', 'kibana'],
catalogue: ['apm'],
management: {

View file

@ -43,8 +43,6 @@ export class CanvasPlugin implements Plugin {
name: 'Canvas',
order: 300,
category: DEFAULT_APP_CATEGORIES.kibana,
icon: 'canvasApp',
navLinkId: 'canvas',
app: ['canvas', 'kibana'],
catalogue: ['canvas'],
privileges: {

View file

@ -85,7 +85,6 @@ export class EnterpriseSearchPlugin implements Plugin {
name: ENTERPRISE_SEARCH_PLUGIN.NAME,
order: 0,
category: DEFAULT_APP_CATEGORIES.enterpriseSearch,
icon: 'logoEnterpriseSearch',
app: [
'kibana',
ENTERPRISE_SEARCH_PLUGIN.ID,

View file

@ -6,6 +6,7 @@
import { RecursiveReadonly } from '@kbn/utility-types';
import { AppCategory } from 'src/core/types';
import { LicenseType } from '../../licensing/common/types';
import { FeatureKibanaPrivileges } from './feature_kibana_privileges';
import { SubFeatureConfig, SubFeature as KibanaSubFeature } from './sub_feature';
import { ReservedKibanaPrivilege } from './reserved_kibana_privilege';
@ -52,25 +53,12 @@ export interface KibanaFeatureConfig {
excludeFromBasePrivileges?: boolean;
/**
* Optional array of supported licenses.
* Optional minimum supported license.
* If omitted, all licenses are allowed.
* This does not restrict access to your feature based on license.
* Its only purpose is to inform the space and roles UIs on which features to display.
*/
validLicenses?: ReadonlyArray<
'basic' | 'standard' | 'gold' | 'platinum' | 'enterprise' | 'trial'
>;
/**
* An optional EUI Icon to be used when displaying your feature.
*/
icon?: string;
/**
* The optional Nav Link ID for feature.
* If specified, your link will be automatically hidden if needed based on the current space and user permissions.
*/
navLinkId?: string;
minimumLicense?: LicenseType;
/**
* An array of app ids that are enabled when this feature is enabled.
@ -170,10 +158,6 @@ export class KibanaFeature {
return this.config.category;
}
public get navLinkId() {
return this.config.navLinkId;
}
public get app() {
return this.config.app;
}
@ -186,12 +170,8 @@ export class KibanaFeature {
return this.config.management;
}
public get icon() {
return this.config.icon;
}
public get validLicenses() {
return this.config.validLicenses;
public get minimumLicense() {
return this.config.minimumLicense;
}
public get privileges() {

View file

@ -12,12 +12,6 @@ exports[`FeatureRegistry Kibana Features prevents features from being registered
exports[`FeatureRegistry Kibana Features prevents features from being registered with a management id of "contains_invalid()_chars" 1`] = `"child \\"management\\" fails because [child \\"kibana\\" fails because [\\"kibana\\" at position 0 fails because [\\"0\\" with value \\"contains_invalid()_chars\\" fails to match the required pattern: /^[a-zA-Z0-9:_-]+$/]]]"`;
exports[`FeatureRegistry Kibana Features prevents features from being registered with a navLinkId of "" 1`] = `"child \\"navLinkId\\" fails because [\\"navLinkId\\" is not allowed to be empty]"`;
exports[`FeatureRegistry Kibana Features prevents features from being registered with a navLinkId of "contains space" 1`] = `"child \\"navLinkId\\" fails because [\\"navLinkId\\" with value \\"contains space\\" fails to match the required pattern: /^[a-zA-Z0-9:_-]+$/]"`;
exports[`FeatureRegistry Kibana Features prevents features from being registered with a navLinkId of "contains_invalid()_chars" 1`] = `"child \\"navLinkId\\" fails because [\\"navLinkId\\" with value \\"contains_invalid()_chars\\" fails to match the required pattern: /^[a-zA-Z0-9:_-]+$/]"`;
exports[`FeatureRegistry Kibana Features prevents features from being registered with an ID of "catalogue" 1`] = `"child \\"id\\" fails because [\\"id\\" contains an invalid value]"`;
exports[`FeatureRegistry Kibana Features prevents features from being registered with an ID of "doesn't match valid regex" 1`] = `"child \\"id\\" fails because [\\"id\\" with value \\"doesn't match valid regex\\" fails to match the required pattern: /^[a-zA-Z0-9_-]+$/]"`;

View file

@ -33,11 +33,9 @@ describe('FeatureRegistry', () => {
id: 'test-feature',
name: 'Test Feature',
excludeFromBasePrivileges: true,
icon: 'addDataApp',
navLinkId: 'someNavLink',
app: ['app1'],
category: { id: 'foo', label: 'foo' },
validLicenses: ['standard', 'basic', 'gold', 'platinum'],
minimumLicense: 'platinum',
catalogue: ['foo'],
management: {
foo: ['bar'],
@ -421,20 +419,6 @@ describe('FeatureRegistry', () => {
});
['contains space', 'contains_invalid()_chars', ''].forEach((prohibitedChars) => {
it(`prevents features from being registered with a navLinkId of "${prohibitedChars}"`, () => {
const featureRegistry = new FeatureRegistry();
expect(() =>
featureRegistry.registerKibanaFeature({
id: 'foo',
name: 'some feature',
navLinkId: prohibitedChars,
app: [],
category: { id: 'foo', label: 'foo' },
privileges: null,
})
).toThrowErrorMatchingSnapshot();
});
it(`prevents features from being registered with a management id of "${prohibitedChars}"`, () => {
const featureRegistry = new FeatureRegistry();
expect(() =>

View file

@ -91,12 +91,14 @@ const kibanaFeatureSchema = Joi.object({
category: appCategorySchema,
order: Joi.number(),
excludeFromBasePrivileges: Joi.boolean(),
validLicenses: Joi.array().items(
Joi.string().valid('basic', 'standard', 'gold', 'platinum', 'enterprise', 'trial')
minimumLicense: Joi.string().valid(
'basic',
'standard',
'gold',
'platinum',
'enterprise',
'trial'
),
icon: Joi.string(),
description: Joi.string(),
navLinkId: Joi.string().regex(uiCapabilitiesRegex),
app: Joi.array().items(Joi.string()).required(),
management: managementSchema,
catalogue: catalogueSchema,

View file

@ -21,8 +21,6 @@ export const buildOSSFeatures = ({ savedObjectTypes, includeTimelion }: BuildOSS
}),
order: 100,
category: DEFAULT_APP_CATEGORIES.kibana,
icon: 'discoverApp',
navLinkId: 'discover',
app: ['discover', 'kibana'],
catalogue: ['discover'],
privileges: {
@ -82,8 +80,6 @@ export const buildOSSFeatures = ({ savedObjectTypes, includeTimelion }: BuildOSS
}),
order: 700,
category: DEFAULT_APP_CATEGORIES.kibana,
icon: 'visualizeApp',
navLinkId: 'visualize',
app: ['visualize', 'lens', 'kibana'],
catalogue: ['visualize'],
privileges: {
@ -143,8 +139,6 @@ export const buildOSSFeatures = ({ savedObjectTypes, includeTimelion }: BuildOSS
}),
order: 200,
category: DEFAULT_APP_CATEGORIES.kibana,
icon: 'dashboardApp',
navLinkId: 'dashboards',
app: ['dashboards', 'kibana'],
catalogue: ['dashboard'],
privileges: {
@ -222,8 +216,6 @@ export const buildOSSFeatures = ({ savedObjectTypes, includeTimelion }: BuildOSS
}),
order: 1300,
category: DEFAULT_APP_CATEGORIES.management,
icon: 'devToolsApp',
navLinkId: 'dev_tools',
app: ['dev_tools', 'kibana'],
catalogue: ['console', 'searchprofiler', 'grokdebugger'],
privileges: {
@ -260,7 +252,6 @@ export const buildOSSFeatures = ({ savedObjectTypes, includeTimelion }: BuildOSS
}),
order: 1500,
category: DEFAULT_APP_CATEGORIES.management,
icon: 'advancedSettingsApp',
app: ['kibana'],
catalogue: ['advanced_settings'],
management: {
@ -300,7 +291,6 @@ export const buildOSSFeatures = ({ savedObjectTypes, includeTimelion }: BuildOSS
}),
order: 1600,
category: DEFAULT_APP_CATEGORIES.management,
icon: 'indexPatternApp',
app: ['kibana'],
catalogue: ['indexPatterns'],
management: {
@ -340,7 +330,6 @@ export const buildOSSFeatures = ({ savedObjectTypes, includeTimelion }: BuildOSS
}),
order: 1700,
category: DEFAULT_APP_CATEGORIES.management,
icon: 'savedObjectsApp',
app: ['kibana'],
catalogue: ['saved_objects'],
management: {
@ -384,8 +373,6 @@ const timelionFeature: KibanaFeatureConfig = {
name: 'Timelion',
order: 350,
category: DEFAULT_APP_CATEGORIES.kibana,
icon: 'timelionApp',
navLinkId: 'timelion',
app: ['timelion', 'kibana'],
catalogue: ['timelion'],
privileges: {

View file

@ -55,7 +55,7 @@ describe('GET /api/features', () => {
name: 'Licensed Feature',
app: ['bar-app'],
category: { id: 'foo', label: 'foo' },
validLicenses: ['gold'],
minimumLicense: 'gold',
privileges: null,
});

View file

@ -33,10 +33,9 @@ export function defineRoutes({ router, featureRegistry }: RouteDefinitionParams)
.filter(
(feature) =>
request.query.ignoreValidLicenses ||
!feature.validLicenses ||
!feature.validLicenses.length ||
(context.licensing!.license.type &&
feature.validLicenses.includes(context.licensing!.license.type))
!feature.minimumLicense ||
(context.licensing!.license &&
context.licensing!.license.hasAtLeast(feature.minimumLicense))
)
.sort(
(f1, f2) =>

View file

@ -92,7 +92,6 @@ describe('populateUICapabilities', () => {
new KibanaFeature({
id: 'newFeature',
name: 'my new feature',
navLinkId: 'newFeatureNavLink',
app: ['bar-app'],
category: { id: 'foo', label: 'foo' },
privileges: {
@ -146,7 +145,6 @@ describe('populateUICapabilities', () => {
new KibanaFeature({
id: 'newFeature',
name: 'my new feature',
navLinkId: 'newFeatureNavLink',
app: ['bar-app'],
category: { id: 'foo', label: 'foo' },
catalogue: ['anotherFooEntry', 'anotherBarEntry'],
@ -216,7 +214,6 @@ describe('populateUICapabilities', () => {
new KibanaFeature({
id: 'newFeature',
name: 'my new feature',
navLinkId: 'newFeatureNavLink',
app: ['bar-app'],
category: { id: 'foo', label: 'foo' },
privileges: {
@ -247,7 +244,6 @@ describe('populateUICapabilities', () => {
new KibanaFeature({
id: 'newFeature',
name: 'my new feature',
navLinkId: 'newFeatureNavLink',
app: ['bar-app'],
category: { id: 'foo', label: 'foo' },
privileges: null,
@ -292,7 +288,6 @@ describe('populateUICapabilities', () => {
new KibanaFeature({
id: 'newFeature',
name: 'my new feature',
navLinkId: 'newFeatureNavLink',
app: ['bar-app'],
category: { id: 'foo', label: 'foo' },
privileges: {
@ -364,7 +359,6 @@ describe('populateUICapabilities', () => {
new KibanaFeature({
id: 'newFeature',
name: 'my new feature',
navLinkId: 'newFeatureNavLink',
app: ['bar-app'],
category: { id: 'foo', label: 'foo' },
privileges: {
@ -385,7 +379,6 @@ describe('populateUICapabilities', () => {
new KibanaFeature({
id: 'yetAnotherNewFeature',
name: 'yet another new feature',
navLinkId: 'yetAnotherNavLink',
app: ['bar-app'],
category: { id: 'foo', label: 'foo' },
privileges: {

View file

@ -49,11 +49,9 @@ export class GraphPlugin implements Plugin {
}),
order: 600,
category: DEFAULT_APP_CATEGORIES.kibana,
icon: 'graphApp',
navLinkId: 'graph',
app: ['graph', 'kibana'],
catalogue: ['graph'],
validLicenses: ['platinum', 'enterprise', 'trial'],
minimumLicense: 'platinum',
privileges: {
all: {
app: ['graph', 'kibana'],

View file

@ -17,8 +17,6 @@ export const METRICS_FEATURE = {
}),
order: 800,
category: DEFAULT_APP_CATEGORIES.observability,
icon: 'metricsApp',
navLinkId: 'metrics',
app: ['infra', 'metrics', 'kibana'],
catalogue: ['infraops', 'metrics'],
management: {
@ -68,8 +66,6 @@ export const LOGS_FEATURE = {
}),
order: 700,
category: DEFAULT_APP_CATEGORIES.observability,
icon: 'logsApp',
navLinkId: 'logs',
app: ['infra', 'logs', 'kibana'],
catalogue: ['infralogging', 'logs'],
alerting: [LOG_DOCUMENT_COUNT_ALERT_TYPE_ID],

View file

@ -181,9 +181,7 @@ export class IngestManagerPlugin
deps.features.registerKibanaFeature({
id: PLUGIN_ID,
name: 'Ingest Manager',
icon: 'savedObjectsApp',
category: DEFAULT_APP_CATEGORIES.management,
navLinkId: PLUGIN_ID,
app: [PLUGIN_ID, 'kibana'],
catalogue: ['ingestManager'],
privileges: {

View file

@ -171,8 +171,6 @@ export class MapsPlugin implements Plugin {
}),
order: 400,
category: DEFAULT_APP_CATEGORIES.kibana,
icon: APP_ICON,
navLinkId: APP_ID,
app: [APP_ID, 'kibana'],
catalogue: [APP_ID],
privileges: {

View file

@ -17,7 +17,7 @@ import {
} from 'kibana/server';
import { DEFAULT_APP_CATEGORIES } from '../../../../src/core/server';
import { PluginsSetup, RouteInitialization } from './types';
import { PLUGIN_ID, PLUGIN_ICON } from '../common/constants/app';
import { PLUGIN_ID } from '../common/constants/app';
import { MlCapabilities } from '../common/types/capabilities';
import { initMlTelemetry } from './lib/telemetry';
@ -73,10 +73,8 @@ export class MlServerPlugin implements Plugin<MlPluginSetup, MlPluginStart, Plug
name: i18n.translate('xpack.ml.featureRegistry.mlFeatureName', {
defaultMessage: 'Machine Learning',
}),
icon: PLUGIN_ICON,
order: 500,
category: DEFAULT_APP_CATEGORIES.kibana,
navLinkId: PLUGIN_ID,
app: [PLUGIN_ID, 'kibana'],
catalogue: [PLUGIN_ID, `${PLUGIN_ID}_file_data_visualizer`],
management: {

View file

@ -279,8 +279,6 @@ export class Plugin {
defaultMessage: 'Stack Monitoring',
}),
category: DEFAULT_APP_CATEGORIES.management,
icon: 'monitoringApp',
navLinkId: 'monitoring',
app: ['monitoring', 'kibana'],
catalogue: ['monitoring'],
privileges: null,

View file

@ -19,8 +19,6 @@ export const createFeature = (
) => {
const { excludeFromBaseAll, excludeFromBaseRead, privileges, category, ...rest } = config;
return new KibanaFeature({
icon: 'discoverApp',
navLinkId: 'discover',
app: [],
category: category ?? { id: 'foo', label: 'foo' },
catalogue: [],

View file

@ -30,7 +30,6 @@ const buildFeatures = () => {
new KibanaFeature({
id: 'feature1',
name: 'Feature 1',
icon: 'addDataApp',
app: ['feature1App'],
category: { id: 'foo', label: 'foo' },
privileges: {
@ -55,7 +54,6 @@ const buildFeatures = () => {
new KibanaFeature({
id: 'feature2',
name: 'Feature 2',
icon: 'addDataApp',
app: ['feature2App'],
category: { id: 'foo', label: 'foo' },
privileges: {

View file

@ -19,7 +19,6 @@ const buildProps = (customProps: any = {}) => {
name: 'Feature 1',
app: ['app'],
category: { id: 'foo', label: 'foo' },
icon: 'spacesApp',
privileges: {
all: {
app: ['app'],

View file

@ -81,7 +81,6 @@ describe('usingPrivileges', () => {
name: 'Foo KibanaFeature',
app: ['fooApp', 'foo'],
category: { id: 'foo', label: 'foo' },
navLinkId: 'foo',
privileges: null,
}),
],
@ -170,7 +169,6 @@ describe('usingPrivileges', () => {
name: 'Foo KibanaFeature',
app: ['foo'],
category: { id: 'foo', label: 'foo' },
navLinkId: 'foo',
privileges: null,
}),
],
@ -322,7 +320,6 @@ describe('usingPrivileges', () => {
new KibanaFeature({
id: 'fooFeature',
name: 'Foo KibanaFeature',
navLinkId: 'foo',
app: [],
category: { id: 'foo', label: 'foo' },
privileges: null,
@ -330,7 +327,6 @@ describe('usingPrivileges', () => {
new KibanaFeature({
id: 'barFeature',
name: 'Bar KibanaFeature',
navLinkId: 'bar',
app: ['bar'],
category: { id: 'foo', label: 'foo' },
privileges: null,
@ -471,7 +467,6 @@ describe('usingPrivileges', () => {
new KibanaFeature({
id: 'fooFeature',
name: 'Foo KibanaFeature',
navLinkId: 'foo',
app: [],
category: { id: 'foo', label: 'foo' },
privileges: null,
@ -479,7 +474,6 @@ describe('usingPrivileges', () => {
new KibanaFeature({
id: 'barFeature',
name: 'Bar KibanaFeature',
navLinkId: 'bar',
app: [],
category: { id: 'foo', label: 'foo' },
privileges: null,
@ -559,7 +553,6 @@ describe('all', () => {
name: 'Foo KibanaFeature',
app: ['foo'],
category: { id: 'foo', label: 'foo' },
navLinkId: 'foo',
privileges: null,
}),
],

View file

@ -28,7 +28,6 @@ export function disableUICapabilitiesFactory(
) {
// nav links are sourced from the apps property.
// The Kibana Platform associates nav links to the app which registers it, in a 1:1 relationship.
// This behavior is replacing the `navLinkId` property.
const featureNavLinkIds = features
.flatMap((feature) => feature.app)
.filter((navLinkId) => navLinkId != null);

View file

@ -18,8 +18,6 @@ describe('features', () => {
new KibanaFeature({
id: 'foo-feature',
name: 'Foo KibanaFeature',
icon: 'arrowDown',
navLinkId: 'kibana:foo',
app: ['app-1', 'app-2'],
category: { id: 'foo', label: 'foo' },
catalogue: ['catalogue-1', 'catalogue-2'],
@ -65,7 +63,6 @@ describe('features', () => {
new KibanaFeature({
id: 'foo',
name: 'Foo KibanaFeature',
icon: 'arrowDown',
app: [],
category: { id: 'foo', label: 'foo' },
privileges: {
@ -169,7 +166,6 @@ describe('features', () => {
new KibanaFeature({
id: 'foo',
name: 'Foo KibanaFeature',
icon: 'arrowDown',
app: [],
category: { id: 'foo', label: 'foo' },
privileges: null,
@ -211,8 +207,6 @@ describe('features', () => {
new KibanaFeature({
id: 'foo',
name: 'Foo KibanaFeature',
icon: 'arrowDown',
navLinkId: 'kibana:foo',
app: [],
category: { id: 'foo', label: 'foo' },
catalogue: ['ignore-me-1', 'ignore-me-2'],
@ -336,8 +330,6 @@ describe('features', () => {
new KibanaFeature({
id: 'foo',
name: 'Foo KibanaFeature',
icon: 'arrowDown',
navLinkId: 'kibana:foo',
app: [],
category: { id: 'foo', label: 'foo' },
catalogue: ['ignore-me-1', 'ignore-me-2'],
@ -421,8 +413,6 @@ describe('features', () => {
new KibanaFeature({
id: 'foo',
name: 'Foo KibanaFeature',
icon: 'arrowDown',
navLinkId: 'kibana:foo',
app: [],
category: { id: 'foo', label: 'foo' },
catalogue: ['ignore-me-1', 'ignore-me-2'],
@ -480,8 +470,6 @@ describe('features', () => {
id: 'foo',
name: 'Foo KibanaFeature',
excludeFromBasePrivileges: true,
icon: 'arrowDown',
navLinkId: 'kibana:foo',
app: [],
category: { id: 'foo', label: 'foo' },
catalogue: ['ignore-me-1', 'ignore-me-2'],
@ -546,8 +534,6 @@ describe('features', () => {
new KibanaFeature({
id: 'foo',
name: 'Foo KibanaFeature',
icon: 'arrowDown',
navLinkId: 'kibana:foo',
app: [],
category: { id: 'foo', label: 'foo' },
catalogue: ['ignore-me-1', 'ignore-me-2'],
@ -617,8 +603,6 @@ describe('reserved', () => {
new KibanaFeature({
id: 'foo',
name: 'Foo KibanaFeature',
icon: 'arrowDown',
navLinkId: 'kibana:foo',
app: ['app-1', 'app-2'],
category: { id: 'foo', label: 'foo' },
catalogue: ['catalogue-1', 'catalogue-2'],
@ -661,7 +645,6 @@ describe('reserved', () => {
new KibanaFeature({
id: 'foo',
name: 'Foo KibanaFeature',
icon: 'arrowDown',
app: [],
category: { id: 'foo', label: 'foo' },
privileges: null,
@ -728,7 +711,6 @@ describe('reserved', () => {
new KibanaFeature({
id: 'foo',
name: 'Foo KibanaFeature',
icon: 'arrowDown',
app: [],
category: { id: 'foo', label: 'foo' },
privileges: {
@ -770,7 +752,6 @@ describe('subFeatures', () => {
new KibanaFeature({
id: 'foo',
name: 'Foo KibanaFeature',
icon: 'arrowDown',
app: [],
category: { id: 'foo', label: 'foo' },
privileges: {
@ -899,7 +880,6 @@ describe('subFeatures', () => {
new KibanaFeature({
id: 'foo',
name: 'Foo KibanaFeature',
icon: 'arrowDown',
app: [],
category: { id: 'foo', label: 'foo' },
privileges: {
@ -1106,7 +1086,6 @@ describe('subFeatures', () => {
new KibanaFeature({
id: 'foo',
name: 'Foo KibanaFeature',
icon: 'arrowDown',
app: [],
category: { id: 'foo', label: 'foo' },
excludeFromBasePrivileges: true,
@ -1251,7 +1230,6 @@ describe('subFeatures', () => {
new KibanaFeature({
id: 'foo',
name: 'Foo KibanaFeature',
icon: 'arrowDown',
app: [],
category: { id: 'foo', label: 'foo' },
privileges: {
@ -1419,7 +1397,6 @@ describe('subFeatures', () => {
new KibanaFeature({
id: 'foo',
name: 'Foo KibanaFeature',
icon: 'arrowDown',
app: [],
category: { id: 'foo', label: 'foo' },
excludeFromBasePrivileges: true,
@ -1551,7 +1528,6 @@ describe('subFeatures', () => {
new KibanaFeature({
id: 'foo',
name: 'Foo KibanaFeature',
icon: 'arrowDown',
app: [],
category: { id: 'foo', label: 'foo' },
privileges: {

View file

@ -190,9 +190,7 @@ export class Plugin implements IPlugin<PluginSetup, PluginStart, SetupPlugins, S
defaultMessage: 'Security',
}),
order: 1100,
icon: 'logoSecurity',
category: DEFAULT_APP_CATEGORIES.security,
navLinkId: APP_ID,
app: [...securitySubPlugins, 'kibana'],
catalogue: ['securitySolution'],
management: {

View file

@ -93,7 +93,6 @@ exports[`EnabledFeatures renders as expected 1`] = `
"label": "Kibana",
"order": 1000,
},
"icon": "spacesApp",
"id": "feature-1",
"name": "Feature 1",
"privileges": null,
@ -106,7 +105,6 @@ exports[`EnabledFeatures renders as expected 1`] = `
"label": "Kibana",
"order": 1000,
},
"icon": "spacesApp",
"id": "feature-2",
"name": "Feature 2",
"privileges": null,

View file

@ -16,7 +16,6 @@ const features: KibanaFeatureConfig[] = [
{
id: 'feature-1',
name: 'Feature 1',
icon: 'spacesApp',
app: [],
category: DEFAULT_APP_CATEGORIES.kibana,
privileges: null,
@ -24,7 +23,6 @@ const features: KibanaFeatureConfig[] = [
{
id: 'feature-2',
name: 'Feature 2',
icon: 'spacesApp',
app: [],
category: DEFAULT_APP_CATEGORIES.kibana,
privileges: null,
@ -235,7 +233,6 @@ describe('EnabledFeatures', () => {
{
id: 'feature-3',
name: 'Feature 3',
icon: 'spacesApp',
app: [],
category: DEFAULT_APP_CATEGORIES.management,
privileges: null,

View file

@ -37,7 +37,6 @@ featuresStart.getFeatures.mockResolvedValue([
new KibanaFeature({
id: 'feature-1',
name: 'feature 1',
icon: 'spacesApp',
app: [],
category: DEFAULT_APP_CATEGORIES.kibana,
privileges: null,

View file

@ -45,7 +45,6 @@ featuresStart.getFeatures.mockResolvedValue([
new KibanaFeature({
id: 'feature-1',
name: 'feature 1',
icon: 'spacesApp',
app: [],
category: { id: 'foo', label: 'foo' },
privileges: null,

View file

@ -22,7 +22,6 @@ const features = ([
{
id: 'feature_2',
name: 'Feature 2',
navLinkId: 'feature2',
app: ['feature2'],
catalogue: ['feature2Entry'],
management: {
@ -42,7 +41,6 @@ const features = ([
{
id: 'feature_3',
name: 'Feature 3',
navLinkId: 'feature3',
app: ['feature3_app'],
catalogue: ['feature3Entry'],
management: {
@ -63,7 +61,6 @@ const features = ([
// feature 4 intentionally delcares the same items as feature 3
id: 'feature_4',
name: 'Feature 4',
navLinkId: 'feature3',
app: ['feature3', 'feature3_app'],
catalogue: ['feature3Entry'],
management: {

View file

@ -15,7 +15,6 @@ export const BUILT_IN_ALERTS_FEATURE = {
name: i18n.translate('xpack.stackAlerts.featureRegistry.actionsFeatureName', {
defaultMessage: 'Stack Alerts',
}),
icon: 'bell',
app: [],
category: DEFAULT_APP_CATEGORIES.management,
management: {

View file

@ -33,8 +33,6 @@ export const initServerWithKibana = (server: UptimeCoreSetup, plugins: UptimeCor
name: PLUGIN.NAME,
order: 1000,
category: DEFAULT_APP_CATEGORIES.observability,
navLinkId: PLUGIN.ID,
icon: 'uptimeApp',
app: ['uptime', 'kibana'],
catalogue: ['uptime'],
management: {

View file

@ -17,9 +17,7 @@ class FooPlugin implements Plugin {
plugins.features.registerKibanaFeature({
id: 'foo',
name: 'Foo',
icon: 'upArrow',
category: { id: 'foo', label: 'foo' },
navLinkId: 'foo_plugin',
app: ['foo_plugin', 'kibana'],
catalogue: ['foo'],
privileges: {