Skip to content

Commit

Permalink
[EPM] Fix package version requirement structure (#49172)
Browse files Browse the repository at this point in the history
* [EPM] Fix package version requirement structure

In elastic/package-registry#134 the API structure changes. This PR should adjust to the new structure.

* Update x-pack/legacy/plugins/integrations_manager/common/types.ts

Co-Authored-By: John Schulz <github.com@jfsiii.org>

* Update x-pack/legacy/plugins/integrations_manager/common/types.ts

Co-Authored-By: John Schulz <github.com@jfsiii.org>

* Update x-pack/legacy/plugins/integrations_manager/common/types.ts

Co-Authored-By: John Schulz <github.com@jfsiii.org>

* Update x-pack/legacy/plugins/integrations_manager/common/types.ts

Co-Authored-By: John Schulz <github.com@jfsiii.org>
  • Loading branch information
2 people authored and John Schulz committed Oct 24, 2019
1 parent 7d9389b commit 0c683aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions x-pack/legacy/plugins/integrations_manager/common/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ServiceRequirements {
'version.min': RequirementVersion;
'version.max': RequirementVersion;
version: RequirementVersionRange;
}

export interface RequirementVersionRange {
min: RequirementVersion;
max: RequirementVersion;
}

// from /categories
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ export function Requirements(props: RequirementsProps) {
</EuiFlexItem>
<EuiFlexItem grow={false}>
<div>
<VersionBadge version={requirement['version.min']} />
<VersionBadge version={requirement.version.min} />
<span>{' - '}</span>
<VersionBadge version={requirement['version.max']} />
<VersionBadge version={requirement.version.max} />
</div>
</EuiFlexItem>
</EuiFlexGroup>
Expand Down

0 comments on commit 0c683aa

Please sign in to comment.