Browse Source

update dist

master
zeus 2 weeks ago
parent
commit
58f0d34b90
21 changed files with 124 additions and 779 deletions
  1. +0
    -8
      client/css/app.a3234da2.css
  2. +0
    -9
      client/css/chunk-vendors.b9dd8f74.css
  3. BIN
      client/favicon.ico
  4. BIN
      client/fonts/themify.2c454669.eot
  5. BIN
      client/fonts/themify.a1ecc3b8.woff
  6. BIN
      client/fonts/themify.e23a7dca.ttf
  7. BIN
      client/img/docker.7b56657d.png
  8. BIN
      client/img/hybrid-1.852eef88.png
  9. BIN
      client/img/loading.f4404720.gif
  10. BIN
      client/img/share2-512.118b3253.png
  11. +0
    -362
      client/img/themify.9c8e96ec.svg
  12. BIN
      client/img/venus1.826d0774.png
  13. BIN
      client/img/warning.f9cebb9b.png
  14. +0
    -1
      client/index.html
  15. +0
    -2
      client/js/app.862a4fda.js
  16. +0
    -1
      client/js/app.862a4fda.js.map
  17. +0
    -394
      client/js/chunk-vendors.f00828c9.js
  18. +0
    -1
      client/js/chunk-vendors.f00828c9.js.map
  19. +1
    -0
      files/findports.sh
  20. +0
    -0
      greetings.txt
  21. +123
    -1
      llo/connect-new.js

+ 0
- 8
client/css/app.a3234da2.css
File diff suppressed because it is too large
View File


+ 0
- 9
client/css/chunk-vendors.b9dd8f74.css
File diff suppressed because it is too large
View File


BIN
client/favicon.ico View File

Before After

BIN
client/fonts/themify.2c454669.eot View File


BIN
client/fonts/themify.a1ecc3b8.woff View File


BIN
client/fonts/themify.e23a7dca.ttf View File


BIN
client/img/docker.7b56657d.png View File

Before After
Width: 200  |  Height: 200  |  Size: 16KB

BIN
client/img/hybrid-1.852eef88.png View File

Before After
Width: 151  |  Height: 165  |  Size: 12KB

BIN
client/img/loading.f4404720.gif View File

Before After
Width: 441  |  Height: 291  |  Size: 17KB

BIN
client/img/share2-512.118b3253.png View File

Before After
Width: 512  |  Height: 512  |  Size: 8.5KB

+ 0
- 362
client/img/themify.9c8e96ec.svg
File diff suppressed because it is too large
View File


BIN
client/img/venus1.826d0774.png View File

Before After
Width: 511  |  Height: 634  |  Size: 80KB

BIN
client/img/warning.f9cebb9b.png View File

Before After
Width: 407  |  Height: 43  |  Size: 4.8KB

+ 0
- 1
client/index.html View File

@@ -1 +0,0 @@
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><title>Vue App</title><link href=/css/app.a3234da2.css rel=preload as=style><link href=/css/chunk-vendors.b9dd8f74.css rel=preload as=style><link href=/js/app.862a4fda.js rel=preload as=script><link href=/js/chunk-vendors.f00828c9.js rel=preload as=script><link href=/css/chunk-vendors.b9dd8f74.css rel=stylesheet><link href=/css/app.a3234da2.css rel=stylesheet></head><body><div id=app></div><script src=/js/chunk-vendors.f00828c9.js></script><script src=/js/app.862a4fda.js></script></body></html>

+ 0
- 2
client/js/app.862a4fda.js
File diff suppressed because it is too large
View File


+ 0
- 1
client/js/app.862a4fda.js.map
File diff suppressed because it is too large
View File


+ 0
- 394
client/js/chunk-vendors.f00828c9.js
File diff suppressed because it is too large
View File


+ 0
- 1
client/js/chunk-vendors.f00828c9.js.map
File diff suppressed because it is too large
View File


+ 1
- 0
files/findports.sh View File

@@ -0,0 +1 @@
grep -v "rem_address" /proc/net/tcp | awk 'function hextonum(str, ret, n, i, k, c) {if (str ~ /^0[xX][0-9a-FA-F]+$/) {str = substr(str, 3);n = length(str);ret = 0;for (i = 1; i <= n; i++) {c = substr(str, i, 1);c = tolower(c);k = index("123456789abcdef", c);ret = ret * 16 + k}} else ret = "NOT-A-NUMBER";return ret} {y=hextonum("0x"substr($2,index($2,":")-2,2));x=hextonum("0x"substr($3,index($3,":")-2,2));for (i=5; i>0; i-=2) {x = x"."hextonum("0x"substr($3,i,2));y = y"."hextonum("0x"substr($2,i,2));} print y":"hextonum("0x"substr($2,index($2,":")+1,4))" "x":"hextonum("0x"substr($3,index($3,":")+1,4));}'

+ 0
- 0
greetings.txt View File


+ 123
- 1
llo/connect-new.js View File

@@ -1133,6 +1133,52 @@ setInterval(function(){
mywgRemoveClosedConnection()
}, 45000)

async function socket_get_container_ports(containerservice){
try {
var mypath = process.cwd()
var service = {}
service.Name = containerservice
service.Dir = mypath
var showexec = `docker cp ${mypath}/files/findports.sh ${service.Name}:/tmp/findports.sh; docker exec ${service.Name} /bin/sh -c "/bin/sh /tmp/findports.sh"`
console.log(showexec)
log = spawn(showexec, {
shell: true,
cwd: service.Dir,
detached: false,
stdio: 'pipe'
});
log.stdout.on('data', function (data) {
var n = {}
n.status = 'data'
n.exec = 'info'
try {
n.data = data.toString()
//n.data = JSON.parse(n.data)
} catch (err) {
console.log(err.stack || String(err));
}
console.log('data '+JSON.stringify(n.data));
io.emit('virtual_port_info_res', n);
});
log.stderr.on('data', function (data) {
var n = {}
n.status = 'error'
n.exec = 'info'
n.data = data.toString()
io.emit('virtual_port_info_reserror', n);
console.log('error '+JSON.stringify(n.data));
});
log.on('close', function (code) {
var n = {}
n.status = 'close'
n.exec = 'info'
n.data = code
io.emit('virtual_port_info_resclose', n);
});
} catch (err) {
console.log(err.stack || String(err));
}
}


io.on('connection', function(socket) {
@@ -1390,15 +1436,30 @@ io.on('connection', function(socket) {
}
});



socket.on('virtual_port_getinfo', (value) => {
var service = {}
var mypath = process.cwd()
console.log(JSON.stringify(value));
try {
socket_get_container_ports(value.name)
} catch (err) {
console.log(err.stack || String(err));
}
});


socket.on('container_info', (value) => {
var service = {}
var mypath = process.cwd()
console.log(JSON.stringify(value));
console.log('-----------------------------------');
try {
service.Name = mpath.basename(value.s.Names)
service.Dir = value.c.dir
var showexec = `docker inspect --format '{{json .HostConfig.NetworkMode}}' ${service.Name}`
//get ports async
//console.log(" exec PORT "+ service.Name);
// ip --brief address show
//var showexec = `docker inspect --format '{{json .Config}}' ${service.Name}`
log = spawn(showexec, {
@@ -1475,6 +1536,7 @@ io.on('connection', function(socket) {
var grep2a = new RegExp(/^microservice-/);
var grep2b = new RegExp(/^hybrid-/);
if(grep2a.test(n.data) || grep2b.test(n.data)){
console.log('-----------------------------------');
var showexec2 = `docker exec ${service.Name} /bin/sh -c "ip -j --brief address show"`
log2 = spawn(showexec2, {
shell: true,
@@ -1490,6 +1552,18 @@ io.on('connection', function(socket) {
console.log(n)
io.emit('container_info_res', n);
});
log2.stderr.on('data', function (data) {
var n = {}
n.status = 'error'
n.exec = 'sharedefault'
n.data = data.toString()
n.command = `docker exec ${service.Name} /bin/sh -c "ip address show" <br> <br>
docker exec ${service.Name} /bin/sh -c "ip a | grep 'scope global' | grep -Po '(?<=inet )[\d.]+'" <br><br>
docker exec ${service.Name} /bin/sh -c "/sbin/ifconfig eth0 | awk '/inet addr/{print substr($2,6)}'"
`
console.log(n.data)
io.emit('container_info_reserror', n);
});
}
}
//var showexec1 = `docker inspect --format '{{json .HostConfig.NetworkMode}}' ${service.Name}`
@@ -1514,8 +1588,56 @@ io.on('connection', function(socket) {
}
});

socket.on('virtual_net_info', (value) => {
var service = {}
var mypath = process.cwd()
console.log(JSON.stringify(value));
console.log('-----------------------------------');
try {
service.Name = mpath.basename(value.s.Names)
service.Dir = value.c.dir
var showexec = `docker exec ${service.Name} /bin/sh -c "ip -j --brief address show"`
log = spawn(showexec, {
shell: true,
cwd: service.Dir,
detached: false,
stdio: 'pipe'
});
log.stdout.on('data', function (data) {
var n = {}
n.status = 'data'
n.exec = 'info'
n.data = data.toString()
try {
n.data = JSON.parse(n.data)
} catch (err) {
console.log(err.stack || String(err));
}
console.log(JSON.stringify(n.data));
io.emit('virtual_net_info_res', n);
});
log.stderr.on('data', function (data) {
var n = {}
n.status = 'error'
n.exec = 'info'
n.data = data.toString()
io.emit('virtual_net_info_reserror', n);
});
log.on('close', function (code) {
var n = {}
n.status = 'close'
n.exec = 'info'
n.data = code
io.emit('virtual_net_info_resclose', n);
});
} catch (err) {
console.log(err.stack || String(err));
}
});

});


server.listen(serverPort, function() {
console.log('server up and running at %s port', serverPort);
});

Loading…
Cancel
Save