Added working plugin manager prototype

- Added experimental plugin UI proxy
- Added plugin icon loader
- Added plugin table renderer
This commit is contained in:
Toby Chui
2025-02-27 22:27:13 +08:00
parent dd4df0b4db
commit bddff0cf2f
13 changed files with 294 additions and 39 deletions

View File

@@ -58,6 +58,19 @@ func FSHandler(handler http.Handler) http.Handler {
return
}
//For Plugin Routing
if strings.HasPrefix(r.URL.Path, "/plugin.ui/") {
//Extract the plugin ID from the request path
parts := strings.Split(r.URL.Path, "/")
if len(parts) > 2 {
pluginID := parts[2]
pluginManager.HandlePluginUI(pluginID, w, r)
} else {
http.Error(w, "Invalid Usage", http.StatusInternalServerError)
}
return
}
//For WebSSH Routing
//Example URL Path: /web.ssh/{{instance_uuid}}/*
if strings.HasPrefix(r.URL.Path, "/web.ssh/") {