-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Filebeat wizard #5790
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 6b2a525
Add exception for unneeded lib since we're using js-data-angular
Bargs f1f0eab
starting to work on pattern creation UI
Bargs 518b9a3
remove per page limit
Bargs dcb5e5a
starting a simple wizard controller with placeholder steps
Bargs 52a4ee3
add breadcrumb to wizard
Bargs 8b5c95d
demonstrating flow of data through the wizard steps
Bargs 50f4652
Merge branch 'feature/ingest' into filebeatWizard
Bargs db8014c
Simplifying communication between wizard and the step directives
Bargs ede8ef6
Disabling navigation buttons until each step is complete and adding s…
Bargs c5c85b7
Merge branch 'feature/ingest' into filebeatWizard
Bargs 25a4e91
Merge branch 'ingest/addDataStart' into filebeatWizard
Bargs b7ddd7e
move filebeat wizard under settings/indices
Bargs 70e21a2
make filebeat wizard layout more consistent with the create index pat…
Bargs 6690e59
Merge branch 'ingest/addDataStart' into filebeatWizard
Bargs 35bd6f4
Use AppState to keep track of current step in the filebeat wizard
Bargs 20b1e6e
Delete changes to current step when navigating backwards, warning the…
Bargs 38a5ef0
Make the step headings clickable
Bargs 43e44d1
Merge branch 'ingest/addDataStart' into filebeatWizard
Bargs 47609ea
remove jsdata files
Bargs f93707b
update the filebeat wizard url to match the existing index pattern cr…
Bargs a74b213
Merge branch 'ingest/addDataStart' into filebeatWizard
Bargs a76b5ec
Remove unnecessary controller that got copy pasted
Bargs 54af347
Merge branch 'feature/ingest' into filebeatWizard
Bargs 2e112f5
Convert filebeat wizard into a directive
Bargs e84b028
don't allow users to navigate back through the wizard after clicking …
Bargs 911cc51
better wording for tail a file description
Bargs 770b51a
Merge branch 'feature/ingest' into filebeatWizard
Bargs 9748328
update new tests to work with add data landing page
Bargs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/plugins/kibana/public/settings/sections/data/directives/install_filebeat_step.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
16 changes: 16 additions & 0 deletions
16
src/plugins/kibana/public/settings/sections/data/directives/install_filebeat_step.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 () { | ||
return { | ||
template: template, | ||
scope: { | ||
results: '=' | ||
}, | ||
controller: function ($scope) { | ||
var results = $scope.results; | ||
} | ||
}; | ||
}); | ||
|
3 changes: 3 additions & 0 deletions
3
src/plugins/kibana/public/settings/sections/data/directives/paste_samples_step.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
13 changes: 13 additions & 0 deletions
13
src/plugins/kibana/public/settings/sections/data/directives/paste_samples_step.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
} | ||
}; | ||
}); | ||
|
7 changes: 7 additions & 0 deletions
7
src/plugins/kibana/public/settings/sections/data/directives/pattern_review_step.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
14 changes: 14 additions & 0 deletions
14
src/plugins/kibana/public/settings/sections/data/directives/pattern_review_step.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
} | ||
}; | ||
}); | ||
|
7 changes: 7 additions & 0 deletions
7
src/plugins/kibana/public/settings/sections/data/directives/pipeline_step.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
14 changes: 14 additions & 0 deletions
14
src/plugins/kibana/public/settings/sections/data/directives/pipeline_step.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
} | ||
}; | ||
}); | ||
|
32 changes: 32 additions & 0 deletions
32
src/plugins/kibana/public/settings/sections/data/filebeat/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
38
src/plugins/kibana/public/settings/sections/data/filebeat/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation :)
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:P