Skip to content

Commit

Permalink
Align WS open/close buttons
Browse files Browse the repository at this point in the history
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
  • Loading branch information
darkodraskovic committed Apr 22, 2019
1 parent 5740d2d commit b0b9331
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions ui/src/Connection.elm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import Bootstrap.Form as Form
import Bootstrap.Form.Checkbox as Checkbox
import Bootstrap.Form.Input as Input
import Bootstrap.Grid as Grid
import Bootstrap.Grid.Col as Col
import Bootstrap.Table as Table
import Bootstrap.Text as Text
import Bootstrap.Utilities.Spacing as Spacing
Expand Down Expand Up @@ -186,16 +187,16 @@ view model =
)
]
, Grid.row []
[ Grid.col []
[ Grid.col [ Col.attrs [ align "left" ] ]
[ Form.form []
[ Button.button [ Button.success, Button.attrs [ Spacing.ml1 ], Button.onClick Connect ] [ text "Connect" ]
, Button.button [ Button.danger, Button.attrs [ Spacing.ml1 ], Button.onClick Disconnect ] [ text "Disconnect" ]
]
]
, Grid.col []
, Grid.col [ Col.attrs [ align "right" ] ]
[ Form.form []
[ Button.button [ Button.success, Button.attrs [ Spacing.ml1 ], Button.onClick Listen ] [ text "Listen" ]
, Button.button [ Button.danger, Button.attrs [ Spacing.ml1 ], Button.onClick Stop ] [ text "Stop" ]
[ Button.button [ Button.success, Button.attrs [ Spacing.ml1 ], Button.onClick Listen ] [ text "WS Listen" ]
, Button.button [ Button.danger, Button.attrs [ Spacing.ml1 ], Button.onClick Stop ] [ text "WS Stop" ]
]
]
]
Expand Down
2 changes: 1 addition & 1 deletion ui/src/Websocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ app.ports.connectWebsocket.subscribe(function(data) {
app.ports.websocketIn.send(JSON.stringify({data: message.data, timestamp: message.timeStamp}));
};

ws.onclose = function () {
ws.onclose = function (event) {
MF.log("Websocket closed. URL: " + url);
delete wss[ws.url];
};
Expand Down

0 comments on commit b0b9331

Please sign in to comment.