Merge pull request #14074 from stop-cran/feature/14072

elasticsearch: do not set a placeholder to index name, if it's already specified
This commit is contained in:
Marcus Efraimsson 2018-11-14 09:21:15 -08:00 committed by GitHub
commit b47a4954c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,9 +28,13 @@ export class ElasticConfigCtrl {
];
indexPatternTypeChanged() {
const def = _.find(this.indexPatternTypes, {
value: this.current.jsonData.interval,
});
this.current.database = def.example || 'es-index-name';
if (!this.current.database ||
this.current.database.length === 0 ||
this.current.database.startsWith('[logstash-]')) {
const def = _.find(this.indexPatternTypes, {
value: this.current.jsonData.interval,
});
this.current.database = def.example || 'es-index-name';
}
}
}