Skip to content

chore: Small portal & logging improvements #318

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions internal/portal/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"embed"
"fmt"
"io/fs"
"log"
"net/http"
"net/http/httputil"
"net/url"
Expand Down Expand Up @@ -55,7 +54,6 @@ func AddRoutes(router *gin.Engine, config PortalConfig) {
c.Next()
return
}
log.Println(c.Request.Method, c.Request.URL.Path, c.Request.URL.RawQuery)
proxy.ServeHTTP(c.Writer, c.Request)
})
} else {
Expand Down
4 changes: 3 additions & 1 deletion internal/portal/src/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
&__header {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: var(--spacing-2);
margin-top: calc(var(--base-grid-multiplier) * 20);
margin-bottom: calc(var(--base-grid-multiplier) * 12);
Expand Down Expand Up @@ -39,7 +40,8 @@
gap: var(--spacing-2);
color: var(--colors-foreground-neutral-3);

span, a {
span,
a {
color: var(--colors-foreground-neutral-3);
}

Expand Down
2 changes: 1 addition & 1 deletion internal/portal/src/scenes/Destination/Events/Events.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
margin-top: var(--spacing-4);
position: relative;
display: grid;
height: 713px;
min-height: 713px;

.event-time-cell {
text-transform: uppercase;
Expand Down
2 changes: 1 addition & 1 deletion internal/portal/src/scenes/Destination/Events/Events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const Events = ({
}

if (!searchParams.has("limit")) {
searchParams.set("limit", "10");
searchParams.set("limit", "15");
}

return `destinations/${destination.id}/events?${searchParams.toString()}`;
Expand Down
6 changes: 6 additions & 0 deletions internal/services/api/logger_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ import (

func LoggerMiddleware(logger *logging.Logger) gin.HandlerFunc {
return func(c *gin.Context) {
// Skip logging portal requests
if !strings.Contains(c.Request.URL.Path, "api/v") {
c.Next()
return
}

logger := logger.Ctx(c.Request.Context()).WithOptions(zap.AddStacktrace(zap.FatalLevel))
c.Next()

Expand Down