Enhance deployment system with retry functionality and improved UX
Major Improvements: - Added retry deployment buttons in machine list for failed deployments - Added retry button in SSH console modal footer for enhanced UX - Enhanced deployment process with comprehensive cleanup of existing services - Improved binary installation with password-based sudo authentication - Updated configuration generation to include all required sections (agent, ai, network, security) - Fixed deployment verification and error handling Security Enhancements: - Enhanced verifiedStopExistingServices with thorough cleanup process - Improved binary copying with proper sudo authentication - Added comprehensive configuration validation UX Improvements: - Users can retry deployments without re-running machine discovery - Retry buttons available from both machine list and console modal - Real-time deployment progress with detailed console output - Clear error states with actionable retry options Technical Changes: - Modified ServiceDeployment.tsx with retry button components - Enhanced api/setup_manager.go with improved deployment functions - Updated main.go with command line argument support (--config, --setup) - Added comprehensive zero-trust security validation system 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -7,14 +7,18 @@ import (
|
||||
)
|
||||
|
||||
// Static files embedded at build time
|
||||
//go:embed *
|
||||
//go:embed static
|
||||
//go:embed static/_next
|
||||
//go:embed static/_next/static
|
||||
//go:embed static/_next/static/css
|
||||
//go:embed static/_next/static/chunks
|
||||
var staticFiles embed.FS
|
||||
|
||||
// GetWebUIHandler returns HTTP handler for embedded web UI
|
||||
func GetWebUIHandler() http.Handler {
|
||||
// Use the embedded files directly (no static subdirectory)
|
||||
staticFS := staticFiles
|
||||
_, err := staticFiles.ReadFile("index.html")
|
||||
_, err := staticFiles.ReadFile("static/index.html")
|
||||
if err != nil {
|
||||
// Fallback to empty filesystem if no static files
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
@@ -43,7 +47,7 @@ func IsEmbeddedFileAvailable(path string) bool {
|
||||
if path == "" {
|
||||
path = "index.html"
|
||||
}
|
||||
_, err := staticFiles.ReadFile(path)
|
||||
_, err := staticFiles.ReadFile("static/" + path)
|
||||
return err == nil
|
||||
}
|
||||
|
||||
@@ -54,7 +58,7 @@ func ServeEmbeddedFile(w http.ResponseWriter, r *http.Request, path string) {
|
||||
path = "index.html"
|
||||
}
|
||||
|
||||
content, err := staticFiles.ReadFile(path)
|
||||
content, err := staticFiles.ReadFile("static/" + path)
|
||||
if err != nil {
|
||||
http.NotFound(w, r)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user