mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Synthetics] Fix type warning (#161745)
This commit is contained in:
parent
c031900036
commit
91e065ebc4
1 changed files with 20 additions and 16 deletions
|
@ -10,20 +10,24 @@ import { ObserverCodec } from '../ping/observer';
|
|||
import { ErrorStateCodec } from '../ping/error_state';
|
||||
import { AgentType, MonitorType, PingErrorType, UrlType } from '..';
|
||||
|
||||
export const OverviewPingCode = t.interface({
|
||||
'@timestamp': t.string,
|
||||
summary: t.partial({
|
||||
down: t.number,
|
||||
up: t.number,
|
||||
export const OverviewPingCodec = t.intersection([
|
||||
t.interface({
|
||||
'@timestamp': t.string,
|
||||
summary: t.partial({
|
||||
down: t.number,
|
||||
up: t.number,
|
||||
}),
|
||||
monitor: MonitorType,
|
||||
observer: ObserverCodec,
|
||||
config_id: t.string,
|
||||
agent: AgentType,
|
||||
url: UrlType,
|
||||
state: ErrorStateCodec,
|
||||
}),
|
||||
monitor: MonitorType,
|
||||
observer: ObserverCodec,
|
||||
config_id: t.string,
|
||||
error: PingErrorType,
|
||||
agent: AgentType,
|
||||
url: UrlType,
|
||||
state: ErrorStateCodec,
|
||||
});
|
||||
t.partial({
|
||||
error: PingErrorType,
|
||||
}),
|
||||
]);
|
||||
|
||||
export const OverviewStatusMetaDataCodec = t.interface({
|
||||
monitorQueryId: t.string,
|
||||
|
@ -31,7 +35,7 @@ export const OverviewStatusMetaDataCodec = t.interface({
|
|||
status: t.string,
|
||||
location: t.string,
|
||||
timestamp: t.string,
|
||||
ping: OverviewPingCode,
|
||||
ping: OverviewPingCodec,
|
||||
});
|
||||
|
||||
export const OverviewPendingStatusMetaDataCodec = t.intersection([
|
||||
|
@ -43,7 +47,7 @@ export const OverviewPendingStatusMetaDataCodec = t.intersection([
|
|||
}),
|
||||
t.partial({
|
||||
timestamp: t.string,
|
||||
ping: OverviewPingCode,
|
||||
ping: OverviewPingCodec,
|
||||
}),
|
||||
]);
|
||||
|
||||
|
@ -70,7 +74,7 @@ export const OverviewStatusStateCodec = t.intersection([
|
|||
}),
|
||||
]);
|
||||
|
||||
export type OverviewPing = t.TypeOf<typeof OverviewPingCode>;
|
||||
export type OverviewPing = t.TypeOf<typeof OverviewPingCodec>;
|
||||
export type OverviewStatus = t.TypeOf<typeof OverviewStatusCodec>;
|
||||
export type OverviewStatusState = t.TypeOf<typeof OverviewStatusStateCodec>;
|
||||
export type OverviewStatusMetaData = t.TypeOf<typeof OverviewStatusMetaDataCodec>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue