diff --git a/client/servicedock.js b/client/servicedock.js index 98a263a..cb74752 100644 --- a/client/servicedock.js +++ b/client/servicedock.js @@ -12,7 +12,12 @@ function showdate() { function error(e) { showdate() $('#status').removeClass().addClass('error') - $('#error').html('

Error

'+(new Date()).toLocaleString()+'

'+e.msg+'

'+e.data+'
').show() + var txt = '

Error

'+(new Date()).toLocaleString()+'

' + if (e) + txt += (e.msg?'

'+e.msg+'

':'
'+e+'
') + + (e.data?'
'+e.data+'
':'') + $('#error').html(txt).show() + console.trace() } function update() { @@ -23,14 +28,14 @@ function update() { 'services': docker.services.get(), 'tasks': docker.tasks.get() } - $('a#data').attr('href', 'data:application/json;base64,'+btoa(JSON.stringify(data))) + $('a#data').attr('href', 'data:application/json;base64,'+btoa(unescape(encodeURIComponent(JSON.stringify(data))))) .attr('target', '_blank') .attr('download', window.location.hostname+'.json') var dot = docker.graphics.header(parameters) if (stack) dot += stack; if (standalone) dot += standalone; dot += docker.graphics.footer() - $('a#dot').attr('href', 'data:text/vnd.graphviz;base64,'+btoa(dot)) + $('a#dot').attr('href', 'data:text/vnd.graphviz;base64,'+btoa(unescape(encodeURIComponent(dot)))) .attr('target', '_blank') .attr('download', window.location.hostname+'.dot') $('#error').hide() @@ -38,12 +43,13 @@ function update() { try { var svg = docker.graphics.viz(dot) $('#wizard').html(svg) - $('#status').removeClass().addClass('success') - $('a#svg').attr('href', 'data:image/svg;base64,'+btoa(svg)) + $('a#svg').attr('href', 'data:image/svg;base64,'+btoa(unescape(encodeURIComponent(svg)))) .attr('target', '_blank') .attr('download', window.location.hostname+'.svg') + $('#status').removeClass().addClass('success') } catch (e) { error(e) + console.trace() } showdate() } diff --git a/package.json b/package.json index a704e89..db7711f 100644 --- a/package.json +++ b/package.json @@ -1,22 +1,19 @@ { "name": "ServiceDock", - "version": "2.2.0", + "version": "2.5.0", "private": true, "scripts": { "start": "./bin/www" }, "dependencies": { "body-parser": "*", - "child_process": "^1.0.2", "cookie-parser": "*", "debug": "*", - "docker.js": "^1.4.16", + "docker.js": "^2.0.0", "dockerode": "^2.5.7", "express": "*", "jquery": "^3.1.1", - "jqueryui": "^1.11.1", "morgan": "*", - "pty.js": "^0.3.1", "pug": "*", "socket.io": "*", "static-favicon": "*", diff --git a/style/style.styl b/style/style.styl index 37c1247..1d3af2e 100644 --- a/style/style.styl +++ b/style/style.styl @@ -8,6 +8,8 @@ svg a text-decoration: inherit + color: inherit + cursor: pointer header z-index: 98 @@ -54,9 +56,6 @@ header &[href] display: block #info - a - color: inherit - cursor: pointer #zoom margin: 0.5em display: flex