Skip to content

Commit

Permalink
all sections merged
Browse files Browse the repository at this point in the history
  • Loading branch information
semd committed Jun 23, 2021
2 parents 22f36a7 + 119fdc6 commit 9d32be5
Show file tree
Hide file tree
Showing 49 changed files with 279 additions and 630 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,7 @@ export const applicationUsageSchema = {
security_login: commonSchema,
security_logout: commonSchema,
security_overwritten_session: commonSchema,
securitySolution: commonSchema, // It's a forward app so we'll likely never report it
'securitySolution:timelines': commonSchema,
'securitySolution:case': commonSchema,
securitySolution: commonSchema,
siem: commonSchema,
space_selector: commonSchema,
uptime: commonSchema,
Expand Down
262 changes: 0 additions & 262 deletions src/plugins/telemetry/schema/oss_plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -5411,268 +5411,6 @@
}
}
},
"securitySolution:timelines": {
"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"
}
}
}
}
}
}
},
"securitySolution:case": {
"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"
}
}
}
}
}
}
},
"siem": {
"properties": {
"appId": {
Expand Down
2 changes: 2 additions & 0 deletions x-pack/plugins/security_solution/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ export enum SecurityPageGroupName {
manage = 'manage',
}

export const TIMELINES_PATH = '/timelines';
export const CASES_PATH = '/cases';
export const OVERVIEW_PATH = '/overview';
export const ALERTS_PATH = '/alerts';
export const RULES_PATH = '/rules';
Expand Down
61 changes: 31 additions & 30 deletions x-pack/plugins/security_solution/public/app/deep_links/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ import { LicenseType } from '../../../../licensing/common/types';
import { SecurityDeepLinkName, SecurityDeepLinks, SecurityPageName } from '../types';
import { App, AppDeepLink, AppNavLinkStatus } from '../../../../../../src/core/public';
import {
ADMINISTRATION,
OVERVIEW,
DETECTION_ENGINE,
ALERTS,
RULES,
EXCEPTIONS,
HOSTS,
NETWORK,
TIMELINES,
CASE,
ADMINISTRATION,
} from '../translations';
import {
APP_ICON_SOLUTION,
Expand All @@ -28,6 +30,8 @@ import {
EXCEPTIONS_PATH,
HOSTS_PATH,
NETWORK_PATH,
TIMELINES_PATH,
CASES_PATH,
ENDPOINTS_PATH,
TRUSTED_APPS_PATH,
EVENT_FILTERS_PATH,
Expand Down Expand Up @@ -86,6 +90,32 @@ export const topDeepLinks: AppDeepLink[] = [
order: 9003,
euiIconType: APP_ICON_SOLUTION,
},
{
id: SecurityPageName.timelines,
title: TIMELINES,
path: TIMELINES_PATH,
navLinkStatus: AppNavLinkStatus.visible,
keywords: [
i18n.translate('xpack.securitySolution.search.timelines', {
defaultMessage: 'Timelines',
}),
],
order: 9002,
euiIconType: APP_ICON_SOLUTION,
},
{
id: SecurityPageName.case,
title: CASE,
path: CASES_PATH,
navLinkStatus: AppNavLinkStatus.visible,
keywords: [
i18n.translate('xpack.securitySolution.search.cases', {
defaultMessage: 'Cases',
}),
],
order: 9002,
euiIconType: APP_ICON_SOLUTION,
},
{
id: SecurityPageName.administration,
title: ADMINISTRATION,
Expand Down Expand Up @@ -290,35 +320,6 @@ const nestedDeepLinks: SecurityDeepLinks = {
},
};

/**
* TODO: [1101] remove function
* A function that generates a subPlugin's meta tag
* @param subPluginName SubPluginName of the app to retrieve meta information for.
* @param licenseType optional string for license level, if not provided basic is assumed.
*/
export function getDeepLinksAndKeywords(
subPluginName: SecurityDeepLinkName,
licenseType?: LicenseType
): Pick<App, 'deepLinks' | 'keywords'> {
const baseRoutes = [...nestedDeepLinks[subPluginName].base];
if (
licenseType === 'gold' ||
licenseType === 'platinum' ||
licenseType === 'enterprise' ||
licenseType === 'trial'
) {
const premiumRoutes = nestedDeepLinks[subPluginName] && nestedDeepLinks[subPluginName].premium;
if (premiumRoutes !== undefined) {
return {
deepLinks: [...baseRoutes, ...premiumRoutes],
};
}
}
return {
deepLinks: baseRoutes,
};
}

/**
* A function that generates the plugin deepLinks
* @param licenseType optional string for license level, if not provided basic is assumed.
Expand Down
Loading

0 comments on commit 9d32be5

Please sign in to comment.