Improve missing index pattern error message (#13915)
Since the title of the missing pattern is unknown (because it's missing) we can't display it, but we can improve the error slightly by including the name of the pattern that is being loaded instead. I've added that, in addition to the ID so there's no confusion if the titles are the same.
This commit is contained in:
parent
1e25cf656b
commit
f23f606383
|
@ -710,11 +710,11 @@ function discoverController(
|
|||
if (stateVal && !stateValFound) {
|
||||
const err = '"' + stateVal + '" is not a configured pattern ID. ';
|
||||
if (own) {
|
||||
notify.warning(err + ' Using the saved index pattern: "' + own.id + '"');
|
||||
notify.warning(`${err} Using the saved index pattern: "${own.title}" (${own.id})`);
|
||||
return own;
|
||||
}
|
||||
|
||||
notify.warning(err + ' Using the default index pattern: "' + loaded.id + '"');
|
||||
notify.warning(`${err} Using the default index pattern: "${loaded.title}" (${loaded.id})`);
|
||||
}
|
||||
return loaded;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue