Browse Source

update dist

master
zeus 3 months ago
parent
commit
6b24561fd9
22 changed files with 68 additions and 785 deletions
  1. +0
    -8
      client/css/app.f160db62.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/cloudvolume--512.9a2838d2.png
  8. BIN
      client/img/docker.7b56657d.png
  9. BIN
      client/img/hybrid-1.852eef88.png
  10. BIN
      client/img/loading.f4404720.gif
  11. BIN
      client/img/share2-512.118b3253.png
  12. +0
    -362
      client/img/themify.9c8e96ec.svg
  13. BIN
      client/img/venus1.826d0774.png
  14. BIN
      client/img/warning.f9cebb9b.png
  15. +0
    -1
      client/index.html
  16. +0
    -2
      client/js/app.51659839.js
  17. +0
    -1
      client/js/app.51659839.js.map
  18. +0
    -394
      client/js/chunk-vendors.f00828c9.js
  19. +0
    -1
      client/js/chunk-vendors.f00828c9.js.map
  20. +23
    -0
      files/checkstatus.sh
  21. +2
    -2
      hybrid/scripts/check-wg-connection.sh
  22. +43
    -5
      llo/connect-new.js

+ 0
- 8
client/css/app.f160db62.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/cloudvolume--512.9a2838d2.png View File

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

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.f160db62.css rel=preload as=style><link href=/css/chunk-vendors.b9dd8f74.css rel=preload as=style><link href=/js/app.51659839.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.f160db62.css rel=stylesheet></head><body><div id=app></div><script src=/js/chunk-vendors.f00828c9.js></script><script src=/js/app.51659839.js></script></body></html>

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


+ 0
- 1
client/js/app.51659839.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


+ 23
- 0
files/checkstatus.sh View File

@@ -0,0 +1,23 @@
#!/bin/bash

nextip(){
IP=$1
IP_HEX=$(printf '%.2X%.2X%.2X%.2X\n' `echo $IP | sed -e 's/\./ /g'`)
NEXT_IP_HEX=$(printf %.8X `echo $(( 0x$IP_HEX + 1 ))`)
NEXT_IP=$(printf '%d.%d.%d.%d\n' `echo $NEXT_IP_HEX | sed -r 's/(..)/0x\1 /g'`)
echo "$NEXT_IP"
}

for fint in $(docker ps --format '{{ .Names }}' | grep "^swarmlabwg-"); do
v=$(docker inspect --format '{{.HostConfig.NetworkMode}}' $fint)
ip=$(docker exec $fint /bin/sh -c "wg show $v allowed-ips | cut -f2 | cut -d'/' -f1")
IP=$(nextip $ip)
#echo " -- $fint --- $v -- $ip -- $IP"
if $(docker exec $fint /bin/sh -c "ping -q -w 2 $IP > /dev/null"); then
echo "ok:$fint"
else
docker stop $fint > /dev/null
docker container rm $fint > /dev/null
echo "stop:$fint"
fi
done

+ 2
- 2
hybrid/scripts/check-wg-connection.sh View File

@@ -7,7 +7,7 @@ declare -a wgint
# ff="${ff#"${ff%%[![:space:]]*}"}"
# ff="${ff%"${ff##*[![:space:]]}"}"
# ff=${ff:5}
# #echo $ff
#echo $ff
# wgint+=($ff)
#done
for f in /sys/class/net/swlab*; do
@@ -17,7 +17,7 @@ for f in /sys/class/net/swlab*; do
f="${f%"${f##*[![:space:]]}"}"
f=${f:5}
f=$(basename $f)
#echo $f
echo $f
wgint+=($f)
fi
done

+ 43
- 5
llo/connect-new.js View File

@@ -1360,6 +1360,42 @@ async function mywgStatus(){

}

async function mywgcheckStatus(){
//var mongoserver = JSON.parse(fs.readFileSync('./hybrid/venus-stats/config.json', 'utf8'))
var mypath = process.cwd()

var showexec = `/bin/bash ${mypath}/files/checkstatus.sh`
log = spawn(showexec, {
shell: true,
cwd: mypath,
detached: false,
stdio: 'pipe'
});

log.stdout.on('data', function (data) {
var n = {}
n.data = data.toString()
n.data = n.data.replace(/(\r\n|\n|\r|\t)/g,"");
console.log('mywgcheckStatusdata '+JSON.stringify(n));
io.emit('mywgcheckStatus_res', n);
});

log.stderr.on('data', function (data) {
var n = {}
n.data = data.toString()
console.log('mywgcheckStatuserror '+JSON.stringify(n));
io.emit('mywgcheckStatus_res_error', n);
});

log.on('close', function (code) {
var n = {}
n.data = code
console.log('mywgcheckStatusclose '+JSON.stringify(code));
io.emit('mywgcheckStatus_res_close', n);
});

}

function mywgRemoveClosedConnection(){
//var mongoserver = JSON.parse(fs.readFileSync('./hybrid/venus-stats/config.json', 'utf8'))
var mypath = process.cwd()
@@ -1408,7 +1444,7 @@ function mywgRemoveClosedConnection(){
stdio: 'pipe'
});
log1.on('close', function (code) {
//console.log('close1 '+JSON.stringify(code));
console.log('close1close----------1 '+JSON.stringify(code));
var n = {}
n.data = code
io.emit('message_close', n);
@@ -1417,6 +1453,7 @@ function mywgRemoveClosedConnection(){
//connection is ok
// check if container is ok

console.log('close1close----------2 ');
var showexeccheck = `docker ps --format '{"Names":"{{ .Names }}", "Status":"{{.Status}}"}' | jq . -s `
exec(showexeccheck, (err, stdout, stderr) => {
if (err) {
@@ -1445,8 +1482,8 @@ function mywgRemoveClosedConnection(){
var wgdown = `/bin/bash /config/${nn.bootstrapstackid}/ifdown_linux`
var showexecrm1 = `/bin/sh ./hybrid/connect/${bootstrapstackid}/swarmlabwgdown`

console.log('fount '+found + ' ' + showexecrm1 )
/*
console.log('fount disconnect '+found + ' ' + showexecrm1 )
// auto close when no connection exist
var showexec1 = `docker exec swlabadminvenus /bin/bash -c "${wgdown}"; ${showexecrm1}`
log1 = spawn(showexec1, {
shell: true,
@@ -1460,9 +1497,9 @@ function mywgRemoveClosedConnection(){
n.data = code
io.emit('message_close', n);
});
*/
}else{
console.log('fount '+found + ' ' + search )
console.log('fountsearch '+found + ' ' + search )
}
}
})
@@ -1493,6 +1530,7 @@ function mywgRemoveClosedConnection(){
var n = {}
n.data = code
io.emit('message_close', n);
mywgcheckStatus();
});

var n1 = {}

Loading…
Cancel
Save