-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: [CCM-19101]: CCM Plugin for IDP #146
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work Rajarshee!
Please ensure you update the main README.md as well marking CCM as done and pointing to the installation instructions.
We also need a README inside the plugin with couple of screenshots. For example - https://github.com/harness/backstage-plugins/tree/main/plugins/harness-iacm
<EmptyState | ||
title="No Cloud Cost Management data available for this entity" | ||
missing="info" | ||
description="You need to add an annotation to your component if you want to enable Cloud Cost Management for it. You can read more about annotations in Backstage by clicking the button below." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add the annotation info here? harness.io/perspective-url
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback! I have made the requested changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@Debanitrkl @rajarshee-harness Let's ensure it works with
We can't merge before that as it leads to confusion after deployment. |
let projectId; | ||
let perspectiveId; | ||
|
||
const urlMatch = match( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rajarshee-harness here we need to add all the URLs that are available for perspective ID, like new nav old nav unified view, example
backstage-plugins/plugins/harness-ci-cd/src/hooks/useProjectSlugEntity.tsx
Lines 25 to 67 in 41c0601
if (containsModule) { | |
pipelineUrlMatch = match( | |
'(.*)/account/:accountId/module/:module/orgs/:orgId/projects/:projectId/pipelines/:pipelineId/(.*)', | |
{ | |
decode: decodeURIComponent, | |
}, | |
); | |
serviceUrlMatch = match( | |
'(.*)/account/:accountId/module/:module/orgs/:orgId/projects/:projectId/services/:serviceId', | |
{ | |
decode: decodeURIComponent, | |
}, | |
); | |
} else if (containsAll) { | |
pipelineUrlMatch = match( | |
'(.*)/account/:accountId/all/orgs/:orgId/projects/:projectId/pipelines/:pipelineId/(.*)', | |
{ | |
decode: decodeURIComponent, | |
}, | |
); | |
serviceUrlMatch = match( | |
'(.*)/account/:accountId/all/orgs/:orgId/projects/:projectId/services/:serviceId', | |
{ | |
decode: decodeURIComponent, | |
}, | |
); | |
} else { | |
pipelineUrlMatch = match( | |
'(.*)/account/:accountId/:module/orgs/:orgId/projects/:projectId/pipelines/:pipelineId/(.*)', | |
{ | |
decode: decodeURIComponent, | |
}, | |
); | |
serviceUrlMatch = match( | |
'(.*)/account/:accountId/:module/orgs/:orgId/projects/:projectId/services/:serviceId', | |
{ | |
decode: decodeURIComponent, | |
}, | |
); | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Describe your changes
This PR adds a CCM plugin for Backstage.
Checklist
Contributor license agreement