Refactor Index Pattern Creation logic. (#11210)

* Reorder Create Index Pattern logic so local functions are before scope methods.
* Extract some Index Pattern Creation logic into sendCreateIndexPatternRequest and getDefaultPatternForInterval services.
* Use UI Framework typography components for Index Pattern Creation header.
* Separate user-specified variables for configuring the index pattern from controller variables, which just change the UI state.
* Rename index to newIndexPattern for clarity.
* Use controllerAs and fat arrow functions in Create Index Pattern.
This commit is contained in:
CJ Cenizal 2017-04-18 14:30:57 -07:00 committed by GitHub
parent 345b64924d
commit a605b7f478
7 changed files with 402 additions and 356 deletions

View file

@ -25,8 +25,7 @@ export default function ({ getService, getPageObjects }) {
})
// try to find the checkbox (this shouldn fail)
.then(function () {
const waitTime = 10000;
return PageObjects.settings.getTimeBasedIndexPatternCheckbox(waitTime);
return PageObjects.settings.getTimeBasedIndexPatternCheckbox();
})
.then(function () {
PageObjects.common.saveScreenshot('Settings-indices-hide-time-based-index-pattern');

View file

@ -50,7 +50,7 @@ export default function ({ getService, getPageObjects }) {
});
it('should not be enable creation', function () {
return PageObjects.settings.getCreateButton().isEnabled()
return PageObjects.settings.getCreateIndexPatternButton().isEnabled()
.then(function (enabled) {
expect(enabled).to.not.be.ok();
});