-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from YANG-DB/package-integration-CI
create auto summarize integration catalog as html page
- Loading branch information
Showing
5 changed files
with
359 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# Correcting the file path and re-reading the contents of the JSON file | ||
from beartype import beartype | ||
@beartype | ||
def generate_catalog_summery(file_path: str) -> bool: | ||
file_path = file_path + "/catalog.json" | ||
|
||
with open(file_path, 'r') as file: | ||
catalog_data = json.load(file) | ||
|
||
# Extracting the required fields | ||
catalog_name = catalog_data.get("catalog", "") | ||
version = catalog_data.get("version", "") | ||
url = catalog_data.get("url", "") | ||
description = catalog_data.get("description", "") | ||
display_name = catalog_data.get("displayName", "") | ||
license = catalog_data.get("license", "") | ||
labels = ", ".join(catalog_data.get("labels", [])) | ||
author = catalog_data.get("author", "") | ||
logo_path = catalog_data.get("statics", {}).get("logo", {}).get("path", "") | ||
components = catalog_data.get("components", []) | ||
|
||
# Creating the HTML content with updated component structure (including logo and gallery) | ||
|
||
html_content = f""" | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>{escape(display_name)}</title> | ||
<style> | ||
body {{ font-family: Arial, sans-serif; }} | ||
.container {{ max-width: 800px; margin: auto; }} | ||
.integrations {{ padding: 10px; border: 1px solid #ddd; margin-bottom: 10px; }} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h1>{escape(display_name)}</h1> | ||
<img src="{escape(logo_path)}" alt="Logo" /> | ||
<p><strong>Version:</strong> {escape(version)}</p> | ||
<p><strong>URL:</strong> <a href="{escape(url)}">{escape(url)}</a></p> | ||
<p><strong>Description:</strong> {escape(description)}</p> | ||
<p><strong>License:</strong> {escape(license)}</p> | ||
<p><strong>Labels:</strong> {escape(labels)}</p> | ||
<p><strong>Author:</strong> {escape(author)}</p> | ||
<h2>Integrations</h2> | ||
""" | ||
|
||
for component in components: | ||
component_name = component.get("component", "") | ||
component_description = component.get("description", "") | ||
component_version = component.get("version", "") | ||
component_logo = component.get("logo", "") | ||
component_url = component.get("url", "") | ||
component_tags = ", ".join(component.get("tags", [])) | ||
gallery = component.get("gallery", []) | ||
|
||
html_content += f""" | ||
<div class="integrations"> | ||
<h3>{escape(component_name)}</h3> | ||
<img src="{escape(component_logo)}" alt="{escape(component_name)} Logo" style="width: 75px; height: 75px;"/> | ||
<p><strong>Description:</strong> {escape(component_description)}</p> | ||
<p><strong>Version:</strong> {escape(component_version)}</p> | ||
<p><strong>URL:</strong> <a href="{escape(component_url)}">{escape(component_url)}</a></p> | ||
<p><strong>Tags:</strong> {escape(component_tags)}</p> | ||
<div class="gallery"> | ||
""" | ||
|
||
for asset in gallery: | ||
asset_name = asset.get("asset", "") | ||
asset_image = asset.get("image", "") | ||
html_content += f""" | ||
<div class="asset"> | ||
<img src="{escape(asset_image)}" alt="{escape(asset_name)}" style="width: 350px; height: 250px;"/> | ||
</div> | ||
""" | ||
|
||
html_content += """ | ||
</div> | ||
</div> | ||
""" | ||
|
||
html_content += """ | ||
</div> | ||
</body> | ||
</html> | ||
""" | ||
|
||
# Saving the updated HTML file | ||
html_file_path = file_path + "/catalog.html" | ||
with open(html_file_path, 'w') as file: | ||
file.write(html_content) | ||
return true | ||
|
||
if __name__ == "__main__": | ||
generate_catalog_summery("../../integrations/observability") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>OpenSearch Observability Integrations Catalog</title> | ||
<style> | ||
body { font-family: Arial, sans-serif; } | ||
.container { max-width: 800px; margin: auto; } | ||
.integrations { padding: 10px; border: 1px solid #ddd; margin-bottom: 10px; } | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<img src="https://opensearch.org/assets/brand/PNG/Logo/opensearch_logo_darkmode.png" style="width: 750px; height: 250px;" alt="Logo" /> | ||
<h1>OpenSearch Observability Integrations Catalog</h1> | ||
<p><strong>Version:</strong> 1.0</p> | ||
<p><strong>URL:</strong> <a href="https://github.com/opensearch-project/opensearch-catalog/integrations/observability">https://github.com/opensearch-project/opensearch-catalog/integrations/observability</a></p> | ||
<p><strong>Description:</strong> Observability integrations are a type of data that capture the events and activities occurring in a system. They reflect information such as user actions, system responses, and errors, providing valuable insights into system behavior. Integrations are well structured and include contextual information such as timestamps, unique identifiers, and metadata tags. Integrations can be used to visualize and troubleshoot performance issues, detect anomalies, and improve system performance by identifying areas for optimization</p> | ||
<p><strong>License:</strong> Apache-2.0</p> | ||
<p><strong>Labels:</strong> log, observability, http, aws, cloud, container</p> | ||
<p><strong>Author:</strong> OpenSearch</p> | ||
<h2>Integrations</h2> | ||
|
||
<div class="integrations"> | ||
<h3>Apache Integration</h3> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/apache/static/logo.png" style="width: 75px; height: 75px;" alt="Apache Integration Logo" /> | ||
<p><strong>Description:</strong> Apache is an open source web server software for modern operating systems including UNIX and Windows.</p> | ||
<p><strong>Version:</strong> 1.0</p> | ||
<p><strong>URL:</strong> <a href="https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/apache">https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/apache</a></p> | ||
<p><strong>Tags:</strong> log, communication, http</p> | ||
<div class="gallery"> | ||
|
||
<div class="asset"> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/apache/static/dashboard1.png" style="width: 350px; height: 250px;" alt="dashboard" /> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="integrations"> | ||
<h3>Amazon CloudFront Integration</h3> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/aws_cloudfront/static/logo.png" style="width: 75px; height: 75px;" alt="Amazon CloudFront Integration Logo" /> | ||
<p><strong>Description:</strong> Amazon CloudFront is a fast content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to customers globally with low latency and high transfer speeds. CloudFront is integrated with other Amazon Web Services products to give developers and businesses an easy way to distribute content to end-users with low latency and high data transfer speeds.</p> | ||
<p><strong>Version:</strong> 1.0</p> | ||
<p><strong>URL:</strong> <a href="https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/aws_cloudfront">https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/aws_cloudfront</a></p> | ||
<p><strong>Tags:</strong> log, aws, s3, cloud, cloudfront</p> | ||
<div class="gallery"> | ||
|
||
<div class="asset"> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/aws_cloudfront/static/dashboard.png" style="width: 350px; height: 250px;" alt="dashboard" /> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="integrations"> | ||
<h3>Amazon CloudTrail Integration</h3> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/aws_cloudtrail/static/logo.png" style="width: 75px; height: 75px;" alt="Amazon CloudTrail Integration Logo" /> | ||
<p><strong>Description:</strong> AWS CloudTrail is a service that enables governance, compliance, operational auditing, and risk auditing of your AWS account. With CloudTrail, you can log, continuously monitor, and retain account activity related to actions across your AWS infrastructure.</p> | ||
<p><strong>Version:</strong> 1.0</p> | ||
<p><strong>URL:</strong> <a href="https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/aws_cloudtrail">https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/aws_cloudtrail</a></p> | ||
<p><strong>Tags:</strong> log, aws, s3, cloud, cloudtrail</p> | ||
<div class="gallery"> | ||
|
||
<div class="asset"> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/aws_cloudtrail/static/dashboard.png" style="width: 350px; height: 250px;" alt="dashboard" /> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="integrations"> | ||
<h3>Amazon ELB Integration</h3> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/aws_elb/static/logo.svg" style="width: 75px; height: 75px;"alt="Amazon ELB Integration Logo" /> | ||
<p><strong>Description:</strong> ELB Access Logs is a feature that allows you to capture information about requests sent to your load balancer.</p> | ||
<p><strong>Version:</strong> 1.0</p> | ||
<p><strong>URL:</strong> <a href="https://github.com/opensearch-project/opensearch-catalog/main/integrations/observability/aws_elb">https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/aws_elb</a></p> | ||
<p><strong>Tags:</strong> log, aws, communication, http, cloud, elb, url</p> | ||
<div class="gallery"> | ||
|
||
<div class="asset"> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/aws_elb/static/dashboard1.png" style="width: 350px; height: 250px;" alt="dashboard" /> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="integrations"> | ||
<h3>Amazon RDS Integration</h3> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/aws_rds/static/logo.png" style="width: 75px; height: 75px;" alt="Amazon RDS Integration Logo" /> | ||
<p><strong>Description:</strong> AWS RDS (Relational Database Service) is a managed service that makes it easy to set up, operate, and scale a relational database in the cloud.</p> | ||
<p><strong>Version:</strong> 1.0</p> | ||
<p><strong>URL:</strong> <a href="https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/aws_rds">https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/aws_rds</a></p> | ||
<p><strong>Tags:</strong> log, aws, s3, cloud, rds</p> | ||
<div class="gallery"> | ||
|
||
<div class="asset"> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/aws_rds/static/dashboard.png" style="width: 350px; height: 250px;"alt="dashboard" /> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="integrations"> | ||
<h3>Amazon S3 Integration</h3> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/aws_s3/static/logo.png" style="width: 75px; height: 75px;" alt="Amazon S3 Integration Logo" /> | ||
<p><strong>Description:</strong> Amazon S3 (Simple Storage Service) is an object storage service that offers industry-leading scalability, data availability, security, and performance. It is designed to make web-scale computing easier for developers.</p> | ||
<p><strong>Version:</strong> 1.0</p> | ||
<p><strong>URL:</strong> <a href="https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/aws_s3">https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/aws_s3</a></p> | ||
<p><strong>Tags:</strong> log, aws, s3, cloud</p> | ||
<div class="gallery"> | ||
|
||
<div class="asset"> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/aws_s3/static/dashboard.png" style="width: 350px; height: 250px;" alt="dashboard" /> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="integrations"> | ||
<h3>Amazon VPC Flow Integration</h3> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/aws_vpc_flow/static/logo.svg" style="width: 75px; height: 75px;"alt="Amazon VPC Flow Integration Logo" /> | ||
<p><strong>Description:</strong> AWS VPC Flow Logs is a feature that enables you to capture information about the IP traffic going to and from network interfaces in your VPC.</p> | ||
<p><strong>Version:</strong> 1.0</p> | ||
<p><strong>URL:</strong> <a href="https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/aws_vpc_flow">https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/aws_vpc_flow</a></p> | ||
<p><strong>Tags:</strong> log, aws, s3, cloud, communication, vpc</p> | ||
<div class="gallery"> | ||
|
||
<div class="asset"> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/aws_vpc_flow/static/dashboard1.png" style="width: 350px; height: 250px;" alt="dashboard" /> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="integrations"> | ||
<h3>Amazon WAF Integration</h3> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/aws_waf/static/logo.png" style="width: 75px; height: 75px;" alt="Amazon WAF Integration Logo" /> | ||
<p><strong>Description:</strong> AWS WAF (Web Application Firewall) is a web application firewall service that helps protect your web applications from common web exploits that could affect application availability, compromise security, or consume excessive resources. AWS WAF provides firewall rules to filter and monitor HTTP/HTTPS requests based on specific conditions.</p> | ||
<p><strong>Version:</strong> 1.0</p> | ||
<p><strong>URL:</strong> <a href="https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/aws_waf">https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/aws_waf</a></p> | ||
<p><strong>Tags:</strong> log, aws, s3, cloud, waf</p> | ||
<div class="gallery"> | ||
|
||
<div class="asset"> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/aws_waf/static/dashboard.png" style="width: 350px; height: 250px;"alt="dashboard" /> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="integrations"> | ||
<h3>Kubernetes Integration</h3> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/k8s/static/logo.png" style="width: 75px; height: 75px;" alt="Kubernetes Integration Logo" /> | ||
<p><strong>Description:</strong> Kubernetes is an open-source container orchestration platform that automates the deployment, scaling, and management of containerized applications. It provides a robust and scalable infrastructure for running applications in a cloud-native environment. | ||
/HTTPS requests based on specific conditions.</p> | ||
<p><strong>Version:</strong> 1.0</p> | ||
<p><strong>URL:</strong> <a href="https://github.com/opensearch-project/opensearch-catalog/main/integrations/observability/k8s">https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/k8s</a></p> | ||
<p><strong>Tags:</strong> log, k8s, cloud, container</p> | ||
<div class="gallery"> | ||
|
||
<div class="asset"> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/k8s/static/dashboard.png" style="width: 350px; height: 250px;" alt="dashboard" /> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="integrations"> | ||
<h3>Nginx Integration</h3> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/nginx/static/logo.svg" style="width: 75px; height: 75px;" alt="Nginx Integration Logo" /> | ||
<p><strong>Description:</strong> NGINX is open source software for web serving, reverse proxying, caching, load balancing, media streaming, and more./HTTPS requests based on specific conditions.</p> | ||
<p><strong>Version:</strong> 1.0</p> | ||
<p><strong>URL:</strong> <a href="https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/nginx">https://github.com/opensearch-project/opensearch-catalog/blob/main/integrations/observability/nginx</a></p> | ||
<p><strong>Tags:</strong> log, http, communication</p> | ||
<div class="gallery"> | ||
|
||
<div class="asset"> | ||
<img src="https://raw.githubusercontent.com/opensearch-project/opensearch-catalog/main/integrations/observability/nginx/static/dashboard1.png" style="width: 350px; height: 250px;"alt="dashboard" /> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.