Skip to content

Commit

Permalink
Fix integration labeling to identify S3 integrations (opensearch-proj…
Browse files Browse the repository at this point in the history
…ect#1157) (opensearch-project#1165)

* Switch from toast to callout for set up failures

* Fix label selection for truncated labels

* Fix button color

* Fix tests

* Remove loading progress bar

* Remove unused imports

* Refactor labels to make distinctions more semantically useful

---------

(cherry picked from commit 562c3e0)

Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 5beb92c)
  • Loading branch information
opensearch-trigger-bot[bot] authored and A9 Swift Project User committed Jan 8, 2024
1 parent c49a997 commit a959d04
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 27 deletions.
4 changes: 2 additions & 2 deletions auto_sync_commit_metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"last_github_commit": "e090a8860a034ef4a548be6c61ae41dc62a583f2",
"last_gitfarm_commit": "06aefad40784add9c3197ce60b7c3b39acc6ffba"
"last_github_commit": "5beb92c60f39d323622cf5d2e634a2cb28475073",
"last_gitfarm_commit": "06a33037b9d06b4000a49f566ad8e643b5fc6f63"
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ export function AvailableIntegrationOverviewPage(props: AvailableIntegrationOver
http.get(`${INTEGRATIONS_BASE}/repository`).then((exists) => {
setData(exists.data);

let newItems = exists.data.hits.flatMap((hit: { labels?: string[] }) => hit.labels ?? []);
let newItems = exists.data.hits.flatMap(
(hit: { labels?: string[] }) => hit.labels?.sort() ?? []
);
newItems = [...new Set(newItems)].sort().map((newItem) => {
return {
name: newItem,
Expand Down Expand Up @@ -182,13 +184,7 @@ export function AvailableIntegrationOverviewPage(props: AvailableIntegrationOver
{isCardView
? AvailableIntegrationsCardView({
data: {
hits: data.hits.filter((hit) =>
helper.every((compon) =>
hit.components
.map((x) => x.name.split('_').findLast(() => true))
.includes(compon)
)
),
hits: data.hits.filter((hit) => helper.every((tag) => hit.labels?.includes(tag))),
},
isCardView,
setCardView,
Expand All @@ -200,13 +196,7 @@ export function AvailableIntegrationOverviewPage(props: AvailableIntegrationOver
: AvailableIntegrationsTable({
loading: false,
data: {
hits: data.hits.filter((hit) =>
helper.every((compon) =>
hit.components
.map((x) => x.name.split('_').findLast(() => true))
.includes(compon)
)
),
hits: data.hits.filter((hit) => helper.every((tag) => hit.labels?.includes(tag))),
},
isCardView,
setCardView,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "Apache web logs collector",
"license": "Apache-2.0",
"type": "logs_apache",
"labels": ["log", "communication", "http"],
"labels": ["Observability", "Logs"],
"author": "OpenSearch",
"sourceUrl": "https://github.com/opensearch-project/dashboards-observability/tree/main/server/adaptors/integrations/__data__/repository/apache/info",
"statics": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "AWS cloudfront Object Store",
"license": "Apache-2.0",
"type": "logs-aws_cloudfront",
"labels": ["log", "aws", "s3", "cloud", "cloudfront"],
"labels": ["Observability", "Logs", "AWS", "Cloud"],
"author": "OpenSearch",
"sourceUrl": "https://github.com/opensearch-project/dashboards-observability/tree/main/server/adaptors/integrations/__data__/repository/aws_cloudfront/info",
"statics": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "AWS CloudTrail log collector",
"license": "Apache-2.0",
"type": "logs-aws_cloudtrail",
"labels": ["log", "aws", "s3", "cloud", "cloudtrail"],
"labels": ["Observability", "Logs", "AWS", "Flint S3", "Cloud"],
"author": "OpenSearch",
"sourceUrl": "https://github.com/opensearch-project/dashboards-observability/tree/main/server/adaptors/integrations/__data__/repository/aws_cloudtrail/info",
"statics": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "AWS Elastic Load Balancer collector",
"license": "Apache-2.0",
"type": "logs_elb",
"labels": ["log", "aws", "communication", "http", "cloud", "elb", "url"],
"labels": ["Observability", "Logs", "AWS", "Flint S3", "Cloud"],
"author": "OpenSearch",
"sourceUrl": "https://github.com/opensearch-project/dashboards-observability/tree/main/server/adaptors/integrations/__data__/repository/aws_elb/info",
"statics": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "AWS RDS",
"license": "Apache-2.0",
"type": "logs_rds",
"labels": ["log", "aws", "s3", "cloud", "rds"],
"labels": ["Observability", "Logs", "AWS", "Cloud"],
"author": "OpenSearch",
"sourceUrl": "https://github.com/opensearch-project/dashboards-observability/tree/main/server/adaptors/integrations/__data__/repository/aws_rds/info",
"statics": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "AWS S3 Object Store",
"license": "Apache-2.0",
"type": "logs_s3",
"labels": ["log", "aws", "s3", "cloud"],
"labels": ["Observability", "Logs", "AWS", "Cloud"],
"author": "OpenSearch",
"sourceUrl": "https://github.com/opensearch-project/dashboards-observability/tree/main/server/adaptors/integrations/__data__/repository/aws_s3/info",
"statics": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "AWS VPC Flow log collector",
"license": "Apache-2.0",
"type": "logs_vpc",
"labels": ["log", "aws", "s3", "cloud", "communication", "vpc"],
"labels": ["Observability", "Logs", "AWS", "Flint S3", "Cloud"],
"author": "Haidong Wang",
"sourceUrl": "https://github.com/opensearch-project/dashboards-observability/tree/main/server/adaptors/integrations/__data__/repository/aws_vpc_flow/info",
"statics": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "AWS waf log collector",
"license": "Apache-2.0",
"type": "logs_waf",
"labels": ["log", "aws", "s3", "cloud", "waf"],
"labels": ["Observability", "Logs", "AWS", "Cloud"],
"author": "OpenSearch",
"sourceUrl": "https://github.com/opensearch-project/dashboards-observability/tree/main/server/adaptors/integrations/__data__/repository/aws_waf/info",
"statics": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "Kubernetes web logs collector",
"license": "Apache-2.0",
"type": "logs-k8s",
"labels": ["log", "k8s", "cloud", "container"],
"labels": ["Observability", "Logs", "Cloud"],
"author": "OpenSearch",
"sourceUrl": "https://github.com/opensearch-project/dashboards-observability/tree/main/server/adaptors/integrations/__data__/repository/k8s/info",
"statics": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "Nginx HTTP server collector",
"license": "Apache-2.0",
"type": "logs",
"labels": ["log", "http", "communication"],
"labels": ["Observability", "Logs", "Flint S3"],
"author": "OpenSearch",
"sourceUrl": "https://github.com/opensearch-project/dashboards-observability/tree/main/server/adaptors/integrations/__data__/repository/nginx/info",
"statics": {
Expand Down
1 change: 1 addition & 0 deletions server/adaptors/integrations/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const templateSchema: JSONSchemaType<IntegrationConfig> = {
license: { type: 'string' },
type: { type: 'string' },
labels: { type: 'array', items: { type: 'string' }, nullable: true },
tags: { type: 'array', items: { type: 'string' }, nullable: true },
author: { type: 'string', nullable: true },
description: { type: 'string', nullable: true },
sourceUrl: { type: 'string', nullable: true },
Expand Down

0 comments on commit a959d04

Please sign in to comment.