Skip to content

Commit

Permalink
Reordering fields to enable smoother path through form (#9991)
Browse files Browse the repository at this point in the history
* Reordering fields to closely follow previous field choices

* Moving deprecated choice field to end of form.

* Forgot to move related section

* Always show "Time-field name" field when index is time-based

* Only require the field when it's not disabled
  • Loading branch information
ycombinator authored Jan 30, 2017
1 parent 0972f2d commit 48604eb
Showing 1 changed file with 63 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,6 @@ <h1>Configure an index pattern</h1>
</div>
<div>
<form name="form" role="form" class="well" ng-submit="createIndexPattern()">
<div class="form-group time-and-pattern">
<label>
<input
ng-model="index.isTimeBased"
type="checkbox">
Index contains time-based events
</label>
<br>
<label ng-if="index.isTimeBased">
<input ng-model="index.nameIsPattern" type="checkbox">
Use event times to create index names <small>[DEPRECATED]</small>
</label>
</div>

<div class="form-group" ng-if="index.isTimeBased && index.nameIsPattern">
<div class="alert alert-warning">
<h4>Time-interval based index patterns are deprecated!</h4>
<p>
We <strong>strongly recommend</strong> using wildcard pattern names instead of
time-interval based index patterns.
</p>
<p>
Kibana is now smart enough to automatically determine which
indices to search against within the current time range for
wildcard index patterns. This means that wildcard
index patterns now get the same performance optimizations when
searching within a time range as time-interval patterns.
</p>
</div>
<label>
Index pattern interval&nbsp;
<kbn-info info="The interval at which index names rotate."></kbn-info>
</label>
<select
required
ng-options="opt.display for opt in index.nameIntervalOptions"
ng-model="index.nameInterval"
class="form-control">
</select>
</div>

<div class="form-group">
<label>
Index name or pattern
Expand All @@ -74,6 +33,35 @@ <h4>Time-interval based index patterns are deprecated!</h4>
</small>
</div>

<div class="form-group time-and-pattern">
<label>
<input
ng-model="index.isTimeBased"
type="checkbox">
Index contains time-based events
</label>
</div>

<div class="form-group" ng-if="index.isTimeBased">
<label>
Time-field name
&nbsp;
<kbn-info info="This field will be used to filter events with the global time filter"></kbn-info>
&nbsp;
<small>
<a ng-click="refreshFieldList();"> refresh fields</a>
</small>
</label>
<select
ng-disabled="index.fetchFieldsError"
ng-required="!index.fetchFieldsError"
ng-options="field.name for field in index.dateFields"
ng-model="index.timeField"
auto-select-if-only-one="index.dateFields"
class="form-control">
</select>
</div>

<div class="form-group" ng-if="canExpandIndices()">
<label>
<input ng-model="index.notExpandable" type="checkbox">
Expand Down Expand Up @@ -104,6 +92,40 @@ <h4>Time-interval based index patterns are deprecated!</h4>
</p>
</div>

<div class="form-group time-and-pattern">
<label ng-if="index.isTimeBased">
<input ng-model="index.nameIsPattern" type="checkbox">
Use event times to create index names <small>[DEPRECATED]</small>
</label>
</div>

<div class="form-group" ng-if="index.isTimeBased && index.nameIsPattern">
<div class="alert alert-warning">
<h4>Time-interval based index patterns are deprecated!</h4>
<p>
We <strong>strongly recommend</strong> using wildcard pattern names instead of
time-interval based index patterns.
</p>
<p>
Kibana is now smart enough to automatically determine which
indices to search against within the current time range for
wildcard index patterns. This means that wildcard
index patterns now get the same performance optimizations when
searching within a time range as time-interval patterns.
</p>
</div>
<label>
Index pattern interval&nbsp;
<kbn-info info="The interval at which index names rotate."></kbn-info>
</label>
<select
required
ng-options="opt.display for opt in index.nameIntervalOptions"
ng-model="index.nameInterval"
class="form-control">
</select>
</div>

<section>
<div class="alert alert-danger" ng-repeat="err in index.patternErrors">
{{err}}
Expand Down Expand Up @@ -147,26 +169,6 @@ <h4>Time-interval based index patterns are deprecated!</h4>
</div>
</section>

<div class="form-group" ng-if="index.isTimeBased && !index.fetchFieldsError">
<label>
Time-field name
&nbsp;
<kbn-info info="This field will be used to filter events with the global time filter"></kbn-info>
&nbsp;
<small>
<a ng-click="refreshFieldList();"> refresh fields</a>
</small>
</label>
<select
required
ng-if="!index.fetchFieldsError"
ng-options="field.name for field in index.dateFields"
ng-model="index.timeField"
auto-select-if-only-one="index.dateFields"
class="form-control">
</select>
</div>

<button
data-test-subj="submitCreateIndexPatternFromExistingForm"
ng-disabled="form.$invalid || index.fetchFieldsError"
Expand Down

0 comments on commit 48604eb

Please sign in to comment.