forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix index pattern w/o timefield filter application (elastic#54757)
* fix index pattern w/o timefield filter application * add null check * Hide timefilter in editor only if timeFieldName is explicitly Co-authored-by: Elastic Machine <[email protected]>
- Loading branch information
1 parent
9b57897
commit d7b4809
Showing
5 changed files
with
103 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
test/functional/apps/visualize/_data_table_notimeindex_filters.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/* | ||
* Licensed to Elasticsearch B.V. under one or more contributor | ||
* license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright | ||
* ownership. Elasticsearch B.V. licenses this file to you under | ||
* the Apache License, Version 2.0 (the "License"); you may | ||
* not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import expect from '@kbn/expect'; | ||
|
||
export default function({ getService, getPageObjects }) { | ||
const log = getService('log'); | ||
const filterBar = getService('filterBar'); | ||
const renderable = getService('renderable'); | ||
const dashboardAddPanel = getService('dashboardAddPanel'); | ||
const PageObjects = getPageObjects(['common', 'visualize', 'header', 'dashboard', 'timePicker']); | ||
|
||
describe('data table with index without time filter filters', function indexPatternCreation() { | ||
const vizName1 = 'Visualization DataTable w/o time filter'; | ||
|
||
before(async function() { | ||
log.debug('navigateToApp visualize'); | ||
await PageObjects.visualize.navigateToNewVisualization(); | ||
log.debug('clickDataTable'); | ||
await PageObjects.visualize.clickDataTable(); | ||
log.debug('clickNewSearch'); | ||
await PageObjects.visualize.clickNewSearch( | ||
PageObjects.visualize.index.LOGSTASH_NON_TIME_BASED | ||
); | ||
log.debug('Bucket = Split Rows'); | ||
await PageObjects.visualize.clickBucket('Split rows'); | ||
log.debug('Aggregation = Histogram'); | ||
await PageObjects.visualize.selectAggregation('Histogram'); | ||
log.debug('Field = bytes'); | ||
await PageObjects.visualize.selectField('bytes'); | ||
log.debug('Interval = 2000'); | ||
await PageObjects.visualize.setNumericInterval('2000'); | ||
await PageObjects.visualize.clickGo(); | ||
}); | ||
|
||
it('should be able to save and load', async function() { | ||
await PageObjects.visualize.saveVisualizationExpectSuccessAndBreadcrumb(vizName1); | ||
|
||
await PageObjects.visualize.loadSavedVisualization(vizName1); | ||
await PageObjects.visualize.waitForVisualization(); | ||
}); | ||
|
||
it('timefilter should be disabled', async () => { | ||
const isOff = await PageObjects.timePicker.isOff(); | ||
expect(isOff).to.be.eql(true); | ||
}); | ||
|
||
// test to cover bug #54548 - add this visualization to a dashboard and filter | ||
it('should add to dashboard and allow filtering', async function() { | ||
await PageObjects.common.navigateToApp('dashboard'); | ||
await PageObjects.dashboard.clickNewDashboard(); | ||
await dashboardAddPanel.addVisualization(vizName1); | ||
|
||
// hover and click on cell to filter | ||
await PageObjects.visualize.filterOnTableCell(1, 2); | ||
|
||
await PageObjects.header.waitUntilLoadingHasFinished(); | ||
await renderable.waitForRender(); | ||
const filterCount = await filterBar.getFilterCount(); | ||
expect(filterCount).to.be(1); | ||
|
||
await filterBar.removeAllFilters(); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters