= async ({
callES,
diff --git a/x-pack/plugins/uptime/server/lib/requests/get_filter_bar.ts b/x-pack/plugins/uptime/server/lib/requests/get_filter_bar.ts
index 95d23ddcbf466..dbe71cf689214 100644
--- a/x-pack/plugins/uptime/server/lib/requests/get_filter_bar.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/get_filter_bar.ts
@@ -5,7 +5,7 @@
*/
import { UMElasticsearchQueryFn } from '../adapters';
-import { OverviewFilters } from '../../../../../legacy/plugins/uptime/common/runtime_types';
+import { OverviewFilters } from '../../../common/runtime_types';
import { generateFilterAggs } from './generate_filter_aggs';
export interface GetFilterBarParams {
diff --git a/x-pack/plugins/uptime/server/lib/requests/get_index_status.ts b/x-pack/plugins/uptime/server/lib/requests/get_index_status.ts
index 6f7854d35b308..7688f04f1acd9 100644
--- a/x-pack/plugins/uptime/server/lib/requests/get_index_status.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/get_index_status.ts
@@ -5,7 +5,7 @@
*/
import { UMElasticsearchQueryFn } from '../adapters';
-import { StatesIndexStatus } from '../../../../../legacy/plugins/uptime/common/runtime_types';
+import { StatesIndexStatus } from '../../../common/runtime_types';
export const getIndexStatus: UMElasticsearchQueryFn<{}, StatesIndexStatus> = async ({
callES,
diff --git a/x-pack/plugins/uptime/server/lib/requests/get_latest_monitor.ts b/x-pack/plugins/uptime/server/lib/requests/get_latest_monitor.ts
index a8e9ccb875a08..98ce449002f21 100644
--- a/x-pack/plugins/uptime/server/lib/requests/get_latest_monitor.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/get_latest_monitor.ts
@@ -5,7 +5,7 @@
*/
import { UMElasticsearchQueryFn } from '../adapters';
-import { Ping } from '../../../../../legacy/plugins/uptime/common/runtime_types';
+import { Ping } from '../../../common/runtime_types';
export interface GetLatestMonitorParams {
/** @member dateRangeStart timestamp bounds */
diff --git a/x-pack/plugins/uptime/server/lib/requests/get_monitor_details.ts b/x-pack/plugins/uptime/server/lib/requests/get_monitor_details.ts
index 4ce7176b57b19..cf4ffa339ddfc 100644
--- a/x-pack/plugins/uptime/server/lib/requests/get_monitor_details.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/get_monitor_details.ts
@@ -5,10 +5,7 @@
*/
import { UMElasticsearchQueryFn } from '../adapters';
-import {
- MonitorDetails,
- MonitorError,
-} from '../../../../../legacy/plugins/uptime/common/runtime_types';
+import { MonitorDetails, MonitorError } from '../../../common/runtime_types';
export interface GetMonitorDetailsParams {
monitorId: string;
diff --git a/x-pack/plugins/uptime/server/lib/requests/get_monitor_duration.ts b/x-pack/plugins/uptime/server/lib/requests/get_monitor_duration.ts
index e9c745b0a8713..ea2a7e790652b 100644
--- a/x-pack/plugins/uptime/server/lib/requests/get_monitor_duration.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/get_monitor_duration.ts
@@ -5,11 +5,8 @@
*/
import { UMElasticsearchQueryFn } from '../adapters';
-import { QUERY } from '../../../../../legacy/plugins/uptime/common/constants';
-import {
- LocationDurationLine,
- MonitorDurationResult,
-} from '../../../../../legacy/plugins/uptime/common/types';
+import { LocationDurationLine, MonitorDurationResult } from '../../../common/types';
+import { QUERY } from '../../../common/constants';
export interface GetMonitorChartsParams {
/** @member monitorId ID value for the selected monitor */
diff --git a/x-pack/plugins/uptime/server/lib/requests/get_monitor_locations.ts b/x-pack/plugins/uptime/server/lib/requests/get_monitor_locations.ts
index f49e404ffb084..c8d3ca043edc5 100644
--- a/x-pack/plugins/uptime/server/lib/requests/get_monitor_locations.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/get_monitor_locations.ts
@@ -5,11 +5,8 @@
*/
import { UMElasticsearchQueryFn } from '../adapters';
-import { UNNAMED_LOCATION } from '../../../../../legacy/plugins/uptime/common/constants';
-import {
- MonitorLocations,
- MonitorLocation,
-} from '../../../../../legacy/plugins/uptime/common/runtime_types';
+import { MonitorLocations, MonitorLocation } from '../../../common/runtime_types';
+import { UNNAMED_LOCATION } from '../../../common/constants';
/**
* Fetch data for the monitor page title.
diff --git a/x-pack/plugins/uptime/server/lib/requests/get_monitor_states.ts b/x-pack/plugins/uptime/server/lib/requests/get_monitor_states.ts
index 4b40943a85705..b1791dd04861c 100644
--- a/x-pack/plugins/uptime/server/lib/requests/get_monitor_states.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/get_monitor_states.ts
@@ -4,15 +4,10 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { CONTEXT_DEFAULTS } from '../../../../../legacy/plugins/uptime/common/constants';
+import { CONTEXT_DEFAULTS } from '../../../common/constants';
import { fetchPage } from './search';
import { UMElasticsearchQueryFn } from '../adapters';
-import {
- SortOrder,
- CursorDirection,
- MonitorSummary,
-} from '../../../../../legacy/plugins/uptime/common/runtime_types';
-
+import { MonitorSummary, SortOrder, CursorDirection } from '../../../common/runtime_types';
import { QueryContext } from './search';
export interface CursorPagination {
diff --git a/x-pack/plugins/uptime/server/lib/requests/get_ping_histogram.ts b/x-pack/plugins/uptime/server/lib/requests/get_ping_histogram.ts
index 5a8927764ea5c..299913c8dff08 100644
--- a/x-pack/plugins/uptime/server/lib/requests/get_ping_histogram.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/get_ping_histogram.ts
@@ -5,12 +5,9 @@
*/
import { UMElasticsearchQueryFn } from '../adapters';
-import { QUERY } from '../../../../../legacy/plugins/uptime/common/constants';
import { getFilterClause } from '../helper';
-import {
- HistogramResult,
- HistogramQueryResult,
-} from '../../../../../legacy/plugins/uptime/common/runtime_types';
+import { HistogramResult, HistogramQueryResult } from '../../../common/runtime_types';
+import { QUERY } from '../../../common/constants';
export interface GetPingHistogramParams {
/** @member dateRangeStart timestamp bounds */
diff --git a/x-pack/plugins/uptime/server/lib/requests/get_pings.ts b/x-pack/plugins/uptime/server/lib/requests/get_pings.ts
index 6eccfdb13cef7..a6a0e3c3d6542 100644
--- a/x-pack/plugins/uptime/server/lib/requests/get_pings.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/get_pings.ts
@@ -10,7 +10,7 @@ import {
HttpResponseBody,
PingsResponse,
Ping,
-} from '../../../../../legacy/plugins/uptime/common/runtime_types';
+} from '../../../common/runtime_types';
const DEFAULT_PAGE_SIZE = 25;
diff --git a/x-pack/plugins/uptime/server/lib/requests/get_snapshot_counts.ts b/x-pack/plugins/uptime/server/lib/requests/get_snapshot_counts.ts
index 01f2ad88161cf..b57bc87d45418 100644
--- a/x-pack/plugins/uptime/server/lib/requests/get_snapshot_counts.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/get_snapshot_counts.ts
@@ -5,8 +5,8 @@
*/
import { UMElasticsearchQueryFn } from '../adapters';
-import { Snapshot } from '../../../../../legacy/plugins/uptime/common/runtime_types';
-import { CONTEXT_DEFAULTS } from '../../../../../legacy/plugins/uptime/common/constants';
+import { CONTEXT_DEFAULTS } from '../../../common/constants';
+import { Snapshot } from '../../../common/runtime_types';
import { QueryContext } from './search';
export interface GetSnapshotCountParams {
diff --git a/x-pack/plugins/uptime/server/lib/requests/search/__tests__/fetch_page.test.ts b/x-pack/plugins/uptime/server/lib/requests/search/__tests__/fetch_page.test.ts
index 2a8f681ab3453..d4ad80c85ec3d 100644
--- a/x-pack/plugins/uptime/server/lib/requests/search/__tests__/fetch_page.test.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/search/__tests__/fetch_page.test.ts
@@ -12,7 +12,7 @@ import {
MonitorGroupsPage,
} from '../fetch_page';
import { QueryContext } from '../query_context';
-import { MonitorSummary } from '../../../../../../../legacy/plugins/uptime/common/runtime_types';
+import { MonitorSummary } from '../../../../../common/runtime_types';
import { nextPagination, prevPagination, simpleQueryContext } from './test_helpers';
const simpleFixture: MonitorGroups[] = [
diff --git a/x-pack/plugins/uptime/server/lib/requests/search/__tests__/query_context.test.ts b/x-pack/plugins/uptime/server/lib/requests/search/__tests__/query_context.test.ts
index 84774cdeed856..e53fff429dd8d 100644
--- a/x-pack/plugins/uptime/server/lib/requests/search/__tests__/query_context.test.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/search/__tests__/query_context.test.ts
@@ -6,10 +6,7 @@
import { QueryContext } from '../query_context';
import { CursorPagination } from '../types';
-import {
- CursorDirection,
- SortOrder,
-} from '../../../../../../../legacy/plugins/uptime/common/runtime_types';
+import { CursorDirection, SortOrder } from '../../../../../common/runtime_types';
describe(QueryContext, () => {
// 10 minute range
diff --git a/x-pack/plugins/uptime/server/lib/requests/search/__tests__/test_helpers.ts b/x-pack/plugins/uptime/server/lib/requests/search/__tests__/test_helpers.ts
index 47034c2130116..40775bde1c7f5 100644
--- a/x-pack/plugins/uptime/server/lib/requests/search/__tests__/test_helpers.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/search/__tests__/test_helpers.ts
@@ -5,10 +5,7 @@
*/
import { CursorPagination } from '../types';
-import {
- CursorDirection,
- SortOrder,
-} from '../../../../../../../legacy/plugins/uptime/common/runtime_types';
+import { CursorDirection, SortOrder } from '../../../../../common/runtime_types';
import { QueryContext } from '../query_context';
export const prevPagination = (key: any): CursorPagination => {
diff --git a/x-pack/plugins/uptime/server/lib/requests/search/enrich_monitor_groups.ts b/x-pack/plugins/uptime/server/lib/requests/search/enrich_monitor_groups.ts
index 4739c804d24e7..d21259fad77a6 100644
--- a/x-pack/plugins/uptime/server/lib/requests/search/enrich_monitor_groups.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/search/enrich_monitor_groups.ts
@@ -6,14 +6,14 @@
import { get, sortBy } from 'lodash';
import { QueryContext } from './query_context';
-import { QUERY, STATES } from '../../../../../../legacy/plugins/uptime/common/constants';
+import { QUERY, STATES } from '../../../../common/constants';
import {
Check,
Histogram,
MonitorSummary,
CursorDirection,
SortOrder,
-} from '../../../../../../legacy/plugins/uptime/common/runtime_types';
+} from '../../../../common/runtime_types';
import { MonitorEnricher } from './fetch_page';
export const enrichMonitorGroups: MonitorEnricher = async (
diff --git a/x-pack/plugins/uptime/server/lib/requests/search/fetch_page.ts b/x-pack/plugins/uptime/server/lib/requests/search/fetch_page.ts
index 84167840d5d9b..bef8106ad1896 100644
--- a/x-pack/plugins/uptime/server/lib/requests/search/fetch_page.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/search/fetch_page.ts
@@ -7,12 +7,8 @@
import { flatten } from 'lodash';
import { CursorPagination } from './types';
import { QueryContext } from './query_context';
-import { QUERY } from '../../../../../../legacy/plugins/uptime/common/constants';
-import {
- CursorDirection,
- MonitorSummary,
- SortOrder,
-} from '../../../../../../legacy/plugins/uptime/common/runtime_types';
+import { QUERY } from '../../../../common/constants';
+import { CursorDirection, MonitorSummary, SortOrder } from '../../../../common/runtime_types';
import { enrichMonitorGroups } from './enrich_monitor_groups';
import { MonitorGroupIterator } from './monitor_group_iterator';
diff --git a/x-pack/plugins/uptime/server/lib/requests/search/find_potential_matches.ts b/x-pack/plugins/uptime/server/lib/requests/search/find_potential_matches.ts
index 3449febfa5b05..e60c52660915a 100644
--- a/x-pack/plugins/uptime/server/lib/requests/search/find_potential_matches.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/search/find_potential_matches.ts
@@ -5,7 +5,7 @@
*/
import { get, set } from 'lodash';
-import { CursorDirection } from '../../../../../../legacy/plugins/uptime/common/runtime_types';
+import { CursorDirection } from '../../../../common/runtime_types';
import { QueryContext } from './query_context';
// This is the first phase of the query. In it, we find the most recent check groups that matched the given query.
diff --git a/x-pack/plugins/uptime/server/lib/requests/search/monitor_group_iterator.ts b/x-pack/plugins/uptime/server/lib/requests/search/monitor_group_iterator.ts
index 31d9166eb1e73..2fb9562028258 100644
--- a/x-pack/plugins/uptime/server/lib/requests/search/monitor_group_iterator.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/search/monitor_group_iterator.ts
@@ -6,7 +6,7 @@
import { QueryContext } from './query_context';
import { fetchChunk } from './fetch_chunk';
-import { CursorDirection } from '../../../../../../legacy/plugins/uptime/common/runtime_types';
+import { CursorDirection } from '../../../../common/runtime_types';
import { MonitorGroups } from './fetch_page';
import { CursorPagination } from './types';
diff --git a/x-pack/plugins/uptime/server/lib/requests/search/refine_potential_matches.ts b/x-pack/plugins/uptime/server/lib/requests/search/refine_potential_matches.ts
index 43fc54fb25808..977c32ad1f984 100644
--- a/x-pack/plugins/uptime/server/lib/requests/search/refine_potential_matches.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/search/refine_potential_matches.ts
@@ -5,7 +5,7 @@
*/
import { QueryContext } from './query_context';
-import { CursorDirection } from '../../../../../../legacy/plugins/uptime/common/runtime_types';
+import { CursorDirection } from '../../../../common/runtime_types';
import { MonitorGroups, MonitorLocCheckGroup } from './fetch_page';
/**
diff --git a/x-pack/plugins/uptime/server/lib/requests/search/types.ts b/x-pack/plugins/uptime/server/lib/requests/search/types.ts
index 2ec52d400b597..35e9647196454 100644
--- a/x-pack/plugins/uptime/server/lib/requests/search/types.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/search/types.ts
@@ -4,10 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import {
- CursorDirection,
- SortOrder,
-} from '../../../../../../legacy/plugins/uptime/common/runtime_types';
+import { CursorDirection, SortOrder } from '../../../../common/runtime_types';
export interface CursorPagination {
cursorKey?: any;
diff --git a/x-pack/plugins/uptime/server/lib/requests/uptime_requests.ts b/x-pack/plugins/uptime/server/lib/requests/uptime_requests.ts
index 84154429b9188..69507d2950cd8 100644
--- a/x-pack/plugins/uptime/server/lib/requests/uptime_requests.ts
+++ b/x-pack/plugins/uptime/server/lib/requests/uptime_requests.ts
@@ -8,10 +8,17 @@ import { UMElasticsearchQueryFn } from '../adapters';
import {
HistogramResult,
Ping,
- PingsResponse as PingResults,
+ PingsResponse,
GetCertsParams,
GetPingsParams,
-} from '../../../../../legacy/plugins/uptime/common/runtime_types';
+ Cert,
+ OverviewFilters,
+ MonitorDetails,
+ MonitorLocations,
+ Snapshot,
+ StatesIndexStatus,
+} from '../../../common/runtime_types';
+import { MonitorDurationResult } from '../../../common/types';
import {
GetFilterBarParams,
GetLatestMonitorParams,
@@ -23,17 +30,8 @@ import {
GetMonitorStatusParams,
GetMonitorStatusResult,
} from '.';
-import {
- OverviewFilters,
- MonitorDetails,
- MonitorLocations,
- Snapshot,
- StatesIndexStatus,
- Cert,
-} from '../../../../../legacy/plugins/uptime/common/runtime_types';
import { GetMonitorStatesResult } from './get_monitor_states';
import { GetSnapshotCountParams } from './get_snapshot_counts';
-import { MonitorDurationResult } from '../../../../../legacy/plugins/uptime/common/types';
type ESQ = UMElasticsearchQueryFn
;
@@ -47,7 +45,7 @@ export interface UptimeRequests {
getMonitorLocations: ESQ;
getMonitorStates: ESQ;
getMonitorStatus: ESQ;
- getPings: ESQ;
+ getPings: ESQ;
getPingHistogram: ESQ;
getSnapshotCount: ESQ;
getIndexStatus: ESQ<{}, StatesIndexStatus>;
diff --git a/x-pack/plugins/uptime/server/lib/saved_objects.ts b/x-pack/plugins/uptime/server/lib/saved_objects.ts
index d849fbd8ce0a8..28b9eaad2cf6f 100644
--- a/x-pack/plugins/uptime/server/lib/saved_objects.ts
+++ b/x-pack/plugins/uptime/server/lib/saved_objects.ts
@@ -4,8 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/
-import { DynamicSettings } from '../../../../legacy/plugins/uptime/common/runtime_types';
-import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../../legacy/plugins/uptime/common/constants';
+import { DYNAMIC_SETTINGS_DEFAULTS } from '../../common/constants';
+import { DynamicSettings } from '../../common/runtime_types';
import { SavedObjectsType, SavedObjectsErrorHelpers } from '../../../../../src/core/server';
import { UMSavedObjectsQueryFn } from './adapters';
diff --git a/x-pack/plugins/uptime/server/plugin.ts b/x-pack/plugins/uptime/server/plugin.ts
index 7cc591a6b2db1..13d1ae216f204 100644
--- a/x-pack/plugins/uptime/server/plugin.ts
+++ b/x-pack/plugins/uptime/server/plugin.ts
@@ -8,19 +8,20 @@ import {
PluginInitializerContext,
CoreStart,
CoreSetup,
+ Plugin as PluginType,
ISavedObjectsRepository,
} from '../../../../src/core/server';
import { initServerWithKibana } from './kibana.index';
import { KibanaTelemetryAdapter, UptimeCorePlugins } from './lib/adapters';
import { umDynamicSettings } from './lib/saved_objects';
-export class Plugin {
+export class Plugin implements PluginType {
private savedObjectsClient?: ISavedObjectsRepository;
constructor(_initializerContext: PluginInitializerContext) {}
public setup(core: CoreSetup, plugins: UptimeCorePlugins) {
- initServerWithKibana({ route: core.http.createRouter() }, plugins);
+ initServerWithKibana({ router: core.http.createRouter() }, plugins);
core.savedObjects.registerType(umDynamicSettings);
KibanaTelemetryAdapter.registerUsageCollector(
plugins.usageCollection,
@@ -28,7 +29,9 @@ export class Plugin {
);
}
- public start(_core: CoreStart, _plugins: any) {
- this.savedObjectsClient = _core.savedObjects.createInternalRepository();
+ public start(core: CoreStart, _plugins: any) {
+ this.savedObjectsClient = core.savedObjects.createInternalRepository();
}
+
+ public stop() {}
}
diff --git a/x-pack/plugins/uptime/server/rest_api/certs.ts b/x-pack/plugins/uptime/server/rest_api/certs.ts
index 31fb3f4ab96a7..f2e1700b23e7d 100644
--- a/x-pack/plugins/uptime/server/rest_api/certs.ts
+++ b/x-pack/plugins/uptime/server/rest_api/certs.ts
@@ -7,7 +7,7 @@
import { schema } from '@kbn/config-schema';
import { UMServerLibs } from '../lib/lib';
import { UMRestApiRouteFactory } from '.';
-import { API_URLS } from '../../../../legacy/plugins/uptime/common/constants/rest_api';
+import { API_URLS } from '../../common/constants';
const DEFAULT_INDEX = 0;
const DEFAULT_SIZE = 25;
diff --git a/x-pack/plugins/uptime/server/rest_api/dynamic_settings.ts b/x-pack/plugins/uptime/server/rest_api/dynamic_settings.ts
index 3f4e2fc345182..31833a25ee8ac 100644
--- a/x-pack/plugins/uptime/server/rest_api/dynamic_settings.ts
+++ b/x-pack/plugins/uptime/server/rest_api/dynamic_settings.ts
@@ -8,10 +8,7 @@ import { schema } from '@kbn/config-schema';
import { isRight } from 'fp-ts/lib/Either';
import { PathReporter } from 'io-ts/lib/PathReporter';
import { UMServerLibs } from '../lib/lib';
-import {
- DynamicSettings,
- DynamicSettingsType,
-} from '../../../../legacy/plugins/uptime/common/runtime_types';
+import { DynamicSettings, DynamicSettingsType } from '../../common/runtime_types';
import { UMRestApiRouteFactory } from '.';
import { savedObjectsAdapter } from '../lib/saved_objects';
diff --git a/x-pack/plugins/uptime/server/rest_api/index_state/get_index_pattern.ts b/x-pack/plugins/uptime/server/rest_api/index_state/get_index_pattern.ts
index 689a75c5903a6..26715f0ff37b6 100644
--- a/x-pack/plugins/uptime/server/rest_api/index_state/get_index_pattern.ts
+++ b/x-pack/plugins/uptime/server/rest_api/index_state/get_index_pattern.ts
@@ -6,7 +6,7 @@
import { UMServerLibs } from '../../lib/lib';
import { UMRestApiRouteFactory } from '../types';
-import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants/rest_api';
+import { API_URLS } from '../../../common/constants';
export const createGetIndexPatternRoute: UMRestApiRouteFactory = (libs: UMServerLibs) => ({
method: 'GET',
diff --git a/x-pack/plugins/uptime/server/rest_api/index_state/get_index_status.ts b/x-pack/plugins/uptime/server/rest_api/index_state/get_index_status.ts
index 8ed73d90b2389..9a4280efa98f9 100644
--- a/x-pack/plugins/uptime/server/rest_api/index_state/get_index_status.ts
+++ b/x-pack/plugins/uptime/server/rest_api/index_state/get_index_status.ts
@@ -6,7 +6,7 @@
import { UMServerLibs } from '../../lib/lib';
import { UMRestApiRouteFactory } from '../types';
-import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants';
+import { API_URLS } from '../../../common/constants';
export const createGetIndexStatusRoute: UMRestApiRouteFactory = (libs: UMServerLibs) => ({
method: 'GET',
diff --git a/x-pack/plugins/uptime/server/rest_api/monitors/monitor_list.ts b/x-pack/plugins/uptime/server/rest_api/monitors/monitor_list.ts
index 5cb4e8a6241b7..60b3eafaa765e 100644
--- a/x-pack/plugins/uptime/server/rest_api/monitors/monitor_list.ts
+++ b/x-pack/plugins/uptime/server/rest_api/monitors/monitor_list.ts
@@ -6,8 +6,7 @@
import { schema } from '@kbn/config-schema';
import { UMRestApiRouteFactory } from '../types';
-import { CONTEXT_DEFAULTS } from '../../../../../legacy/plugins/uptime/common/constants';
-import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants/rest_api';
+import { API_URLS, CONTEXT_DEFAULTS } from '../../../common/constants';
export const createMonitorListRoute: UMRestApiRouteFactory = libs => ({
method: 'GET',
diff --git a/x-pack/plugins/uptime/server/rest_api/monitors/monitor_locations.ts b/x-pack/plugins/uptime/server/rest_api/monitors/monitor_locations.ts
index 66ce9871506d4..a110209043a7e 100644
--- a/x-pack/plugins/uptime/server/rest_api/monitors/monitor_locations.ts
+++ b/x-pack/plugins/uptime/server/rest_api/monitors/monitor_locations.ts
@@ -7,7 +7,7 @@
import { schema } from '@kbn/config-schema';
import { UMServerLibs } from '../../lib/lib';
import { UMRestApiRouteFactory } from '../types';
-import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants/rest_api';
+import { API_URLS } from '../../../common/constants';
export const createGetMonitorLocationsRoute: UMRestApiRouteFactory = (libs: UMServerLibs) => ({
method: 'GET',
diff --git a/x-pack/plugins/uptime/server/rest_api/monitors/monitor_status.ts b/x-pack/plugins/uptime/server/rest_api/monitors/monitor_status.ts
index 9cf1340fb9409..bb002f8a8c286 100644
--- a/x-pack/plugins/uptime/server/rest_api/monitors/monitor_status.ts
+++ b/x-pack/plugins/uptime/server/rest_api/monitors/monitor_status.ts
@@ -7,7 +7,7 @@
import { schema } from '@kbn/config-schema';
import { UMServerLibs } from '../../lib/lib';
import { UMRestApiRouteFactory } from '../types';
-import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants';
+import { API_URLS } from '../../../common/constants';
export const createGetStatusBarRoute: UMRestApiRouteFactory = (libs: UMServerLibs) => ({
method: 'GET',
diff --git a/x-pack/plugins/uptime/server/rest_api/monitors/monitors_details.ts b/x-pack/plugins/uptime/server/rest_api/monitors/monitors_details.ts
index 1cc010781457e..69e719efb0719 100644
--- a/x-pack/plugins/uptime/server/rest_api/monitors/monitors_details.ts
+++ b/x-pack/plugins/uptime/server/rest_api/monitors/monitors_details.ts
@@ -7,7 +7,7 @@
import { schema } from '@kbn/config-schema';
import { UMServerLibs } from '../../lib/lib';
import { UMRestApiRouteFactory } from '../types';
-import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants/rest_api';
+import { API_URLS } from '../../../common/constants';
export const createGetMonitorDetailsRoute: UMRestApiRouteFactory = (libs: UMServerLibs) => ({
method: 'GET',
diff --git a/x-pack/plugins/uptime/server/rest_api/monitors/monitors_durations.ts b/x-pack/plugins/uptime/server/rest_api/monitors/monitors_durations.ts
index 9743ced13350a..34313211061b0 100644
--- a/x-pack/plugins/uptime/server/rest_api/monitors/monitors_durations.ts
+++ b/x-pack/plugins/uptime/server/rest_api/monitors/monitors_durations.ts
@@ -7,7 +7,7 @@
import { schema } from '@kbn/config-schema';
import { UMServerLibs } from '../../lib/lib';
import { UMRestApiRouteFactory } from '../types';
-import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants/rest_api';
+import { API_URLS } from '../../../common/constants';
export const createGetMonitorDurationRoute: UMRestApiRouteFactory = (libs: UMServerLibs) => ({
method: 'GET',
diff --git a/x-pack/plugins/uptime/server/rest_api/overview_filters/get_overview_filters.ts b/x-pack/plugins/uptime/server/rest_api/overview_filters/get_overview_filters.ts
index deac05f36c8dc..00cbaf0d16723 100644
--- a/x-pack/plugins/uptime/server/rest_api/overview_filters/get_overview_filters.ts
+++ b/x-pack/plugins/uptime/server/rest_api/overview_filters/get_overview_filters.ts
@@ -8,7 +8,7 @@ import { schema } from '@kbn/config-schema';
import { UMServerLibs } from '../../lib/lib';
import { UMRestApiRouteFactory } from '../types';
import { objectValuesToArrays } from '../../lib/helper';
-import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants/rest_api';
+import { API_URLS } from '../../../common/constants';
const arrayOrStringType = schema.maybe(
schema.oneOf([schema.string(), schema.arrayOf(schema.string())])
diff --git a/x-pack/plugins/uptime/server/rest_api/pings/get_ping_histogram.ts b/x-pack/plugins/uptime/server/rest_api/pings/get_ping_histogram.ts
index dceef5ecb7848..41078f735920b 100644
--- a/x-pack/plugins/uptime/server/rest_api/pings/get_ping_histogram.ts
+++ b/x-pack/plugins/uptime/server/rest_api/pings/get_ping_histogram.ts
@@ -7,7 +7,7 @@
import { schema } from '@kbn/config-schema';
import { UMServerLibs } from '../../lib/lib';
import { UMRestApiRouteFactory } from '../types';
-import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants/rest_api';
+import { API_URLS } from '../../../common/constants';
export const createGetPingHistogramRoute: UMRestApiRouteFactory = (libs: UMServerLibs) => ({
method: 'GET',
diff --git a/x-pack/plugins/uptime/server/rest_api/pings/get_pings.ts b/x-pack/plugins/uptime/server/rest_api/pings/get_pings.ts
index 80a887a7f64a9..d97195a7fe2b1 100644
--- a/x-pack/plugins/uptime/server/rest_api/pings/get_pings.ts
+++ b/x-pack/plugins/uptime/server/rest_api/pings/get_pings.ts
@@ -9,8 +9,8 @@ import { isLeft } from 'fp-ts/lib/Either';
import { PathReporter } from 'io-ts/lib/PathReporter';
import { UMServerLibs } from '../../lib/lib';
import { UMRestApiRouteFactory } from '../types';
-import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants/rest_api';
-import { GetPingsParamsType } from '../../../../../legacy/plugins/uptime/common/runtime_types';
+import { API_URLS } from '../../../common/constants';
+import { GetPingsParamsType } from '../../../common/runtime_types';
export const createGetPingsRoute: UMRestApiRouteFactory = (libs: UMServerLibs) => ({
method: 'GET',
diff --git a/x-pack/plugins/uptime/server/rest_api/snapshot/get_snapshot_count.ts b/x-pack/plugins/uptime/server/rest_api/snapshot/get_snapshot_count.ts
index d870f49280117..7809e102a499f 100644
--- a/x-pack/plugins/uptime/server/rest_api/snapshot/get_snapshot_count.ts
+++ b/x-pack/plugins/uptime/server/rest_api/snapshot/get_snapshot_count.ts
@@ -7,7 +7,7 @@
import { schema } from '@kbn/config-schema';
import { UMServerLibs } from '../../lib/lib';
import { UMRestApiRouteFactory } from '../types';
-import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants';
+import { API_URLS } from '../../../common/constants';
export const createGetSnapshotCount: UMRestApiRouteFactory = (libs: UMServerLibs) => ({
method: 'GET',
diff --git a/x-pack/plugins/uptime/server/rest_api/telemetry/log_page_view.ts b/x-pack/plugins/uptime/server/rest_api/telemetry/log_page_view.ts
index 4b2db71037071..d8387e79e9089 100644
--- a/x-pack/plugins/uptime/server/rest_api/telemetry/log_page_view.ts
+++ b/x-pack/plugins/uptime/server/rest_api/telemetry/log_page_view.ts
@@ -8,7 +8,7 @@ import { schema } from '@kbn/config-schema';
import { KibanaTelemetryAdapter } from '../../lib/adapters/telemetry';
import { UMRestApiRouteFactory } from '../types';
import { PageViewParams } from '../../lib/adapters/telemetry/types';
-import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants';
+import { API_URLS } from '../../../common/constants';
export const createLogPageViewRoute: UMRestApiRouteFactory = () => ({
method: 'POST',
diff --git a/x-pack/plugins/uptime/server/rest_api/types.ts b/x-pack/plugins/uptime/server/rest_api/types.ts
index e05e7a4d7faf1..8720b9dc60b12 100644
--- a/x-pack/plugins/uptime/server/rest_api/types.ts
+++ b/x-pack/plugins/uptime/server/rest_api/types.ts
@@ -15,8 +15,8 @@ import {
KibanaRequest,
KibanaResponseFactory,
IKibanaResponse,
-} from 'src/core/server';
-import { DynamicSettings } from '../../../../legacy/plugins/uptime/common/runtime_types';
+} from 'kibana/server';
+import { DynamicSettings } from '../../common/runtime_types';
import { UMServerLibs } from '../lib/lib';
/**
diff --git a/x-pack/test/api_integration/apis/uptime/feature_controls.ts b/x-pack/test/api_integration/apis/uptime/feature_controls.ts
index 6d125807e169d..6c566ec7cb23b 100644
--- a/x-pack/test/api_integration/apis/uptime/feature_controls.ts
+++ b/x-pack/test/api_integration/apis/uptime/feature_controls.ts
@@ -7,7 +7,7 @@
import expect from '@kbn/expect';
import { FtrProviderContext } from '../../ftr_provider_context';
import { PINGS_DATE_RANGE_END, PINGS_DATE_RANGE_START } from './constants';
-import { API_URLS } from '../../../../legacy/plugins/uptime/common/constants';
+import { API_URLS } from '../../../../plugins/uptime/common/constants';
export default function featureControlsTests({ getService }: FtrProviderContext) {
const supertest = getService('supertestWithoutAuth');
diff --git a/x-pack/test/api_integration/apis/uptime/rest/certs.ts b/x-pack/test/api_integration/apis/uptime/rest/certs.ts
index 7510ea3f34d28..a3a15d8f8b014 100644
--- a/x-pack/test/api_integration/apis/uptime/rest/certs.ts
+++ b/x-pack/test/api_integration/apis/uptime/rest/certs.ts
@@ -8,8 +8,8 @@ import expect from '@kbn/expect';
import moment from 'moment';
import { isRight } from 'fp-ts/lib/Either';
import { FtrProviderContext } from '../../../ftr_provider_context';
-import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants';
-import { CertType } from '../../../../../legacy/plugins/uptime/common/runtime_types';
+import { API_URLS } from '../../../../../plugins/uptime/common/constants';
+import { CertType } from '../../../../../plugins/uptime/common/runtime_types';
import { makeChecksWithStatus } from './helper/make_checks';
export default function({ getService }: FtrProviderContext) {
diff --git a/x-pack/test/api_integration/apis/uptime/rest/doc_count.ts b/x-pack/test/api_integration/apis/uptime/rest/doc_count.ts
index 5258426cf193c..f343cd1da8788 100644
--- a/x-pack/test/api_integration/apis/uptime/rest/doc_count.ts
+++ b/x-pack/test/api_integration/apis/uptime/rest/doc_count.ts
@@ -5,7 +5,7 @@
*/
import { FtrProviderContext } from '../../../ftr_provider_context';
import { expectFixtureEql } from './helper/expect_fixture_eql';
-import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants';
+import { API_URLS } from '../../../../../plugins/uptime/common/constants';
export default function({ getService }: FtrProviderContext) {
describe('docCount query', () => {
diff --git a/x-pack/test/api_integration/apis/uptime/rest/dynamic_settings.ts b/x-pack/test/api_integration/apis/uptime/rest/dynamic_settings.ts
index ea980721b831b..95caf50d1ca7a 100644
--- a/x-pack/test/api_integration/apis/uptime/rest/dynamic_settings.ts
+++ b/x-pack/test/api_integration/apis/uptime/rest/dynamic_settings.ts
@@ -7,9 +7,8 @@
import expect from '@kbn/expect';
import { isRight } from 'fp-ts/lib/Either';
import { FtrProviderContext } from '../../../ftr_provider_context';
-import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../../../legacy/plugins/uptime/common/constants';
-import { DynamicSettingsType } from '../../../../../legacy/plugins/uptime/common/runtime_types';
-
+import { DynamicSettingsType } from '../../../../../plugins/uptime/common/runtime_types';
+import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../../../plugins/uptime/common/constants';
export default function({ getService }: FtrProviderContext) {
const supertest = getService('supertest');
diff --git a/x-pack/test/api_integration/apis/uptime/rest/monitor_states_generated.ts b/x-pack/test/api_integration/apis/uptime/rest/monitor_states_generated.ts
index 3c17370532f91..c3d5849e028ab 100644
--- a/x-pack/test/api_integration/apis/uptime/rest/monitor_states_generated.ts
+++ b/x-pack/test/api_integration/apis/uptime/rest/monitor_states_generated.ts
@@ -7,8 +7,8 @@
import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../ftr_provider_context';
import { makeChecksWithStatus } from './helper/make_checks';
-import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants';
-import { MonitorSummary } from '../../../../../legacy/plugins/uptime/common/runtime_types';
+import { MonitorSummary } from '../../../../../plugins/uptime/common/runtime_types';
+import { API_URLS } from '../../../../../plugins/uptime/common/constants';
export default function({ getService }: FtrProviderContext) {
const supertest = getService('supertest');
diff --git a/x-pack/test/api_integration/apis/uptime/rest/monitor_states_real_data.ts b/x-pack/test/api_integration/apis/uptime/rest/monitor_states_real_data.ts
index f1e37bff405fd..c5a691312f525 100644
--- a/x-pack/test/api_integration/apis/uptime/rest/monitor_states_real_data.ts
+++ b/x-pack/test/api_integration/apis/uptime/rest/monitor_states_real_data.ts
@@ -7,8 +7,8 @@
import expect from '@kbn/expect';
import { isRight } from 'fp-ts/lib/Either';
import { FtrProviderContext } from '../../../ftr_provider_context';
-import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants';
-import { MonitorSummaryResultType } from '../../../../../legacy/plugins/uptime/common/runtime_types';
+import { MonitorSummaryResultType } from '../../../../../plugins/uptime/common/runtime_types';
+import { API_URLS } from '../../../../../plugins/uptime/common/constants';
interface ExpectedMonitorStatesPage {
response: any;
diff --git a/x-pack/test/api_integration/apis/uptime/rest/ping_list.ts b/x-pack/test/api_integration/apis/uptime/rest/ping_list.ts
index a261763d5991f..3d754d89cf9be 100644
--- a/x-pack/test/api_integration/apis/uptime/rest/ping_list.ts
+++ b/x-pack/test/api_integration/apis/uptime/rest/ping_list.ts
@@ -7,7 +7,7 @@
import expect from '@kbn/expect';
import { isLeft } from 'fp-ts/lib/Either';
import { PathReporter } from 'io-ts/lib/PathReporter';
-import { PingsResponseType } from '../../../../../legacy/plugins/uptime/common/runtime_types';
+import { PingsResponseType } from '../../../../../plugins/uptime/common/runtime_types';
import { FtrProviderContext } from '../../../ftr_provider_context';
function decodePingsResponseData(response: any) {
diff --git a/x-pack/test/api_integration/apis/uptime/rest/telemetry_collectors.ts b/x-pack/test/api_integration/apis/uptime/rest/telemetry_collectors.ts
index 017ef02afe5ea..99e09aa5ce886 100644
--- a/x-pack/test/api_integration/apis/uptime/rest/telemetry_collectors.ts
+++ b/x-pack/test/api_integration/apis/uptime/rest/telemetry_collectors.ts
@@ -6,7 +6,7 @@
import expect from '@kbn/expect';
import { FtrProviderContext } from '../../../ftr_provider_context';
-import { API_URLS } from '../../../../../legacy/plugins/uptime/common/constants';
+import { API_URLS } from '../../../../../plugins/uptime/common/constants';
import { makeChecksWithStatus } from './helper/make_checks';
export default function({ getService }: FtrProviderContext) {
diff --git a/x-pack/test/functional/apps/uptime/settings.ts b/x-pack/test/functional/apps/uptime/settings.ts
index 64b6300e0df63..7a813a5cdfb52 100644
--- a/x-pack/test/functional/apps/uptime/settings.ts
+++ b/x-pack/test/functional/apps/uptime/settings.ts
@@ -6,8 +6,8 @@
import expect from '@kbn/expect';
import { FtrProviderContext } from '../../ftr_provider_context';
-import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../../legacy/plugins/uptime/common/constants';
-import { DynamicSettings } from '../../../../legacy/plugins/uptime/common/runtime_types';
+import { DynamicSettings } from '../../../../plugins/uptime/common/runtime_types';
+import { DYNAMIC_SETTINGS_DEFAULTS } from '../../../../plugins/uptime/common/constants';
import { makeChecks } from '../../../api_integration/apis/uptime/rest/helper/make_checks';
export default ({ getPageObjects, getService }: FtrProviderContext) => {
diff --git a/x-pack/test/functional/services/uptime/settings.ts b/x-pack/test/functional/services/uptime/settings.ts
index 9719152b62d35..96f5e45ce2ca4 100644
--- a/x-pack/test/functional/services/uptime/settings.ts
+++ b/x-pack/test/functional/services/uptime/settings.ts
@@ -5,7 +5,7 @@
*/
import { FtrProviderContext } from '../../ftr_provider_context';
-import { DynamicSettings } from '../../../../legacy/plugins/uptime/common/runtime_types';
+import { DynamicSettings } from '../../../../plugins/uptime/common/runtime_types';
export function UptimeSettingsProvider({ getService }: FtrProviderContext) {
const testSubjects = getService('testSubjects');