-
Notifications
You must be signed in to change notification settings - Fork 8.3k
/
owners.ts
69 lines (64 loc) · 1.92 KB
/
owners.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0; you may not use this file except in compliance with the Elastic License
* 2.0.
*/
import { AlertConsumers } from '@kbn/rule-data-utils';
import { APP_ID } from './application';
import type { Owner } from './types';
/**
* Owner
*/
export const SECURITY_SOLUTION_OWNER = 'securitySolution' as const;
export const OBSERVABILITY_OWNER = 'observability' as const;
export const GENERAL_CASES_OWNER = APP_ID;
export const OWNERS = [GENERAL_CASES_OWNER, OBSERVABILITY_OWNER, SECURITY_SOLUTION_OWNER] as const;
interface RouteInfo {
id: Owner;
appId: string;
label: string;
iconType: string;
appRoute: string;
validRuleConsumers?: readonly AlertConsumers[];
}
export const OWNER_INFO: Record<Owner, RouteInfo> = {
[SECURITY_SOLUTION_OWNER]: {
id: SECURITY_SOLUTION_OWNER,
appId: 'securitySolutionUI',
label: 'Security',
iconType: 'logoSecurity',
appRoute: '/app/security',
validRuleConsumers: [AlertConsumers.SIEM],
},
[OBSERVABILITY_OWNER]: {
id: OBSERVABILITY_OWNER,
appId: 'observability-overview',
label: 'Observability',
iconType: 'logoObservability',
appRoute: '/app/observability',
validRuleConsumers: [
// only valid in serverless
AlertConsumers.OBSERVABILITY,
AlertConsumers.APM,
AlertConsumers.INFRASTRUCTURE,
AlertConsumers.LOGS,
AlertConsumers.SLO,
AlertConsumers.UPTIME,
AlertConsumers.MONITORING,
],
},
[GENERAL_CASES_OWNER]: {
id: GENERAL_CASES_OWNER,
appId: 'management',
label: 'Management',
iconType: 'managementApp',
appRoute: '/app/management/insightsAndAlerting',
validRuleConsumers: [
AlertConsumers.ML,
AlertConsumers.STACK_ALERTS,
AlertConsumers.EXAMPLE,
AlertConsumers.DISCOVER,
],
},
} as const;