sardell commented on a change in pull request #1477: METRON-2199: [UI] Add ability to turn off query building in Alerts UI search input URL: https://github.com/apache/metron/pull/1477#discussion_r314346632
########## File path: metron-interface/metron-alerts/src/app/alerts/alerts-list/alerts-list.component.ts ########## @@ -521,4 +548,25 @@ export class AlertsListComponent implements OnInit, OnDestroy { this.subgroupTotal = subgroupTotal; this.cdRef.detectChanges(); } + + toggleQueryBuilder() { + this.setSelectedTimeRange([this.selectedTimeRange]); + if (!this.hideQueryBuilder) { + this.hideQueryBuilder = true; + this.manualQuery.nativeElement.value = this.queryBuilder.query; + } else { + this.hideQueryBuilder = false; + this.queryBuilder.clearSearch(); + this.search(); + } + } + + queryForTreeView() { Review comment: I added a function to handle query generation for the tree view. If the query builder is enabled, we use the generateSelect function like we were before. If the manual query is enabled, we are instead using the value provided by the user in the input. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services