Skip to content

Commit

Permalink
enhance(build): add cancel button for pending builds (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecrupper authored May 10, 2023
1 parent 176167f commit 31602ae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ services:
VELA_ADDR: 'http://localhost:8080'
VELA_WEBUI_ADDR: 'http://localhost:8888'
VELA_LOG_LEVEL: trace
# comment the line below to use registration flow
VELA_SECRET: 'zB7mrKDTZqNeNTD8z47yG4DHywspAh'
VELA_SERVER_PRIVATE_KEY: 'F534FF2A080E45F38E05DC70752E6787'
VELA_REFRESH_TOKEN_DURATION: 90m
VELA_ACCESS_TOKEN_DURATION: 60m
VELA_DISABLE_WEBHOOK_VALIDATION: 'true'
Expand Down Expand Up @@ -87,6 +89,7 @@ services:
VELA_RUNTIME_DRIVER: docker
VELA_RUNTIME_PRIVILEGED_IMAGES: 'target/vela-docker'
VELA_SERVER_ADDR: 'http://server:8080'
# comment the line below to use registration flow
VELA_SERVER_SECRET: 'zB7mrKDTZqNeNTD8z47yG4DHywspAh'
WORKER_ADDR: 'http://worker:8080'
WORKER_CHECK_IN: 5m
Expand Down
11 changes: 9 additions & 2 deletions src/elm/Nav.elm
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ cancelBuildButton : Org -> Repo -> WebData Build -> (Org -> Repo -> BuildNumber
cancelBuildButton org repo build cancelBuild =
case build of
RemoteData.Success b ->
case b.status of
Vela.Running ->
let
cancelButton =
button
[ classList
[ ( "button", True )
Expand All @@ -389,6 +389,13 @@ cancelBuildButton org repo build cancelBuild =
]
[ text "Cancel Build"
]
in
case b.status of
Vela.Running ->
cancelButton

Vela.Pending ->
cancelButton

_ ->
text ""
Expand Down

0 comments on commit 31602ae

Please sign in to comment.