+
+
+
+ Install Filebeat on all servers on which you want to tail logs
+ (
+ instructions
+ )
+
+
+ Point Filebeat at the log files you want to tail
+ (
+ instructions
+ )
+
+ Configure Filebeat on each server to send data to your Elasticsearch instances
+ (
+ instructions
+ )
+
+ Set the index name in filebeat.yml based on the index pattern you configured in the previous step. The Filebeat
+ config takes a base index name and automatically rotates the target index by appending "-{date}" to the end, so if
+ your pattern was "foo-*" you would make the index name "foo" in filebeat.yml.
+
+ Run Filebeat on each server
+ (
+ instructions
+ )
+
+
+
diff --git a/src/plugins/kibana/public/settings/sections/indices/add_data_steps/install_filebeat_step.js b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/install_filebeat_step.js
new file mode 100644
index 000000000000..5869d4b385a3
--- /dev/null
+++ b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/install_filebeat_step.js
@@ -0,0 +1,16 @@
+import modules from 'ui/modules';
+import template from 'plugins/kibana/settings/sections/indices/add_data_steps/install_filebeat_step.html';
+
+modules.get('apps/settings')
+ .directive('installFilebeatStep', function () {
+ return {
+ template: template,
+ scope: {
+ results: '='
+ },
+ controller: function ($scope) {
+ var results = $scope.results;
+ }
+ };
+ });
+
diff --git a/src/plugins/kibana/public/settings/sections/indices/add_data_steps/paste_samples_step.html b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/paste_samples_step.html
new file mode 100644
index 000000000000..b24c6b74094f
--- /dev/null
+++ b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/paste_samples_step.html
@@ -0,0 +1,13 @@
+
+
Provide some sample logs
+ Paste in one or more lines from the file you intend to tail. We'll use these samples in the following steps to help
+ you build an ingest pipeline and configure a Kibana index pattern. Log lines can be raw strings or
+ formatted as JSON. If your logs are raw strings but you intend to use
+
Filebeat's metadata ,
+ you'll want to paste the JSON as it will come out of Filebeat.
+
+
+
+
+
+
diff --git a/src/plugins/kibana/public/settings/sections/indices/add_data_steps/paste_samples_step.js b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/paste_samples_step.js
new file mode 100644
index 000000000000..1e78ea45559f
--- /dev/null
+++ b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/paste_samples_step.js
@@ -0,0 +1,37 @@
+import modules from 'ui/modules';
+import template from 'plugins/kibana/settings/sections/indices/add_data_steps/paste_samples_step.html';
+import _ from 'lodash';
+
+modules.get('apps/settings')
+ .directive('pasteSamplesStep', function () {
+ return {
+ template: template,
+ scope: {
+ samples: '=',
+ rawSamples: '='
+ },
+ bindToController: true,
+ controllerAs: 'pasteStep',
+ controller: function ($scope) {
+ if (_.isUndefined(this.rawSamples)) {
+ this.rawSamples = '';
+ }
+
+ $scope.$watch('pasteStep.rawSamples', (newValue) => {
+ const splitRawSamples = newValue.split('\n');
+
+ try {
+ this.samples = _.map(splitRawSamples, (sample) => {
+ return JSON.parse(sample);
+ });
+ }
+ catch (error) {
+ this.samples = _.map(splitRawSamples, (sample) => {
+ return {message: sample};
+ });
+ }
+ });
+ }
+ };
+ });
+
diff --git a/src/plugins/kibana/public/settings/sections/indices/add_data_steps/pattern_review_step.html b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/pattern_review_step.html
new file mode 100644
index 000000000000..5a8735d7b3ea
--- /dev/null
+++ b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/pattern_review_step.html
@@ -0,0 +1,32 @@
+
+
Review the index pattern
+ Here we'll define how and where to store your parsed events. We've made some intellient guesses for you, but most
+ fields can be changed if we got it wrong!
+
+
+
+
+ Index name or pattern
+
+
+
+
+
+ time based
+
+
+ Time Field
+
+
+ {{field}}
+
+
+
+
+
+
diff --git a/src/plugins/kibana/public/settings/sections/indices/add_data_steps/pattern_review_step.js b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/pattern_review_step.js
new file mode 100644
index 000000000000..be7a220636ed
--- /dev/null
+++ b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/pattern_review_step.js
@@ -0,0 +1,152 @@
+const modules = require('ui/modules');
+const template = require('plugins/kibana/settings/sections/indices/add_data_steps/pattern_review_step.html');
+const _ = require('lodash');
+const editFieldTypeHTML = require('plugins/kibana/settings/sections/indices/partials/_edit_field_type.html');
+
+const testData = {
+ message: '11/24/2015 ip=1.1.1.1 bytes=1234',
+ clientip: '1.1.1.1',
+ bytes: 1234,
+ geoip: {
+ lat: 37.3894,
+ lon: 122.0819
+ },
+ location: {
+ lat: 37.3894,
+ lon: 122.0819
+ },
+ '@timestamp': '2015-11-24T00:00:00.000Z',
+ otherdate: '2015-11-24T00:00:00.000Z',
+ codes: [1, 2, 3, 4]
+};
+
+const testPipeline = [
+ {
+ grok: {
+ match_field: 'message',
+ match_pattern: 'foo'
+ }
+ },
+ {
+ geoip: {
+ source_field: 'ip'
+ }
+ },
+ {
+ geoip: {
+ source_field: 'ip',
+ target_field: 'location'
+ }
+ },
+ {
+ date: {
+ match_field: 'initialDate',
+ match_formats: ['dd/MM/yyyy hh:mm:ss']
+ }
+ },
+ {
+ date: {
+ match_field: 'initialDate',
+ match_formats: ['dd/MM/yyyy hh:mm:ss'],
+ target_field: 'otherdate'
+ }
+ }
+];
+
+function pickDefaultTimeFieldName(dateFields) {
+ if (_.isEmpty(dateFields)) {
+ return undefined;
+ }
+
+ return _.includes(dateFields, '@timestamp') ? '@timestamp' : dateFields[0];
+}
+
+modules.get('apps/settings')
+ .directive('patternReviewStep', function () {
+ return {
+ template: template,
+ scope: {
+ sampleDocs: '=',
+ indexPattern: '=',
+ pipeline: '='
+ },
+ controllerAs: 'reviewStep',
+ bindToController: true,
+ controller: function ($scope, Private) {
+ this.sampleDocs = testData;
+ this.pipeline = testPipeline;
+
+ if (_.isUndefined(this.indexPattern)) {
+ this.indexPattern = {};
+ }
+
+ const knownFieldTypes = {};
+ this.dateFields = [];
+ this.pipeline.forEach((processor) => {
+ if (processor.geoip) {
+ const field = processor.geoip.target_field || 'geoip';
+ knownFieldTypes[field] = 'geo_point';
+ }
+ else if (processor.date) {
+ const field = processor.date.target_field || '@timestamp';
+ knownFieldTypes[field] = 'date';
+ this.dateFields.push(field);
+ }
+ });
+
+ _.defaults(this.indexPattern, {
+ id: 'filebeat-*',
+ title: 'filebeat-*',
+ timeFieldName: pickDefaultTimeFieldName(this.dateFields),
+ fields: _.map(this.sampleDocs, (value, key) => {
+ let type = knownFieldTypes[key] || typeof value;
+ if (type === 'object' && _.isArray(value) && !_.isEmpty(value)) {
+ type = typeof value[0];
+ }
+ return {name: key, type: type};
+ })
+ });
+
+ this.isTimeBased = !!this.indexPattern.timeFieldName;
+
+ $scope.$watch('reviewStep.indexPattern.id', (value) => {
+ this.indexPattern.title = value;
+ });
+ $scope.$watch('reviewStep.isTimeBased', (value) => {
+ if (value) {
+ this.indexPattern.timeFieldName = pickDefaultTimeFieldName(this.dateFields);
+ }
+ else {
+ delete this.indexPattern.timeFieldName;
+ }
+ });
+ $scope.$watch('reviewStep.indexPattern.fields', (fields) => {
+ this.dateFields = _.map(_.filter(fields, {type: 'date'}), 'name');
+ }, true);
+
+ const buildRows = () => {
+ this.rows = _.map(this.indexPattern.fields, (field) => {
+ const sampleValue = this.sampleDocs[field.name];
+ return [
+ _.escape(field.name),
+ {
+ markup: editFieldTypeHTML,
+ scope: _.assign($scope.$new(), {field: field, knownFieldTypes: knownFieldTypes, buildRows: buildRows}),
+ value: field.type
+ },
+ typeof sampleValue === 'object' ? _.escape(JSON.stringify(sampleValue)) : _.escape(sampleValue)
+ ];
+ });
+ };
+
+ this.columns = [
+ {title: 'Field'},
+ {title: 'Type'},
+ {title: 'Example', sortable: false}
+ ];
+
+ buildRows();
+ }
+ };
+ });
+
diff --git a/src/plugins/kibana/public/settings/sections/indices/add_data_steps/pipeline_step.html b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/pipeline_step.html
new file mode 100644
index 000000000000..0c717c86256b
--- /dev/null
+++ b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/pipeline_step.html
@@ -0,0 +1,7 @@
+
Build pipeline step
+
+
+ Logs: {{samples}}
+
+
+
Build a pipeline
diff --git a/src/plugins/kibana/public/settings/sections/indices/add_data_steps/pipeline_step.js b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/pipeline_step.js
new file mode 100644
index 000000000000..fc946f14f40a
--- /dev/null
+++ b/src/plugins/kibana/public/settings/sections/indices/add_data_steps/pipeline_step.js
@@ -0,0 +1,15 @@
+var modules = require('ui/modules');
+var template = require('plugins/kibana/settings/sections/indices/add_data_steps/pipeline_step.html');
+
+modules.get('apps/settings')
+ .directive('pipelineStep', function () {
+ return {
+ template: template,
+ scope: {
+ samples: '=',
+ sampleDocs: '=',
+ pipeline: '='
+ }
+ };
+ });
+
diff --git a/src/plugins/kibana/public/settings/sections/indices/directives/kbn_settings_indices.html b/src/plugins/kibana/public/settings/sections/indices/directives/kbn_settings_indices.html
new file mode 100644
index 000000000000..3e5329af54c7
--- /dev/null
+++ b/src/plugins/kibana/public/settings/sections/indices/directives/kbn_settings_indices.html
@@ -0,0 +1,38 @@
+
+
+
diff --git a/src/plugins/kibana/public/settings/sections/indices/directives/kbn_settings_indices.js b/src/plugins/kibana/public/settings/sections/indices/directives/kbn_settings_indices.js
new file mode 100644
index 000000000000..6a590bc29d8a
--- /dev/null
+++ b/src/plugins/kibana/public/settings/sections/indices/directives/kbn_settings_indices.js
@@ -0,0 +1,28 @@
+// wrapper directive, which sets some global stuff up like the left nav
+require('ui/modules').get('apps/settings')
+.directive('kbnSettingsIndices', function ($route, config, kbnUrl) {
+ return {
+ restrict: 'E',
+ transclude: true,
+ template: require('plugins/kibana/settings/sections/indices/directives/kbn_settings_indices.html'),
+ link: function ($scope) {
+ $scope.showAddNew = !/^\/settings\/indices$/.test($route.current.$$route.originalPath);
+ $scope.editingId = $route.current.params.indexPatternId;
+ config.$bind($scope, 'defaultIndex');
+
+ $scope.$watch('defaultIndex', function () {
+ var ids = $route.current.locals.indexPatternIds;
+ $scope.indexPatternList = ids.map(function (id) {
+ return {
+ id: id,
+ url: kbnUrl.eval('#/settings/indices/edit/{{id}}', {id: id}),
+ class: 'sidebar-item-title ' + ($scope.editingId === id ? 'active' : ''),
+ default: $scope.defaultIndex === id
+ };
+ });
+ });
+
+ $scope.$emit('application.load');
+ }
+ };
+});
diff --git a/src/plugins/kibana/public/settings/sections/indices/filebeat/directives/filebeat_wizard.html b/src/plugins/kibana/public/settings/sections/indices/filebeat/directives/filebeat_wizard.html
new file mode 100644
index 000000000000..0a9983258197
--- /dev/null
+++ b/src/plugins/kibana/public/settings/sections/indices/filebeat/directives/filebeat_wizard.html
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+ 1. Paste
+
+
+ 2. Parse
+
+
+ 3. Review
+
+
+ 4. Install Filebeat
+
+
+
+
+
+
+
+
+
+
+
+ Prev
+ Next
+
+
+
+
+
+
+
+
+ Prev
+
+ Save
+
+
+
+
+
+
+
+
+ Click Done to go explore your data
+ Done
+
+
+
+
diff --git a/src/plugins/kibana/public/settings/sections/indices/filebeat/directives/filebeat_wizard.js b/src/plugins/kibana/public/settings/sections/indices/filebeat/directives/filebeat_wizard.js
new file mode 100644
index 000000000000..2c5cc55a6133
--- /dev/null
+++ b/src/plugins/kibana/public/settings/sections/indices/filebeat/directives/filebeat_wizard.js
@@ -0,0 +1,78 @@
+var modules = require('ui/modules');
+var template = require('plugins/kibana/settings/sections/indices/filebeat/directives/filebeat_wizard.html');
+
+require('plugins/kibana/settings/sections/indices/add_data_steps/pattern_review_step');
+require('plugins/kibana/settings/sections/indices/add_data_steps/paste_samples_step');
+require('plugins/kibana/settings/sections/indices/add_data_steps/pipeline_step');
+require('plugins/kibana/settings/sections/indices/add_data_steps/install_filebeat_step');
+
+// wrapper directive, which sets up the breadcrumb for all filebeat steps
+modules.get('apps/settings')
+.directive('filebeatWizard', function () {
+ return {
+ restrict: 'E',
+ template: template,
+ scope: {},
+ bindToController: true,
+ controllerAs: 'wizard',
+ controller: function ($scope, AppState, safeConfirm, kbnUrl) {
+ var $state = this.state = new AppState();
+ var totalSteps = 4;
+ this.stepResults = {};
+
+ this.setCurrentStep = (step) => {
+ if (!this.complete) {
+ $state.currentStep = step;
+ $state.save();
+ }
+ };
+ this.setCurrentStep(0);
+
+ this.nextStep = () => {
+ if ($state.currentStep + 1 < totalSteps) {
+ this.setCurrentStep($state.currentStep + 1);
+ }
+ else if ($state.currentStep + 1 === totalSteps) {
+ kbnUrl.change('/discover');
+ }
+ };
+ this.prevStep = () => {
+ if ($state.currentStep > 0) {
+ this.setCurrentStep($state.currentStep - 1);
+ }
+ };
+
+ $scope.$watch('wizard.state.currentStep', (newValue, oldValue) => {
+ if (this.complete) {
+ $state.currentStep = totalSteps - 1;
+ $state.save();
+ return;
+ }
+ if (newValue + 1 === totalSteps) {
+ this.complete = true;
+ }
+ if (newValue < oldValue) {
+ return safeConfirm('Going back will reset any changes you\'ve made to this step, do you want to continue?')
+ .then(
+ () => {
+ if ($state.currentStep < 1) {
+ delete this.stepResults.pipeline;
+ }
+ if ($state.currentStep < 2) {
+ delete this.stepResults.indexPattern;
+ }
+ this.currentStep = newValue;
+ },
+ () => {
+ $state.currentStep = oldValue;
+ $state.save();
+ }
+ );
+ }
+ else {
+ this.currentStep = newValue;
+ }
+ });
+ }
+ };
+});
diff --git a/src/plugins/kibana/public/settings/sections/indices/filebeat/index.html b/src/plugins/kibana/public/settings/sections/indices/filebeat/index.html
new file mode 100644
index 000000000000..714999f29e36
--- /dev/null
+++ b/src/plugins/kibana/public/settings/sections/indices/filebeat/index.html
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/src/plugins/kibana/public/settings/sections/indices/filebeat/index.js b/src/plugins/kibana/public/settings/sections/indices/filebeat/index.js
new file mode 100644
index 000000000000..bc3859e9b1c3
--- /dev/null
+++ b/src/plugins/kibana/public/settings/sections/indices/filebeat/index.js
@@ -0,0 +1,8 @@
+var routes = require('ui/routes');
+var template = require('plugins/kibana/settings/sections/indices/filebeat/index.html');
+
+require('plugins/kibana/settings/sections/indices/filebeat/directives/filebeat_wizard');
+
+routes.when('/settings/indices/create/filebeat', {
+ template: template
+});
diff --git a/src/plugins/kibana/public/settings/sections/indices/index.html b/src/plugins/kibana/public/settings/sections/indices/index.html
index 15809f900a47..245753e76218 100644
--- a/src/plugins/kibana/public/settings/sections/indices/index.html
+++ b/src/plugins/kibana/public/settings/sections/indices/index.html
@@ -1,38 +1,25 @@
-
+
+
+
+
-
+
+
+ Pick this option if you already have data in Elasticsearch.
+
+
+
+
+ Pick this option if you have log file data you'd like to send to Elasticsearch.
+
+
+
+
diff --git a/src/plugins/kibana/public/settings/sections/indices/index.js b/src/plugins/kibana/public/settings/sections/indices/index.js
index b3588ef40bd7..fc96a0d24da9 100644
--- a/src/plugins/kibana/public/settings/sections/indices/index.js
+++ b/src/plugins/kibana/public/settings/sections/indices/index.js
@@ -1,7 +1,9 @@
define(function (require) {
var _ = require('lodash');
+ require('plugins/kibana/settings/sections/indices/directives/kbn_settings_indices');
require('plugins/kibana/settings/sections/indices/_create');
+ require('plugins/kibana/settings/sections/indices/filebeat/index');
require('plugins/kibana/settings/sections/indices/_edit');
require('plugins/kibana/settings/sections/indices/_field_editor');
@@ -15,37 +17,14 @@ define(function (require) {
}
});
- // wrapper directive, which sets some global stuff up like the left nav
- require('ui/modules').get('apps/settings')
- .directive('kbnSettingsIndices', function ($route, config, kbnUrl) {
- return {
- restrict: 'E',
- transclude: true,
- template: require('plugins/kibana/settings/sections/indices/index.html'),
- link: function ($scope) {
- $scope.edittingId = $route.current.params.indexPatternId;
- config.$bind($scope, 'defaultIndex');
-
- $scope.$watch('defaultIndex', function () {
- var ids = $route.current.locals.indexPatternIds;
- $scope.indexPatternList = ids.map(function (id) {
- return {
- id: id,
- url: kbnUrl.eval('#/settings/indices/{{id}}', {id: id}),
- class: 'sidebar-item-title ' + ($scope.edittingId === id ? 'active' : ''),
- default: $scope.defaultIndex === id
- };
- });
- });
-
- $scope.$emit('application.load');
- }
- };
- });
+ require('ui/routes')
+ .when('/settings/indices', {
+ template: require('plugins/kibana/settings/sections/indices/index.html')
+ });
return {
name: 'indices',
display: 'Indices',
- url: '#/settings/indices',
+ url: '#/settings/indices'
};
});
diff --git a/src/plugins/kibana/public/settings/sections/indices/partials/_edit_field_type.html b/src/plugins/kibana/public/settings/sections/indices/partials/_edit_field_type.html
new file mode 100644
index 000000000000..b80ded8219f1
--- /dev/null
+++ b/src/plugins/kibana/public/settings/sections/indices/partials/_edit_field_type.html
@@ -0,0 +1,13 @@
+
+ string
+ number
+ boolean
+ date
+ geo_point
+ geo_shape
+ ip
+
+
+
+ geo_point
+
diff --git a/src/plugins/kibana/public/settings/styles/main.less b/src/plugins/kibana/public/settings/styles/main.less
index ef10f7317faa..7cf4bbc16a0b 100644
--- a/src/plugins/kibana/public/settings/styles/main.less
+++ b/src/plugins/kibana/public/settings/styles/main.less
@@ -186,3 +186,51 @@ kbn-settings-indices {
.kbn-settings-indices-create {
.time-and-pattern > div {}
}
+
+.wizard-step-headings{
+ margin-top: 1em;
+
+ .wizard-step-heading {
+ font-size: 1.5em;
+ padding-right: 1.5em;
+
+ &.active {
+ cursor: default;
+ font-weight: bold;
+ }
+ &.aheadActive {
+ cursor: default;
+ font-weight: 300;
+ }
+ }
+
+ &.complete {
+ .wizard-step-heading:not(.active) {
+ color: #dddddd;
+ cursor: default;
+ }
+ }
+}
+
+.wizard-step-title {
+ padding-bottom: 1em;
+}
+
+.pattern-review {
+ .time-field-input {
+ padding-left: 1em;
+ margin-bottom: 0;
+ }
+
+ .pattern-input {
+ width: 300px;
+ }
+}
+
+.paste-samples {
+ textarea {
+ width: 100%;
+ height: 250px;
+ }
+}
+
diff --git a/src/ui/public/index_patterns/_field.js b/src/ui/public/index_patterns/_field.js
index caabb8a1d08c..0ff09177467b 100644
--- a/src/ui/public/index_patterns/_field.js
+++ b/src/ui/public/index_patterns/_field.js
@@ -69,7 +69,7 @@ define(function (require) {
}
Field.prototype.routes = {
- edit: '/settings/indices/{{indexPattern.id}}/field/{{name}}'
+ edit: '/settings/indices/edit/{{indexPattern.id}}/field/{{name}}'
};
return Field;
diff --git a/src/ui/public/index_patterns/_index_pattern.js b/src/ui/public/index_patterns/_index_pattern.js
index d99f67ff607b..833a436d2c8b 100644
--- a/src/ui/public/index_patterns/_index_pattern.js
+++ b/src/ui/public/index_patterns/_index_pattern.js
@@ -314,10 +314,10 @@ define(function (require) {
}
IndexPattern.prototype.routes = {
- edit: '/settings/indices/{{id}}',
- addField: '/settings/indices/{{id}}/create-field',
- indexedFields: '/settings/indices/{{id}}?_a=(tab:indexedFields)',
- scriptedFields: '/settings/indices/{{id}}?_a=(tab:scriptedFields)'
+ edit: '/settings/indices/edit/{{id}}',
+ addField: '/settings/indices/edit/{{id}}/create-field',
+ indexedFields: '/settings/indices/edit/{{id}}?_a=(tab:indexedFields)',
+ scriptedFields: '/settings/indices/edit/{{id}}?_a=(tab:scriptedFields)'
};
return IndexPattern;
diff --git a/src/ui/public/state_management/state.js b/src/ui/public/state_management/state.js
index 1c0c91ed003c..64e202d6e41b 100644
--- a/src/ui/public/state_management/state.js
+++ b/src/ui/public/state_management/state.js
@@ -23,7 +23,7 @@ define(function (require) {
self.fetch();
}),
- // begining of full route update, new app will be initialized before
+ // beginning of full route update, new app will be initialized before
// $routeChangeSuccess or $routeChangeError
$rootScope.$on('$routeChangeStart', function () {
if (self._persistAcrossApps) {
@@ -136,8 +136,8 @@ define(function (require) {
* @returns {void}
*/
State.prototype.destroy = function () {
- this.off(); // removes all listners
- this._cleanUpListeners(); // Removes the $routeUpdate listner
+ this.off(); // removes all listeners
+ this._cleanUpListeners(); // Removes the $routeUpdate listener
};
State.prototype.setDefaults = function (defaults) {
diff --git a/src/ui/public/time_buckets/time_buckets.js b/src/ui/public/time_buckets/time_buckets.js
index 1d2449d84a91..71faa411f91d 100644
--- a/src/ui/public/time_buckets/time_buckets.js
+++ b/src/ui/public/time_buckets/time_buckets.js
@@ -88,9 +88,9 @@ define(function (require) {
/**
* Return the current bounds, if we have any.
*
- * THIS DOES NOT CLONE THE BOUNDS, so editting them
+ * THIS DOES NOT CLONE THE BOUNDS, so editing them
* may have unexpected side-effects. Always
- * call bounds.min.clone() before editting
+ * call bounds.min.clone() before editing
*
* @return {object|undefined} - If bounds are not defined, this
* returns undefined, else it returns the bounds
diff --git a/test/functional/apps/discover/_collapse_expand.js b/test/functional/apps/discover/_collapse_expand.js
index 5e271d29724b..ec16a5b2d484 100644
--- a/test/functional/apps/discover/_collapse_expand.js
+++ b/test/functional/apps/discover/_collapse_expand.js
@@ -32,7 +32,7 @@ define(function (require) {
})
.then(function (navigateTo) {
common.debug('navigateTo');
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
})
.then(function () {
common.debug('createIndexPattern');
diff --git a/test/functional/apps/discover/_discover.js b/test/functional/apps/discover/_discover.js
index 44525ad24d45..fd7cf3a1055b 100644
--- a/test/functional/apps/discover/_discover.js
+++ b/test/functional/apps/discover/_discover.js
@@ -28,7 +28,7 @@ define(function (require) {
})
.then(function (navigateTo) {
common.debug('navigateTo');
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
})
.then(function () {
common.debug('createIndexPattern');
diff --git a/test/functional/apps/discover/_field_data.js b/test/functional/apps/discover/_field_data.js
index c36ae8e0fcae..0089ac6b3b7d 100644
--- a/test/functional/apps/discover/_field_data.js
+++ b/test/functional/apps/discover/_field_data.js
@@ -28,7 +28,7 @@ define(function (require) {
})
.then(function (navigateTo) {
common.debug('navigateTo');
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
})
.then(function () {
common.debug('createIndexPattern');
diff --git a/test/functional/apps/discover/_shared_links.js b/test/functional/apps/discover/_shared_links.js
index f590cc2dd44c..366b35fc4e67 100644
--- a/test/functional/apps/discover/_shared_links.js
+++ b/test/functional/apps/discover/_shared_links.js
@@ -37,7 +37,7 @@ define(function (require) {
})
.then(function (navigateTo) {
common.debug('navigateTo');
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
})
.then(function () {
common.debug('createIndexPattern');
diff --git a/test/functional/apps/settings/_advanced_settings.js b/test/functional/apps/settings/_advanced_settings.js
index 6a39e5654b52..eee2b9c32418 100644
--- a/test/functional/apps/settings/_advanced_settings.js
+++ b/test/functional/apps/settings/_advanced_settings.js
@@ -14,7 +14,7 @@ define(function (require) {
return scenarioManager.reload('emptyKibana')
.then(function () {
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
});
});
diff --git a/test/functional/apps/settings/_creation_form_changes.js b/test/functional/apps/settings/_creation_form_changes.js
index b6451f9b0159..d493b0ef3a3a 100644
--- a/test/functional/apps/settings/_creation_form_changes.js
+++ b/test/functional/apps/settings/_creation_form_changes.js
@@ -16,7 +16,7 @@ define(function (require) {
bdd.beforeEach(function () {
return scenarioManager.reload('emptyKibana')
.then(function () {
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
});
});
diff --git a/test/functional/apps/settings/_index_pattern_create_delete.js b/test/functional/apps/settings/_index_pattern_create_delete.js
index 294e187a6170..50252e46c475 100644
--- a/test/functional/apps/settings/_index_pattern_create_delete.js
+++ b/test/functional/apps/settings/_index_pattern_create_delete.js
@@ -16,7 +16,7 @@ define(function (require) {
return scenarioManager.reload('emptyKibana')
.then(function () {
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
});
});
@@ -81,9 +81,9 @@ define(function (require) {
});
});
- bdd.it('should return to index pattern creation page', function returnToPage() {
+ bdd.it('should return to the add data landing page', function returnToPage() {
return common.tryForTime(5000, function () {
- return settingsPage.getCreateButton();
+ return common.findTestSubject('addData');
})
.catch(common.handleError(this));
});
diff --git a/test/functional/apps/settings/_index_pattern_popularity.js b/test/functional/apps/settings/_index_pattern_popularity.js
index 42ec83f3e814..bc93b4847fb1 100644
--- a/test/functional/apps/settings/_index_pattern_popularity.js
+++ b/test/functional/apps/settings/_index_pattern_popularity.js
@@ -16,7 +16,7 @@ define(function (require) {
return scenarioManager.reload('emptyKibana')
.then(function () {
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
});
});
@@ -25,7 +25,7 @@ define(function (require) {
});
bdd.afterEach(function ae() {
- return settingsPage.removeIndexPattern();
+ return settingsPage.removeIndexPattern().then(settingsPage.clickExistingIndicesAddDataLink);
});
bdd.describe('change popularity', function indexPatternCreation() {
diff --git a/test/functional/apps/settings/_index_pattern_results_sort.js b/test/functional/apps/settings/_index_pattern_results_sort.js
index e91c0ebf6ac5..e1ee0202a75b 100644
--- a/test/functional/apps/settings/_index_pattern_results_sort.js
+++ b/test/functional/apps/settings/_index_pattern_results_sort.js
@@ -38,7 +38,7 @@ define(function (require) {
columns.forEach(function (col) {
bdd.describe('sort by heading - ' + col.heading, function indexPatternCreation() {
bdd.before(function () {
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
});
bdd.beforeEach(function () {
@@ -46,7 +46,7 @@ define(function (require) {
});
bdd.afterEach(function () {
- return settingsPage.removeIndexPattern();
+ return settingsPage.removeIndexPattern().then(settingsPage.clickExistingIndicesAddDataLink);
});
bdd.it('should sort ascending', function pageHeader() {
@@ -84,6 +84,7 @@ define(function (require) {
bdd.before(function () {
return settingsPage.navigateTo()
+ .then(settingsPage.clickExistingIndicesAddDataLink)
.then(function () {
return settingsPage.createIndexPattern();
});
diff --git a/test/functional/apps/settings/_initial_state.js b/test/functional/apps/settings/_initial_state.js
index a7d4f2b872eb..5770e95ce1f9 100644
--- a/test/functional/apps/settings/_initial_state.js
+++ b/test/functional/apps/settings/_initial_state.js
@@ -14,7 +14,7 @@ define(function (require) {
return scenarioManager.reload('emptyKibana')
.then(function () {
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
});
});
diff --git a/test/functional/apps/visualize/_area_chart.js b/test/functional/apps/visualize/_area_chart.js
index a456dfec3ed7..94d05758e9b8 100644
--- a/test/functional/apps/visualize/_area_chart.js
+++ b/test/functional/apps/visualize/_area_chart.js
@@ -31,7 +31,7 @@ define(function (require) {
return scenarioManager.reload('emptyKibana')
.then(function () {
common.debug('navigateTo');
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
})
.then(function () {
common.debug('createIndexPattern');
diff --git a/test/functional/apps/visualize/_chart_types.js b/test/functional/apps/visualize/_chart_types.js
index 6da1462ec25f..e60f27b1604c 100644
--- a/test/functional/apps/visualize/_chart_types.js
+++ b/test/functional/apps/visualize/_chart_types.js
@@ -18,7 +18,7 @@ define(function (require) {
return scenarioManager.reload('emptyKibana')
.then(function () {
common.debug('navigateTo');
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
})
.then(function () {
common.debug('createIndexPattern');
diff --git a/test/functional/apps/visualize/_data_table.js b/test/functional/apps/visualize/_data_table.js
index 0f4e3a4faaa7..aa494d7c677d 100644
--- a/test/functional/apps/visualize/_data_table.js
+++ b/test/functional/apps/visualize/_data_table.js
@@ -31,7 +31,7 @@ define(function (require) {
return scenarioManager.reload('emptyKibana')
.then(function () {
common.debug('navigateTo');
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
})
.then(function () {
common.debug('createIndexPattern');
diff --git a/test/functional/apps/visualize/_line_chart.js b/test/functional/apps/visualize/_line_chart.js
index 539758e69bb6..2f7e813468ab 100644
--- a/test/functional/apps/visualize/_line_chart.js
+++ b/test/functional/apps/visualize/_line_chart.js
@@ -28,7 +28,7 @@ define(function (require) {
return scenarioManager.reload('emptyKibana')
.then(function () {
common.debug('navigateTo');
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
})
.then(function () {
common.debug('createIndexPattern');
diff --git a/test/functional/apps/visualize/_metric_chart.js b/test/functional/apps/visualize/_metric_chart.js
index 728784784507..7365fabdcbc3 100644
--- a/test/functional/apps/visualize/_metric_chart.js
+++ b/test/functional/apps/visualize/_metric_chart.js
@@ -34,7 +34,7 @@ define(function (require) {
return scenarioManager.reload('emptyKibana')
.then(function () {
common.debug('navigateTo');
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
})
.then(function () {
common.debug('createIndexPattern');
diff --git a/test/functional/apps/visualize/_pie_chart.js b/test/functional/apps/visualize/_pie_chart.js
index 5490fe6af3a1..4aa94692fe9b 100644
--- a/test/functional/apps/visualize/_pie_chart.js
+++ b/test/functional/apps/visualize/_pie_chart.js
@@ -28,7 +28,7 @@ define(function (require) {
return scenarioManager.reload('emptyKibana')
.then(function () {
common.debug('navigateTo');
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
})
.then(function () {
common.debug('createIndexPattern');
diff --git a/test/functional/apps/visualize/_tile_map.js b/test/functional/apps/visualize/_tile_map.js
index bea797df399e..4e22b92e2a26 100644
--- a/test/functional/apps/visualize/_tile_map.js
+++ b/test/functional/apps/visualize/_tile_map.js
@@ -30,7 +30,7 @@ define(function (require) {
return scenarioManager.reload('emptyKibana')
.then(function () {
common.debug('navigateTo');
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
})
.then(function () {
common.debug('createIndexPattern');
diff --git a/test/functional/apps/visualize/_vertical_bar_chart.js b/test/functional/apps/visualize/_vertical_bar_chart.js
index 7f9d942deb0a..c6ae977fe3fa 100644
--- a/test/functional/apps/visualize/_vertical_bar_chart.js
+++ b/test/functional/apps/visualize/_vertical_bar_chart.js
@@ -30,7 +30,7 @@ define(function (require) {
return scenarioManager.reload('emptyKibana')
.then(function () {
common.debug('navigateTo');
- return settingsPage.navigateTo();
+ return settingsPage.navigateTo().then(settingsPage.clickExistingIndicesAddDataLink);
})
.then(function () {
common.debug('createIndexPattern');
diff --git a/test/support/pages/settings_page.js b/test/support/pages/settings_page.js
index 871d7081a9d3..1ade61c8c81d 100644
--- a/test/support/pages/settings_page.js
+++ b/test/support/pages/settings_page.js
@@ -20,6 +20,10 @@ define(function (require) {
return common.findTestSubject('settingsNav advanced').click();
},
+ clickExistingIndicesAddDataLink: function () {
+ return common.findTestSubject('addData existingIndices').click();
+ },
+
setAdvancedSettings: function setAdvancedSettings(propertyName, propertyValue) {
var self = this;
return common.findTestSubject('advancedSetting&' + propertyName + ' editButton')
@@ -126,13 +130,11 @@ define(function (require) {
},
getCreateButton: function () {
- return this.remote.setFindTimeout(defaultTimeout)
- .findByCssSelector('.btn');
+ return common.findTestSubject('submitCreateIndexPatternFromExistingForm');
},
clickCreateButton: function () {
- return this.remote.setFindTimeout(defaultTimeout)
- .findByCssSelector('.btn').click();
+ return common.findTestSubject('submitCreateIndexPatternFromExistingForm').click();
},
clickDefaultIndexButton: function () {
@@ -305,17 +307,17 @@ define(function (require) {
return common.tryForTime(defaultTimeout, function () {
return self.selectTimeFieldOption('@timestamp')
.then(function () {
- return self.getCreateButton().click();
+ return self.clickCreateButton();
});
})
.then(function () {
return common.tryForTime(defaultTimeout, function () {
- return self.remote.getCurrentUrl()
- .then(function (currentUrl) {
- if (!currentUrl.match(/indices\/.+\?/)) {
+ return common.findTestSubject('editIndexPattern')
+ .then(function (editPatternContainer) {
+ if (!editPatternContainer) {
throw new Error('Index pattern not created');
} else {
- common.debug('Index pattern created: ' + currentUrl);
+ common.debug('Index pattern created');
}
});
});