mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Enterprise Search] Add Content plugin (#129108)
* Add Content plugin * Update telemetry schema * Fix failing test Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
ce83b0a5d9
commit
d69c99356f
8 changed files with 177 additions and 16 deletions
|
@ -134,6 +134,7 @@ export const applicationUsageSchema = {
|
|||
apm: commonSchema,
|
||||
canvas: commonSchema,
|
||||
enterpriseSearch: commonSchema,
|
||||
enterpriseSearchContent: commonSchema,
|
||||
appSearch: commonSchema,
|
||||
workplaceSearch: commonSchema,
|
||||
graph: commonSchema,
|
||||
|
|
|
@ -2136,6 +2136,137 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"enterpriseSearchContent": {
|
||||
"properties": {
|
||||
"appId": {
|
||||
"type": "keyword",
|
||||
"_meta": {
|
||||
"description": "The application being tracked"
|
||||
}
|
||||
},
|
||||
"viewId": {
|
||||
"type": "keyword",
|
||||
"_meta": {
|
||||
"description": "Always `main`"
|
||||
}
|
||||
},
|
||||
"clicks_total": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the application since we started counting them"
|
||||
}
|
||||
},
|
||||
"clicks_7_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the application over the last 7 days"
|
||||
}
|
||||
},
|
||||
"clicks_30_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the application over the last 30 days"
|
||||
}
|
||||
},
|
||||
"clicks_90_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the application over the last 90 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_total": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen since we started counting them."
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_7_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen over the last 7 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_30_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen over the last 30 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_90_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen over the last 90 days"
|
||||
}
|
||||
},
|
||||
"views": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"properties": {
|
||||
"appId": {
|
||||
"type": "keyword",
|
||||
"_meta": {
|
||||
"description": "The application being tracked"
|
||||
}
|
||||
},
|
||||
"viewId": {
|
||||
"type": "keyword",
|
||||
"_meta": {
|
||||
"description": "The application view being tracked"
|
||||
}
|
||||
},
|
||||
"clicks_total": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the application sub view since we started counting them"
|
||||
}
|
||||
},
|
||||
"clicks_7_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the active application sub view over the last 7 days"
|
||||
}
|
||||
},
|
||||
"clicks_30_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the active application sub view over the last 30 days"
|
||||
}
|
||||
},
|
||||
"clicks_90_days": {
|
||||
"type": "long",
|
||||
"_meta": {
|
||||
"description": "General number of clicks in the active application sub view over the last 90 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_total": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application sub view is active and on-screen since we started counting them."
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_7_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen active application sub view over the last 7 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_30_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen active application sub view over the last 30 days"
|
||||
}
|
||||
},
|
||||
"minutes_on_screen_90_days": {
|
||||
"type": "float",
|
||||
"_meta": {
|
||||
"description": "Minutes the application is active and on-screen active application sub view over the last 90 days"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"appSearch": {
|
||||
"properties": {
|
||||
"appId": {
|
||||
|
|
|
@ -26,6 +26,7 @@ import { SecurityPluginSetup, SecurityPluginStart } from '../../security/public'
|
|||
|
||||
import {
|
||||
APP_SEARCH_PLUGIN,
|
||||
ENTERPRISE_SEARCH_CONTENT_PLUGIN,
|
||||
ENTERPRISE_SEARCH_OVERVIEW_PLUGIN,
|
||||
WORKPLACE_SEARCH_PLUGIN,
|
||||
} from '../common/constants';
|
||||
|
@ -89,6 +90,29 @@ export class EnterpriseSearchPlugin implements Plugin {
|
|||
},
|
||||
});
|
||||
|
||||
core.application.register({
|
||||
id: ENTERPRISE_SEARCH_CONTENT_PLUGIN.ID,
|
||||
title: ENTERPRISE_SEARCH_CONTENT_PLUGIN.NAV_TITLE,
|
||||
euiIconType: ENTERPRISE_SEARCH_CONTENT_PLUGIN.LOGO,
|
||||
appRoute: ENTERPRISE_SEARCH_CONTENT_PLUGIN.URL,
|
||||
category: DEFAULT_APP_CATEGORIES.enterpriseSearch,
|
||||
mount: async (params: AppMountParameters) => {
|
||||
const kibanaDeps = await this.getKibanaDeps(core, params, cloud);
|
||||
const { chrome, http } = kibanaDeps.core;
|
||||
chrome.docTitle.change(ENTERPRISE_SEARCH_CONTENT_PLUGIN.NAME);
|
||||
|
||||
await this.getInitialData(http);
|
||||
const pluginData = this.getPluginData();
|
||||
|
||||
const { renderApp } = await import('./applications');
|
||||
const { EnterpriseSearchContent } = await import(
|
||||
'./applications/enterprise_search_content'
|
||||
);
|
||||
|
||||
return renderApp(EnterpriseSearchContent, kibanaDeps, pluginData);
|
||||
},
|
||||
});
|
||||
|
||||
core.application.register({
|
||||
id: APP_SEARCH_PLUGIN.ID,
|
||||
title: APP_SEARCH_PLUGIN.NAME,
|
||||
|
|
|
@ -24,6 +24,7 @@ import { SpacesPluginStart } from '../../spaces/server';
|
|||
|
||||
import {
|
||||
ENTERPRISE_SEARCH_OVERVIEW_PLUGIN,
|
||||
ENTERPRISE_SEARCH_CONTENT_PLUGIN,
|
||||
APP_SEARCH_PLUGIN,
|
||||
WORKPLACE_SEARCH_PLUGIN,
|
||||
ENTERPRISE_SEARCH_RELEVANCE_LOGS_SOURCE_ID,
|
||||
|
@ -89,6 +90,12 @@ export class EnterpriseSearchPlugin implements Plugin {
|
|||
) {
|
||||
const config = this.config;
|
||||
const log = this.logger;
|
||||
const PLUGIN_IDS = [
|
||||
ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.ID,
|
||||
ENTERPRISE_SEARCH_CONTENT_PLUGIN.ID,
|
||||
APP_SEARCH_PLUGIN.ID,
|
||||
WORKPLACE_SEARCH_PLUGIN.ID,
|
||||
];
|
||||
|
||||
if (customIntegrations) {
|
||||
registerEnterpriseSearchIntegrations(http, customIntegrations);
|
||||
|
@ -107,17 +114,8 @@ export class EnterpriseSearchPlugin implements Plugin {
|
|||
name: ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.NAME,
|
||||
order: 0,
|
||||
category: DEFAULT_APP_CATEGORIES.enterpriseSearch,
|
||||
app: [
|
||||
'kibana',
|
||||
ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.ID,
|
||||
APP_SEARCH_PLUGIN.ID,
|
||||
WORKPLACE_SEARCH_PLUGIN.ID,
|
||||
],
|
||||
catalogue: [
|
||||
ENTERPRISE_SEARCH_OVERVIEW_PLUGIN.ID,
|
||||
APP_SEARCH_PLUGIN.ID,
|
||||
WORKPLACE_SEARCH_PLUGIN.ID,
|
||||
],
|
||||
app: ['kibana', ...PLUGIN_IDS],
|
||||
catalogue: PLUGIN_IDS,
|
||||
privileges: null,
|
||||
});
|
||||
|
||||
|
@ -130,16 +128,18 @@ export class EnterpriseSearchPlugin implements Plugin {
|
|||
const dependencies = { config, security, spaces, request, log };
|
||||
|
||||
const { hasAppSearchAccess, hasWorkplaceSearchAccess } = await checkAccess(dependencies);
|
||||
const showEnterpriseSearchOverview = hasAppSearchAccess || hasWorkplaceSearchAccess;
|
||||
const showEnterpriseSearch = hasAppSearchAccess || hasWorkplaceSearchAccess;
|
||||
|
||||
return {
|
||||
navLinks: {
|
||||
enterpriseSearch: showEnterpriseSearchOverview,
|
||||
enterpriseSearch: showEnterpriseSearch,
|
||||
enterpriseSearchContent: showEnterpriseSearch,
|
||||
appSearch: hasAppSearchAccess,
|
||||
workplaceSearch: hasWorkplaceSearchAccess,
|
||||
},
|
||||
catalogue: {
|
||||
enterpriseSearch: showEnterpriseSearchOverview,
|
||||
enterpriseSearch: showEnterpriseSearch,
|
||||
enterpriseSearchContent: showEnterpriseSearch,
|
||||
appSearch: hasAppSearchAccess,
|
||||
workplaceSearch: hasWorkplaceSearchAccess,
|
||||
},
|
||||
|
|
|
@ -65,6 +65,7 @@ export default function catalogueTests({ getService }: FtrProviderContext) {
|
|||
const exceptions = [
|
||||
'monitoring',
|
||||
'enterpriseSearch',
|
||||
'enterpriseSearchContent',
|
||||
'appSearch',
|
||||
'workplaceSearch',
|
||||
'spaces',
|
||||
|
@ -89,6 +90,7 @@ export default function catalogueTests({ getService }: FtrProviderContext) {
|
|||
'ml_file_data_visualizer',
|
||||
'monitoring',
|
||||
'enterpriseSearch',
|
||||
'enterpriseSearchContent',
|
||||
'appSearch',
|
||||
'workplaceSearch',
|
||||
'spaces',
|
||||
|
|
|
@ -55,6 +55,7 @@ export default function navLinksTests({ getService }: FtrProviderContext) {
|
|||
navLinksBuilder.except(
|
||||
'monitoring',
|
||||
'enterpriseSearch',
|
||||
'enterpriseSearchContent',
|
||||
'appSearch',
|
||||
'workplaceSearch',
|
||||
'osquery'
|
||||
|
|
|
@ -25,8 +25,9 @@ export default function catalogueTests({ getService }: FtrProviderContext) {
|
|||
];
|
||||
|
||||
const uiCapabilitiesExceptions = [
|
||||
// enterprise_search plugin is loaded but disabled because security isn't enabled in ES. That means the following 3 capabilities are disabled
|
||||
// enterprise_search plugin is loaded but disabled because security isn't enabled in ES. That means the following 4 capabilities are disabled
|
||||
'enterpriseSearch',
|
||||
'enterpriseSearchContent',
|
||||
'appSearch',
|
||||
'workplaceSearch',
|
||||
];
|
||||
|
|
|
@ -17,8 +17,9 @@ export default function navLinksTests({ getService }: FtrProviderContext) {
|
|||
const featuresService: FeaturesService = getService('features');
|
||||
|
||||
const uiCapabilitiesExceptions = [
|
||||
// enterprise_search plugin is loaded but disabled because security isn't enabled in ES. That means the following 3 capabilities are disabled
|
||||
// enterprise_search plugin is loaded but disabled because security isn't enabled in ES. That means the following 4 capabilities are disabled
|
||||
'enterpriseSearch',
|
||||
'enterpriseSearchContent',
|
||||
'appSearch',
|
||||
'workplaceSearch',
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue