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

[7.3] Restore discover histogram selection triggering fetch (#43097) #43287

Merged
merged 3 commits into from
Aug 16, 2019
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -546,6 +546,7 @@ function discoverController(
$scope.$listen(timefilter, 'autoRefreshFetch', $scope.fetch);
$scope.$listen(timefilter, 'refreshIntervalUpdate', $scope.updateRefreshInterval);
$scope.$listen(timefilter, 'timeUpdate', $scope.updateTime);
$scope.$listen(timefilter, 'fetch', $scope.fetch);

$scope.$watchCollection('state.sort', function (sort) {
if (!sort) return;
Expand Down
8 changes: 5 additions & 3 deletions test/functional/apps/discover/_discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ export default function ({ getService, getPageObjects }) {
const time = await PageObjects.timePicker.getTimeConfig();
expect(time.start).to.be('Sep 20, 2015 @ 00:00:00.000');
expect(time.end).to.be('Sep 20, 2015 @ 03:00:00.000');
const rowData = await PageObjects.discover.getDocTableIndex(1);
expect(rowData).to.have.string('Sep 20, 2015 @ 02:57:03.761');
});

it('should modify the time range when the histogram is brushed', async function () {
Expand All @@ -156,9 +158,9 @@ export default function ({ getService, getPageObjects }) {
await PageObjects.visualize.waitForVisualization();

const newDurationHours = await PageObjects.timePicker.getTimeDurationInHours();
if (newDurationHours < 1 || newDurationHours >= 5) {
throw new Error(`expected new duration of ${newDurationHours} hours to be between 1 and 5 hours`);
}
expect(Math.round(newDurationHours)).to.be(3);
const rowData = await PageObjects.discover.getDocTableIndex(1);
expect(rowData).to.have.string('Sep 20, 2015 @ 02:51:53.327');

This comment was marked as outdated.

});

it('should show correct initial chart interval of Auto', async function () {
Expand Down