Commit b47a4954 by Marcus Efraimsson Committed by GitHub

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

elasticsearch: do not set a placeholder to index name, if it's already specified
parents 0cba6da2 20214b3d
......@@ -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';
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment