Fix filtering by label

When clicking on a label on the AlertList or SilenceList view, the
changed Alert/Silence query is appended to the current url. This Postfix
should not start with a slash. If it does, the url is not appended but
replaced by the browser instead resulting in a `pushState` exception.
This commit is contained in:
Max Leonard Inden 2017-06-08 21:34:26 +02:00
parent b6b7fe775f
commit 46ffad322e
No known key found for this signature in database
GPG Key ID: 5403C5464810BC26
3 changed files with 4 additions and 4 deletions

View File

@ -16,7 +16,7 @@ update : AlertListMsg -> Model -> Filter -> String -> String -> ( Model, Cmd Typ
update msg ({ groupBar, filterBar } as model) filter apiUrl basePath =
let
alertsUrl =
basePath ++ "/#/alerts"
basePath ++ "#/alerts"
in
case msg of
AlertsFetched listOfAlerts ->

View File

@ -31,7 +31,7 @@ update msg model filter basePath apiUrl =
MsgForFilterBar msg ->
let
( filterBar, cmd ) =
FilterBar.update (basePath ++ "/#/silences") filter msg model.filterBar
FilterBar.update (basePath ++ "#/silences") filter msg model.filterBar
in
( { model | filterBar = filterBar }, Cmd.map MsgForFilterBar cmd )

File diff suppressed because one or more lines are too long