Skip to content
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

Update doc table when auto refresh contains doc updates #10385

Merged
merged 3 commits into from
Mar 3, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be added here? If not, then won't you have a similar issue to what you explained here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely, good catch. I also realized I needed to update the track by above the first one I changed. Updated.


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