Skip to content

Commit

Permalink
view app activity in the logs without having to manually refresh the …
Browse files Browse the repository at this point in the history
…web page
  • Loading branch information
mpivotal committed Apr 19, 2016
1 parent 23e24c5 commit 5d40893
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions public/javascripts/ping.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
$(document).ready( function() {

var interval = 4000

var ping = setInterval( function() {
$.ajax({
url: '/ping.txt',
dataType: 'text',
success: function (data) {
$("[data-ping='ping']").append( data )
}
})
}, interval
)
})
1 change: 1 addition & 0 deletions public/ping.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.
3 changes: 3 additions & 0 deletions views/pages/index.jade
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ html
link( rel='shortcut icon', href='/shortcut-icon.png')
link( rel='stylesheet', href='/pui-3.0.0/pivotal-ui.min.css')
link( rel='stylesheet', href='/font-mfizz-2.3.0/font-mfizz.css')
script( src='https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js')
script( src='/javascripts/ping.js')

body
.container.pan
section.header
Expand Down

0 comments on commit 5d40893

Please sign in to comment.