Prevents default index pattern name when ID is provided (#13353)

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This commit is contained in:
Tyler Smalley 2017-08-16 09:51:16 -07:00 committed by GitHub
parent 0920a99a15
commit 911467a78e

View file

@ -30,7 +30,6 @@ uiModules.get('apps/management')
// Configure the new index pattern we're going to create.
this.formValues = {
id: $routeParams.id ? decodeURIComponent($routeParams.id) : undefined,
name: config.get('indexPattern:placeholder'),
timeFieldOption: null,
};
@ -38,7 +37,15 @@ uiModules.get('apps/management')
// UI state.
this.timeFieldOptions = [];
this.timeFieldOptionsError = null;
this.showAdvancedOptions = $routeParams.id || false;
this.showAdvancedOptions = false;
// fills index-pattern ID based on query param.
if ($routeParams.id) {
this.formValues.id = decodeURIComponent($routeParams.id);
this.formValues.name = '';
this.showAdvancedOptions = true;
}
const getTimeFieldOptions = () => {
loadingCount += 1;