diff --git a/gophergate b/gophergate index 13fa9bf9..5afa03f1 100755 Binary files a/gophergate and b/gophergate differ diff --git a/internal/server/dashboard.go b/internal/server/dashboard.go index 5c662e8d..78fe1080 100644 --- a/internal/server/dashboard.go +++ b/internal/server/dashboard.go @@ -859,6 +859,28 @@ func (s *Server) handleGetProviders(c *gin.Context) { } } + // Get last used for this provider + var lastUsedTime sql.NullTime + _ = s.database.Get(&lastUsedTime, "SELECT MAX(timestamp) FROM llm_requests WHERE provider = ?", id) + var lastUsed interface{} + if lastUsedTime.Valid && !lastUsedTime.Time.IsZero() { + lastUsed = lastUsedTime.Time + } + + // Get models for this provider from registry + var models []string + if s.registry != nil { + registryID := id + if id == "gemini" { registryID = "google" } + if id == "grok" { registryID = "xai" } + + if pInfo, ok := s.registry.Providers[registryID]; ok { + for mID := range pInfo.Models { + models = append(models, mID) + } + } + } + result = append(result, gin.H{ "id": id, "name": name, @@ -868,6 +890,8 @@ func (s *Server) handleGetProviders(c *gin.Context) { "credit_balance": balance, "low_credit_threshold": threshold, "billing_mode": billingMode, + "last_used": lastUsed, + "models": models, }) } diff --git a/static/css/dashboard.css b/static/css/dashboard.css index 0b1318c7..ee4a888f 100644 --- a/static/css/dashboard.css +++ b/static/css/dashboard.css @@ -329,6 +329,25 @@ body { font-size: 1.125rem; } +/* Badges */ +.badge { + display: inline-block; + padding: 0.25rem 0.5rem; + font-size: 0.75rem; + font-weight: 600; + line-height: 1; + text-align: center; + white-space: nowrap; + vertical-align: baseline; + border-radius: 4px; +} + +.badge-success { background-color: rgba(152, 151, 26, 0.15); color: var(--green-light); border: 1px solid var(--green); } +.badge-info { background-color: rgba(69, 133, 136, 0.15); color: var(--blue-light); border: 1px solid var(--blue); } +.badge-warning { background-color: rgba(215, 153, 33, 0.15); color: var(--yellow-light); border: 1px solid var(--yellow); } +.badge-danger { background-color: rgba(204, 36, 29, 0.15); color: var(--red-light); border: 1px solid var(--red); } +.badge-client { background-color: var(--bg2); color: var(--fg1); border: 1px solid var(--bg3); padding: 2px 6px; font-size: 0.7rem; text-transform: uppercase; } + /* Responsive Login */ @media (max-width: 480px) { .login-card {