Skip to content

Commit

Permalink
adjust types
Browse files Browse the repository at this point in the history
  • Loading branch information
dominiqueclarke committed Feb 11, 2022
1 parent fe56dfb commit 296f833
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
6 changes: 3 additions & 3 deletions x-pack/plugins/uptime/common/runtime_types/ping/ping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ export type Tls = t.TypeOf<typeof TlsType>;

export const MonitorType = t.intersection([
t.type({
duration: t.type({
us: t.union([t.number, t.null]),
}),
id: t.string,
status: t.string,
type: t.string,
}),
t.partial({
duration: t.type({
us: t.number,
}),
check_group: t.string,
ip: t.string,
name: t.string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ describe('PingList component', () => {
type: 'io',
},
monitor: {
duration: { us: null },
id: 'auto-tcp-0X81440A68E839814D',
ip: '255.255.255.0',
name: '',
Expand Down Expand Up @@ -161,9 +160,6 @@ describe('PingList component', () => {
"type": "io",
},
"monitor": Object {
"duration": Object {
"us": null,
},
"id": "auto-tcp-0X81440A68E839814D",
"ip": "255.255.255.0",
"name": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export const MonitorListComponent: ({
timestamp={timestamp}
summaryPings={summaryPings ?? []}
monitorType={type}
duration={duration!.us}
duration={duration?.us}
monitorId={monitorId}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class ServiceAPIClient {
);
if (locMonitors.length > 0) {
promises.push(
rxjsFrom(callServiceEndpoint(locMonitors, url)).pipe(
rxjsFrom(callServiceEndpoint(locMonitors, `${url}-test`)).pipe(
tap((result) => {
this.logger.debug(result.data);
this.logger.debug(
Expand Down

0 comments on commit 296f833

Please sign in to comment.