Browse Source

update dist

master
zeus 1 year ago
parent
commit
58f0d34b90
  1. 8
      client/css/app.a3234da2.css
  2. 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. 362
      client/img/themify.9c8e96ec.svg
  12. BIN
      client/img/venus1.826d0774.png
  13. BIN
      client/img/warning.f9cebb9b.png
  14. 1
      client/index.html
  15. 2
      client/js/app.862a4fda.js
  16. 1
      client/js/app.862a4fda.js.map
  17. 394
      client/js/chunk-vendors.f00828c9.js
  18. 1
      client/js/chunk-vendors.f00828c9.js.map
  19. 1
      files/findports.sh
  20. 0
      greetings.txt
  21. 124
      llo/connect-new.js

8
client/css/app.a3234da2.css

File diff suppressed because one or more lines are too long

9
client/css/chunk-vendors.b9dd8f74.css

File diff suppressed because one or more lines are too long

BIN
client/favicon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

BIN
client/fonts/themify.2c454669.eot

Binary file not shown.

BIN
client/fonts/themify.a1ecc3b8.woff

Binary file not shown.

BIN
client/fonts/themify.e23a7dca.ttf

Binary file not shown.

BIN
client/img/docker.7b56657d.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

BIN
client/img/hybrid-1.852eef88.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
client/img/loading.f4404720.gif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

BIN
client/img/share2-512.118b3253.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

362
client/img/themify.9c8e96ec.svg

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 229 KiB

BIN
client/img/venus1.826d0774.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

BIN
client/img/warning.f9cebb9b.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

1
client/index.html

@ -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>

2
client/js/app.862a4fda.js

File diff suppressed because one or more lines are too long

1
client/js/app.862a4fda.js.map

File diff suppressed because one or more lines are too long

394
client/js/chunk-vendors.f00828c9.js

File diff suppressed because one or more lines are too long

1
client/js/chunk-vendors.f00828c9.js.map

File diff suppressed because one or more lines are too long

1
files/findports.sh

@ -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
greetings.txt

124
llo/connect-new.js

@ -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