|
|
@ -1,6 +1,7 @@ |
|
|
|
var socket = io.connect() |
|
|
|
var socket = io.connect() |
|
|
|
var docker = new Docker(socket, error, sigstack, sigcontainer) |
|
|
|
var docker = new Docker(socket, error, sigstack, sigcontainer) |
|
|
|
var parameters = docker.graphics.parameters |
|
|
|
var parameters = docker.graphics.parameters |
|
|
|
|
|
|
|
var zoom = 1 |
|
|
|
var stack = null |
|
|
|
var stack = null |
|
|
|
var standalone = null |
|
|
|
var standalone = null |
|
|
|
|
|
|
|
|
|
|
@ -14,7 +15,6 @@ function error(e) { |
|
|
|
$('#error').html('<h1>Error</h1><p>'+(new Date()).toLocaleString()+'</p><p>'+e.msg+'</p><pre>'+e.data+'</pre>').show() |
|
|
|
$('#error').html('<h1>Error</h1><p>'+(new Date()).toLocaleString()+'</p><p>'+e.msg+'</p><pre>'+e.data+'</pre>').show() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function update() { |
|
|
|
function update() { |
|
|
|
var data = { |
|
|
|
var data = { |
|
|
|
'containers': docker.containers.get(), |
|
|
|
'containers': docker.containers.get(), |
|
|
@ -88,6 +88,26 @@ function init() { |
|
|
|
.on('dragstart', (event) => { |
|
|
|
.on('dragstart', (event) => { |
|
|
|
event.originalEvent.dataTransfer.setData("text", ""); |
|
|
|
event.originalEvent.dataTransfer.setData("text", ""); |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
// zoom in
|
|
|
|
|
|
|
|
$('#zoomin').on('click', () => { |
|
|
|
|
|
|
|
zoom *= 1.5 |
|
|
|
|
|
|
|
if (zoom>500) zoom=500; |
|
|
|
|
|
|
|
$('#wizard').width(100*zoom+'%') |
|
|
|
|
|
|
|
$('#wizard svg').width('100%') |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
// zoom reset
|
|
|
|
|
|
|
|
$('#zoomreset').on('click', () => { |
|
|
|
|
|
|
|
zoom = 1 |
|
|
|
|
|
|
|
$('#wizard').width('100%') |
|
|
|
|
|
|
|
$('#wizard svg').width('auto') |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
// zoom out
|
|
|
|
|
|
|
|
$('#zoomout').on('click', () => { |
|
|
|
|
|
|
|
zoom /= 1.5 |
|
|
|
|
|
|
|
if (zoom<0.1) zoom=0.1; |
|
|
|
|
|
|
|
$('#wizard').width(100*zoom+'%') |
|
|
|
|
|
|
|
$('#wizard svg').width('100%') |
|
|
|
|
|
|
|
}) |
|
|
|
// restart on click on status
|
|
|
|
// restart on click on status
|
|
|
|
$('#status').on('click', () => { |
|
|
|
$('#status').on('click', () => { |
|
|
|
docker.unpause() |
|
|
|
docker.unpause() |
|
|
|