Skip to content
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

Merged
merged 20 commits into from
Sep 13, 2024
Merged

feat: [CCM-19101]: CCM Plugin for IDP #146

merged 20 commits into from
Sep 13, 2024

Conversation

rajarshee-harness
Copy link
Contributor

Describe your changes

This PR adds a CCM plugin for Backstage.

Checklist

  • I've documented the changes in the PR description.
  • I've tested this change either in PR or local environment.

Contributor license agreement

@rajarshee-harness rajarshee-harness requested review from a team as code owners August 29, 2024 05:17
Copy link
Collaborator

@OrkoHunter OrkoHunter left a 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."
Copy link
Collaborator

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

Copy link
Contributor Author

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.

Debanitrkl
Debanitrkl previously approved these changes Sep 9, 2024
Copy link
Member

@Debanitrkl Debanitrkl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@OrkoHunter
Copy link
Collaborator

@Debanitrkl @rajarshee-harness Let's ensure it works with

  1. vanity urls (app3.harness.io, company.harness.io, etc.)
  2. old and new nav urls both

We can't merge before that as it leads to confusion after deployment.

let projectId;
let perspectiveId;

const urlMatch = match(
Copy link
Member

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

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,
},
);
}

@Debanitrkl Debanitrkl dismissed their stale review September 9, 2024 09:33

Need few more changes

Copy link
Member

@Debanitrkl Debanitrkl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@rajarshee-harness rajarshee-harness merged commit 7ba2bed into main Sep 13, 2024
1 check passed
@rajarshee-harness rajarshee-harness deleted the CCM-19101 branch September 13, 2024 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants