[ https://issues.apache.org/jira/browse/METRON-1548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16480623#comment-16480623 ]
ASF GitHub Bot commented on METRON-1548: ---------------------------------------- Github user sardell commented on a diff in the pull request: https://github.com/apache/metron/pull/1010#discussion_r189261776 --- Diff: metron-interface/metron-alerts/src/app/alerts/alerts-list/table-view/table-view.component.ts --- @@ -77,12 +80,24 @@ export class TableViewComponent implements OnChanges { searchService: SearchService, metronDialogBox: MetronDialogBox, updateService: UpdateService, - metaAlertService: MetaAlertService) { + metaAlertService: MetaAlertService, + globalConfigService: GlobalConfigService) { this.router = router; this.searchService = searchService; this.metronDialogBox = metronDialogBox; this.updateService = updateService; this.metaAlertService = metaAlertService; + this.globalConfigService = globalConfigService; + } + + ngOnInit() { + this.globalConfigService.get().subscribe((config: {}) => { + this.globalConfig = config; + if (this.globalConfig['source.type.field'] === 'source.type' && !this.alertsColumnsToDisplay['source.type']) { --- End diff -- @merrimanr Good point. What if we check if a config property of ['source.type.field'] exists and change it to whatever value it has. If no config exists, default to `source:type` (to catch existing users without a config property set)? ``` if (this.globalConfig['source.type.field']) { this.alertsColumnsToDisplay.splice(2, 0, new ColumnMetadata(config['source.type.field'], 'string')); } else { this.alertsColumnsToDisplay.splice(2, 0, new ColumnMetadata(config['source:type'], 'string')); } ``` > Alerts UI: Remove hardcoded source:type and other fields that may vary > ---------------------------------------------------------------------- > > Key: METRON-1548 > URL: https://issues.apache.org/jira/browse/METRON-1548 > Project: Metron > Issue Type: Sub-task > Reporter: Justin Leet > Priority: Major > > In Solr, we use source.type instead of source:type (which was originally due > to ES limitations, we'd prefer it to be common across both). However, it's > hardcoded in the alerts UI to be source:type, so nothing in the UI has a > source type and it breaks other things like metaalerts (which rely on source > type for being able to pull the data together). > Any other configs / queries that would cause similar problems should be > updated appropriately. -- This message was sent by Atlassian JIRA (v7.6.3#76005)