Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filebeat wizard #5790

Merged
merged 29 commits into from
Feb 2, 2016
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2672b72
beginning to play with jsdata
Bargs Dec 29, 2015
6b2a525
Add exception for unneeded lib since we're using js-data-angular
Bargs Dec 29, 2015
f1f0eab
starting to work on pattern creation UI
Bargs Dec 29, 2015
518b9a3
remove per page limit
Bargs Dec 29, 2015
dcb5e5a
starting a simple wizard controller with placeholder steps
Bargs Dec 30, 2015
52a4ee3
add breadcrumb to wizard
Bargs Dec 30, 2015
8b5c95d
demonstrating flow of data through the wizard steps
Bargs Dec 30, 2015
50f4652
Merge branch 'feature/ingest' into filebeatWizard
Bargs Jan 12, 2016
db8014c
Simplifying communication between wizard and the step directives
Bargs Jan 12, 2016
ede8ef6
Disabling navigation buttons until each step is complete and adding s…
Bargs Jan 12, 2016
c5c85b7
Merge branch 'feature/ingest' into filebeatWizard
Bargs Jan 13, 2016
25a4e91
Merge branch 'ingest/addDataStart' into filebeatWizard
Bargs Jan 20, 2016
b7ddd7e
move filebeat wizard under settings/indices
Bargs Jan 20, 2016
70e21a2
make filebeat wizard layout more consistent with the create index pat…
Bargs Jan 20, 2016
6690e59
Merge branch 'ingest/addDataStart' into filebeatWizard
Bargs Jan 22, 2016
35bd6f4
Use AppState to keep track of current step in the filebeat wizard
Bargs Jan 22, 2016
20b1e6e
Delete changes to current step when navigating backwards, warning the…
Bargs Jan 22, 2016
38a5ef0
Make the step headings clickable
Bargs Jan 22, 2016
43e44d1
Merge branch 'ingest/addDataStart' into filebeatWizard
Bargs Jan 22, 2016
47609ea
remove jsdata files
Bargs Jan 23, 2016
f93707b
update the filebeat wizard url to match the existing index pattern cr…
Bargs Jan 23, 2016
a74b213
Merge branch 'ingest/addDataStart' into filebeatWizard
Bargs Jan 25, 2016
a76b5ec
Remove unnecessary controller that got copy pasted
Bargs Jan 25, 2016
54af347
Merge branch 'feature/ingest' into filebeatWizard
Bargs Jan 26, 2016
2e112f5
Convert filebeat wizard into a directive
Bargs Feb 2, 2016
e84b028
don't allow users to navigate back through the wizard after clicking …
Bargs Feb 2, 2016
911cc51
better wording for tail a file description
Bargs Feb 2, 2016
770b51a
Merge branch 'feature/ingest' into filebeatWizard
Bargs Feb 2, 2016
9748328
update new tests to work with add data landing page
Bargs Feb 2, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@
"jade-loader": "0.7.1",
"joi": "6.6.1",
"jquery": "2.1.4",
"js-data": "2.8.2",
"js-data-angular": "3.1.0",
"js-yaml": "3.4.1",
"json-loader": "0.5.3",
"json-stringify-safe": "5.0.1",
Expand Down
2 changes: 2 additions & 0 deletions src/optimize/BaseOptimizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ class BaseOptimizer {
devtoolModuleFilenameTemplate: '[absolute-resource-path]'
},

externals: ['axios'],

recordsPath: resolve(this.env.workingDir, 'webpack.records'),

plugins: [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<h2>Install filebeat step</h2>

<div>
Results:
<ul>
<li>Logs: {{results[0]}}</li>
<li>Docs: {{results[1]}}</li>
<li>Pattern: {{results[2]}}</li>
</ul>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var modules = require('ui/modules');
var template = require('plugins/kibana/settings/sections/data/directives/install_filebeat_step.html');

modules.get('apps/settings')
.directive('installFilebeatStep', function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Who needs eslint when I've got spalinter?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:P

return {
template: template,
scope: {
results: '='
},
controller: function ($scope) {
var results = $scope.results;
}
};
});

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<h2>Paste samples step</h2>

<button ng-click="save({results: 'some sample logs'})">Do Stuff</button>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
var modules = require('ui/modules');
var template = require('plugins/kibana/settings/sections/data/directives/paste_samples_step.html');

modules.get('apps/settings')
.directive('pasteSamplesStep', function () {
return {
template: template,
scope: {
save: '&onSave'
}
};
});

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<h2>Pattern review step</h2>

<div>
Docs: {{docs}}
</div>

<button ng-click="save({results: {id: 'logstash-*', title: 'myFirstIndexPattern'}})">Create an index pattern</button>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var modules = require('ui/modules');
var template = require('plugins/kibana/settings/sections/data/directives/pattern_review_step.html');

modules.get('apps/settings')
.directive('patternReviewStep', function () {
return {
template: template,
scope: {
docs: '=',
save: '&onSave'
}
};
});

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<h2>Build pipeline step</h2>

<div>
Logs: {{logs}}
</div>

<button ng-click="save({results: {os: 'osx'}})">Build a pipeline</button>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var modules = require('ui/modules');
var template = require('plugins/kibana/settings/sections/data/directives/pipeline_step.html');

modules.get('apps/settings')
.directive('pipelineStep', function () {
return {
template: template,
scope: {
logs: '=',
save: '&onSave'
}
};
});

Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<kbn-settings-app section="data">
<div ng-controller="kbnSettingsDataFilebeat" class="container">
<div class="btn-group">
<button ng-class="{active: currentStep === 0}"
ng-click="setCurrentStep(0)">
Paste
</button>
<button ng-class="{active: currentStep === 1}"
ng-click="setCurrentStep(1)">
Parse
</button>
<button ng-class="{active: currentStep === 2}"
ng-click="setCurrentStep(2)">
Review
</button>
<button ng-class="{active: currentStep === 3}"
ng-click="setCurrentStep(3)">
Install Filebeat
</button>
</div>

<div ng-switch="currentStep">
<paste-samples-step on-save="saveStepResults(0, results)" ng-switch-when="0"></paste-samples-step>
<pipeline-step on-save="saveStepResults(1, results)" logs="stepResults[0]" ng-switch-when="1"></pipeline-step>
<pattern-review-step on-save="saveStepResults(2, results)" docs="stepResults[1]" ng-switch-when="2"></pattern-review-step>
<install-filebeat-step results="stepResults" ng-switch-when="3"></install-filebeat-step>
</div>

<button ng-click="prevStep()">Prev</button>
<button ng-click="nextStep()">Next</button>
</div>
</kbn-settings-app>
38 changes: 38 additions & 0 deletions src/plugins/kibana/public/settings/sections/data/filebeat/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
var routes = require('ui/routes');
var modules = require('ui/modules');
var template = require('plugins/kibana/settings/sections/data/filebeat/index.html');

require('plugins/kibana/settings/sections/data/directives/pattern_review_step');
require('plugins/kibana/settings/sections/data/directives/paste_samples_step');
require('plugins/kibana/settings/sections/data/directives/pipeline_step');
require('plugins/kibana/settings/sections/data/directives/install_filebeat_step');

routes.when('/settings/data/filebeat', {
template: template
});

// wrapper directive, which sets up the breadcrumb for all filebeat steps
modules.get('apps/settings')
.controller('kbnSettingsDataFilebeat', function ($scope) {
var totalSteps = 4;
$scope.currentStep = 0;
$scope.stepResults = [];

$scope.nextStep = function () {
if ($scope.currentStep + 1 < totalSteps) {
++$scope.currentStep;
}
};
$scope.prevStep = function () {
if ($scope.currentStep > 0) {
--$scope.currentStep;
}
};
$scope.setCurrentStep = function (step) {
$scope.currentStep = step;
};

$scope.saveStepResults = function (step, results) {
$scope.stepResults[step] = results;
};
});
5 changes: 5 additions & 0 deletions src/plugins/kibana/public/settings/sections/data/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<kbn-settings-app section="data">
<div class="container">
<a ng-href="#/settings/data/filebeat">Tail a file</a>
</div>
</kbn-settings-app>
12 changes: 12 additions & 0 deletions src/plugins/kibana/public/settings/sections/data/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require('plugins/kibana/settings/sections/data/filebeat/index');

require('ui/routes')
.when('/settings/data', {
template: require('plugins/kibana/settings/sections/data/index.html')
});

module.exports = {
name: 'data',
display: 'Data',
url: '#/settings/data'
};
1 change: 1 addition & 0 deletions src/plugins/kibana/public/settings/sections/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ define(function (require) {
// are used to create the nav bar
return [
require('plugins/kibana/settings/sections/indices/index'),
require('plugins/kibana/settings/sections/data/index'),
require('plugins/kibana/settings/sections/advanced/index'),
require('plugins/kibana/settings/sections/objects/index'),
require('plugins/kibana/settings/sections/status/index'),
Expand Down
6 changes: 6 additions & 0 deletions src/ui/public/store/store.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import modules from 'ui/modules';
const module = modules.get('kibana', [require('js-data-angular')]);

export default function storeProvider(DS) {
return DS;
}