Skip to content

Commit

Permalink
rename to graviton savings dashboard (#953)
Browse files Browse the repository at this point in the history
* rename to graviton savings dashboard

* allow unistsall graviton dashboard

---------

Co-authored-by: Iakov Gan <iakov@amazon.com>
  • Loading branch information
yprikhodko and iakov-aws authored Sep 27, 2024
1 parent cc94e5e commit 46e9baf
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
7 changes: 6 additions & 1 deletion cid/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,12 @@ def load_catalog(self, catalog_url):
''' load additional resources from catalog
'''
try:
catalog = yaml.safe_load(self.get_page(catalog_url).text)
if 'https://' in catalog_url:
text = self.get_page(catalog_url).text
else:
with open(catalog_url, encoding='utf-8') as catalog_file:
text = catalog_file.read()
catalog = yaml.safe_load(text)
except (requests.exceptions.RequestException, yaml.error.MarkedYAMLError) as exc:
logger.warning(f'Failed to load a catalog url: {exc}')
logger.debug(exc, exc_info=True)
Expand Down
3 changes: 2 additions & 1 deletion dashboards/catalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Resources:
- Url: data-transfer/DataTransfer-Cost-Analysis-Dashboard.yaml
- Url: aws-marketplace/aws-marketplace-spg.yaml
- Url: extended-support-cost-projection/extended-support-cost-projection.yaml
- Url: graviton-opportunities-dashboard/graviton_dashboard.yaml
- Url: graviton-savings-dashboard/graviton_savings_dashboard.yaml
- Url: graviton-savings-dashboard/graviton_legacy.yaml # deprecated
- Url: health-events/health-events.yaml
- Url: scad-containers-cost-allocation/scad-containers-cost-allocation.yaml
- Url: aws-feeds/aws-feeds.yaml
Expand Down
14 changes: 14 additions & 0 deletions dashboards/graviton-savings-dashboard/graviton_legacy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
dashboards:
GRAVITON_DASHBOARD:
dependsOn:
datasets:
- graviton_ec2_view
- graviton_elasticache_view
- graviton_opensearch_view
- graviton_rds_view
name: Graviton Opportunities Dashboard
deprecationNotice: "This version is deprecated. Delete it and install 'graviton-savings' instead."
dashboardId: graviton-opportunities
category: Advanced
theme: MIDNIGHT
data: '{}'
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
dashboards:
GRAVITON_DASHBOARD:
GRAVITON_SAVINGS_DASHBOARD:
dependsOn:
datasets:
- graviton_ec2_view
- graviton_elasticache_view
- graviton_opensearch_view
- graviton_rds_view
name: Graviton Opportunities Dashboard
dashboardId: graviton-opportunities
name: Graviton Savings Dashboard
dashboardId: graviton-savings
category: Advanced
theme: MIDNIGHT
data: |-
Expand Down

0 comments on commit 46e9baf

Please sign in to comment.