mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Discover] Encode context link filter part (#63831)
* Encode filter part of the URI for context * Add functional test agent filter with whitespace
This commit is contained in:
parent
9a13779c4f
commit
e6254f1f7c
2 changed files with 16 additions and 8 deletions
|
@ -112,13 +112,17 @@ export function createTableRowDirective($compile: ng.ICompileService, $httpParam
|
|||
const globalFilters: any = getServices().filterManager.getGlobalFilters();
|
||||
const appFilters: any = getServices().filterManager.getAppFilters();
|
||||
const hash = $httpParamSerializer({
|
||||
_g: rison.encode({
|
||||
filters: globalFilters || [],
|
||||
}),
|
||||
_a: rison.encode({
|
||||
columns: $scope.columns,
|
||||
filters: (appFilters || []).map(esFilters.disableFilter),
|
||||
}),
|
||||
_g: encodeURI(
|
||||
rison.encode({
|
||||
filters: globalFilters || [],
|
||||
})
|
||||
),
|
||||
_a: encodeURI(
|
||||
rison.encode({
|
||||
columns: $scope.columns,
|
||||
filters: (appFilters || []).map(esFilters.disableFilter),
|
||||
})
|
||||
),
|
||||
});
|
||||
|
||||
return `${path}?${hash}`;
|
||||
|
|
|
@ -23,6 +23,10 @@ const TEST_COLUMN_NAMES = ['@message'];
|
|||
const TEST_FILTER_COLUMN_NAMES = [
|
||||
['extension', 'jpg'],
|
||||
['geo.src', 'IN'],
|
||||
[
|
||||
'agent',
|
||||
'Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.50 Safari/534.24',
|
||||
],
|
||||
];
|
||||
|
||||
export default function({ getService, getPageObjects }) {
|
||||
|
@ -56,7 +60,7 @@ export default function({ getService, getPageObjects }) {
|
|||
await browser.goBack();
|
||||
await PageObjects.discover.waitForDocTableLoadingComplete();
|
||||
const hitCount = await PageObjects.discover.getHitCount();
|
||||
expect(hitCount).to.be('1,556');
|
||||
expect(hitCount).to.be('522');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue