Skip to content

Commit

Permalink
More cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkambic committed Apr 2, 2020
1 parent 5cd39dc commit 4b35b4e
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 82 deletions.
40 changes: 13 additions & 27 deletions x-pack/plugins/uptime/common/graphql/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,18 @@ export interface Resolve {
rtt?: Duration | null;
}

export interface Socks5 {
rtt?: Rtt | null;
}

export interface Rtt {
connect?: Duration | null;

handshake?: Duration | null;

validate?: Duration | null;
}

export interface Summary {
up?: number | null;

Expand All @@ -319,18 +331,6 @@ export interface Location {
lon?: number | null;
}

export interface Socks5 {
rtt?: Rtt | null;
}

export interface Rtt {
connect?: Duration | null;

handshake?: Duration | null;

validate?: Duration | null;
}

export interface Tcp {
port?: number | null;

Expand Down Expand Up @@ -411,21 +411,7 @@ export interface State {

monitor?: MonitorState | null;

summary: {
up?: number | null;

down?: number | null;

geo?: {
name?: string | null;

location?: {
lat?: number | null;

lon?: number | null;
} | null;
} | null;
};
summary: Summary;

timestamp: UnsignedInteger;
/** Transport encryption information. */
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { ChartEmptyState } from '../chart_empty_state';
import { shallowWithIntl } from 'test_utils/enzyme_helpers';
import React from 'react';
import { FormattedMessage } from '@kbn/i18n/react';

describe('ChartEmptyState', () => {
it('renders string values', () => {
expect(
shallowWithIntl(<ChartEmptyState body="This is the body" title="This is the title" />)
).toMatchSnapshot();
});

it('renders JSX values', () => {
expect(
shallowWithIntl(
<ChartEmptyState
body={
<FormattedMessage
id="test.body"
defaultMessage="This is the default with a {val} included"
values={{ val: <strong>down</strong> }}
/>
}
title={<FormattedMessage id="test.title" defaultMessage="The title" />}
/>
)
).toMatchSnapshot();
});
});

0 comments on commit 4b35b4e

Please sign in to comment.