Skip to content
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

revert serach streams and debug 2 #1792

Closed
wants to merge 92 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
fb3bb31
Revert "Always be closing"
lukaszreszke Jul 24, 2024
39fad7d
Revert "Improve naming to better reveal the intention"
lukaszreszke Jul 24, 2024
0225eb3
Revert "Kosher way to communicate via subscriptions"
lukaszreszke Jul 24, 2024
1504613
Revert "Move functions and helpers before place of use"
lukaszreszke Jul 24, 2024
af8adf6
Revert "Close search modal on Escape keypress"
lukaszreszke Jul 24, 2024
df4eaf6
Revert "Close modal after clicking on stream from dropdown"
lukaszreszke Jul 24, 2024
3a099c4
Revert "Do not assert specific adapter being used"
lukaszreszke Jul 24, 2024
bae7d77
Revert "specification -> inspect, repository_specification -> inspect…
lukaszreszke Jul 24, 2024
c96755c
Revert "Hide conditionals from the Search view"
lukaszreszke Jul 24, 2024
a526955
Revert "Only streams matter after refactoring"
lukaszreszke Jul 24, 2024
debd4a5
Revert "value always sounded odd to me"
lukaszreszke Jul 24, 2024
aa9eef7
Revert "Utility function for empty streams list"
lukaszreszke Jul 24, 2024
c92200a
Revert "Filter visible streams early in the view"
lukaszreszke Jul 24, 2024
e4578fb
Revert "Clientside filtering is case insensitive now"
lukaszreszke Jul 24, 2024
bd070ea
Revert "Improved non–matching stream names clearing"
lukaszreszke Jul 24, 2024
b27668f
Revert "Extract list item to view"
lukaszreszke Jul 24, 2024
46badcc
Revert "Clear streams when deleting last 3 characters"
lukaszreszke Jul 24, 2024
3197f92
Revert "More specific naming"
lukaszreszke Jul 24, 2024
5f6c47d
Revert "Break lines, not bones"
lukaszreszke Jul 24, 2024
b097db1
Revert "Move helper functions to bottom of the module"
lukaszreszke Jul 24, 2024
e3e3c30
Revert "Replace use of datalist with ul"
lukaszreszke Jul 24, 2024
45a5177
Revert "Doh"
lukaszreszke Jul 24, 2024
1764691
Revert "Refactor"
lukaszreszke Jul 24, 2024
5eca162
Revert "Prefer same variable"
lukaszreszke Jul 24, 2024
b3a192e
Revert "One more formatter round"
lukaszreszke Jul 24, 2024
4c17d12
Revert "Remove autosubmit of matching stream name"
lukaszreszke Jul 24, 2024
091c1cd
Revert "Dead code"
lukaszreszke Jul 24, 2024
b5272d5
Revert "formatting"
lukaszreszke Jul 24, 2024
6df184e
Revert "Add total events counter to the debug page"
lukaszreszke Jul 24, 2024
0b42fb3
Revert "Format Page.Debug"
lukaszreszke Jul 24, 2024
7391a7f
Revert "Format Main"
lukaszreszke Jul 24, 2024
487eb1a
Revert "Format Route"
lukaszreszke Jul 24, 2024
9e4a12a
Revert "Format Search"
lukaszreszke Jul 24, 2024
7c6c28a
Revert "add order to rom"
lukaszreszke Jul 24, 2024
5b651f0
Revert "Search streams for sequel"
lukaszreszke Jul 24, 2024
c18c9a1
Revert "Implement search_streams in ROM"
lukaszreszke Jul 24, 2024
c866447
Revert "Don't add "all" stream to search results"
lukaszreszke Jul 24, 2024
a885721
Revert "Refactor"
lukaszreszke Jul 24, 2024
b2b53c5
Revert "Stream is our domain–specific type"
lukaszreszke Jul 24, 2024
29a6035
Revert "Require at lest 3 chars before fetching streams"
lukaszreszke Jul 24, 2024
0e2e52c
Revert "Refactor"
lukaszreszke Jul 24, 2024
10693da
Revert "Add debug url to the browser layout"
lukaszreszke Jul 24, 2024
7b9fa50
Revert "Search module communicates important state changes to upper m…
lukaszreszke Jul 24, 2024
be3bf9b
Revert "Adjust test"
lukaszreszke Jul 24, 2024
e6914da
Revert "We don't mind the order"
lukaszreszke Jul 24, 2024
05e4a59
Revert "adjust tests"
lukaszreszke Jul 24, 2024
eafe327
Revert "Optimize querys performance"
lukaszreszke Jul 24, 2024
02a607c
Revert "Move navigation out of Stream"
lukaszreszke Jul 24, 2024
d1cf5c1
Revert "One more intermediate, dummy message to handle in Layout"
lukaszreszke Jul 24, 2024
6576278
Revert "test if InstrumentedRepository presents which repository is i…
lukaszreszke Jul 24, 2024
9026c88
Revert "present which exactly repository is instrumented"
lukaszreszke Jul 24, 2024
c9344df
Revert "prettier"
lukaszreszke Jul 24, 2024
9538406
Revert "test if /debug page is served"
lukaszreszke Jul 24, 2024
d82f8f1
Revert "test if repositoryAdapter flag is set"
lukaszreszke Jul 24, 2024
17ccddc
Revert "move `repository_specification` method to the proper class"
lukaszreszke Jul 24, 2024
a22e38a
Revert "Clear input on exact match too"
lukaszreszke Jul 24, 2024
e786de3
Revert "Rely on special internal OnSelect message to close modal"
lukaszreszke Jul 24, 2024
67e21f1
Revert "Forgotten signature"
lukaszreszke Jul 24, 2024
bd4b47a
Revert "Clear selected value when submitting stream"
lukaszreszke Jul 24, 2024
e22eead
Revert "kill mutants"
lukaszreszke Jul 24, 2024
e66f79a
Revert "Hide dialog when stream is selected"
lukaszreszke Jul 24, 2024
b9c6c11
Revert "Kill mutants"
lukaszreszke Jul 24, 2024
b2d8dfe
Revert "Limit number of searched streams to 10"
lukaszreszke Jul 24, 2024
fe6a5bb
Revert "Make global stream available on top of the search"
lukaszreszke Jul 24, 2024
adde5f1
Revert "Add repositoryAdapter eml flag"
lukaszreszke Jul 24, 2024
0a2d6f2
Revert "Debug module with its own model"
lukaszreszke Jul 24, 2024
9ecd557
Revert "Set value when is exact stream"
lukaszreszke Jul 24, 2024
59f8fbe
Revert "refactor"
lukaszreszke Jul 24, 2024
20b62fd
Revert "Redirect to stream on exact match"
lukaszreszke Jul 24, 2024
e066ff0
Revert "move Debug page to separate module"
lukaszreszke Jul 24, 2024
63e26d2
Revert "Autocomplete stream names"
lukaszreszke Jul 24, 2024
5d90be9
Revert "Revert "Use WrappedModel in search""
lukaszreszke Jul 24, 2024
93daea2
Revert "Use WrappedModel in search"
lukaszreszke Jul 24, 2024
fd824e5
Revert "initiate /debug browser page"
lukaszreszke Jul 24, 2024
7c17c76
Revert "No need those gymnastics with Maybe"
lukaszreszke Jul 24, 2024
eca4678
Revert "Don't render search streams here"
lukaszreszke Jul 24, 2024
e85e710
Revert "Use function"
lukaszreszke Jul 24, 2024
048a84c
Revert "Extract function"
lukaszreszke Jul 24, 2024
0b53bf4
Revert "Kill mutant"
lukaszreszke Jul 24, 2024
dede467
Revert "lowercase"
lukaszreszke Jul 24, 2024
30ca059
Revert "render search streams"
lukaszreszke Jul 24, 2024
3f3883f
Revert "hardcoded api call"
lukaszreszke Jul 24, 2024
8f102d7
Revert "Add searchStreamsDecoder"
lukaszreszke Jul 24, 2024
1f61050
Revert "search streams endpoint for browser"
lukaszreszke Jul 24, 2024
41c2d86
Revert "Add search_streams in RubyEventStore::Client"
lukaszreszke Jul 24, 2024
6e12ec3
Revert "Add search_streams to InMemoryRepository"
lukaszreszke Jul 24, 2024
0271272
Revert "Add search_streams test into event_repository_lint"
lukaszreszke Jul 24, 2024
835b27a
Revert "Reverse results order"
lukaszreszke Jul 24, 2024
5da01b3
Revert "Return stream object instead of name"
lukaszreszke Jul 24, 2024
96e34e2
Revert "Introduce search_streams in EventRepository"
lukaszreszke Jul 24, 2024
31928ac
Revert "Introduce Search module"
lukaszreszke Jul 24, 2024
c9167ef
Revert "Show real repository adapter on Debug page"
lukaszreszke Jul 24, 2024
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
Prev Previous commit
Next Next commit
Revert "One more formatter round"
This reverts commit 974d1b6.
  • Loading branch information
lukaszreszke committed Jul 24, 2024
commit b3a192ed4d5e3e3187a1bbb703eae737398f2f43
17 changes: 4 additions & 13 deletions ruby_event_store-browser/elm/src/Api.elm
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module Api exposing (Event, PaginatedList, PaginationLink, PaginationLinks, RemoteResource(..), SearchStream, Stats, Stream, emptyPaginatedList, eventDecoder, eventsDecoder, getEvent, getEvents, getSearchStreams, getStats, getStream, searchStreamsDecoder)
module Api exposing (Event, PaginatedList, PaginationLink, PaginationLinks, RemoteResource(..), SearchStream, Stream, emptyPaginatedList, eventDecoder, eventsDecoder, getEvent, getEvents, getSearchStreams, getStream, searchStreamsDecoder, Stats, getStats)

import Flags exposing (Flags)
import Http
import Iso8601
import Json.Decode exposing (Decoder, field, int, list, maybe, string, succeed, value)
import Json.Decode exposing (Decoder, field, list, maybe, string, succeed, value, int)
import Json.Decode.Pipeline exposing (optional, optionalAt, required, requiredAt)
import Json.Encode exposing (encode)
import Maybe.Extra
Expand Down Expand Up @@ -42,12 +42,10 @@ type alias SearchStream =
{ streamId : String
}


type alias Stats =
{ eventsInTotal : Int
{ eventsInTotal: Int
}


type alias PaginatedList a =
{ pagination : Pagination.Specification
, events : List a
Expand Down Expand Up @@ -98,12 +96,10 @@ searchStreamsUrl : Flags -> String -> String
searchStreamsUrl flags query =
buildUrl (Url.toString flags.apiUrl ++ "/search_streams") query


getStatsUrl : Flags -> String
getStatsUrl flags =
Url.toString flags.apiUrl ++ "/stats"


getEvent : (Result Http.Error Event -> msg) -> Flags -> String -> Cmd msg
getEvent msgBuilder flags eventId =
Http.get
Expand All @@ -127,15 +123,13 @@ getSearchStreams msgBuilder flags query =
, expect = Http.expectJson msgBuilder searchStreamsDecoder
}


getStats : (Result Http.Error Stats -> msg) -> Flags -> Cmd msg
getStats : (Result Http.Error (Stats) -> msg) -> Flags -> Cmd msg
getStats msgBuilder flags =
Http.get
{ url = getStatsUrl flags
, expect = Http.expectJson msgBuilder statsDecoder
}


eventDecoder : Decoder Event
eventDecoder =
eventDecoder_
Expand Down Expand Up @@ -201,19 +195,16 @@ searchStreamsDecoder =
list searchStreamDecoder
|> field "data"


statsDecoder : Decoder Stats
statsDecoder =
statsDecoder_
|> field "meta"


statsDecoder_ : Decoder Stats
statsDecoder_ =
succeed Stats
|> required "events_in_total" int


linksDecoder : Decoder PaginationLinks
linksDecoder =
succeed PaginationLinks
Expand Down
20 changes: 9 additions & 11 deletions ruby_event_store-browser/elm/src/Main.elm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import LinkedTimezones exposing (mapLinkedTimeZone)
import Page.Debug
import Page.ShowEvent
import Page.ShowStream
import Page.Debug
import Route
import Task
import Time
Expand Down Expand Up @@ -52,7 +53,6 @@ type Msg
| ReceiveTimeZone (Result String Time.ZoneName)
| GotDebugMsg Page.Debug.Msg


type Page
= NotFound
| ShowEvent Page.ShowEvent.Model
Expand Down Expand Up @@ -133,12 +133,13 @@ update msg model =

( GotDebugMsg gotDebugMsg, Debug debugModel ) ->
let
( subModel, subCmd ) =
(subModel, subCmd) =
Page.Debug.update gotDebugMsg debugModel
in
( { model | page = Debug subModel }
, Cmd.map GotDebugMsg subCmd
)
({model | page = Debug subModel}
, Cmd.map GotDebugMsg subCmd
)


( GotLayoutMsg layoutMsg, _ ) ->
case model.flags of
Expand Down Expand Up @@ -224,13 +225,10 @@ navigate model location =
Nothing ->
( { model | page = NotFound }, Cmd.none )

Just Route.Debug ->
Just (Route.Debug) ->
let
page =
Page.Debug.init flags

cmd =
Page.Debug.initCmd flags
page = Page.Debug.init flags
cmd = Page.Debug.initCmd flags
in
( { model | page = Debug page }, Cmd.map GotDebugMsg cmd )

Expand Down