From 458749d8017ce7d50eaadfffef075cad6d8d9228 Mon Sep 17 00:00:00 2001 From: ruflin Date: Thu, 24 Oct 2019 14:06:21 +0200 Subject: [PATCH 1/5] [EPM] Fix package version requirement structure In https://github.com/elastic/integrations-registry/pull/134 the API structure changes. This PR should adjust to the new structure. --- .../plugins/integrations_manager/common/types.ts | 11 ++++++++--- .../public/components/requirements.tsx | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/x-pack/legacy/plugins/integrations_manager/common/types.ts b/x-pack/legacy/plugins/integrations_manager/common/types.ts index 1266471122077..71d1adf8b0049 100644 --- a/x-pack/legacy/plugins/integrations_manager/common/types.ts +++ b/x-pack/legacy/plugins/integrations_manager/common/types.ts @@ -40,9 +40,14 @@ export interface ScreenshotItem { // https://github.com/elastic/integrations-registry/blob/master/docs/api/package.json export type ServiceName = 'kibana' | 'elasticsearch' | 'filebeat' | 'metricbeat'; export type RequirementVersion = string; + +export interface ServiceVersion { + version: ServiceRequirements; +} + export interface ServiceRequirements { - 'version.min': RequirementVersion; - 'version.max': RequirementVersion; + min: RequirementVersion; + max: RequirementVersion; } // from /categories @@ -55,7 +60,7 @@ export interface CategorySummaryItem { count: number; } -export type RequirementsByServiceName = Record; +export type RequirementsByServiceName = Record; export interface AssetParts { pkgkey: string; service: ServiceName; diff --git a/x-pack/legacy/plugins/integrations_manager/public/components/requirements.tsx b/x-pack/legacy/plugins/integrations_manager/public/components/requirements.tsx index d68366afd5565..329d4348edebf 100644 --- a/x-pack/legacy/plugins/integrations_manager/public/components/requirements.tsx +++ b/x-pack/legacy/plugins/integrations_manager/public/components/requirements.tsx @@ -39,9 +39,9 @@ export function Requirements(props: RequirementsProps) {
- + {' - '} - +
From 168601c834d66457d8f266178e0cafaffb9a5d84 Mon Sep 17 00:00:00 2001 From: Nicolas Ruflin Date: Thu, 24 Oct 2019 15:00:56 +0200 Subject: [PATCH 2/5] Update x-pack/legacy/plugins/integrations_manager/common/types.ts Co-Authored-By: John Schulz --- x-pack/legacy/plugins/integrations_manager/common/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/legacy/plugins/integrations_manager/common/types.ts b/x-pack/legacy/plugins/integrations_manager/common/types.ts index 71d1adf8b0049..281607632990c 100644 --- a/x-pack/legacy/plugins/integrations_manager/common/types.ts +++ b/x-pack/legacy/plugins/integrations_manager/common/types.ts @@ -60,7 +60,7 @@ export interface CategorySummaryItem { count: number; } -export type RequirementsByServiceName = Record; +export type RequirementsByServiceName = Record; export interface AssetParts { pkgkey: string; service: ServiceName; From 16ffecb8645f4ff27e191aa13c5f512980126706 Mon Sep 17 00:00:00 2001 From: Nicolas Ruflin Date: Thu, 24 Oct 2019 15:01:04 +0200 Subject: [PATCH 3/5] Update x-pack/legacy/plugins/integrations_manager/common/types.ts Co-Authored-By: John Schulz --- x-pack/legacy/plugins/integrations_manager/common/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/legacy/plugins/integrations_manager/common/types.ts b/x-pack/legacy/plugins/integrations_manager/common/types.ts index 281607632990c..016f1e5e13ef5 100644 --- a/x-pack/legacy/plugins/integrations_manager/common/types.ts +++ b/x-pack/legacy/plugins/integrations_manager/common/types.ts @@ -42,7 +42,7 @@ export type ServiceName = 'kibana' | 'elasticsearch' | 'filebeat' | 'metricbeat' export type RequirementVersion = string; export interface ServiceVersion { - version: ServiceRequirements; + version: RequirementVersionRange; } export interface ServiceRequirements { From e5627a9fb9080001d1730cd0711f3938c010e7d0 Mon Sep 17 00:00:00 2001 From: Nicolas Ruflin Date: Thu, 24 Oct 2019 15:01:10 +0200 Subject: [PATCH 4/5] Update x-pack/legacy/plugins/integrations_manager/common/types.ts Co-Authored-By: John Schulz --- x-pack/legacy/plugins/integrations_manager/common/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/legacy/plugins/integrations_manager/common/types.ts b/x-pack/legacy/plugins/integrations_manager/common/types.ts index 016f1e5e13ef5..363b319d17604 100644 --- a/x-pack/legacy/plugins/integrations_manager/common/types.ts +++ b/x-pack/legacy/plugins/integrations_manager/common/types.ts @@ -45,7 +45,7 @@ export interface ServiceVersion { version: RequirementVersionRange; } -export interface ServiceRequirements { +export interface RequirementVersionRange { min: RequirementVersion; max: RequirementVersion; } From 96001870adee1d07f6a7eca71432d802ae6c54b8 Mon Sep 17 00:00:00 2001 From: Nicolas Ruflin Date: Thu, 24 Oct 2019 15:01:16 +0200 Subject: [PATCH 5/5] Update x-pack/legacy/plugins/integrations_manager/common/types.ts Co-Authored-By: John Schulz --- x-pack/legacy/plugins/integrations_manager/common/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/legacy/plugins/integrations_manager/common/types.ts b/x-pack/legacy/plugins/integrations_manager/common/types.ts index 363b319d17604..590ff00746e3f 100644 --- a/x-pack/legacy/plugins/integrations_manager/common/types.ts +++ b/x-pack/legacy/plugins/integrations_manager/common/types.ts @@ -41,7 +41,7 @@ export interface ScreenshotItem { export type ServiceName = 'kibana' | 'elasticsearch' | 'filebeat' | 'metricbeat'; export type RequirementVersion = string; -export interface ServiceVersion { +export interface ServiceRequirements { version: RequirementVersionRange; }