fixed
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -324,6 +325,12 @@ func (m *Manager) GetStacks() []Stack {
|
||||
for _, s := range m.stacks {
|
||||
result = append(result, *s)
|
||||
}
|
||||
|
||||
// Sort alphabetically by display name for consistent UI ordering
|
||||
sort.Slice(result, func(i, j int) bool {
|
||||
return result[i].Meta.DisplayName < result[j].Meta.DisplayName
|
||||
})
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
|
||||
@@ -390,11 +390,9 @@ func (s *Server) serveAsset(w http.ResponseWriter, r *http.Request, filename str
|
||||
func (s *Server) appDetailHandler(w http.ResponseWriter, r *http.Request, slug string) {
|
||||
for _, stack := range s.stackMgr.GetStacks() {
|
||||
if stack.Meta.Slug == slug {
|
||||
if !stack.Deployed {
|
||||
// Always redirect to deploy page — it has a read-only mode for
|
||||
// deployed apps showing current settings, plus the external link
|
||||
http.Redirect(w, r, "/stacks/"+stack.Name+"/deploy", http.StatusFound)
|
||||
} else {
|
||||
http.Redirect(w, r, "/stacks", http.StatusFound)
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user