Files
v2realbot/v2realbot/static/index.html
David Brazda 3172721eec ok
2023-04-13 14:59:51 +02:00

253 lines
17 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<title>V2realbot</title>
<link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/static//favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/static//favicon-16x16.png">
<link rel="manifest" href="/static/site.webmanifest">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="https://cdn.datatables.net/1.13.4/css/jquery.dataTables.min.css" rel="stylesheet">
<script src="/static/js/jquery.dataTables.min.js"></script>
<link rel="stylesheet" href="/static/main.css">
</head>
<body>
<div id="main" class="mainConteiner flex-container">
<div id="chartContainer" class="flex-items">
<h4>Status: <span id="status">Not connected</span></h4>
<div id="formular">
<form action="">
<input type="text" id="runnerId" autocomplete="off" placeholder="StrategyID" value=""/>
<button onclick="connect(event)" id="bt-conn" class="btn btn-success">Connect</button>
<button onclick="disconnect(event)" id="bt-disc" style="display: None" class="btn btn-success">Disconnect</button>
<!-- <label>Message: --> <input type="text" id="messageText" autocomplete="off" placeholder="WS out message"/>
<button onclick="sendMessage(event)" id="bt.send" class="btn btn-success">Send</button>
</form>
</div>
<ul id='messages'>
</ul>
<div id="chart"></div>
<div class="legend" id="legend"></div>
</div>
<div id="runner-table" class="flex-items">
<div id="controls">
<label>API-KEY: <input type="password" id="api-key" autocomplete="off"/></label>
<button onclick="store_api_key(event)" id="bt-store" class="btn btn-success">Store</button>
<button id="button_pause" class="btn btn-success">Pause/Unpause</button>
<button id="button_stop" class="btn btn-success">Stop</button>
<button id="button_stopall" class="btn btn-success">Stop All</button>
<button id="button_refresh" class="btn btn-success">Refresh</button>
</div>
<div id="runner-table">
<table id="runnerTable" class="display" style="width:100%">
<thead>
<tr>
<th>Id</th>
<th>Started</th>
<th>Mode</th>
<th>Account</th>
<th>Paused</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div id="runnerModal" class="modal fade">
<div class="modal-dialog">
<form method="post" id="stopForm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title"><i class="fa fa-plus"></i> Stop Strategy</h4>
</div>
<div class="modal-body">
<div class="form-group">
<label for="runnerid" class="control-label">Id</label>
<input type="text" class="form-control" id="runnerid" name="runnerid" placeholder="id">
</div>
</div>
<div class="modal-footer">
<input type="submit" name="stop" id="stop" class="btn btn-info" value="stop" />
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div id="stratin-table" class="flex-items">
<div id="stratin-table">
<button id="button_add" class="btn btn-success">Add</button><button id="button_edit" class="btn btn-success">Edit</button><button id="button_delete" class="btn btn-success">Delete</button><button id="button_run" class="btn btn-success">Run Strategy</button>
<table id="stratinTable" class="display" style="width:100%">
<thead>
<tr>
<th>Id</th>
<th>Id2</th>
<th>Name</th>
<th>Symbol</th>
<th>class</th>
<th>script</th>
<th>OR</th>
<th>CR</th>
<th>Stratvars</th>
<th>add_data</th>
<th>note</th>
<th>history</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<div id="recordModal" class="modal fade">
<div class="modal-dialog">
<form method="post" id="recordForm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title"><i class="fa fa-plus"></i> Add Record</h4>
</div>
<div class="modal-body">
<div class="form-group">
<label for="id" class="control-label">Id</label>
<input type="text" class="form-control" id="id" name="id" placeholder="id" readonly>
</div>
<div class="form-group">
<label for="id2" class="control-label">Id2</label>
<input type="text" class="form-control" id="id2" name="id2" placeholder="id2" required>
</div>
<div class="form-group">
<label for="name" class="control-label">Name</label>
<input type="text" class="form-control" id="name" name="name" placeholder="Name" required>
</div>
<div class="form-group">
<label for="symbol" class="control-label">symbol</label>
<input type="text" class="form-control" id="symbol" name="symbol" placeholder="Symbol" required>
</div>
<div class="form-group">
<label for="class_name" class="control-label">class_name</label>
<input type="text" class="form-control" id="class_name" name="class_name" placeholder="class_name" required>
</div>
<div class="form-group">
<label for="script" class="control-label">script</label>
<input type="text" class="form-control" id="script" name="script" placeholder="script" required>
</div>
<div class="form-group">
<label for="open_rush" class="control-label">open_rush</label>
<input type="number" class="form-control" id="open_rush" name="open_rush" placeholder="open_rush" value=0 required>
</div>
<div class="form-group">
<label for="close_rush" class="control-label">close_rush</label>
<input type="number" class="form-control" id="close_rush" name="close_rush" placeholder="close_rush" value=0 required>
</div>
<div class="form-group">
<label for="stratvars_conf" class="control-label">stratvars_conf</label>
<textarea class="form-control" rows="8" id="stratvars_conf" name="stratvars_conf" required></textarea>
</div>
<div class="form-group">
<label for="add_data_conf" class="control-label">add_data_conf</label>
<textarea class="form-control" rows="7" id="add_data_conf" name="add_data_conf" required></textarea>
</div>
<div class="form-group">
<label for="note" class="control-label">note</label>
<textarea class="form-control" rows="2" id="note" name="note"></textarea>
</div>
<div class="form-group">
<label for="history" class="control-label">history</label>
<textarea class="form-control" rows="3" id="history" name="history"></textarea>
</div>
</div>
<div class="modal-footer">
<!--<input type="hidden" name="id" id="id" />-->
<!--<input type="hidden" name="action" id="action" value="" />-->
<input type="submit" name="save" id="save" class="btn btn-info" value="Save" />
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</form>
</div>
</div>
<div id="delModal" class="modal fade">
<div class="modal-dialog">
<form method="post" id="delForm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title"><i class="fa fa-plus"></i> Delete Record</h4>
</div>
<div class="modal-body">
<div class="form-group">
<label for="delid" class="control-label">Id</label>
<input type="text" class="form-control" id="delid" name="delid" placeholder="id">
</div>
</div>
<div class="modal-footer">
<input type="submit" name="delete" id="delete" class="btn btn-info" value="Delete" />
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</form>
</div>
</div>
<div id="runModal" class="modal fade">
<div class="modal-dialog">
<form method="post" id="runForm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title"><i class="fa fa-plus"></i> Run strategy</h4>
</div>
<div class="modal-body">
<div class="form-group">
<label for="runid" class="control-label">Id</label>
<input type="text" class="form-control" id="runid" name="runid" placeholder="id" readonly>
</div>
<div class="form-group">
<label for="mode" class="control-label">Mode</label>
<select class="form-control" id="mode" name="mode"><option value="paper">paper</option><option value="live">live</option><option value="backtest">backtest</option></select>
</div>
<div class="form-group">
<label for="account" class="control-label">Account</label>
<select class="form-control" id="account" name="account"><option value="ACCOUNT1">ACCOUNT1</option><option value="ACCOUNT2">ACCOUNT2</option></select>
</div>
<div class="form-group">
<label for="debug" class="control-label">debug</label>
<select class="form-control" id="debug" name="debug"><option value="true">true</option><option value="false" selected>false</option></select>
</div>
<div class="form-group">
<label for="bt_from" class="control-label">bt_from</label>
<input type="datetime-local" class="form-control" id="bt_from" name="bt_from" placeholder="2023-04-06T09:00:00Z">
</div>
<div class="form-group">
<label for="bt_to" class="control-label">bt_to</label>
<input type="datetime-local" class="form-control" id="bt_to" name="bt_to" placeholder="2023-04-06T09:00:00Z">
</div>
<div class="form-group">
<label for="cash" class="control-label">cash</label>
<input type="number" class="form-control" id="cash" name="cash" placeholder="cash" value=0>
</div>
</div>
<div class="modal-footer">
<!--<input type="hidden" name="id" id="id" />-->
<!--<input type="hidden" name="action" id="action" value="" />-->
<input type="submit" name="run" id="run" class="btn btn-info" value="Run" />
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="https://unpkg.com/lightweight-charts/dist/lightweight-charts.standalone.production.js"></script>
<script src="/static/js/mywebsocket.js"></script>
<script src="/static/js/mychart.js"></script>
<script src="/static/js/mytables.js"></script>
<script src="/static/js/jquery.serializejson.js"></script>
</body>
</html>