Skip to content

Commit

Permalink
Update doc table when auto refresh contains doc updates
Browse files Browse the repository at this point in the history
Backports PR #10385

**Commit 1:**
Adds document version to doc table's track_by

* Original sha: 747b8ed
* Authored by Matthew Bargar <[email protected]> on 2017-02-15T22:13:04Z

**Commit 2:**
Add version to dashboard search source as well

* Original sha: 2cd0f31
* Authored by Matthew Bargar <[email protected]> on 2017-02-17T17:45:39Z

**Commit 3:**
Add version to context queries

* Original sha: 2db1c09
* Authored by Matthew Bargar <[email protected]> on 2017-02-28T16:17:43Z
  • Loading branch information
elastic-jasper committed Mar 3, 2017
1 parent 1cdf106 commit 076ca12
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/core_plugins/kibana/public/context/api/utils/queries.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
function createAnchorQueryBody(uid, contextSort) {
return {
_source: true,
version: true,
query: {
terms: {
_uid: [uid],
Expand All @@ -13,6 +14,7 @@ function createAnchorQueryBody(uid, contextSort) {
function createSuccessorsQueryBody(anchorSortValues, contextSort, size) {
return {
_source: true,
version: true,
query: {
match_all: {},
},
Expand Down
1 change: 1 addition & 0 deletions src/core_plugins/kibana/public/dashboard/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ app.directive('dashboardApp', function (Notifier, courier, AppState, timefilter,

timefilter.enabled = true;
dash.searchSource.highlightAll(true);
dash.searchSource.version(true);
courier.setRootSearchSource(dash.searchSource);

// Following the "best practice" of always have a '.' in your ng-models –
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ function discoverController($scope, config, courier, $route, $window, Notifier,
$scope.indexPattern = resolveIndexPatternLoading();
$scope.searchSource
.set('index', $scope.indexPattern)
.highlightAll(true);
.highlightAll(true)
.version(true);

if (savedSearch.id) {
docTitle.change(savedSearch.title);
Expand Down
3 changes: 2 additions & 1 deletion src/ui/public/courier/data_source/search_source.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ export default function SearchSourceFactory(Promise, Private, config) {
'aggs',
'from',
'size',
'source'
'source',
'version'
];

SearchSource.prototype.index = function (indexPattern) {
Expand Down
4 changes: 2 additions & 2 deletions src/ui/public/doc_table/doc_table.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
sorting="sorting">
</thead>
<tbody>
<tr ng-repeat="row in page|limitTo:limit track by row._index+row._type+row._id+row._score"
<tr ng-repeat="row in page|limitTo:limit track by row._index+row._type+row._id+row._score+row._version"
kbn-table-row="row"
columns="columns"
sorting="sorting"
Expand All @@ -30,7 +30,7 @@
sorting="sorting">
</thead>
<tbody>
<tr ng-repeat="row in hits|limitTo:limit track by row._index+row._type+row._id+row._score"
<tr ng-repeat="row in hits|limitTo:limit track by row._index+row._type+row._id+row._score+row._version"
kbn-table-row="row"
columns="columns"
sorting="sorting"
Expand Down

0 comments on commit 076ca12

Please sign in to comment.