Skip to content

Commit

Permalink
Revert "Fix integration labeling to identify S3 integrations (opensea…
Browse files Browse the repository at this point in the history
…rch-project#1157) (opensearch-project#1164)"

This reverts commit 9de9aea.

Signed-off-by: Eric <menwe@amazon.com>
  • Loading branch information
mengweieric committed Nov 8, 2023
1 parent 389fddf commit ebcd7c0
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ 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?.sort() ?? []
);
let newItems = exists.data.hits.flatMap((hit: { labels?: string[] }) => hit.labels ?? []);
newItems = [...new Set(newItems)].sort().map((newItem) => {
return {
name: newItem,
Expand Down Expand Up @@ -184,7 +182,13 @@ export function AvailableIntegrationOverviewPage(props: AvailableIntegrationOver
{isCardView
? AvailableIntegrationsCardView({
data: {
hits: data.hits.filter((hit) => helper.every((tag) => hit.labels?.includes(tag))),
hits: data.hits.filter((hit) =>
helper.every((compon) =>
hit.components
.map((x) => x.name.split('_').findLast(() => true))
.includes(compon)
)
),
},
isCardView,
setCardView,
Expand All @@ -196,7 +200,13 @@ export function AvailableIntegrationOverviewPage(props: AvailableIntegrationOver
: AvailableIntegrationsTable({
loading: false,
data: {
hits: data.hits.filter((hit) => helper.every((tag) => hit.labels?.includes(tag))),
hits: data.hits.filter((hit) =>
helper.every((compon) =>
hit.components
.map((x) => x.name.split('_').findLast(() => true))
.includes(compon)
)
),
},
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": ["Observability", "Logs"],
"labels": ["log", "communication", "http"],
"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": ["Observability", "Logs", "AWS", "Cloud"],
"labels": ["log", "aws", "s3", "cloud", "cloudfront"],
"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": ["Observability", "Logs", "AWS", "Flint S3", "Cloud"],
"labels": ["log", "aws", "s3", "cloud", "cloudtrail"],
"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": ["Observability", "Logs", "AWS", "Flint S3", "Cloud"],
"labels": ["log", "aws", "communication", "http", "cloud", "elb", "url"],
"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": ["Observability", "Logs", "AWS", "Cloud"],
"labels": ["log", "aws", "s3", "cloud", "rds"],
"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": ["Observability", "Logs", "AWS", "Cloud"],
"labels": ["log", "aws", "s3", "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": ["Observability", "Logs", "AWS", "Flint S3", "Cloud"],
"labels": ["log", "aws", "s3", "cloud", "communication", "vpc"],
"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": ["Observability", "Logs", "AWS", "Cloud"],
"labels": ["log", "aws", "s3", "cloud", "waf"],
"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": ["Observability", "Logs", "Cloud"],
"labels": ["log", "k8s", "cloud", "container"],
"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": ["Observability", "Logs", "Flint S3"],
"labels": ["log", "http", "communication"],
"author": "OpenSearch",
"sourceUrl": "https://github.com/opensearch-project/dashboards-observability/tree/main/server/adaptors/integrations/__data__/repository/nginx/info",
"statics": {
Expand Down
1 change: 0 additions & 1 deletion server/adaptors/integrations/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ 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 ebcd7c0

Please sign in to comment.