Skip to content

Commit

Permalink
Merge pull request #2291 from simianhacker/fix-2285
Browse files Browse the repository at this point in the history
Closes #2285 - Reloading the route when the index pattern changes to ens...
  • Loading branch information
simianhacker committed Dec 12, 2014
2 parents 2be0708 + 6e86aa7 commit 04ddc74
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/kibana/plugins/discover/controllers/discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@ define(function (require) {
index: $state.index,
savedSearch: savedSearch,
indexPatternList: indexPatternList,
changeIndexAndReload: function () {
$state.index = $scope.opts.index;
$state.save();
$route.reload();
}
};

// stores the complete list of fields
Expand Down
4 changes: 2 additions & 2 deletions src/kibana/plugins/discover/partials/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
class="form-control"
ng-model="opts.index"
ng-options="id as id for id in opts.indexPatternList"
ng-change="opts.updateDataSource.then(opts.fetch())">
ng-change="opts.changeIndexAndReload()">
</select>
<small>
Time field: <strong>{{opts.timefield || 'not configured'}}</strong>
</small>
</div>
</div>
</div>
</div>

0 comments on commit 04ddc74

Please sign in to comment.