init
This commit is contained in:
143
templates/helpswmu.html
Normal file
143
templates/helpswmu.html
Normal file
@@ -0,0 +1,143 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!-- Write your comments here -->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='index.css') }}">
|
||||
<link rel="shortcut icon" href="{{ url_for('static', filename='pic/favicon.ico') }}">
|
||||
|
||||
<label class="swmu">
|
||||
<pre>environment: {{ environment }}</pre>
|
||||
</label>
|
||||
|
||||
<div style="text-align: center;">
|
||||
<label class="logo">SWMU</label>
|
||||
</div>
|
||||
<head>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background-color: WhiteSmoke;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"> </script>
|
||||
<!-- <script type=text/javascript> $(function() { $("#mybutton").click(function (event) { $.getJSON('/swmu_run', { },
|
||||
function(data) { }); return false; }); }); </script> -->
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.2.0/css/fork-awesome.min.css" integrity="sha256-XoaMnoYC5TH6/+ihMEnospgm0J1PM/nioxbOUdnM8HY=" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Audiowide">
|
||||
|
||||
<title>SWMU</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div>
|
||||
<pre>
|
||||
SWMU examples:
|
||||
|
||||
Example for 5 Software Mobile Units and server host `localhost`:
|
||||
$ runswmu 5 --mode run
|
||||
$ runswmu 5 --mode sim --log ./test_log.log
|
||||
$ runswmu 5 --mode simfast --log ./test_log.log --simulate_pause 0.25
|
||||
|
||||
Other examples:
|
||||
$ runswmu 1 --mode run --server-host localhost --start-id32 3567779841
|
||||
$ runswmu 1 --mode sim --server-host localhost --start-id32 3567779841 --log ./test_log.log
|
||||
$ runswmu 1 --mode run --server-host 10.48.172.135 --start-id32 3567779841 --bt-spontaneous-timeout 5 --simulate_pause 0.25
|
||||
$ LOG_LEVEL="INFO" runswmu 5 --mode sim --server-host localhost --start-id32 3567779871 --bt-spontaneous-timeout 5 --simulate_pause 0.25 --log ./test_log.log
|
||||
$ LOG_LEVEL="INFO" runswmu 2500 --mode run --server-host 10.48.172.135 --bt-spontaneous-timeout 20 --sigma 3 --sta True --sta-pause 60 --x01-pause 11 --x1d-pause 250 --x1a-pause 18 --x1a-type 1
|
||||
--domain DE00 --near_by_domain CZ00 --start-id32 3567779841
|
||||
$ runswmu 1 --mode run --server-host 10.48.172.135 --start-id32 3567779841 --bt-spontaneous-timeout 5 --simulate_pause 0.25
|
||||
$ runswmu 50 --mode simfast --server-host localhost --start-id32 3567779841 --log ./test_log.log --simulate_pause 0.25
|
||||
|
||||
how to create pod (k8s):
|
||||
$ kubectl [-n namespace] run [name_of_pod] --rm -i --tty --image [name_of_image] -- /bin/bash
|
||||
$ kubectl -n uhura-azure-wagexp run swmu --namespace=uhura-azure-wagexp --image=principazureacr.azurecr.io/uhura/swmu-0.1.0 --requests=cpu=100m,memory=512Mi --limits=cpu=200m,memory=2048Mi --rm -i --tty -- /bin/bash
|
||||
$ kubectl -n uhura-azure-wagexp run swmu --rm -i --tty --image=python -- /bin/bash
|
||||
|
||||
how to add mulog_file to k8s pod:
|
||||
$ kubectl [-n namespace] cp [path to mulog file] [pod_name]:/
|
||||
$ kubectl -n uhura-azure-wagexp cp /home/directory/test_log.log swmu:/data
|
||||
|
||||
|
||||
|
||||
|
||||
SWMU arguments (command runswmu -h):
|
||||
|
||||
mandatory arguments:
|
||||
UNITS unit amount
|
||||
--mode MODE mode run | sim | simfast
|
||||
|
||||
optional arguments for "run" mode:
|
||||
--latitude LATITUDE latitude (default 47.687622035085916)
|
||||
--longitude LONGITUDE
|
||||
longitude (default 17.744894027593666)
|
||||
--domain DOMAIN current domain (default HU00)
|
||||
--near_by_domain NEAR_BY_DOMAIN
|
||||
near by domain (default HU00)
|
||||
--x01 GENERATE_X01 generate x01 (default True)
|
||||
--x01-pause X01_PAUSE
|
||||
x01 pause in seconds (default 5s)
|
||||
--units-wo-x1a UNITS_WO_X1A
|
||||
amount of units that will not generate x1a (default 0)
|
||||
--x1a-pause X1A_PAUSE
|
||||
x1a pause in seconds (default 10s)
|
||||
--x1a-mask X1A_MASK x1a mask-type of log: 01 - without Regain signal flag; 17 - with Regain signal flag (default)
|
||||
--x1a-type X1A_TYPE x1a type of log (number of positions): 0 - (default); 1 - 17pos; 2 - 33pos
|
||||
--x1d GENERATE_X1D generate x1d (default True)
|
||||
--x1d-pause X1D_PAUSE
|
||||
x1d pause in seconds (default 60sec)
|
||||
--x1d-weight_axles X1D_WEIGHT_AXLES
|
||||
x1d weight + number of axles: 'auto' - generate 2-10 (default); '42' - set weight 4, axle 2; '76' - set weight 7, axle 6;
|
||||
|
||||
optional arguments for "sim" or "simfast" mode:
|
||||
--log IMPORT_DIR path to simulated log (obligatory with "sim" and "simfast" mode)
|
||||
--simulate_pause SIMULATE_PAUSE
|
||||
used for mode "simfast" to set delay between each message in seconds (default 2s)
|
||||
--sim_time_check SIM_TIME_CHECK
|
||||
used for mode 'sim' to check timestamp:
|
||||
1) if 'no' is set, there is no changes in timestamp (default)
|
||||
2) if 'max' is set, the the wait between two messages cannot be greater than 60s
|
||||
3) if 'max_y' is set, the messages older then 5 years are ignored
|
||||
--sim_stop SIM_STOP turn off/on auto-loop-close for sim/simfast mode (default True)
|
||||
|
||||
|
||||
shared arguments:
|
||||
-h, --help show this help message and exit
|
||||
--server-host SERVER_HOST
|
||||
server host (default localhost)
|
||||
--server-port SERVER_PORT
|
||||
server port (default 31001)
|
||||
--start-id32 START_ID32
|
||||
start id32 (default 3567779840)
|
||||
--start-port START_PORT
|
||||
start port (default 1024)
|
||||
--bt-spontaneous-timeout BT_SPONTANEOUS_TIMEOUT
|
||||
BT spontaneous timeout in seconds (default 20)
|
||||
--sigma SIGMA sigma in seconds (default 0.2)
|
||||
--sta SEND_STA send sta (default True)
|
||||
--sta-pause STA_PAUSE
|
||||
STA pause in seconds (default 30sec)
|
||||
|
||||
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<form action="/" method="get">
|
||||
<div class="navbar">
|
||||
<a href="/home" >Home</a>
|
||||
<a href="/info" >info</a>
|
||||
<a href="/helpswmu" class="active" >helpswmu</a>
|
||||
<a href="/mulog_read" >mulog read</a>
|
||||
|
||||
<!--<a href="#examples">examples -->
|
||||
<!--<a href="#about">about</a> -->
|
||||
<a class="navbar-brand pull-sm-right m-r-0" style="float:right" href="https://gitlab.princip.cz/lab/sw/uhura/swmu" target="_blank">
|
||||
<i class="fa fa-gitlab" aria-hidden="true"><span> </span>Gitlab</i>
|
||||
</a>
|
||||
<a href="https://muid.princip.cz/" style="float:right" target="_blank">muidconv</a>
|
||||
<a href="https://xxxlog.cml.princip.cz/" style="float:right" target="_blank">xxlog</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
24
templates/index.html
Normal file
24
templates/index.html
Normal file
@@ -0,0 +1,24 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>The jQuery Example</title>
|
||||
|
||||
<h2>jQuery-AJAX in FLASK. Execute function on button click</h2>
|
||||
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"> </script>
|
||||
<script type=text/javascript> $(function() { $("#mybutton").click(function (event) { $.getJSON('/SomeFunction', { },
|
||||
function(data) { }); return false; }); }); </script>
|
||||
<script type=text/javascript> $(function() { $("#mybutton2").click(function (event) { $.getJSON('/SomeFunction2', { },
|
||||
function(data) { }); return false; }); }); </script>
|
||||
<script type=text/javascript> $(function() { $("#mybutton3").click(function (event) { $.getJSON('/SomeFunction3', { },
|
||||
function(data) { }); return false; }); }); </script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<input type = "button" id = "mybutton" value = "Click Here" />
|
||||
<input type = "button" id = "mybutton2" value = "Click Here" />
|
||||
<input type = "button" id = "mybutton3" value = "Click Here" />
|
||||
</body>
|
||||
|
||||
</html>
|
||||
636
templates/index_v2.html
Normal file
636
templates/index_v2.html
Normal file
@@ -0,0 +1,636 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!-- Write your comments here -->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='index.css') }}">
|
||||
<link rel="shortcut icon" href="{{ url_for('static', filename='pic/favicon.ico') }}">
|
||||
|
||||
<label class="swmu">
|
||||
<pre>environment: {{ environment }}</pre>
|
||||
</label>
|
||||
|
||||
<div style="text-align: center;">
|
||||
<!-- <label class="logo">SWMU</label> -->
|
||||
<img src="static/pic/SWMU-logos_transparent3.png" alt="TEST" width="700" height="250">
|
||||
</div>
|
||||
<head>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background-color: WhiteSmoke;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"> </script>
|
||||
<script type=text/javascript> $(function() { $("#mybutton").click(function (event) { $.getJSON('/swmu_run', { },
|
||||
function(data) { }); return false; }); }); </script>
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.2.0/css/fork-awesome.min.css" integrity="sha256-XoaMnoYC5TH6/+ihMEnospgm0J1PM/nioxbOUdnM8HY=" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Audiowide">
|
||||
|
||||
<title>SWMU</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form action="#">
|
||||
|
||||
</form>
|
||||
|
||||
<form action="/" method="POST" >
|
||||
<!--<div class="text-center">-->
|
||||
<div class="clearfix">
|
||||
<div>
|
||||
<label class="info_argument">Mandatory arguments:</label>
|
||||
</div>
|
||||
<label class="dropbox_text">log leves:
|
||||
<select name="loglevels" id="loglevels">
|
||||
<!--<option value="INFO" selected disabled hidden>Choose, default "INFO"</option>-->
|
||||
<option value="INFO">INFO</option>
|
||||
<option value="CRITICAL">CRITICAL</option>
|
||||
<option value="ERROR">ERROR</option>
|
||||
<option value="WARNING">WARNING</option>
|
||||
<option value="DEBUG">DEBUG</option>
|
||||
<option value="NOTSET">NOTSET</option>
|
||||
</select>
|
||||
<!--<input type="submit" value=" Set ">-->
|
||||
<label class="info_number"> (default INFO)</label>
|
||||
</label>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">start ID32:</label>
|
||||
<input type="number" name="start-id32" value="3567779840"
|
||||
min="3567779840" max="9999999999">
|
||||
|
||||
<label class="info_number"> (min 3567779840)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">number of swmu: </label>
|
||||
<input type="number" name="number_of_swmu" value="1"
|
||||
min="1" max="99999">
|
||||
|
||||
<label class="info_number"> (min 1)</label>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- RadioButtons + content -->
|
||||
<div>
|
||||
<label class="mode_text">modes:</label>
|
||||
<label>
|
||||
<input type="radio" name="modes"
|
||||
value="run">run
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="modes"
|
||||
value="sim">sim
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="modes"
|
||||
value="simfast">simfast
|
||||
</label>
|
||||
|
||||
<label class="info_number"> (default run)</label>
|
||||
|
||||
<label>
|
||||
<input type="radio" name="modes" value="None" style="display:none" checked>
|
||||
</label>
|
||||
<!--
|
||||
<label>
|
||||
<input type="radio" name="modes"
|
||||
value="XX"> XX</label>
|
||||
-->
|
||||
|
||||
</div>
|
||||
|
||||
<div> </div>
|
||||
|
||||
<div>
|
||||
<label class="info_argument">Shared arguments:</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">server host: </label>
|
||||
<input type=text name="server_hosts" value="localhost">
|
||||
|
||||
<label class="info_number"> (default localhost)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">server port: </label>
|
||||
<input type="number" name="server_ports" value="31001">
|
||||
|
||||
<label class="info_number"> (default 31001)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">start port: </label>
|
||||
<input type="number" name="start_ports" value="1024">
|
||||
|
||||
<label class="info_number"> (default 1024)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">bt spontaneous timeout: </label>
|
||||
<input type="number" name="bt_spontaneous_timeouts" value="20">
|
||||
|
||||
<label class="info_number"> (default 20)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">sigma: </label>
|
||||
<input type="number" name="sigmas" value="0.2"
|
||||
min="0" max="2" step="0.1">
|
||||
|
||||
<label class="info_number"> (default 0.2)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">sta: </label>
|
||||
<select name="stas">
|
||||
<option value="True">True</option>
|
||||
<option value="False">False</option>
|
||||
</select>
|
||||
|
||||
<label class="info_number"> (default True)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">sta pause: </label>
|
||||
<input type="number" name="sta_pauses" value="30">
|
||||
|
||||
<label class="info_number"> (default 30s)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">file-transfer delay: </label>
|
||||
<input type="number" name="ft_delays" value="2"
|
||||
min="0" max="30" step="0.1">
|
||||
|
||||
<label class="info_number"> (default 2s)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">file-transfer mode: </label>
|
||||
<select name="ft_modes">
|
||||
<option value="keep_none">keep_none</option>
|
||||
<option value="keep_all">keep_all</option>
|
||||
</select>
|
||||
|
||||
<label class="info_number"> (default keep_none)</label>
|
||||
</div>
|
||||
|
||||
<!-- run selectt -->
|
||||
<div class="run selectt">
|
||||
<label class="info_argument">Mode 'run' arguments:</label>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">latitude: </label>
|
||||
<input type="number" name="latitudes" value="47.687622035085916"
|
||||
step="0.000000000000001">
|
||||
|
||||
<label class="info_number"> (default 47.687622035085916)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">longitude: </label>
|
||||
<input type="number" name="longitudes" value="17.744894027593666"
|
||||
step="0.000000000000001">
|
||||
|
||||
<label class="info_number"> (default 17.744894027593666)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">domain: </label>
|
||||
<select name="domains">
|
||||
<option value="HU00">HU00</option>
|
||||
<option value="AL00">AL00</option>
|
||||
<option value="AQ00">AQ00</option>
|
||||
<option value="AT00">AT00</option>
|
||||
<option value="BA00">BA00</option>
|
||||
<option value="BE00">BE00</option>
|
||||
<option value="BG00">BG00</option>
|
||||
<option value="BY00">BY00</option>
|
||||
<option value="CH00">CH00</option>
|
||||
<option value="CY00">CY00</option>
|
||||
<option value="CZ00">CZ00</option>
|
||||
<option value="DE00">DE00</option>
|
||||
<option value="DK00">DK00</option>
|
||||
<option value="EE00">EE00</option>
|
||||
<option value="ES00">ES00</option>
|
||||
<option value="FI00">FI00</option>
|
||||
<option value="FR00">FR00</option>
|
||||
<option value="GB00">GB00</option>
|
||||
<option value="GI00">GI00</option>
|
||||
<option value="GR00">GR00</option>
|
||||
<option value="HR00">HR00</option>
|
||||
<option value="IE00">IE00</option>
|
||||
<option value="IT00">IT00</option>
|
||||
<option value="LT00">LT00</option>
|
||||
<option value="LU00">LU00</option>
|
||||
<option value="LV00">LV00</option>
|
||||
<option value="MC00">MC00</option>
|
||||
<option value="MD00">MD00</option>
|
||||
<option value="ME00">ME00</option>
|
||||
<option value="MT00">MT00</option>
|
||||
<option value="NL00">NL00</option>
|
||||
<option value="NO00">NO00</option>
|
||||
<option value="PL00">PL00</option>
|
||||
<option value="PT00">PT00</option>
|
||||
<option value="RO00">RO00</option>
|
||||
<option value="RS00">RS00</option>
|
||||
<option value="RU00">RU00</option>
|
||||
<option value="SE00">SE00</option>
|
||||
<option value="SI00">SI00</option>
|
||||
<option value="SK00">SK00</option>
|
||||
<option value="TR00">TR00</option>
|
||||
<option value="UA00">UA00</option>
|
||||
</select>
|
||||
|
||||
<label class="info_number"> (default HU00)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">near by domain: </label>
|
||||
<select name="near_by_domains">
|
||||
<option value="HU00">HU00</option>
|
||||
<option value="AL00">AL00</option>
|
||||
<option value="AQ00">AQ00</option>
|
||||
<option value="AT00">AT00</option>
|
||||
<option value="BA00">BA00</option>
|
||||
<option value="BE00">BE00</option>
|
||||
<option value="BG00">BG00</option>
|
||||
<option value="BY00">BY00</option>
|
||||
<option value="CH00">CH00</option>
|
||||
<option value="CY00">CY00</option>
|
||||
<option value="CZ00">CZ00</option>
|
||||
<option value="DE00">DE00</option>
|
||||
<option value="DK00">DK00</option>
|
||||
<option value="EE00">EE00</option>
|
||||
<option value="ES00">ES00</option>
|
||||
<option value="FI00">FI00</option>
|
||||
<option value="FR00">FR00</option>
|
||||
<option value="GB00">GB00</option>
|
||||
<option value="GI00">GI00</option>
|
||||
<option value="GR00">GR00</option>
|
||||
<option value="HR00">HR00</option>
|
||||
<option value="IE00">IE00</option>
|
||||
<option value="IT00">IT00</option>
|
||||
<option value="LT00">LT00</option>
|
||||
<option value="LU00">LU00</option>
|
||||
<option value="LV00">LV00</option>
|
||||
<option value="MC00">MC00</option>
|
||||
<option value="MD00">MD00</option>
|
||||
<option value="ME00">ME00</option>
|
||||
<option value="MT00">MT00</option>
|
||||
<option value="NL00">NL00</option>
|
||||
<option value="NO00">NO00</option>
|
||||
<option value="PL00">PL00</option>
|
||||
<option value="PT00">PT00</option>
|
||||
<option value="RO00">RO00</option>
|
||||
<option value="RS00">RS00</option>
|
||||
<option value="RU00">RU00</option>
|
||||
<option value="SE00">SE00</option>
|
||||
<option value="SI00">SI00</option>
|
||||
<option value="SK00">SK00</option>
|
||||
<option value="TR00">TR00</option>
|
||||
<option value="UA00">UA00</option>
|
||||
</select>
|
||||
|
||||
<label class="info_number"> (default HU00)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">x01: </label>
|
||||
<select name="x01s">
|
||||
<option value="True">True</option>
|
||||
<option value="False">False</option>
|
||||
</select>
|
||||
|
||||
<label class="info_number"> (default True)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">x01 pause: </label>
|
||||
<input type="number" name="x01_pauses" value="5">
|
||||
|
||||
<label class="info_number"> (default 5s)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">units without x1a: </label>
|
||||
<input type="number" name="units_wo_x1as" value="0">
|
||||
|
||||
<label class="info_number"> (default 0)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">x1a pause: </label>
|
||||
<input type="number" name="x1a_pauses" value="10">
|
||||
|
||||
<label class="info_number"> (default 10s)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">x1a mask: </label>
|
||||
<select name="x1a_masks">
|
||||
<option value="17">17 - with Regain signal flag</option>
|
||||
<option value="01">01 - without Regain signal flag</option>
|
||||
</select>
|
||||
|
||||
<label class="info_number"> (default 17)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">x1a type: </label>
|
||||
<select name="x1a_types">
|
||||
<option value="0">0</option>
|
||||
<option value="1">1 - 17pos</option>
|
||||
<option value="2">1 - 33pos</option>
|
||||
</select>
|
||||
|
||||
<label class="info_number"> (default 17)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">x1d: </label>
|
||||
<select name="x1ds">
|
||||
<option value="True">True</option>
|
||||
<option value="False">False</option>
|
||||
</select>
|
||||
|
||||
<label class="info_number"> (default True)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">x1d pause: </label>
|
||||
<input type="number" name="x1d_pauses" value="60">
|
||||
|
||||
<label class="info_number"> (default 60s)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">x1d weight axle: </label>
|
||||
<input type=text name="x1d_weight_axles" value="auto">
|
||||
<div>
|
||||
<label class="info_number"> (generate 2-10 (default) | 42 - set weight 4, axle 2 | 76 - set weight 7, axle 6)</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- sim selectt -->
|
||||
<div class="sim selectt">
|
||||
<label class="info_argument">Mode 'sim' arguments:</label>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">path to log: </label>
|
||||
<input type=text name="logs" value="/home/User/Documents/log.txt" size="40">
|
||||
<div>
|
||||
<label class="info_number"> path to simulated log (obligatory with "sim" and "simfast" mode)</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">sim time check: </label>
|
||||
<select name="sim_time_checks">
|
||||
<option value="no">'no' is set, there is no changes in timestamp</option>
|
||||
<option value="max">'max' is set, the the wait between two messages cannot be greater than 60s</option>
|
||||
<option value="max_y">'max_y' is set, the messages older then 5 years are ignored</option>
|
||||
</select>
|
||||
|
||||
<label class="info_number"> (default 'no')</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">sim stop: </label>
|
||||
<select name="sim_stops">
|
||||
<option value="True">True</option>
|
||||
<option value="False">False</option>
|
||||
</select>
|
||||
|
||||
<label class="info_number"> (default True)</label>
|
||||
</div>
|
||||
<!-- simfast selectt -->
|
||||
</div>
|
||||
<div class="simfast selectt">
|
||||
<label class="info_argument">Mode 'simfast' arguments:</label>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">path to log: </label>
|
||||
<input type=text name="logs_simfast" value="/home/User/Documents/log.txt" size="40">
|
||||
<div>
|
||||
<label class="info_number"> path to simulated log (obligatory with "sim" and "simfast" mode)</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">sim time check: </label>
|
||||
<select name="sim_time_checks_simfast">
|
||||
<option value="no">'no' is set, there is no changes in timestamp</option>
|
||||
<option value="max">'max' is set, the the wait between two messages cannot be greater than 60s</option>
|
||||
<option value="max_y">'max_y' is set, the messages older then 5 years are ignored</option>
|
||||
</select>
|
||||
|
||||
<label class="info_number"> (default 'no')</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">sim stop: </label>
|
||||
<select name="sim_stops">
|
||||
<option value="True">True</option>
|
||||
<option value="False">False</option>
|
||||
</select>
|
||||
|
||||
<label class="info_number"> (default True)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label class="mode_text">simulate pause: </label>
|
||||
<input type="number" name="simulate_pauses" value="2">
|
||||
|
||||
<label class="info_number"> (default 2s)</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--
|
||||
<div class="XX selectt">
|
||||
<strong>XX</strong>
|
||||
XX
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
<!--</div>-->
|
||||
|
||||
<div class="text-center">
|
||||
<input type="submit" name="submit_button" value="Generate" class="run_butt">
|
||||
<input type="submit" name="submit_button" value="Clear" class="clear_butt">
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <input type=submit name='submit'>-->
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('input[type="radio"]').click(function() {
|
||||
var inputValue = $(this).attr("value");
|
||||
var targetBox = $("." + inputValue);
|
||||
$(".selectt").not(targetBox).hide();
|
||||
$(targetBox).show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!--
|
||||
<script type="text/javascript">
|
||||
function myFunction() {
|
||||
/* Get the text field */
|
||||
var copyText = document.getElementById("myInput");
|
||||
|
||||
/* Select the text field */
|
||||
copyText.select();
|
||||
copyText.setSelectionRange(0, 99999); /* For mobile devices */
|
||||
|
||||
/* Copy the text inside the text field */
|
||||
navigator.clipboard.writeText(copyText.value);
|
||||
|
||||
/* Alert the copied text */
|
||||
alert("Copied the text: " + copyText.value);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript"> id="a" onclick="copyDivToClipboard()"
|
||||
function copyDivToClipboard() {
|
||||
var range = document.createRange();
|
||||
range.selectNode(document.getElementById("a"));
|
||||
window.getSelection().removeAllRanges(); // clear current selection
|
||||
window.getSelection().addRange(range); // to select text
|
||||
document.execCommand("copy");
|
||||
window.getSelection().removeAllRanges();// to deselect
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<form action="/" method="get">
|
||||
<div class="text-center">
|
||||
<button formaction="/swmu_run" class="run_butt" role="button">Generate</button>
|
||||
</div>
|
||||
</form>
|
||||
-->
|
||||
|
||||
<!-- https://jinja.palletsprojects.com/en/3.0.x/ -->
|
||||
<div style="text-align: auto;">
|
||||
{% if clear == False %} <!-- clear -->
|
||||
{% if questions %} <!-- to not see blank style -->
|
||||
<div style="border: groove" >
|
||||
{% for question in questions %}
|
||||
{% if "None" == question.mode %} <!-- set default run mode -->
|
||||
<div style="border: groove" >
|
||||
LOG_LEVEL="{{question.loglevel}}" runswmu {{question.number_swmu}} --mode run --start-id32 {{question.id32}} --server-host {{question.server_host}} --server-port {{question.server_port}} --start-port {{question.start_port}} --bt-spontaneous-timeout {{question.bt_spontaneous_timeout}} --sigma {{question.sigma}} --sta {{question.sta}} --sta-pause {{question.sta_pause}} --ft_delay {{question.ft_delay}} --ft_mode {{question.ft_mode}}<br>
|
||||
</div>
|
||||
|
||||
{% elif "run" == question.mode %}
|
||||
<div style="border: groove" >
|
||||
LOG_LEVEL="{{question.loglevel}}"
|
||||
runswmu {{question.number_swmu}}
|
||||
--mode {{question.mode}}
|
||||
--start-id32 {{question.id32}}
|
||||
--server-host {{question.server_host}}
|
||||
--server-port {{question.server_port}}
|
||||
--start-port {{question.start_port}}
|
||||
--bt-spontaneous-timeout {{question.bt_spontaneous_timeout}}
|
||||
--sigma {{question.sigma}}
|
||||
--sta {{question.sta}}
|
||||
--sta-pause {{question.sta_pause}}
|
||||
--ft_delay {{question.ft_delay}}
|
||||
--ft_mode {{question.ft_mode}}
|
||||
--latitude {{question.latitude}}
|
||||
--longitude {{question.longitude}}
|
||||
--domain {{question.domain}}
|
||||
--near_by_domain {{question.near_by_domain}}
|
||||
--x01 {{question.x01}}
|
||||
--x01-pause {{question.x01_pause}}
|
||||
--units-wo-x1a {{question.units_wo_x1a}}
|
||||
--x1a-pause {{question.x1a_pause}}
|
||||
--x1a-mask {{question.x1a_mask}}
|
||||
--x1a-type {{question.x1a_type}}
|
||||
--x1d {{question.x1d}}
|
||||
--x1d-pause {{question.x1d_pause}}
|
||||
--x1d-weight_axles {{question.x1d_weight_axles}}<br>
|
||||
</div>
|
||||
|
||||
{% elif "sim" == question.mode %}
|
||||
<div style="border: groove" >
|
||||
LOG_LEVEL="{{question.loglevel}}"
|
||||
runswmu {{question.number_swmu}}
|
||||
--mode {{question.mode}}
|
||||
--start-id32 {{question.id32}}
|
||||
--server-host {{question.server_host}}
|
||||
--server-port {{question.server_port}}
|
||||
--start-port {{question.start_port}}
|
||||
--bt-spontaneous-timeout {{question.bt_spontaneous_timeout}}
|
||||
--sigma {{question.sigma}}
|
||||
--sta {{question.sta}}
|
||||
--sta-pause {{question.sta_pause}}
|
||||
--ft_delay {{question.ft_delay}}
|
||||
--ft_mode {{question.ft_mode}}
|
||||
--log {{question.log}}
|
||||
--sim_time_check {{question.sim_time_check}}
|
||||
--sim_stop {{question.sim_stop}}<br>
|
||||
</div>
|
||||
|
||||
{% elif "simfast" == question.mode %}
|
||||
<div style="border: groove" >
|
||||
LOG_LEVEL="{{question.loglevel}}"
|
||||
runswmu {{question.number_swmu}}
|
||||
--mode {{question.mode}}
|
||||
--start-id32 {{question.id32}}
|
||||
--server-host {{question.server_host}}
|
||||
--server-port {{question.server_port}}
|
||||
--start-port {{question.start_port}}
|
||||
--bt-spontaneous-timeout {{question.bt_spontaneous_timeout}}
|
||||
--sigma {{question.sigma}}
|
||||
--sta {{question.sta}}
|
||||
--sta-pause {{question.sta_pause}}
|
||||
--ft_delay {{question.ft_delay}}
|
||||
--ft_mode {{question.ft_mode}}
|
||||
--log {{question.log}}
|
||||
--sim_time_check {{question.sim_time_check}}
|
||||
--sim_stop {{question.sim_stop}}
|
||||
--simulate_pause {{question.simulate_pause}}<br>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div></div>
|
||||
|
||||
{% endif %}
|
||||
|
||||
<div> </div>
|
||||
<div> </div>
|
||||
<div> </div>
|
||||
</div>
|
||||
|
||||
<form action="/" method="get">
|
||||
<div class="navbar">
|
||||
<a href="/home" class="active" >Home</a>
|
||||
<a href="/info" >info</a>
|
||||
<a href="/helpswmu" >helpswmu</a>
|
||||
<a href="/mulog_read" >mulog read</a>
|
||||
|
||||
<!--<a href="#examples">examples -->
|
||||
<!--<a href="#about">about</a> -->
|
||||
<a class="navbar-brand pull-sm-right m-r-0" style="float:right" href="https://gitlab.princip.cz/lab/sw/uhura/swmu" target="_blank">
|
||||
<i class="fa fa-gitlab" aria-hidden="true"><span> </span>Gitlab</i>
|
||||
</a>
|
||||
<a href="https://muid.princip.cz/" style="float:right" target="_blank">muidconv</a>
|
||||
<a href="https://xxxlog.cml.princip.cz/" style="float:right" target="_blank">xxlog</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
51
templates/info.html
Normal file
51
templates/info.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!-- Write your comments here -->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='index.css') }}">
|
||||
<link rel="shortcut icon" href="{{ url_for('static', filename='pic/favicon.ico') }}">
|
||||
|
||||
<label class="swmu">
|
||||
<pre>environment: {{ environment }}</pre>
|
||||
</label>
|
||||
|
||||
<div style="text-align: center;">
|
||||
<label class="logo">SWMU</label>
|
||||
</div>
|
||||
<head>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background-color: WhiteSmoke;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"> </script>
|
||||
<!-- <script type=text/javascript> $(function() { $("#mybutton").click(function (event) { $.getJSON('/swmu_run', { },
|
||||
function(data) { }); return false; }); }); </script> -->
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.2.0/css/fork-awesome.min.css" integrity="sha256-XoaMnoYC5TH6/+ihMEnospgm0J1PM/nioxbOUdnM8HY=" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Audiowide">
|
||||
|
||||
<title>SWMU</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form action="/" method="get">
|
||||
<div class="navbar">
|
||||
<a href="/home" >Home</a>
|
||||
<a href="/info" class="active" >info</a>
|
||||
<a href="/helpswmu" >helpswmu</a>
|
||||
<a href="/mulog_read" >mulog read</a>
|
||||
|
||||
<!--<a href="#examples">examples -->
|
||||
<!--<a href="#about">about</a> -->
|
||||
<a class="navbar-brand pull-sm-right m-r-0" style="float:right" href="https://gitlab.princip.cz/lab/sw/uhura/swmu" target="_blank">
|
||||
<i class="fa fa-gitlab" aria-hidden="true"><span> </span>Gitlab</i>
|
||||
</a>
|
||||
<a href="https://muid.princip.cz/" style="float:right" target="_blank">muidconv</a>
|
||||
<a href="https://xxxlog.cml.princip.cz/" style="float:right" target="_blank">xxlog</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
202
templates/mulog_read.html
Normal file
202
templates/mulog_read.html
Normal file
@@ -0,0 +1,202 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!-- Write your comments here -->
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='index.css') }}">
|
||||
<link rel="shortcut icon" href="{{ url_for('static', filename='pic/favicon.ico') }}">
|
||||
|
||||
<label class="swmu">
|
||||
<pre>environment: {{ environment }}</pre>
|
||||
</label>
|
||||
|
||||
<div style="text-align: center;">
|
||||
<label class="logo">SWMU</label>
|
||||
</div>
|
||||
<head>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background-color: WhiteSmoke;
|
||||
}
|
||||
table, th, td {
|
||||
border:1px solid black;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"> </script>
|
||||
<!--<script type=text/javascript> $(function() { $("#call_remove_butt").click(function (event) { $.getJSON('/call_remove', { },
|
||||
function(data) { }); return false; }); }); </script>-->
|
||||
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fork-awesome@1.2.0/css/fork-awesome.min.css" integrity="sha256-XoaMnoYC5TH6/+ihMEnospgm0J1PM/nioxbOUdnM8HY=" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Audiowide">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/dropzone/5.7.1/min/dropzone.min.css">
|
||||
|
||||
<title>SWMU</title>
|
||||
</head>
|
||||
<body>
|
||||
<div style="text-align: center;" >
|
||||
<pre>supports only <b>.log</b> format with max file size <b>{{ max_size }}</b>mb</pre>
|
||||
</div>
|
||||
<div style="text-align: auto;">
|
||||
<form action="{{ environment_road }}" method = "POST" enctype = "multipart/form-data">
|
||||
<div class="clearfix">
|
||||
<input type = "file" name = "file" class="text-left"/>
|
||||
<!--<input type = "submit"/>-->
|
||||
<button type="submit" class="file_butt"> load file </button>
|
||||
|
||||
|
||||
<select id="ign1a" style="float:right" name="ign1a">
|
||||
<option value="False">False</option>
|
||||
<option value="True">True</option>
|
||||
</select>
|
||||
<label for="ign1a" class="ign1a_info" style="float:right"> ignore x1a positions</label>
|
||||
|
||||
</div>
|
||||
<div class="clearfix">
|
||||
{% if files %}
|
||||
{% for file in files %}
|
||||
<!--<br>name: {{file}}
|
||||
<br> test: {{mulog}}-->
|
||||
<div class="info_argument" style="text-align: left;" >
|
||||
<a href="uploads/{{file}}" class="button">Download log</a>
|
||||
<a href="uploads/{{file}}_pos_file.csv" class="button">Download position file</a>
|
||||
|
||||
<br>name: {{files}}
|
||||
<table class="mode_text" style="width:100%">
|
||||
<tr>
|
||||
<td>x01_log_book_record: {{mulog[0]}}
|
||||
<a href="https://wiki.princip.cz/mediawiki/index.php/Doc-v2/log/0x01" class="info_argument" target="_blank">info</a>
|
||||
</td>
|
||||
<td>x04_driver_login: {{mulog[1]}}
|
||||
<a href="https://wiki.princip.cz/mediawiki/index.php/Doc-v2/log/0x04" class="info_argument" target="_blank">info</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>x05_driver_logout: {{mulog[2]}}
|
||||
<a href="https://wiki.princip.cz/mediawiki/index.php/Doc-v2/log/0x05" class="info_argument" target="_blank">info</a>
|
||||
</td>
|
||||
<td>x08x09_log_record: {{mulog[3]}}
|
||||
<a href="https://wiki.princip.cz/mediawiki/index.php/Doc-v2/log/0x08/01/10" class="info_argument" target="_blank">info</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>x08x09_log_record: {{mulog[4]}}
|
||||
<a href="https://wiki.princip.cz/mediawiki/index.php/Doc-v2/log/0x08/190" class="info_argument" target="_blank">info</a>
|
||||
</td>
|
||||
<td>x13_driving_style: {{mulog[5]}}
|
||||
<a href="https://wiki.princip.cz/mediawiki/index.php/Doc-v2/log/0x13" class="info_argument" target="_blank">info</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>x1400_accelerometer_event: {{mulog[6]}}
|
||||
<a href="https://wiki.princip.cz/mediawiki/index.php/Doc-v2/log/0x1400" class="info_argument" target="_blank">info</a>
|
||||
</td>
|
||||
<td>x25_perfect_drive: {{mulog[7]}}
|
||||
<a href="https://wiki.princip.cz/mediawiki/index.php/Doc-v2/log/0x25" class="info_argument" target="_blank">info</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>x26_long_mext: {{mulog[8]}}
|
||||
<a href="https://wiki.princip.cz/mediawiki/index.php/Doc-v2/log/0x26" class="info_argument" target="_blank">info</a>
|
||||
</td>
|
||||
<td>x0b_log_record: {{mulog[9]}}
|
||||
<a href="https://wiki.princip.cz/mediawiki/index.php/Doc-v2/log/0x0b81" class="info_argument" target="_blank">info</a>
|
||||
<a href="https://wiki.princip.cz/mediawiki/index.php/Doc-v2/log/0x0b85" class="info_argument" target="_blank">info</a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>x0d_log_record: {{mulog[10]}}
|
||||
<a href="https://wiki.princip.cz/mediawiki/index.php/Doc-v2/log/0x0d#0x0014" class="info_argument" target="_blank">info</a>
|
||||
</td>
|
||||
<td>x1a_fastlog: {{mulog[11]}}
|
||||
<a href="https://wiki.princip.cz/mediawiki/index.php/Doc-v2/log/0x1a" class="info_argument" target="_blank">info</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>x1c_log_record: {{mulog[12]}}
|
||||
<a href="https://wiki.princip.cz/mediawiki/index.php/Doc-v2/log/0x1c" class="info_argument" target="_blank">info</a>
|
||||
</td>
|
||||
<td>x1d_domain_vehicle_parameters: {{mulog[13]}}
|
||||
<a href="https://wiki.princip.cz/mediawiki/index.php/Doc-v2/log/0x1d" class="info_argument" target="_blank">info</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0x0e_record: {{mulog[15]}}
|
||||
<a href="https://wiki.princip.cz/mediawiki/index.php/Doc-v2/log/0x0e" class="info_argument" target="_blank">info</a>
|
||||
</td>
|
||||
<td>other_type: {{mulog[16]}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>0x10_record: {{mulog[14]}}
|
||||
<a href="https://wiki.princip.cz/mediawiki/index.php/Doc-v2/log/0x10" class="info_argument" target="_blank">info</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="mode_text" style="width:100%">
|
||||
<tr>
|
||||
<td>number of timestamps: {{ts_c}}</td>
|
||||
<td>number of positions: {{pos_c}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{% if pos_c > max_pos %}
|
||||
<table class="mode_text_alert" style="width:100%">
|
||||
<tr align="center">
|
||||
<td>recommended amount position for rendering is <b>{{max_pos}}</b>, otherwise, it may cause delay or instability </td>
|
||||
</tr>
|
||||
</table>
|
||||
{% endif %}
|
||||
|
||||
{% if warn %}
|
||||
<div class="info_argument" style="text-align: left;" >
|
||||
timestamp in mulog is suspicious ([row in mulog], [message], [timestamp]): {list_ts_warning} {{warn}}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if text %}
|
||||
{{text}}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<div class="text-center">
|
||||
<!--<input type = "button" id = "call_remove_butt" value = "Click Here" />
|
||||
<input type="submit" name="submit_button" value="Clear" class="clear_butt">-->
|
||||
{% if files %}
|
||||
{% if text %}
|
||||
{% else %}
|
||||
<form action="/call_render" method="get" target="_blank">
|
||||
<button name="subject" type="submit" class="run_butt" value="">Render map</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<form action="/call_remove" method="get">
|
||||
<button name="subject" type="submit" class="clear_butt" value="">Clear</button>
|
||||
</form>
|
||||
</div>
|
||||
<div> </div>
|
||||
<div> </div>
|
||||
<div> </div>
|
||||
</div>
|
||||
|
||||
<form action="/" method="get">
|
||||
<div class="navbar">
|
||||
<a href="/home" >Home</a>
|
||||
<a href="/info" >info</a>
|
||||
<a href="/helpswmu" >helpswmu</a>
|
||||
<a href="/mulog_read" class="active" >mulog read</a>
|
||||
|
||||
<!--<a href="#examples">examples -->
|
||||
<!--<a href="#about">about</a> -->
|
||||
<a class="navbar-brand pull-sm-right m-r-0" style="float:right" href="https://gitlab.princip.cz/lab/sw/uhura/swmu" target="_blank">
|
||||
<i class="fa fa-gitlab" aria-hidden="true"><span> </span>Gitlab</i>
|
||||
</a>
|
||||
<a href="https://muid.princip.cz/" style="float:right" target="_blank">muidconv</a>
|
||||
<a href="https://xxxlog.cml.princip.cz/" style="float:right" target="_blank">xxlog</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
17
templates/test.html
Normal file
17
templates/test.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>File Upload</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>File Upload</h1>
|
||||
<form method="POST" action="" enctype="multipart/form-data">
|
||||
<p><input type="file" name="file"></p>
|
||||
<p><input type="submit" value="Submit"></p>
|
||||
</form>
|
||||
<hr>
|
||||
{% for file in files %}
|
||||
<img src="{{ url_for('upload', filename=file) }}" style="width: 64px">
|
||||
{% endfor %}
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user