mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Uptime] Fix headers io-ts type (#84089)
This commit is contained in:
parent
fac792778e
commit
a4c8dca021
2 changed files with 7 additions and 2 deletions
|
@ -86,6 +86,10 @@ export const MonitorType = t.intersection([
|
|||
|
||||
export type Monitor = t.TypeOf<typeof MonitorType>;
|
||||
|
||||
export const PingHeadersType = t.record(t.string, t.union([t.string, t.array(t.string)]));
|
||||
|
||||
export type PingHeaders = t.TypeOf<typeof PingHeadersType>;
|
||||
|
||||
export const PingType = t.intersection([
|
||||
t.type({
|
||||
timestamp: t.string,
|
||||
|
@ -135,7 +139,7 @@ export const PingType = t.intersection([
|
|||
bytes: t.number,
|
||||
redirects: t.array(t.string),
|
||||
status_code: t.number,
|
||||
headers: t.record(t.string, t.string),
|
||||
headers: PingHeadersType,
|
||||
}),
|
||||
version: t.string,
|
||||
}),
|
||||
|
|
|
@ -7,9 +7,10 @@
|
|||
import React from 'react';
|
||||
import { EuiAccordion, EuiDescriptionList, EuiSpacer, EuiText } from '@elastic/eui';
|
||||
import { i18n } from '@kbn/i18n';
|
||||
import { PingHeaders as HeadersProp } from '../../../../common/runtime_types';
|
||||
|
||||
interface Props {
|
||||
headers: Record<string, string>;
|
||||
headers: HeadersProp;
|
||||
}
|
||||
|
||||
export const PingHeaders = ({ headers }: Props) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue