in the middle of the work for authentication

This commit is contained in:
Marc Wäckerlin
2016-07-29 19:25:06 +00:00
parent bdaebcc92f
commit 82bb795b85
9 changed files with 338 additions and 90 deletions

View File

@@ -13,8 +13,12 @@ module.exports = function(io) {
}
function exec(cmd, callback) {
console.log("== "+cmd);
proc.exec(cmd, callback);
if (cmd.length>40) {
console.log("== "+cmd.slice(0, 30+cmd.slice(30).indexOf(' '))+" ...");
} else {
console.log("== "+cmd);
}
proc.exec(cmd, {maxBuffer: 10*1024*1024}, callback);
}
function fail(txt, data) {
@@ -68,7 +72,8 @@ module.exports = function(io) {
return fail("list docker images failed", {
error: error, stderr: stderr, stdout: stdout
});
exec("docker inspect "+stdout.trim().replace(/\n/g, " "), imageinspect);
exec("docker inspect "+stdout.trim().replace(/\n/g, " "),
imageinspect);
}
function updateimages(error, stdout, stderr) {
@@ -80,8 +85,8 @@ module.exports = function(io) {
}
function connection(socket) {
console.log("new client");
console.log("new connection");
function emit(signal, data, info) {
if (typeof data == 'string' && !data.match("\n")) {