[elasticsearch] Do not set a placeholder to index name, if it's already specified.

This commit is contained in:
stop-cran 2018-11-14 18:12:05 +02:00
parent 0a080149ae
commit 20214b3d6a

View File

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