Open MarAvFe opened 1 year ago
Sounds good! is this something that you want to contribute? :pray:
I am, yes! For what I've checked, I'm planning on a front and backend parts.
Frontend would be a list with all the created short links and a few statistics like the total, and the top 10 recently used. Or it could simply be that "Create" button on the software catalog, kind of how badges plugin works.
Backend would be:
Sounds good! I will assign you to the ticket! π
I have worked on it a little. Please checkout https://github.com/shailahir/backstage-plugin-shorturl and https://github.com/shailahir/backstage-plugin-shorturl-backend @MarAvFe @benjdlambert
transferring to the community plugins repo
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.
any chance we can get this opened back up? This is a cool plugin idea.
Yes! I had forgotten this. By the time I opened it, the task exceeded my backstage knowledge and I couldn't work on it. But I recently did my first collab to backstage and understand the contributing guides.
I was looking at it and @shailahir's code is mostly done! It might only be a matter of creating PR for front and backend.
I'll just add some optional config tweaks and submit the PR.
I was thinking this at one point to add as a tool to https://github.com/drodil/backstage-plugin-toolbox .. Maybe I will at some point now that I have good reference implementation π
I'd advise against that to keep the DB isolated. For a big team, if your shortlink is lost once, you lose trust in the library. And your references are immediately outdated.
Actually, this prompted me an idea. To have a frontend module with a "error redirecting" screen where you can error handle that case and lead the user for support.
One other consideration while weβre all excited about this would be associating a user/group as a βresponsibleβ party for the record. Could allow for modification/deletion permissions down the line.
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.
π Summary
A URL-shortener which you enable a path to detect. You go to
localhost:8080/short/ABC123
and backstage retrieves that theABC123
url exists and redirects the browser tolocalhost:8080/my/full/path/and/likely/long/link
π Project website (if applicable)
It could be implemented with https://github.com/ai/nanoid
βοΈ Context
Whenever a new entity is registered, a short URL can be generated and stored in DB as a key-value format. Then in the router component you add a prefix path like
/short
where the rest of the path will be matched to a long link in the db.Optionally, you can generate these short links only on demand on the entity page; adding a button to
Generate short URL
which stores the reference and returns the short url.π Have you spent some time to check if this plugin request has been raised before?
π’ Have you read the Code of Conduct?
Are you willing to submit PR?
Yes I am willing to submit a PR!