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

Add native web interface support for plugins inside the ASF UI. #2876

Closed
7 tasks done
fazelukario opened this issue Apr 9, 2023 · 7 comments
Closed
7 tasks done

Add native web interface support for plugins inside the ASF UI. #2876

fazelukario opened this issue Apr 9, 2023 · 7 comments
Labels
✨ Enhancement Issues marked with this label indicate further enhancements to the program, such as new features. 🏁 Finished Issues marked with this label were finished already and no further work is required on them. 🟢 Low priority Issues marked with this label are actively being worked on if nothing serious is on the list. 🙏 Wishlist Issues marked with this label are wishlisted. We'd like to make them happen but they're not crucial.

Comments

@fazelukario
Copy link
Contributor

fazelukario commented Apr 9, 2023

Checklist

Enhancement purpose

Currently ASF only supports creating IPC API endpoints for plugins. The proposal is to add the ability to create their own plugin web interface for plugin creators.

Solution

Add the ability to create a plugin web interface inside ASF IPC, for example available at "http://127.0.0.1:1242/plugin/<pluginName>/". Make this option optional for plugin creators and users, and default to false. Web interface files can be placed, for example, in the path "path/to/ASF/plugins/<pluginName>/www".

Why currently available solutions are not sufficient?

Current solutions allow you to create only IPC API endpoints, which is not enough to create full-fledged plugins with a user friendly interface.

Can you help us with this enhancement idea?

Yes, I can code the solution myself and send a pull request

Additional info

No response

@fazelukario fazelukario added ✨ Enhancement Issues marked with this label indicate further enhancements to the program, such as new features. 👀 Evaluation Issues marked with this label are currently being evaluated if they're going to be considered. labels Apr 9, 2023
@Abrynos
Copy link
Member

Abrynos commented Apr 9, 2023

The way I see it that's ASF-ui issue and not core repository.

@fazelukario
Copy link
Contributor Author

The way I see it that's ASF-ui issue and not core repository.

No, this is an ASF issue, not ASF-ui, as ASF itself has no support for a web GUI for plugins.

@Rudokhvist
Copy link
Member

The way I see it that's ASF-ui issue and not core repository.

Well, the way I see it is that at least some way to inform asf-ui about existence of ui in plugin is needed, like some flag or something like that. But yes, we can just make some agreement about a way to inform ASF-ui about existence of ui in a plugin, like some endpoint or some specific name or version pattern, and then we won't need any changes in ASF at all.

@Abrynos
Copy link
Member

Abrynos commented Apr 9, 2023

The way I see it that's ASF-ui issue and not core repository.

Well, the way I see it is that at least some way to inform asf-ui about existence of ui in plugin is needed, like some flag or something like that.

I already asked Archi on our discord for that (and had PR ready locally) but he didn't like the idea and told me to make ASF-ui check for predefined URI based on plugin name instead

@JustArchi JustArchi added 🙏 Wishlist Issues marked with this label are wishlisted. We'd like to make them happen but they're not crucial. 🟢 Low priority Issues marked with this label are actively being worked on if nothing serious is on the list. and removed 👀 Evaluation Issues marked with this label are currently being evaluated if they're going to be considered. labels Apr 9, 2023
@JustArchi
Copy link
Member

Nothing you need ASF core support for.

First of all, API endpoints are not used for JSON output only, you can use it for outputting other files as well, whether static ones, or dynamic, see ASP.NET MVC pattern for example (and you don't need ASF support for that, you can already implement it yourself).

Secondly, what you effectively want is another IPC interface serving files from custom location. Once again, you can already do that - host your own IPC on your own custom port with your own custom files.

But there is also one thing we actually can do, adding ASF support for serving WWW files from several locations, as per https://learn.microsoft.com/en-us/aspnet/core/fundamentals/static-files?view=aspnetcore-7.0#serve-files-from-multiple-locations - and this is the part I consider good as ASF enhancement, because it'll allow you to achieve the same without second IPC interface and it doesn't cost ASF almost anything to add support for it.

I can code it myself but if you want to do it then proper thing is to evaluate plugins/*/www path and add static files as per the doc for each file location that exists.

@JustArchi JustArchi added the 👍 PR-ok Issues marked with this label are good candidates for being accepted in a pull request. label Apr 9, 2023
@fazelukario
Copy link
Contributor Author

But there is also one thing we actually can do, adding ASF support for serving WWW files from several locations, as per https://learn.microsoft.com/en-us/aspnet/core/fundamentals/static-files?view=aspnetcore-7.0#serve-files-from-multiple-locations - and this is the part I consider good as ASF enhancement, because it'll allow you to achieve the same without second IPC interface and it doesn't cost ASF almost anything to add support for it.

Yes, that's what I meant in the first place.

I can code it myself but if you want to do it then proper thing is to evaluate plugins/*/www path and add static files as per the doc for each file location that exists.

Yes, it would be great if you did.

@fazelukario
Copy link
Contributor Author

fazelukario commented Apr 10, 2023

@JustArchi Done with PR (#2877).

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 20, 2023
@JustArchi JustArchi added the 🏁 Finished Issues marked with this label were finished already and no further work is required on them. label Jun 17, 2024
@JustArchi JustArchi added 🏁 Finished Issues marked with this label were finished already and no further work is required on them. and removed 🏁 Finished Issues marked with this label were finished already and no further work is required on them. 👍 PR-ok Issues marked with this label are good candidates for being accepted in a pull request. labels Jul 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
✨ Enhancement Issues marked with this label indicate further enhancements to the program, such as new features. 🏁 Finished Issues marked with this label were finished already and no further work is required on them. 🟢 Low priority Issues marked with this label are actively being worked on if nothing serious is on the list. 🙏 Wishlist Issues marked with this label are wishlisted. We'd like to make them happen but they're not crucial.
Projects
None yet
Development

No branches or pull requests

4 participants