Skip to content

Commit

Permalink
Show console output from server
Browse files Browse the repository at this point in the history
  • Loading branch information
bergie committed Oct 2, 2013
1 parent 81ea0f0 commit a085be2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
9 changes: 9 additions & 0 deletions css/noflo-ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ body {
border: none;
}

.dataflow-card .noflo-ui-preview .preview pre {
max-height: 300px;
color: #7ee67e;
font-size: 10px;
overflow-x: hidden;
overflow-y: scroll;
font-family: monospace;
}

.dataflow-node-inspector-inputs label.connected {
display: none;
}
Expand Down
12 changes: 12 additions & 0 deletions src/runtimes/websocket.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ class WebSocketRuntime extends Base

getType: -> 'websocket'

getElement: ->
console = document.createElement 'pre'

@on 'network', (message) ->
return unless message.command is 'output'
console.innerHTML = "#{console.innerHTML}#{message.payload.message}\n"
console.scrollTop = console.scrollHeight
@on 'disconnected', ->
console.innerHTML = ''

console

connect: (preview) ->
return if @connection or @connecting

Expand Down

0 comments on commit a085be2

Please sign in to comment.