diff --git a/ChangeLog b/ChangeLog index f5aa27e..c824514 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2016-01-19 16:20 marc + + * nodejs/package.json.in, nodejs/public/javascripts/servicedock.js, + nodejs/public/stylesheets/servicedock.css, + nodejs/sockets/index.js, nodejs/views/index.ejs: new features log + and bash + +2016-01-18 14:04 marc + + * ChangeLog, ax_init_standard_project.m4, bootstrap.sh, + build-in-docker.conf, build-in-docker.sh, configure.ac, + debian/control.in, doc/doxyfile.in, html, makefile.am, + nodejs/makefile.am, nodejs/package.json, nodejs/package.json.in, + resolve-debbuilddeps.sh: updated build from html/php to nodejs + 2016-01-17 23:07 marc * ChangeLog, html/makefile.am, html/servicedock.js, diff --git a/nodejs/public/javascripts/servicedock.js b/nodejs/public/javascripts/servicedock.js index 484de35..c89a967 100644 --- a/nodejs/public/javascripts/servicedock.js +++ b/nodejs/public/javascripts/servicedock.js @@ -14,11 +14,23 @@ var focused = null; function Docker() { function same(array1, array2) { + if (!array1 && !array2) return true; + if (!array1 || !array2) return false; return (array1.length == array2.length) && array1.every(function(element, index) { return element === array2[index]; }); } + + function quote(text) { + if (text.match('"')) { + if (!text.match("'")) return "'"+text+"'"; + else return '"'+text.replace(/"/g, '\\"')+'"'; + } else { + if (text.match(' ')) return '"'+text+'"'; + else return text; + } + } var _docker = this; @@ -56,9 +68,7 @@ function Docker() { if ((pos=instance.env.indexOf(e))>-1) instance.env.splice(pos, 1) }) if (same(nodes[id].cmd, instance.cmd)) instance.cmd = null - else console.log(instance.cmd+" != "+nodes[id].cmd) if (same(nodes[id].entrypoint, instance.entrypoint)) instance.entrypoint = null - else console.log(instance.entrypoint+" != "+nodes[id].entrypoint) } this.set = function(c) { if (typeof c == "string") c = JSON.parse(c); @@ -202,7 +212,7 @@ function Docker() { this.subgraph = function(name) { return this.graph(this.subnet(name)); } - this.creation = function(name) { + this.configuration = function(name) { var ns = this.subnet(name); var creates = []; for (n in ns) { @@ -227,14 +237,44 @@ function Docker() { creates.push(instance); } creates.sort(function(a, b) { - if (a.volumesfrom.indexOf(b)>=0) return 1; // a after b - if (b.volumesfrom.indexOf(a)>=0) return -1; // a before b + if (a.volumesfrom.indexOf(b.name)>=0) return 1; // a after b + if (b.volumesfrom.indexOf(a.name)>=0) return -1; // a before b for (var i=0; i'+ansifilter(htmlenc(data.text))+''); } -} + $("#screen").animate({ + scrollTop: $("#screen").scrollHeight() + }, 500);} function overview() { focused = null; diff --git a/nodejs/public/stylesheets/servicedock.css b/nodejs/public/stylesheets/servicedock.css index 65ce395..b0f2fe9 100644 --- a/nodejs/public/stylesheets/servicedock.css +++ b/nodejs/public/stylesheets/servicedock.css @@ -237,11 +237,11 @@ table.docker li+li { top: 1.5em; left: 0; right: 0; - bottom: 1.5em; padding: 1em 1em 1em 1em; clear: both; overflow: auto; z-index: 0; + bottom: 1.5em; } #main { @@ -332,7 +332,24 @@ table.docker li+li { #console { background-color: black; - color: white + color: white; + overflow: none; +} +#screen { + position: fixed; + top: 2em; + bottom: 4em; + left: 0; + right: 0; + overflow: auto; + padding: 1ex; +} +#bash { + position: fixed; + bottom: 1.5em; + left: 0; + right: 0; + padding: 0; } .bold {font-weight: bold} .dim {color: grey}