Show "running command" in the log pane when running a command.
This commit is contained in:
parent
e595bbbea8
commit
0b982a326d
1 changed files with 7 additions and 1 deletions
|
@ -62,6 +62,7 @@ type Log
|
||||||
| MakeResult String String
|
| MakeResult String String
|
||||||
| MakeError String
|
| MakeError String
|
||||||
| CommandResult String String
|
| CommandResult String String
|
||||||
|
| RunningCommand String
|
||||||
|
|
||||||
type alias CommandResult = Result String { stdout : String, stderr : String }
|
type alias CommandResult = Result String { stdout : String, stderr : String }
|
||||||
|
|
||||||
|
@ -261,7 +262,7 @@ update msg model = case msg of
|
||||||
SetCommand cmd -> { model | command_to_run = cmd } |> nocmd
|
SetCommand cmd -> { model | command_to_run = cmd } |> nocmd
|
||||||
|
|
||||||
RunCommand cmd ->
|
RunCommand cmd ->
|
||||||
(model
|
({ model | log = RunningCommand cmd }
|
||||||
, Http.post
|
, Http.post
|
||||||
{ url = "run-command"
|
{ url = "run-command"
|
||||||
, body = Http.multipartBody
|
, body = Http.multipartBody
|
||||||
|
@ -649,6 +650,11 @@ log_pane model =
|
||||||
, H.dt [] [H.text "stderr" ]
|
, H.dt [] [H.text "stderr" ]
|
||||||
, H.dd [] [H.pre [] [ H.text stderr ]]
|
, H.dd [] [H.pre [] [ H.text stderr ]]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
RunningCommand cmd ->
|
||||||
|
H.div
|
||||||
|
[]
|
||||||
|
[ H.p [] [H.text "Running command ", H.code [] [H.text cmd] ]]
|
||||||
|
|
||||||
CommandResult stdout stderr ->
|
CommandResult stdout stderr ->
|
||||||
H.dl
|
H.dl
|
||||||
|
|
Loading…
Reference in a new issue