Skip to content

Commit

Permalink
Add debug url to the browser layout
Browse files Browse the repository at this point in the history
  • Loading branch information
pjurewicz committed Mar 21, 2024
1 parent de70c3a commit c42c546
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ruby_event_store-browser/elm/src/Layout.elm
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,12 @@ browserFooter { flags, time } =
, class "ml-4"
]
[ text "Support" ]
, spacer
, a
[ href (Route.debugUrl flags.rootUrl)
, class "ml-4"
]
[ text "Debug" ]
]
, div
[ class "text-gray-500 text-sm flex item-center gap-2" ]
Expand Down
5 changes: 4 additions & 1 deletion ruby_event_store-browser/elm/src/Route.elm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Route exposing (Route(..), buildUrl, decodeLocation, eventUrl, paginatedStreamUrl, streamUrl)
module Route exposing (Route(..), buildUrl, decodeLocation, eventUrl, paginatedStreamUrl, streamUrl, debugUrl)

import Maybe.Extra
import Pagination
Expand Down Expand Up @@ -54,6 +54,9 @@ eventUrl : Url.Url -> String -> String
eventUrl baseUrl eventId =
buildUrl baseUrl [ "events", Url.percentEncode eventId ] []

debugUrl : Url.Url -> String
debugUrl baseUrl =
buildUrl baseUrl [ "debug" ] []

pathSegments : Url.Url -> List String
pathSegments baseUrl =
Expand Down

0 comments on commit c42c546

Please sign in to comment.