Skip to content

Commit c0715ce

Browse files
authored
chore: Small portal & logging improvements (#318)
* chore: Remove portal log lines from API logger * fix: Portal header items spanning the full width * chore: Default events page size 15 * chore: Make events table min-height instead of fixed height
2 parents 5c4e829 + e25878b commit c0715ce

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

internal/portal/embed.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"embed"
55
"fmt"
66
"io/fs"
7-
"log"
87
"net/http"
98
"net/http/httputil"
109
"net/url"
@@ -55,7 +54,6 @@ func AddRoutes(router *gin.Engine, config PortalConfig) {
5554
c.Next()
5655
return
5756
}
58-
log.Println(c.Request.Method, c.Request.URL.Path, c.Request.URL.RawQuery)
5957
proxy.ServeHTTP(c.Writer, c.Request)
6058
})
6159
} else {

internal/portal/src/app.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
&__header {
1212
display: flex;
1313
flex-direction: column;
14+
align-items: flex-start;
1415
gap: var(--spacing-2);
1516
margin-top: calc(var(--base-grid-multiplier) * 20);
1617
margin-bottom: calc(var(--base-grid-multiplier) * 12);
@@ -39,7 +40,8 @@
3940
gap: var(--spacing-2);
4041
color: var(--colors-foreground-neutral-3);
4142

42-
span, a {
43+
span,
44+
a {
4345
color: var(--colors-foreground-neutral-3);
4446
}
4547

internal/portal/src/scenes/Destination/Events/Events.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
margin-top: var(--spacing-4);
3131
position: relative;
3232
display: grid;
33-
height: 713px;
33+
min-height: 713px;
3434

3535
.event-time-cell {
3636
text-transform: uppercase;

internal/portal/src/scenes/Destination/Events/Events.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ const Events = ({
6363
}
6464

6565
if (!searchParams.has("limit")) {
66-
searchParams.set("limit", "10");
66+
searchParams.set("limit", "15");
6767
}
6868

6969
return `destinations/${destination.id}/events?${searchParams.toString()}`;

internal/services/api/logger_middleware.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ import (
1515

1616
func LoggerMiddleware(logger *logging.Logger) gin.HandlerFunc {
1717
return func(c *gin.Context) {
18+
// Skip logging portal requests
19+
if !strings.Contains(c.Request.URL.Path, "api/v") {
20+
c.Next()
21+
return
22+
}
23+
1824
logger := logger.Ctx(c.Request.Context()).WithOptions(zap.AddStacktrace(zap.FatalLevel))
1925
c.Next()
2026

0 commit comments

Comments
 (0)