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

Added support for links to tech-insight checks #1203

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

grantila
Copy link
Contributor

Add links support to checks

There is currently the possibility to add successMetadata and failureMetadata to each check. These objects are loosely typed, and there is no standard built-in way to use them. This means, the current views won't deal with them - you have to build your own views, or possibly override the description renderer. This is fine for very custom details.

I believe that links, whether a check passed or failed, are very useful. Companies likely have documentation for their checks, how to adhere to them, what they mean, etc. This is not always useful to fill in the description text, as that would bloat the UI quite a bit. Being able to click the result icon for a popup menu with links to where to read more, is very useful.

This PR adds support for this, with a new check property links (an array of {title, url} objects). These are added in the backend, where checks are defined. Some links however, need to be constructed when the Entity object is available, to be able to read annotations, and link to external systems (Dependabot, SonarQube, etc). These links can be added by building your own function that creates a list of links per (result, entity) pair. The dynamic (entity) links will be appended to the list of static links - the popup menu will show all of them combined.

When the built-in list of checks (the Scorecards) are rendered, the result icon/component will be wrapped and clickable, to show a popup menu with the links for this particular check.

Hovering the icon when it's clickable

Skärmavbild 2024-09-10 kl  15 26 35

Clicking the icon

Skärmavbild 2024-09-10 kl  15 26 52

Dynamic links

When a dynamic link is created in the UI for a specific entity, we can read the annotations and create a link to e.g. the very project of SonarQube:

Skärmavbild 2024-09-10 kl  15 31 11

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

@grantila grantila requested review from Xantier and a team as code owners September 10, 2024 13:35
@grantila grantila requested a review from nickboldt September 10, 2024 13:35
@backstage-goalie
Copy link
Contributor

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage-community/plugin-tech-insights-backend-module-jsonfc workspaces/tech-insights/plugins/tech-insights-backend-module-jsonfc patch v0.1.55
@backstage-community/plugin-tech-insights-common workspaces/tech-insights/plugins/tech-insights-common patch v0.2.17
@backstage-community/plugin-tech-insights-node workspaces/tech-insights/plugins/tech-insights-node patch v0.6.6
@backstage-community/plugin-tech-insights workspaces/tech-insights/plugins/tech-insights patch v0.3.34

@nickboldt
Copy link
Collaborator

Tests are failing - please review

This includes UI components to render a popup menu with these links, by default on the result icon in the scorecards view.

Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
@grantila grantila force-pushed the grantila/tech-insight-links branch from 4a164ed to 8ddba71 Compare September 11, 2024 08:25
@grantila
Copy link
Contributor Author

@nickboldt I forgot the api-reports, but they're there now. I think you or someone needs to approve the pipeline for this PR again.

Copy link
Contributor

@Xantier Xantier left a comment

Choose a reason for hiding this comment

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

Thanks @grantila,

This looks good to go.

@BethGriggs BethGriggs merged commit 1d33996 into backstage:main Sep 17, 2024
11 checks passed
Eswaraiahsapram pushed a commit to Eswaraiahsapram/community-plugins that referenced this pull request Sep 17, 2024
…cks (backstage#1203)

This includes UI components to render a popup menu with these links, by default on the result icon in the scorecards view.

Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
Eswaraiahsapram added a commit to Eswaraiahsapram/community-plugins that referenced this pull request Sep 17, 2024
Signed-off-by: Eswaraiahsapram <esapram@redhat.com>

fix(deps): update dependency dompurify to v3.1.3 [security] (backstage#1231)

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: backstage-goalie[bot] <97962292+backstage-goalie[bot]@users.noreply.github.com>

workspace(tech-insights): added support for links to tech-insight checks (backstage#1203)

This includes UI components to render a popup menu with these links, by default on the result icon in the scorecards view.

Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>

fix(deps): update dependency body-parser to v1.20.3 [security] (backstage#1206)

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: backstage-goalie[bot] <97962292+backstage-goalie[bot]@users.noreply.github.com>

plugin(linguist): marked `createRouter`, `createRouterFromConfig`, `RouterOptions`, and `PluginOptions` as deprecated (backstage#1198)

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

addressed review comments for argo resources timestamp

Signed-off-by: Eswaraiahsapram <esapram@redhat.com>
Eswaraiahsapram added a commit to Eswaraiahsapram/community-plugins that referenced this pull request Sep 19, 2024
# This is the 1st commit message:

fetching resources timestamp from k8s object

Signed-off-by: Eswaraiahsapram <esapram@redhat.com>

fix(deps): update dependency dompurify to v3.1.3 [security] (backstage#1231)

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: backstage-goalie[bot] <97962292+backstage-goalie[bot]@users.noreply.github.com>

workspace(tech-insights): added support for links to tech-insight checks (backstage#1203)

This includes UI components to render a popup menu with these links, by default on the result icon in the scorecards view.

Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>

fix(deps): update dependency body-parser to v1.20.3 [security] (backstage#1206)

Signed-off-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: backstage-goalie[bot] <97962292+backstage-goalie[bot]@users.noreply.github.com>

plugin(linguist): marked `createRouter`, `createRouterFromConfig`, `RouterOptions`, and `PluginOptions` as deprecated (backstage#1198)

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

addressed review comments for argo resources timestamp

Signed-off-by: Eswaraiahsapram <esapram@redhat.com>

# This is the commit message backstage#2:

fetched argo resources timestamp from k8s object

Signed-off-by: Eswaraiahsapram <esapram@redhat.com>

fetched argo resources timestamp from k8s object

Signed-off-by: Eswaraiahsapram <esapram@redhat.com>

fetched argo resources timestamp from k8s object

Signed-off-by: Eswaraiahsapram <esapram@redhat.com>
karthikjeeyar pushed a commit to karthikjeeyar/community-plugins that referenced this pull request Oct 28, 2024
…cks (backstage#1203)

This includes UI components to render a popup menu with these links, by default on the result icon in the scorecards view.

Signed-off-by: Gustaf Räntilä <g.rantila@gmail.com>
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.

4 participants