METRON-1627 Alerts UI: Metaalert details missing in details panel when trying to add alert to existing metaalert (sardell via justinleet) closes apache/metron#1070
Project: http://git-wip-us.apache.org/repos/asf/metron/repo Commit: http://git-wip-us.apache.org/repos/asf/metron/commit/e7efd48d Tree: http://git-wip-us.apache.org/repos/asf/metron/tree/e7efd48d Diff: http://git-wip-us.apache.org/repos/asf/metron/diff/e7efd48d Branch: refs/heads/feature/METRON-1554-pcap-query-panel Commit: e7efd48d1402b1619c4ab5fc36ce4a7c5b0a058d Parents: e30f77a Author: sardell <[email protected]> Authored: Wed Jun 20 11:36:47 2018 -0400 Committer: leet <[email protected]> Committed: Wed Jun 20 11:36:47 2018 -0400 ---------------------------------------------------------------------- .../app/alerts/alerts-list/table-view/table-view.component.ts | 2 +- .../src/app/alerts/meta-alerts/meta-alerts.component.html | 6 ++++-- .../src/app/alerts/meta-alerts/meta-alerts.component.ts | 4 +--- 3 files changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/metron/blob/e7efd48d/metron-interface/metron-alerts/src/app/alerts/alerts-list/table-view/table-view.component.ts ---------------------------------------------------------------------- diff --git a/metron-interface/metron-alerts/src/app/alerts/alerts-list/table-view/table-view.component.ts b/metron-interface/metron-alerts/src/app/alerts/alerts-list/table-view/table-view.component.ts index 10d5ea8..ee1970f 100644 --- a/metron-interface/metron-alerts/src/app/alerts/alerts-list/table-view/table-view.component.ts +++ b/metron-interface/metron-alerts/src/app/alerts/alerts-list/table-view/table-view.component.ts @@ -285,7 +285,7 @@ export class TableViewComponent implements OnInit, OnChanges, OnDestroy { } doDeleteOneAlertFromMetaAlert(alert, metaAlertIndex) { - let alertToRemove = alert.source.alert[metaAlertIndex]; + let alertToRemove = alert.source.metron_alert[metaAlertIndex]; let metaAlertAddRemoveRequest = new MetaAlertAddRemoveRequest(); metaAlertAddRemoveRequest.metaAlertGuid = alert.source.guid; metaAlertAddRemoveRequest.alerts = [new GetRequest(alertToRemove.guid, alertToRemove[this.globalConfig['source.type.field']], '')]; http://git-wip-us.apache.org/repos/asf/metron/blob/e7efd48d/metron-interface/metron-alerts/src/app/alerts/meta-alerts/meta-alerts.component.html ---------------------------------------------------------------------- diff --git a/metron-interface/metron-alerts/src/app/alerts/meta-alerts/meta-alerts.component.html b/metron-interface/metron-alerts/src/app/alerts/meta-alerts/meta-alerts.component.html index a9298e0..87c0585 100644 --- a/metron-interface/metron-alerts/src/app/alerts/meta-alerts/meta-alerts.component.html +++ b/metron-interface/metron-alerts/src/app/alerts/meta-alerts/meta-alerts.component.html @@ -35,8 +35,10 @@ <div class="col-11 px-0"> <span class="severity" appAlertSeverity [severity]="getScore(alert)"></span><sup> {{ getScore(alert) }} </sup> <div class="px-0 guid-name-container"> - <div [ngClass]="{'selected': selectedMetaAlert===alert.source.guid}"> {{(alert.source.name && alert.source.name.length > 0) ? alert.source.name : alert.source.guid | centerEllipses:20 }} ({{ alert.source.alert.length }})</div> - <span class="pull-left sub-text"> {{ (alert.source.alert_status && alert.source.alert_status.length > 0) ? alert.source.alert_status : 'NEW' }} </span> + <div [ngClass]="{'selected': selectedMetaAlert===alert.source.guid}" *ngIf="alert.source.name && alert.source.name.length > 0">{{ alert.source.name }} ({{ alert.source.metron_alert.length }})</div> + <div [ngClass]="{'selected': selectedMetaAlert===alert.source.guid}" *ngIf="!alert.source.name || alert.source.name.length === 0">{{ alert.source.guid | centerEllipses:20 }} ({{ alert.source.metron_alert.length }})</div> + <span class="pull-left sub-text" *ngIf="alert.source.status && alert.source.status.length > 0">{{ alert.source.status }}</span> + <span class="pull-left sub-text" *ngIf="!alert.source.status || alert.source.status.length === 0">NEW</span> <span class="pull-right sub-text"> {{ alert.source.timestamp | timeLapse }} </span> </div> </div> http://git-wip-us.apache.org/repos/asf/metron/blob/e7efd48d/metron-interface/metron-alerts/src/app/alerts/meta-alerts/meta-alerts.component.ts ---------------------------------------------------------------------- diff --git a/metron-interface/metron-alerts/src/app/alerts/meta-alerts/meta-alerts.component.ts b/metron-interface/metron-alerts/src/app/alerts/meta-alerts/meta-alerts.component.ts index c1997b6..1c72904 100644 --- a/metron-interface/metron-alerts/src/app/alerts/meta-alerts/meta-alerts.component.ts +++ b/metron-interface/metron-alerts/src/app/alerts/meta-alerts/meta-alerts.component.ts @@ -65,10 +65,8 @@ export class MetaAlertsComponent implements OnInit, OnDestroy { searchRequest.indices = [META_ALERTS_SENSOR_TYPE]; this.configSubscription = this.globalConfigService.get().subscribe((config: {}) => { this.globalConfig = config; + searchRequest.sort = [new SortField(this.globalConfig['threat.triage.score.field'], 'desc')]; }); - - searchRequest.sort = [new SortField(this.globalConfig['threat.triage.score.field'], 'desc')]; - this.searchService.search(searchRequest).subscribe(resp => this.searchResponse = resp); }
