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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user