Skip to content

Commit 17bcc30

Browse files
committed
fix(alert-view): update log navigation to correctly reference log IDs
1 parent 5a3fe77 commit 17bcc30

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

frontend/src/app/data-management/alert-management/shared/components/alert-view-detail/alert-view-detail.component.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@
3434
<a [ngClass]="{'active':view===alertDetailTabEnum.TAGS}" class="nav-link">
3535
<i class="icon-price-tags2 mr-1"></i> Rules applied </a>
3636
</li>
37-
<!--<li class="nav-item cursor-pointer btn-tab">
38-
<button (click)="navigateToEvents()" *ngIf="countRelatedEvents>0" class="btn utm-button utm-button-primary ml-2"
39-
routerLink="/integrations/explore">
37+
<li class="nav-item cursor-pointer btn-tab">
38+
<button (click)="navigateToEvents()" *ngIf="countRelatedEvents>0" class="btn utm-button utm-button-primary ml-2">
4039
<i class="icon-eye8 mr-1"></i> View logs related
4140
</button>
42-
</li>-->
41+
</li>
4342
</ul>
4443
<div class="w-100" *ngIf="view === alertDetailTabEnum.DETAIL">
4544
<app-alert-description [alert]="alert"></app-alert-description>

frontend/src/app/data-management/alert-management/shared/components/alert-view-detail/alert-view-detail.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export class AlertViewDetailComponent implements OnInit {
127127
navigateToEvents() {
128128
const queryParams = {patternId: LOG_INDEX_PATTERN_ID, indexPattern: LOG_INDEX_PATTERN};
129129
const LOG_ID_FIELD = 'id';
130-
queryParams[LOG_ID_FIELD] = ElasticOperatorsEnum.IS_ONE_OF + '->' + this.logs.slice(0, 100);
130+
queryParams[LOG_ID_FIELD] = ElasticOperatorsEnum.IS_ONE_OF + '->' + this.logs.map(log => log.id).slice(0, 100);
131131
queryParams[this.TIMESTAMP_FIELD] = ElasticOperatorsEnum.IS_BETWEEN + '->' + 'now-1y' + ',' + 'now';
132132
this.spinner.show('loadingSpinner');
133133
this.router.navigate([LOG_ROUTE], {

0 commit comments

Comments
 (0)