feat: integrate Grafana dashboards into BOC DashboardPage

- Add Infrastructure Health section with CPU/Memory/Disk panels
- Add Service Status section with PM2/Docker panels
- Create GrafanaPanel component for iframe embedding
- Build passes successfully
This commit is contained in:
Bernt
2026-07-29 19:03:06 +00:00
parent af874040ca
commit e5623d2f84
77 changed files with 11338 additions and 779 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ import (
"github.com/golang-jwt/jwt/v5"
"boc/config"
"boc/handlers"
"boc/models"
)
func Auth(cfg *config.Config) func(http.Handler) http.Handler {
@@ -26,7 +26,7 @@ func Auth(cfg *config.Config) func(http.Handler) http.Handler {
}
tokenString := strings.TrimPrefix(authHeader, "Bearer ")
token, err := jwt.ParseWithClaims(tokenString, &handlers.Claims{}, func(token *jwt.Token) (interface{}, error) {
token, err := jwt.ParseWithClaims(tokenString, &models.Claims{}, func(token *jwt.Token) (interface{}, error) {
return []byte(cfg.JWTSecret), nil
})
if err != nil || !token.Valid {
@@ -34,7 +34,7 @@ func Auth(cfg *config.Config) func(http.Handler) http.Handler {
return
}
claims, ok := token.Claims.(*handlers.Claims)
claims, ok := token.Claims.(*models.Claims)
if !ok {
writeError(w, http.StatusUnauthorized, "invalid claims")
return