Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] [Uptime] Remove monitor states graphql (#62853) #63871

Merged
merged 1 commit into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions x-pack/legacy/plugins/uptime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,23 @@
## Purpose

The purpose of this plugin is to provide users of Heartbeat more visibility of what's happening
in their infrastructure. It's primarily built using React and Apollo's GraphQL tools.
in their infrastructure.

## Layout

There are three sections to the app, `common`, `public`, and `server`.

### common

Contains GraphQL types, constants and a few other files.
Contains runtime types types, constants and a few other files.

Notably, we use `io-ts`/`fp-ts` functions and types to help provide
additional runtime safety for our API requests/responses.

### public

Components come in two main types, queries and functional. Queries are extended from Apollo's queries
type which abstracts a lot of the GraphQL connectivity away. Functional are dumb components that
don't store any state.
We use Redux and associated tools for managing our app state. Components come in the usual `connect`ed and
presentational varieties.

The `lib` directory controls bootstrapping code and adapter types.

Expand All @@ -27,12 +29,13 @@ The principal structure of the app is stored in `uptime_app.tsx`.

### server

There is a `graphql` directory which contains the resolvers, schema files, and constants.

The `lib` directory contains `adapters`, which are connections to external resources like Kibana
Server, Elasticsearch, etc. In addition, it contains domains, which are libraries that provide
functionality via adapters.

The `requests` directory contains functions responsible for querying Elasticsearch and parsing its
responses.

There's also a `rest_api` folder that defines the structure of the RESTful API endpoints.

## Testing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { SortOrder, CursorDirection } from '../graphql/types';
import { CursorDirection, SortOrder } from '../runtime_types';

/**
* The Uptime UI utilizes a settings context, the defaults for which are stored here.
Expand Down
1 change: 1 addition & 0 deletions x-pack/legacy/plugins/uptime/common/constants/rest_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
export enum API_URLS {
INDEX_PATTERN = `/api/uptime/index_pattern`,
INDEX_STATUS = '/api/uptime/index_status',
MONITOR_LIST = `/api/uptime/monitor/list`,
MONITOR_LOCATIONS = `/api/uptime/monitor/locations`,
MONITOR_DURATION = `/api/uptime/monitor/duration`,
MONITOR_DETAILS = `/api/uptime/monitor/details`,
Expand Down
232 changes: 0 additions & 232 deletions x-pack/legacy/plugins/uptime/common/graphql/types.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@

export * from './details';
export * from './locations';
export * from './state';
Loading