mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Uptime] Add both both ip filters for view host in uptime location for host and monitor (#155382)
This commit is contained in:
parent
5de52e84d5
commit
c13a3ab603
3 changed files with 12 additions and 6 deletions
|
@ -21,7 +21,9 @@ describe('uptimeOverviewNavigatorParams', () => {
|
|||
|
||||
it('creates a path with expected search when ip is specified', async () => {
|
||||
const location = await uptimeOverviewNavigatorParams.getLocation({ ip: '127.0.0.1' });
|
||||
expect(location.path).toEqual(`${OVERVIEW_ROUTE}?search=monitor.ip: "127.0.0.1"`);
|
||||
expect(location.path).toEqual(
|
||||
`${OVERVIEW_ROUTE}?search=host.ip: "127.0.0.1" OR monitor.ip: "127.0.0.1"`
|
||||
);
|
||||
});
|
||||
|
||||
it('creates a path with expected search when hostname is specified', async () => {
|
||||
|
@ -35,7 +37,7 @@ describe('uptimeOverviewNavigatorParams', () => {
|
|||
ip: '127.0.0.1',
|
||||
});
|
||||
expect(location.path).toEqual(
|
||||
`${OVERVIEW_ROUTE}?search=host.name: "elastic.co" OR host.ip: "127.0.0.1"`
|
||||
`${OVERVIEW_ROUTE}?search=host.name: "elastic.co" OR host.ip: "127.0.0.1" OR monitor.ip: "127.0.0.1"`
|
||||
);
|
||||
});
|
||||
|
||||
|
@ -45,7 +47,7 @@ describe('uptimeOverviewNavigatorParams', () => {
|
|||
ip: '10.0.0.1',
|
||||
});
|
||||
expect(location.path).toEqual(
|
||||
`${OVERVIEW_ROUTE}?search=kubernetes.pod.uid: "foo" OR monitor.ip: "10.0.0.1"`
|
||||
`${OVERVIEW_ROUTE}?search=kubernetes.pod.uid: "foo" OR host.ip: "10.0.0.1" OR monitor.ip: "10.0.0.1"`
|
||||
);
|
||||
});
|
||||
|
||||
|
|
|
@ -28,8 +28,8 @@ async function navigate({
|
|||
if (pod) searchParams.push(formatSearchKey('kubernetes.pod.uid', pod));
|
||||
|
||||
if (ip) {
|
||||
const root = host ? 'host' : 'monitor';
|
||||
searchParams.push(formatSearchKey(`${root}.ip`, ip));
|
||||
searchParams.push(formatSearchKey(`host.ip`, ip));
|
||||
searchParams.push(formatSearchKey(`monitor.ip`, ip));
|
||||
}
|
||||
|
||||
const searchString = searchParams.join(' OR ');
|
||||
|
|
|
@ -12,4 +12,8 @@ const path = require('path');
|
|||
|
||||
const e2eDir = path.join(__dirname, '../e2e');
|
||||
|
||||
executeSyntheticsRunner(e2eDir);
|
||||
try {
|
||||
executeSyntheticsRunner(e2eDir);
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue