-
Notifications
You must be signed in to change notification settings - Fork 173
/
alerts-gdpr-data-source.ts
42 lines (38 loc) · 1 KB
/
alerts-gdpr-data-source.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
import { tFilter } from '../../../index';
import { DATA_SOURCE_FILTER_CONTROLLED_GDPR_EXIST } from '../../../../../../../common/constants';
import { AlertsDataSource } from '../alerts-data-source';
const KEY_EXIST = 'rule.gdpr';
export class AlertsGDPRDataSource extends AlertsDataSource {
constructor(id: string, title: string) {
super(id, title);
}
private getFilterExist() {
return [
{
meta: {
index: this.id,
negate: false,
disabled: false,
alias: null,
type: 'exists',
key: KEY_EXIST,
value: 'exists',
params: {
query: null,
type: 'phrase',
},
controlledBy: DATA_SOURCE_FILTER_CONTROLLED_GDPR_EXIST,
},
exists: {
field: KEY_EXIST,
},
$state: {
store: 'appState',
},
} as tFilter,
];
}
getFixedFilters(): tFilter[] {
return [...this.getFilterExist(), ...super.getFixedFilters()];
}
}