Skip to content

Commit

Permalink
Remove pipeline creation step from CSV wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
Bargs committed May 12, 2016
1 parent 57c391a commit ed5e4e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,12 @@
<span ng-class="{active: wizard.currentStep === 1, aheadActive: wizard.currentStep < 1}"
class="wizard-step-heading"
ng-click="wizard.currentStep < 1 || wizard.setCurrentStep(1)">
2. Parse
2. Review
</span>
<span ng-class="{active: wizard.currentStep === 2, aheadActive: wizard.currentStep < 2}"
class="wizard-step-heading"
ng-click="wizard.currentStep < 2 || wizard.setCurrentStep(2)">
3. Review
</span>
<span ng-class="{active: wizard.currentStep === 3, aheadActive: wizard.currentStep < 3}"
class="wizard-step-heading"
ng-click="wizard.currentStep < 3 || wizard.setCurrentStep(3)">
4. Upload
3. Upload
</span>
</div>

Expand Down Expand Up @@ -47,35 +42,9 @@
</div>

<div ng-switch-when="1">
<pipeline-setup
pipeline="wizard.stepResults.pipeline"
samples="wizard.stepResults.samples">
</pipeline-setup>

<div class="wizard-nav-buttons">
<div>
<button
class="btn btn-secondary"
ng-click="wizard.prevStep()">
Prev
</button>
</div>
<div>
<button
class="btn btn-primary"
ng-click="wizard.nextStep()">
Next
</button>
</div>
<div></div>
</div>
</div>

<div ng-switch-when="2">
<pattern-review-step
index-pattern="wizard.stepResults.indexPattern"
pipeline="wizard.stepResults.pipeline"
sample-doc="wizard.stepResults.pipeline.output">
sample-doc="wizard.stepResults.samples[0]">
</pattern-review-step>

<div class="wizard-nav-buttons">
Expand All @@ -98,7 +67,7 @@
</div>
</div>

<div ng-switch-when="3">
<div ng-switch-when="2">
<upload-data-step results="wizard.stepResults"></upload-data-step>

<div class="wizard-nav-buttons">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ modules.get('apps/settings')
location: 'Add Data'
});

var totalSteps = 4;
var totalSteps = 3;
this.stepResults = {};

this.setCurrentStep = (step) => {
Expand All @@ -49,8 +49,7 @@ modules.get('apps/settings')
};

this.save = () => {
const processors = this.stepResults.pipeline.processors.map(processor => processor.model);
return ingest.save(this.stepResults.indexPattern, processors)
return ingest.save(this.stepResults.indexPattern)
.then(
() => {
this.nextStep();
Expand All @@ -76,9 +75,6 @@ modules.get('apps/settings')
.then(
() => {
if ($state.currentStep < 1) {
delete this.stepResults.pipeline;
}
if ($state.currentStep < 2) {
delete this.stepResults.indexPattern;
}
this.currentStep = newValue;
Expand Down

0 comments on commit ed5e4e3

Please sign in to comment.