You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
644 B
23 lines
644 B
var socket = null; |
|
var docker = null; |
|
|
|
function error(msg, data) { |
|
$('#error').html('<h1>Error</h1><p>'+(new Date()).toLocaleString()+'</p><p>'+msg+'</p><pre>'+data+'</pre>').show() |
|
} |
|
|
|
function sigstack() { |
|
$('#error').hide() |
|
var dot = docker.graphics.stack() |
|
var svg = docker.graphics.viz(dot, error) |
|
$('#stacks').html(svg) |
|
$('a#svgStacks').attr('href', 'data:image/svg;base64,'+btoa(svg)) |
|
.attr('target', '_blank') |
|
.attr('download', window.location.hostname+'.svg') |
|
.show() |
|
} |
|
|
|
function init() { |
|
socket = io.connect() |
|
docker = new Docker(socket, error, sigstack) |
|
} |
|
$(init)
|
|
|