diff --git a/ruby_event_store-browser/elm/src/Page/ShowStream.elm b/ruby_event_store-browser/elm/src/Page/ShowStream.elm index e7a093772a..df125ca05e 100644 --- a/ruby_event_store-browser/elm/src/Page/ShowStream.elm +++ b/ruby_event_store-browser/elm/src/Page/ShowStream.elm @@ -22,7 +22,6 @@ type alias Model = , relatedStreams : Maybe (List String) , problems : List Problem , pagination : Pagination.Specification - , searchStreams : List Api.SearchStream } @@ -38,7 +37,6 @@ initModel flags streamName paginationSpecification = , flags = flags , problems = [] , pagination = paginationSpecification - , searchStreams = [] } @@ -49,7 +47,6 @@ initModel flags streamName paginationSpecification = type Msg = EventsFetched (Result Http.Error (Api.PaginatedList Api.Event)) | StreamFetched (Result Http.Error Api.Stream) - | SearchedStreamsFetched (Result Http.Error (List Api.SearchStream)) initCmd : Flags -> String -> Cmd Msg @@ -80,15 +77,9 @@ update msg model = in ( { model | problems = serverErrors }, Cmd.none ) - SearchedStreamsFetched (Ok result) -> - ( { model | searchStreams = result }, Cmd.none ) - - SearchedStreamsFetched (Err _) -> - ( model, Cmd.none ) - view : Model -> BrowserTime.TimeZone -> ( String, Html Msg ) -view { streamName, events, relatedStreams, problems, flags, pagination, searchStreams } selectedTime = +view { streamName, events, relatedStreams, problems, flags, pagination } selectedTime = let title = "Stream " ++ streamName @@ -99,7 +90,7 @@ view { streamName, events, relatedStreams, problems, flags, pagination, searchSt case problems of [] -> ( title - , browseEvents flags.rootUrl header streamName events relatedStreams selectedTime searchStreams + , browseEvents flags.rootUrl header streamName events relatedStreams selectedTime ) _ -> @@ -115,8 +106,8 @@ view { streamName, events, relatedStreams, problems, flags, pagination, searchSt ) -browseEvents : Url.Url -> String -> String -> Api.PaginatedList Api.Event -> Maybe (List String) -> BrowserTime.TimeZone -> List Api.SearchStream -> Html Msg -browseEvents baseUrl title streamName { links, events } relatedStreams timeZone searchStreams = +browseEvents : Url.Url -> String -> String -> Api.PaginatedList Api.Event -> Maybe (List String) -> BrowserTime.TimeZone -> Html Msg +browseEvents baseUrl title streamName { links, events } relatedStreams timeZone = div [ class "py-8 container mx-auto" ] [ div [ class "flex justify-between" ] @@ -127,7 +118,6 @@ browseEvents baseUrl title streamName { links, events } relatedStreams timeZone ] , div [] [ renderResults baseUrl events timeZone ] , div [] [ renderRelatedStreams baseUrl relatedStreams ] - , div [ class "bg-red-500" ] [ renderSearchStreams searchStreams ] ] @@ -142,12 +132,6 @@ viewProblem problem = li [] [ text errorMessage ] -renderSearchStreams : List Api.SearchStream -> Html msg -renderSearchStreams searchStreams = - ul [] - (List.map (\searchStream -> li [] [ text searchStream.streamId ]) searchStreams) - - renderRelatedStreams : Url.Url -> Maybe (List String) -> Html Msg renderRelatedStreams baseUrl relatedStreams_ = case relatedStreams_ of