-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement embeddable dashboard on TSC (#6517)
* feat(TSC): replace the dashboard on TSC application * fix(tsc): fix ids dashboard panels * fix(tsc): fix ids dashboards panels * rename(tsc): rename dashboard files * fix(tsc): add id to visualizations * fix(TSC): fix dashboard * fix: fix dashboards * feat(tsc): use data source on Dashboard and Events tabs * clean(tsc): cleaning unused statement * fix(tsc): remove comment * fix(tsc): add date range to Dashboard query * remove(tsc): visualizations on server side * feat(tsc): hide filter control on the search bar of dashboard * feat(tsc): move sample data warning on the dashboard --------- Co-authored-by: Federico Rodriguez <federico.rodriguez@wazuh.com>
- Loading branch information
1 parent
510714d
commit d70976f
Showing
13 changed files
with
1,294 additions
and
1,058 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...n/public/components/common/data-source/pattern/alerts/alerts-tsc/alerts-tsc-data-souce.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { tFilter } from '../../../index'; | ||
import { DATA_SOURCE_FILTER_CONTROLLED_TSC_EXIST } from '../../../../../../../common/constants'; | ||
import { AlertsDataSource } from '../alerts-data-source'; | ||
|
||
const KEY_EXIST = 'rule.tsc'; | ||
|
||
export class AlertsTSCDataSource 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_TSC_EXIST, | ||
}, | ||
exists: { | ||
field: KEY_EXIST, | ||
}, | ||
$state: { | ||
store: 'appState', | ||
}, | ||
} as tFilter, | ||
]; | ||
} | ||
|
||
getFixedFilters(): tFilter[] { | ||
return [...this.getFilterExist(), ...super.getFixedFilters()]; | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
plugins/main/public/components/common/data-source/pattern/alerts/alerts-tsc/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './alerts-tsc-data-souce'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.