Add edit button to Missing Annotation Page
See original GitHub issueFeature Suggestion
When a plugin isn’t enabled, the Missing Annotation page is shown. At the bottom of the example, a Read More button is available to go to the docs to show how to add the annotation. It would be great if this page also included an Edit button to go straight to the meta data to update it as well.
Possible Implementation
I got the visual to work with this rough sample code:
<Grid container>
<Grid item>
<Button
variant="contained"
color="primary"
href="https://backstage.io/docs/features/software-catalog/well-known-annotations"
>
Edit Metadata
</Button>
</Grid>
<Grid item>
<Button
variant="contained"
color="primary"
href="https://backstage.io/docs/features/software-catalog/well-known-annotations"
>
Read more
</Button>
</Grid>
</Grid>
However, what’s really needed is essentially to reuse the code in the catalog plugin (https://github.com/backstage/backstage/blob/master/plugins/catalog/src/components/createEditLink.ts), but since this annotation is in core I wasn’t quite sure how to work that out. (move the catalog code INTO core perhaps?) Since I’m not quite sure, thought I’d open an enhancement to get other’s suggestions/feedback.
Context
It seems reasonable that as a user if I want say, tech docs to be enabled, the missing annotation page tells me not only how, but gives me a super quick link to go directly to the metadata file to actually edit it.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top GitHub Comments
@adamdmharvey - I completely agree. I would say that the first is a bit more nuanced though. Possibly split into 2 sub categories. First there are the cases where the backstage managing team needs to configure something globally across the org, and then an annotation can just be configured. The other is when the team needs to do some background work on each entity to configure it. Some examples of the latter for us are
sonarqube
setup requires CI changes, and the newpagerduty
plugin requires configuring integration keys for services. We are working to automate as much of this as possible, but some things are difficult to do that with.We’ve also introduced some custom annotation catalog processors where we automatically add annotations for things that can be done so using a convention. However, certain things are more difficult to do this with then others.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.