v0.27.2 — copyable error popups, Tier2 hub reporting, memory bar fixes, new labels
- Replace native alert() with custom showAlert() modal (text selectable) - Manual Tier2 backup now pushes infra backup to Hub - CommittedMemory() excludes stopped/exited apps - Pre-start memory check blocks start if insufficient RAM - Add hungarian_ui metadata field + "Magyar felület" badge - Add "USB" badge on storage cards in settings page Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -756,7 +756,9 @@ func ParseMemoryMB(s string) int {
|
||||
return int(val)
|
||||
}
|
||||
|
||||
// CommittedMemory returns the sum of mem_request and mem_limit across all deployed stacks.
|
||||
// CommittedMemory returns the sum of mem_request and mem_limit across all
|
||||
// deployed stacks that are currently running (or starting/unhealthy/restarting).
|
||||
// Stopped and exited apps are excluded since they do not consume memory.
|
||||
func (m *Manager) CommittedMemory() (requestMB int, limitMB int) {
|
||||
m.mu.RLock()
|
||||
defer m.mu.RUnlock()
|
||||
@@ -765,12 +767,25 @@ func (m *Manager) CommittedMemory() (requestMB int, limitMB int) {
|
||||
if !s.Deployed {
|
||||
continue
|
||||
}
|
||||
if s.State == StateStopped || s.State == StateExited {
|
||||
continue
|
||||
}
|
||||
requestMB += ParseMemoryMB(s.Meta.Resources.MemRequest)
|
||||
limitMB += ParseMemoryMB(s.Meta.Resources.MemLimit)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// StackMemoryMB returns the mem_request for a specific stack.
|
||||
func (m *Manager) StackMemoryMB(name string) int {
|
||||
m.mu.RLock()
|
||||
defer m.mu.RUnlock()
|
||||
if s, ok := m.stacks[name]; ok {
|
||||
return ParseMemoryMB(s.Meta.Resources.MemRequest)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// getCatalogTemplateSlugs reads the synced catalog cache and returns a set of
|
||||
// template slugs (directory names) that have a docker-compose.yml.
|
||||
func (m *Manager) getCatalogTemplateSlugs() map[string]bool {
|
||||
|
||||
Reference in New Issue
Block a user