Browse Source

add warning

master
zeus 3 months ago
parent
commit
d043bf5164
10 changed files with 119 additions and 7 deletions
  1. BIN
      dist/img/warning.f9cebb9b.png
  2. +1
    -1
      dist/index.html
  3. +2
    -0
      dist/js/app.9e47b461.js
  4. +1
    -0
      dist/js/app.9e47b461.js.map
  5. +0
    -2
      dist/js/app.bf5252c9.js
  6. +0
    -1
      dist/js/app.bf5252c9.js.map
  7. +3
    -2
      src-local/start-server.sh
  8. +110
    -0
      src/App.vue
  9. BIN
      src/assets/img/warning.png
  10. +2
    -1
      start.sh

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

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

+ 1
- 1
dist/index.html View File

@@ -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
- 0
dist/js/app.9e47b461.js
File diff suppressed because it is too large
View File


+ 1
- 0
dist/js/app.9e47b461.js.map
File diff suppressed because it is too large
View File


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


+ 0
- 1
dist/js/app.bf5252c9.js.map
File diff suppressed because it is too large
View File


+ 3
- 2
src-local/start-server.sh View File

@@ -27,6 +27,9 @@ if [ "$cwdir" != "$wdir" ]; then
cd $wdir
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
sleep 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
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
- 0
src/App.vue View File

@@ -1,6 +1,109 @@
<template>
<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">
<b-navbar-brand class="logo simple-text ti-swarmlab text-secondary">
Swarmlab.io
@@ -384,6 +487,9 @@



<!-- ------ /warning --------------- -->
</div>

</div>
</template>

@@ -414,6 +520,7 @@ export default {
},
data() {
return {
warning: true,
componentKeyreload:1,
componentKeyreload1:1,
setStatusAgent:'',
@@ -439,6 +546,9 @@ export default {
created() {
},
methods: {
setWarning(){
this.warning = false
},
async onAction(action){
if(action == 'check'){
if(this.$socket.disconnected){

BIN
src/assets/img/warning.png View File

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

+ 2
- 1
start.sh View File

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

cd $cwdir

Loading…
Cancel
Save