mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[8.7] [Uptime] Add both both ip filters for view host in uptime location for host and monitor (#155382) (#155399)
# Backport
This will backport the following commits from `main` to `8.7`:
- [Uptime] Add both both ip filters for view host in uptime location for
host and monitor (#155382) (c13a3ab6
)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT
[{"author":{"name":"Shahzad","email":"shahzad31comp@gmail.com"},"sourceCommit":{"committedDate":"2023-04-20T13:17:09Z","message":"[Uptime]
Add both both ip filters for view host in uptime location for host and
monitor
(#155382)","sha":"c13a3ab603c51df0b36433e0e658ead0753bb9b8"},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[]}]
BACKPORT-->
Co-authored-by: Shahzad <shahzad31comp@gmail.com>
This commit is contained in:
parent
4b993659b8
commit
cad6f92bc2
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