Browse Source

add warning

master
zeus 4 years ago
parent
commit
d043bf5164
  1. BIN
      dist/img/warning.f9cebb9b.png
  2. 2
      dist/index.html
  3. 2
      dist/js/app.9e47b461.js
  4. 1
      dist/js/app.9e47b461.js.map
  5. 2
      dist/js/app.bf5252c9.js
  6. 1
      dist/js/app.bf5252c9.js.map
  7. 5
      src-local/start-server.sh
  8. 110
      src/App.vue
  9. BIN
      src/assets/img/warning.png
  10. 3
      start.sh

BIN
dist/img/warning.f9cebb9b.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

2
dist/index.html

@ -1 +1 @@
<!DOCTYPE html><html lang=""><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.f8f5dc61.css" rel="preload" as="style"><link href="/css/chunk-vendors.e469b508.css" rel="preload" as="style"><link href="/js/app.bf5252c9.js" rel="preload" as="script"><link href="/js/chunk-vendors.d8d18fe6.js" rel="preload" as="script"><link href="/css/chunk-vendors.e469b508.css" rel="stylesheet"><link href="/css/app.f8f5dc61.css" rel="stylesheet"></head><body><div id="app"></div><script src="/js/chunk-vendors.d8d18fe6.js"></script><script src="/js/app.bf5252c9.js"></script></body></html> <!DOCTYPE html><html lang=""><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.f8f5dc61.css" rel="preload" as="style"><link href="/css/chunk-vendors.e469b508.css" rel="preload" as="style"><link href="/js/app.9e47b461.js" rel="preload" as="script"><link href="/js/chunk-vendors.d8d18fe6.js" rel="preload" as="script"><link href="/css/chunk-vendors.e469b508.css" rel="stylesheet"><link href="/css/app.f8f5dc61.css" rel="stylesheet"></head><body><div id="app"></div><script src="/js/chunk-vendors.d8d18fe6.js"></script><script src="/js/app.9e47b461.js"></script></body></html>

2
dist/js/app.9e47b461.js

File diff suppressed because one or more lines are too long

1
dist/js/app.9e47b461.js.map

File diff suppressed because one or more lines are too long

2
dist/js/app.bf5252c9.js

File diff suppressed because one or more lines are too long

1
dist/js/app.bf5252c9.js.map

File diff suppressed because one or more lines are too long

5
src-local/start-server.sh

@ -27,6 +27,9 @@ if [ "$cwdir" != "$wdir" ]; then
cd $wdir cd $wdir
fi fi
sudo /bin/bash ./hybrid/connect/get-swarmlab-ca > /dev/null 2>&1
sudo /bin/bash ./hybrid/connect/get-base-ca > /dev/null 2>&1
pm2 stop hybridserver > /dev/null 2>&1 pm2 stop hybridserver > /dev/null 2>&1
sleep 1 sleep 1
pm2 start ecosystem.config.js --watch --ignore-watch="node_modules" > /dev/null 2>&1 pm2 start ecosystem.config.js --watch --ignore-watch="node_modules" > /dev/null 2>&1
@ -42,5 +45,3 @@ if [ ! -d 'LabLearningObject-hybrid-tmp' ]; then
mkdir LabLearningObject-hybrid-tmp mkdir LabLearningObject-hybrid-tmp
fi fi
sudo /bin/bash ./hybrid/connect/get-swarmlab-ca > /dev/null 2>&1
sudo /bin/bash ./hybrid/connect/get-base-ca > /dev/null 2>&1

110
src/App.vue

@ -1,6 +1,109 @@
<template> <template>
<div id="app" class="container-fluid"> <div id="app" class="container-fluid">
<!-- ------ if warning --------------- -->
<div
v-if="warning===true"
>
<card class="card-user" style="max-height:100%">
<div class="row" >
<div class="col-3 order-first " >
<br>
</div>
<div class="col-8 order-last" >
<br>
<h2> Welcome to Swarmlab! </h2>
<br>
You are now <b>connected to the local Swarmlab client.</b>
<br>
That means that at the moment you are offline and can only <b>work locally on your PC.</b>
<br>
<br>
To connect to the server please <i>visit the Profile and click on connect.</i>
<br>
<br>
<b>DISCLAMER:</b>
<br>
When connecting to the server you are becoming part of a network of multiple other computers that are also connected.
<br>
This means that communication between those hosts is unlimited.
<br>
<br>
Since docker is a contained virtual environment this is <b>VERY SAFE</b>
<br>
<br>
<b>BUT</b>
<br>
to be absolutely secure, like when connecting to any network:
<br>
<ul>
<li>
please make sure your passwords are strong (and obviously change all defaults like the ones provided for the downloadable docker images or our labs, since they are publicly available)
</li>
<li>
don't connect to hosts you don't trust (e.g. when using the hybrid only trust relliable sources)
</li>
<li>
be aware that you are in a public network (like an airport e.g.) and act accordingly
</li>
</ul>
<br>
<div class="row" >
<div class="col-3 order-first " >
<b>You can always check your connection status at the top right</b>
</div>
<div class="col-8 order-last" >
<img src="@/assets/img/warning.png" alt="..." >
</div>
</div>
<br>
<div class="row" >
<div class="col-3 order-first " >
<br>
</div>
<div class="col-8 order-last" >
<div class="input-group">
<div class="input-group-append">
<button
class="btn btn-outline-danger"
round
type="button"
@click="setWarning">
Yes I understad and will be careful</button>
</div>
</div>
</div>
</div>
</div>
</div>
</card>
</div>
<!-- ------ else warning --------------- -->
<div
v-else
>
<nav class="navbar navbar-light navbar-expand-md bg-light justify-content-md-center justify-content-start"> <nav class="navbar navbar-light navbar-expand-md bg-light justify-content-md-center justify-content-start">
<b-navbar-brand class="logo simple-text ti-swarmlab text-secondary"> <b-navbar-brand class="logo simple-text ti-swarmlab text-secondary">
Swarmlab.io Swarmlab.io
@ -384,6 +487,9 @@
<!-- ------ /warning --------------- -->
</div>
</div> </div>
</template> </template>
@ -414,6 +520,7 @@ export default {
}, },
data() { data() {
return { return {
warning: true,
componentKeyreload:1, componentKeyreload:1,
componentKeyreload1:1, componentKeyreload1:1,
setStatusAgent:'', setStatusAgent:'',
@ -439,6 +546,9 @@ export default {
created() { created() {
}, },
methods: { methods: {
setWarning(){
this.warning = false
},
async onAction(action){ async onAction(action){
if(action == 'check'){ if(action == 'check'){
if(this.$socket.disconnected){ if(this.$socket.disconnected){

BIN
src/assets/img/warning.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

3
start.sh

@ -64,7 +64,8 @@ cd $wdir
cd $wdir cd $wdir
FILEstart="$wdir/src-local/hybrid/connect/join.sh" FILEstart="$wdir/src-local/hybrid/connect/join.sh"
if [ -f "$FILEstart" ]; then if [ -f "$FILEstart" ]; then
sudo bash $FILEstart echo 'Run "hybrid->connect" if you want to join the swarmlab-hybrid network'
#sudo bash $FILEstart
fi fi
cd $cwdir cd $cwdir

Loading…
Cancel
Save