Skip to content

Commit

Permalink
Update integration format for multiple asset types (#1498)
Browse files Browse the repository at this point in the history
* Update integration type for new format

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

* Update integration type validator for new type

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

* Fix type errors in integration_reader

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

* Fix return types in adaptor

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

* Update integrations constants

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

* Fix local repository and local repository tests

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

* Fix remaining integrations unit tests

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

* Add integration format migration

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

* Fix frontend usage of integration assets

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

* Update integration install query iteration

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>

---------

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
  • Loading branch information
Swiddis authored Mar 8, 2024
1 parent 290415a commit b5ee6f8
Show file tree
Hide file tree
Showing 36 changed files with 679 additions and 470 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ exports[`Added Integration Table View Test Renders added integration table view
Object {
"hits": Array [
Object {
"addedBy": "admin",
"assets": Array [
Object {
"assetId": "3fc41705-8a23-49f4-926c-2819e0d7306d",
Expand Down Expand Up @@ -79,13 +80,15 @@ exports[`Added Integration Table View Test Renders added integration table view
},
"id": "ad7e6e30-0b99-11ee-b27c-c9863222e9bf",
"name": "nginx",
"status": "active",
"templateName": "nginx",
},
],
"total": 1,
}
}
http={[MockFunction]}
loading={false}
setData={[Function]}
>
<EuiPageContent
data-test-subj="addedIntegrationsArea"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ exports[`Available Integration Card View Test Renders nginx integration card vie
Object {
"hits": Array [
Object {
"assets": Object {
"savedObjects": Object {
"assets": Array [
Object {
"extension": "ndjson",
"name": "nginx",
"type": "savedObjectBundle",
"version": "1.0.1",
},
},
],
"author": "John Doe",
"components": Array [
Object {
Expand All @@ -29,7 +31,6 @@ exports[`Available Integration Card View Test Renders nginx integration card vie
],
"description": "Nginx HTTP server collector",
"displayName": "NginX Dashboard",
"integrationType": "logs",
"license": "Apache-2.0",
"name": "nginx",
"sourceUrl": "https://github.com/",
Expand All @@ -55,8 +56,12 @@ exports[`Available Integration Card View Test Renders nginx integration card vie
],
}
}
http={[MockFunction]}
isCardView={false}
query=""
renderCateogryFilters={[Function]}
showModal={[Function]}
setCardView={[Function]}
setQuery={[Function]}
>
<EuiPanel>
<div
Expand Down Expand Up @@ -462,6 +467,118 @@ exports[`Available Integration Card View Test Renders nginx integration card vie
className="euiSpacer euiSpacer--l"
/>
</EuiSpacer>
<EuiFlexGroup
gutterSize="l"
style={
Object {
"flexWrap": "wrap",
}
}
>
<div
className="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--directionRow euiFlexGroup--responsive"
style={
Object {
"flexWrap": "wrap",
}
}
>
<EuiFlexItem
key="0"
style={
Object {
"maxWidth": "14rem",
"minWidth": "14rem",
}
}
>
<div
className="euiFlexItem"
style={
Object {
"maxWidth": "14rem",
"minWidth": "14rem",
}
}
>
<EuiCard
data-test-subj="integration_card_nginx"
description="Nginx HTTP server collector"
footer={<EuiBadgeGroup />}
onClick={[Function]}
title="NginX Dashboard"
titleElement="span"
>
<EuiPanel
className="euiCard euiCard--centerAligned euiCard--isClickable"
data-test-subj="integration_card_nginx"
element="div"
hasShadow={true}
onClick={[Function]}
>
<div
className="euiPanel euiPanel--paddingMedium euiPanel--borderRadiusMedium euiPanel--plain euiPanel--hasShadow euiPanel--isClickable euiCard euiCard--centerAligned euiCard--isClickable"
data-test-subj="integration_card_nginx"
onClick={[Function]}
>
<div
className="euiCard__content"
>
<EuiTitle
className="euiCard__title"
id="random_html_idTitle"
size="s"
>
<span
className="euiTitle euiTitle--small euiCard__title"
id="random_html_idTitle"
>
<button
aria-describedby=" random_html_idDescription"
className="euiCard__titleButton"
disabled={false}
onClick={[Function]}
>
NginX Dashboard
</button>
</span>
</EuiTitle>
<EuiText
className="euiCard__description"
id="random_html_idDescription"
size="s"
>
<div
className="euiText euiText--small euiCard__description"
id="random_html_idDescription"
>
<p>
Nginx HTTP server collector
</p>
</div>
</EuiText>
</div>
<div
className="euiCard__footer"
>
<EuiBadgeGroup>
<div
className="euiBadgeGroup euiBadgeGroup--gutterExtraSmall"
/>
</EuiBadgeGroup>
</div>
</div>
</EuiPanel>
</EuiCard>
</div>
</EuiFlexItem>
</div>
</EuiFlexGroup>
<EuiSpacer>
<div
className="euiSpacer euiSpacer--l"
/>
</EuiSpacer>
</div>
</EuiPanel>
</AvailableIntegrationsCardView>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ exports[`Available Integration Table View Test Renders nginx integration table v
Object {
"hits": Array [
Object {
"assets": Object {
"savedObjects": Object {
"assets": Array [
Object {
"extension": "ndjson",
"name": "nginx",
"type": "savedObjectBundle",
"version": "1.0.1",
},
},
],
"author": "John Doe",
"components": Array [
Object {
Expand All @@ -29,7 +31,6 @@ exports[`Available Integration Table View Test Renders nginx integration table v
],
"description": "Nginx HTTP server collector",
"displayName": "NginX Dashboard",
"integrationType": "logs",
"license": "Apache-2.0",
"name": "nginx",
"sourceUrl": "https://github.com/",
Expand All @@ -55,9 +56,10 @@ exports[`Available Integration Table View Test Renders nginx integration table v
],
}
}
isCardView={false}
loading={false}
renderCateogryFilters={[Function]}
showModal={[Function]}
setCardView={[Function]}
>
<EuiPageContent
id="availableIntegrationsArea"
Expand Down Expand Up @@ -110,12 +112,14 @@ exports[`Available Integration Table View Test Renders nginx integration table v
items={
Array [
Object {
"assets": Object {
"savedObjects": Object {
"assets": Array [
Object {
"extension": "ndjson",
"name": "nginx",
"type": "savedObjectBundle",
"version": "1.0.1",
},
},
],
"author": "John Doe",
"components": Array [
Object {
Expand All @@ -133,7 +137,6 @@ exports[`Available Integration Table View Test Renders nginx integration table v
],
"description": "Nginx HTTP server collector",
"displayName": "NginX Dashboard",
"integrationType": "logs",
"license": "Apache-2.0",
"name": "nginx",
"sourceUrl": "https://github.com/",
Expand Down Expand Up @@ -702,12 +705,14 @@ exports[`Available Integration Table View Test Renders nginx integration table v
items={
Array [
Object {
"assets": Object {
"savedObjects": Object {
"assets": Array [
Object {
"extension": "ndjson",
"name": "nginx",
"type": "savedObjectBundle",
"version": "1.0.1",
},
},
],
"author": "John Doe",
"components": Array [
Object {
Expand All @@ -725,7 +730,6 @@ exports[`Available Integration Table View Test Renders nginx integration table v
],
"description": "Nginx HTTP server collector",
"displayName": "NginX Dashboard",
"integrationType": "logs",
"license": "Apache-2.0",
"name": "nginx",
"sourceUrl": "https://github.com/",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ exports[`Integration Setup Page Renders integration setup page as expected 1`] =
}
integration={
Object {
"assets": Object {},
"assets": Array [],
"components": Array [],
"license": "",
"name": "sample",
"type": "",
"version": "",
}
}
setupCallout={
Expand Down Expand Up @@ -718,9 +721,12 @@ exports[`Integration Setup Page Renders integration setup page as expected 1`] =
}
integration={
Object {
"assets": Object {},
"assets": Array [],
"components": Array [],
"license": "",
"name": "sample",
"type": "",
"version": "",
}
}
loading={false}
Expand Down Expand Up @@ -1052,18 +1058,22 @@ exports[`Integration Setup Page Renders the form as expected 1`] = `
config={
Object {
"connectionDataSource": "ss4o_logs-nginx-test",
"connectionLocation": "",
"connectionTableName": "",
"connectionType": "index",
"displayName": "Test Instance Name",
}
}
integration={
Object {
"assets": Object {
"savedObjects": Object {
"assets": Array [
Object {
"extension": "ndjson",
"name": "sample",
"type": "savedObjectBundle",
"version": "1.0.1",
},
},
],
"components": Array [
Object {
"name": "logs",
Expand Down
Loading

0 comments on commit b5ee6f8

Please sign in to comment.