log highlighting and better compare

This commit is contained in:
David Brazda
2023-10-19 13:32:37 +02:00
parent 538f722015
commit 9bd4a84d2a
12 changed files with 2321 additions and 36 deletions

View File

@ -688,6 +688,11 @@ def populate_metrics_output_directory(strat: StrategyInstance, inter_batch_param
res["profit"]["long_losses"] = round(long_losses,2) res["profit"]["long_losses"] = round(long_losses,2)
res["profit"]["short_wins"] = round(short_wins,2) res["profit"]["short_wins"] = round(short_wins,2)
res["profit"]["short_losses"] = round(short_losses,2) res["profit"]["short_losses"] = round(short_losses,2)
mpt_string = "PT"+str(max_profit_time.hour)+":"+str(max_profit_time.minute) if max_profit_time is not None else ""
mlt_string ="LT"+str(max_loss_time.hour)+":"+str(max_loss_time.minute) if max_loss_time is not None else ""
##summary pro rychle zobrazeni P333L-222 PT9:30 PL10:30
res["profit"]["sum"]="P"+str(int(max_profit))+"L"+str(int(max_loss))+" "+ mpt_string+" " + mlt_string
#vlozeni celeho listu #vlozeni celeho listu
res["prescr_trades"]=json.loads(json.dumps(strat.state.vars.prescribedTrades, default=json_serial)) res["prescr_trades"]=json.loads(json.dumps(strat.state.vars.prescribedTrades, default=json_serial))

View File

@ -82,19 +82,34 @@
<link rel="stylesheet" data-name="vs/editor/editor.main" href="/static/js/libs/monaco/vs/editor/editor.main.css"> <link rel="stylesheet" data-name="vs/editor/editor.main" href="/static/js/libs/monaco/vs/editor/editor.main.css">
<script src="/static/js/libs/monaco/vs/loader.js"></script> <script src="/static/js/libs/monaco/vs/loader.js"></script>
<!-- <link rel="stylesheet" href="/static/js/libs/atom-dark.css"> <!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism-dark.min.css" integrity="sha512-Njdz7T/p6Ud1FiTMqH87bzDxaZBsVNebOWmacBjMdgWyeIhUSFU4V52oGwo3sT+ud+lyIE98sS291/zxBfozKw==" crossorigin="anonymous" referrerpolicy="no-referrer" /> -->
<link rel="stylesheet" href="/static/js/libs/speedhighlight/dist/themes/atom-dark.css"> <!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css" integrity="sha512-tN7Ec6zAFaVSG3TpNAKtk4DOHNpSwKHxxrsiw4GHKESGPs5njn/0sMCUMl2svV4wo4BK/rCP7juYz+zx+l6oeQ==" crossorigin="anonymous" referrerpolicy="no-referrer" /> -->
<link rel="stylesheet" href="https://unpkg.com/@speed-highlight/core@1.2.4/dist/themes/default.css"> <link rel="stylesheet" href="/static/js/libs/prism/prism-tomorrow.min.css" />
<script src="/static/js/libs/prism/prism.js" ></script>
<script src="/static/js/libs/prism/prism-log.js"></script>
<script src="/static/js/libs/prism/prism-json.js"></script>
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/highlight.min.js"></script>
--> -->
<!-- <!-- and it's easy to individually load additional languages -->
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/languages/go.min.js"></script> -->
<!-- <script>hljs.highlightAll();</script> -->
<!-- <link rel="stylesheet" href="/static/js/libs/atom-dark.css">
<link rel="stylesheet" href="/static/js/libs/speedhighlight/dist/themes/atom-dark.css">
<link rel="stylesheet" href="https://unpkg.com/@speed-highlight/core@1.2.4/dist/themes/default.css">
<script type="module"> <script type="module">
import { highlightAll, highlightText } from '/static/js/libs/speedhighlight/dist/index.js'; import { highlightText } from '/static/js/libs/speedhighlight/dist/index.js';
// import { detectLanguage } from 'https://unpkg.com/@speed-highlight/core/dist/detect.js'; // import { detectLanguage } from 'https://unpkg.com/@speed-highlight/core/dist/detect.js';
// import e from 'https://unpkg.com/@speed-highlight/core@1.2.4/dist/languages/log.js'; // import e from 'https://unpkg.com/@speed-highlight/core@1.2.4/dist/languages/log.js';
// loadLanguage('log', e); // loadLanguage('log', e);
highlightAll(); // highlightAll();
</script> --> </script>-->
<!-- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.41.0/min/vs/editor/editor.main.js"></script> --> <!-- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.41.0/min/vs/editor/editor.main.js"></script> -->
<!-- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.41.0/min/vs/loader.min.js"></script> --> <!-- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/monaco-editor/0.41.0/min/vs/loader.min.js"></script> -->
@ -236,6 +251,9 @@
<!-- <button id="button_stopall" class="btn btn-outline-success btn-sm">Stop All</button> <!-- <button id="button_stopall" class="btn btn-outline-success btn-sm">Stop All</button>
<button id="button_refresh" class="btn btn-outline-success btn-sm">Refresh</button> --> <button id="button_refresh" class="btn btn-outline-success btn-sm">Refresh</button> -->
</div> </div>
<!-- <div>
Toggle column: <a class="toggle-vis" data-column="0">Name</a> - <a class="toggle-vis" data-column="1">Position</a> - <a class="toggle-vis" data-column="2">Office</a> - <a class="toggle-vis" data-column="3">Age</a> - <a class="toggle-vis" data-column="4">Start date</a> - <a class="toggle-vis" data-column="5">Salary</a>
</div> -->
<table id="archiveTable" class="table-striped table dataTable" style="width:100%; border-color: #dce1dc;"> <table id="archiveTable" class="table-striped table dataTable" style="width:100%; border-color: #dce1dc;">
<thead> <thead>
<tr> <tr>
@ -510,7 +528,7 @@
</form> </form>
</div> </div>
</div> </div>
<div id="diffModal" class="modal fade" style="--bs-modal-width: 1800px;"> <div id="diffModal" class="modal fade" style="--bs-modal-width: 1100px;">
<div class="modal-dialog"> <div class="modal-dialog">
<form method="post" id="diffForm"> <form method="post" id="diffForm">
<div class="modal-content"> <div class="modal-content">
@ -530,7 +548,8 @@
<div id="second" name="second"></div> <div id="second" name="second"></div>
</div> </div>
<div class="form-group"> <div class="form-group">
<div id="diff_content" style="height:700px;border:1px solid black;"></div> <div id="diff_content1" style="height:700px;width: 1082px;border:1px solid black;"></div>
<div id="diff_content2" style="height:240px;width: 1082px;border:1px solid black;"></div>
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">

View File

@ -1,4 +1,3 @@
var tradeDetails = new Map(); var tradeDetails = new Map();
var toolTip = null var toolTip = null
var CHART_SHOW_TEXT = get_from_config("CHART_SHOW_TEXT", false) var CHART_SHOW_TEXT = get_from_config("CHART_SHOW_TEXT", false)
@ -943,6 +942,7 @@ function fetch_log_data(timestamp, runner_id) {
function display_log(iterLogList, timestamp) { function display_log(iterLogList, timestamp) {
//console.log("Incoming logline object") //console.log("Incoming logline object")
var lines = document.getElementById('lines') var lines = document.getElementById('lines')
var line = document.createElement('div') var line = document.createElement('div')
line.classList.add("line") line.classList.add("line")
@ -966,11 +966,17 @@ function display_log(iterLogList, timestamp) {
highlighted = (parseInt(logLine.time) == parseInt(timestamp)) ? "highlighted" : "" highlighted = (parseInt(logLine.time) == parseInt(timestamp)) ? "highlighted" : ""
logcnt++; logcnt++;
row = '<div data-bs-toggle="collapse" class="'+ highlighted + ' shj-lang-log" onclick="set_timestamp(' + logLine.time + ')" data-bs-target="#rec'+logcnt+'">'+logLine.time + " " + logLine.event + ' - '+ (logLine.message == undefined ? "" : logLine.message) +'</div>' hdr = logLine.time + " " + logLine.event + ' - '+ (logLine.message == undefined ? "" : logLine.message)
hdr = Prism.highlight(hdr, Prism.languages.log, 'log');
row = '<div data-bs-toggle="collapse" class="'+ highlighted + ' shj-lang-log" onclick="set_timestamp(' + logLine.time + ')" data-bs-target="#rec'+logcnt+'">'
+hdr + '</div>'
str_row = JSON.stringify(logLine.details, null, 2) str_row = JSON.stringify(logLine.details, null, 2)
//row_detail = '<div id="rec'+logcnt+'" data-toggle="collapse" data-target="#rec'+logcnt+'"class="collapse pidi"><pre>' + str_row + '</pre></div>' //row_detail = '<div id="rec'+logcnt+'" data-toggle="collapse" data-target="#rec'+logcnt+'"class="collapse pidi"><pre>' + str_row + '</pre></div>'
row_detail = '<div id="rec'+logcnt+'" class="collapse pidi shj-lang-log"><pre>' + str_row + '</pre></div>' const html = Prism.highlight(str_row, Prism.languages.json, 'json');
//console.log("tady", html)
row_detail = '<div id="rec'+logcnt+'" class="collapse pidi shj-lang-log"><pre><code class="language-log">' + html + '</code></pre></div>'
var lines = document.getElementById('lines') var lines = document.getElementById('lines')
var line = document.createElement('div') var line = document.createElement('div')

View File

@ -2,7 +2,6 @@
let editor_diff_arch1 let editor_diff_arch1
let editor_diff_arch2 let editor_diff_arch2
function refresh_arch_and_callback(row, callback) { function refresh_arch_and_callback(row, callback) {
console.log("entering refresh") console.log("entering refresh")
var request = $.ajax({ var request = $.ajax({
@ -215,7 +214,7 @@ $(document).ready(function () {
//monaco //monaco
require(["vs/editor/editor.main"], () => { require(["vs/editor/editor.main"], () => {
editor_diff_arch1 = monaco.editor.createDiffEditor(document.getElementById('diff_content'), editor_diff_arch1 = monaco.editor.createDiffEditor(document.getElementById('diff_content1'),
{ {
language: 'toml', language: 'toml',
theme: 'tomlTheme-dark', theme: 'tomlTheme-dark',
@ -229,7 +228,7 @@ $(document).ready(function () {
original: monaco.editor.createModel(record1.stratvars_conf, 'toml'), original: monaco.editor.createModel(record1.stratvars_conf, 'toml'),
modified: monaco.editor.createModel(record2.stratvars_conf, 'toml'), modified: monaco.editor.createModel(record2.stratvars_conf, 'toml'),
}); });
editor_diff_arch2 = monaco.editor.createDiffEditor(document.getElementById('diff_content'), editor_diff_arch2 = monaco.editor.createDiffEditor(document.getElementById('diff_content2'),
{ {
language: 'toml', language: 'toml',
theme: 'tomlTheme-dark', theme: 'tomlTheme-dark',
@ -625,7 +624,7 @@ var archiveRecords =
}, },
}, },
{ {
targets: [5,6], targets: [5],
render: function ( data, type, row ) { render: function ( data, type, row ) {
now = new Date(data) now = new Date(data)
if (type == "sort") { if (type == "sort") {
@ -647,6 +646,29 @@ var archiveRecords =
} }
}, },
}, },
{
targets: [6],
render: function ( data, type, row ) {
now = new Date(data)
if (type == "sort") {
return new Date(data).getTime();
}
var date = new Date(data);
tit = date.toLocaleString('cs-CZ', {
timeZone: 'America/New_York',
})
if (isToday(now)) {
//return local time only
return '<div title="'+tit+'" class="token level comment">'+ 'dnes ' + format_date(data,false,true)+'</div>'
}
else
{
//return local datetime
return '<div title="'+tit+'" class="token level number">'+ format_date(data,false,false)+'</div>'
}
},
},
{ {
targets: [9,10], targets: [9,10],
render: function ( data, type, row ) { render: function ( data, type, row ) {
@ -661,9 +683,15 @@ var archiveRecords =
{ {
targets: [2], targets: [2],
render: function ( data, type, row ) { render: function ( data, type, row ) {
return '<div class="tdname" title="'+data+'">'+data+'</div>' return '<div class="tdname tdnowrap" title="'+data+'">'+data+'</div>'
}, },
}, },
// {
// targets: [4],
// render: function ( data, type, row ) {
// return '<div class="tdname tdnowrap" title="'+data+'">'+data+'</div>'
// },
// },
{ {
targets: [16], targets: [16],
render: function ( data, type, row ) { render: function ( data, type, row ) {
@ -673,10 +701,19 @@ var archiveRecords =
catch (error) { catch (error) {
} }
var res = JSON.stringify(data) var res = JSON.stringify(data)
const unquoted = res.replace(/"([^"]+)":/g, '$1:') var unquoted = res.replace(/"([^"]+)":/g, '$1:')
return '<div class="tdmetrics" title="'+unquoted+'">'+unquoted+'</div>'
//zobrazujeme jen kratkou summary pokud mame, jinak davame vse, do titlu davame vzdy vse
//console.log(data)
short = null
if ((data.profit) && (data.profit.sum)) {
short = data.profit.sum
}
else {
short = unquoted
}
return '<div class="tdmetrics" title="'+unquoted+'">'+short+'</div>'
}, },
}, },
{ {
@ -685,6 +722,12 @@ var archiveRecords =
return '<div class="tdnote" title="'+data+'">'+data+'</div>' return '<div class="tdnote" title="'+data+'">'+data+'</div>'
}, },
}, },
{
targets: [13,14,15],
render: function ( data, type, row ) {
return '<div class="tdsmall">'+data+'</div>'
},
},
{ {
targets: [11], targets: [11],
render: function ( data, type, row ) { render: function ( data, type, row ) {
@ -739,5 +782,17 @@ var archiveRecords =
//} //}
} ); } );
//WIP buttons to hide datatable columns
// document.querySelectorAll('a.toggle-vis').forEach((el) => {
// el.addEventListener('click', function (e) {
// e.preventDefault();
// let columnIdx = e.target.getAttribute('data-column');
// let column = archiveRecords.column(columnIdx);
// // Toggle the visibility
// column.visible(!column.visible());
// });
// });

View File

@ -39,7 +39,7 @@ $(document).ready(function () {
console.log("jsme tu") console.log("jsme tu")
indConfig = configData["JS"].indConfig indConfig = configData["JS"].indConfig
console.log("after") console.log("after")
console.log(JSON.stringify(indConfig, null,null, 2)) //console.log(JSON.stringify(indConfig, null,null, 2))
console.log("before CHART_SHOW_TEXT",CHART_SHOW_TEXT) console.log("before CHART_SHOW_TEXT",CHART_SHOW_TEXT)
var CHART_SHOW_TEXT = configData["JS"].CHART_SHOW_TEXT var CHART_SHOW_TEXT = configData["JS"].CHART_SHOW_TEXT

View File

@ -0,0 +1,27 @@
// https://www.json.org/json-en.html
Prism.languages.json = {
'property': {
pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,
lookbehind: true,
greedy: true
},
'string': {
pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
lookbehind: true,
greedy: true
},
'comment': {
pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,
greedy: true
},
'number': /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,
'punctuation': /[{}[\],]/,
'operator': /:/,
'boolean': /\b(?:false|true)\b/,
'null': {
pattern: /\bnull\b/,
alias: 'keyword'
}
};
Prism.languages.webmanifest = Prism.languages.json;

View File

@ -0,0 +1,120 @@
// This is a language definition for generic log files.
// Since there is no one log format, this language definition has to support all formats to some degree.
//
// Based on https://github.com/MTDL9/vim-log-highlighting
Prism.languages.log = {
'string': {
// Single-quoted strings must not be confused with plain text. E.g. Can't isn't Susan's Chris' toy
pattern: /"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/,
greedy: true,
},
'exception': {
pattern: /(^|[^\w.])[a-z][\w.]*(?:Error|Exception):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/,
lookbehind: true,
greedy: true,
alias: ['javastacktrace', 'language-javastacktrace'],
inside: Prism.languages['javastacktrace'] || {
'keyword': /\bat\b/,
'function': /[a-z_][\w$]*(?=\()/,
'punctuation': /[.:()]/
}
},
'level': [
{
pattern: /\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE|-----)\b/,
alias: ['error', 'important']
},
{
pattern: /\b(?:WARN|WARNING|WRN|ENTRY|LP|SL)\b/,
alias: ['warning', 'important']
},
{
pattern: /\b(?:DISPLAY|INF|INFO|NOTICE|STATUS)\b/,
alias: ['info', 'keyword']
},
{
pattern: /\b(?:DBG|DEBUG|FINE|REVERSE|ADD|EXITADD|SIGNAL)\b/,
alias: ['debug', 'keyword']
},
{
pattern: /\b(?:FINER|FINEST|TRACE|TRC|VERBOSE|VRB|IND)\b/,
alias: ['trace', 'comment']
}
],
'property': {
pattern: /((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im,
lookbehind: true
},
'separator': {
pattern: /(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m,
lookbehind: true,
alias: 'comment'
},
'url': /\b(?:file|ftp|https?):\/\/[^\s|,;'"]*[^\s|,;'">.]/,
'email': {
pattern: /(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,
lookbehind: true,
alias: 'url'
},
'ip-address': {
pattern: /\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/,
alias: 'constant'
},
'mac-address': {
pattern: /\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,
alias: 'constant'
},
'domain': {
pattern: /(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,
lookbehind: true,
alias: 'constant'
},
'uuid': {
pattern: /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/i,
alias: 'constant'
},
'hash': {
pattern: /\b(?:[a-f0-9]{32}){1,2}\b/i,
alias: 'constant'
},
'file-path': {
pattern: /\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,
lookbehind: true,
greedy: true,
alias: 'string'
},
'date': {
pattern: RegExp(
/\b\d{4}[-/]\d{2}[-/]\d{2}(?:T(?=\d{1,2}:)|(?=\s\d{1,2}:))/.source +
'|' +
/\b\d{1,4}[-/ ](?:\d{1,2}|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)[-/ ]\d{2,4}T?\b/.source +
'|' +
/\b(?:(?:Fri|Mon|Sat|Sun|Thu|Tue|Wed)(?:\s{1,2}(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep))?|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)\s{1,2}\d{1,2}\b/.source,
'i'
),
alias: 'number'
},
'time': {
pattern: /\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2}:?\d{2}|Z)?\b/,
alias: 'number'
},
'boolean': /\b(?:false|null|true)\b/i,
'number': {
pattern: /(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,
lookbehind: true
},
'operator': /[;:?<=>~/@!$%&+\-|^(){}*#]/,
'punctuation': /[\[\].,]/
};

View File

@ -0,0 +1,99 @@
code[class*=language-],pre[class*=language-] {
color: #ccc;
background: 0 0;
font-family: Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;
font-size: 1em;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none
}
pre[class*=language-] {
padding: 1em;
margin: .5em 0;
overflow: auto
}
:not(pre)>code[class*=language-],pre[class*=language-] {
background: #2d2d2d
}
:not(pre)>code[class*=language-] {
padding: .1em;
border-radius: .3em;
white-space: normal
}
.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog {
color: #999
}
.token.punctuation {
color: #ccc
}
.token.attr-name,.token.deleted,.token.namespace,.token.tag {
color: #e2777a
}
.token.function-name {
color: #6196cc
}
.token.boolean {
color: #c39375;
}
.token.function {
color: #8f5734;
}
.token.number {
color: #828080;
}
.token.class-name,.token.constant,.token.property,.token.symbol {
color: #f29599;
}
.token.atrule,.token.builtin,.token.important,.token.selector {
color: #cc99cd
}
.token.keyword{
color: #9d8c98
}
.token.attr-value,.token.char,.token.regex,.token.string,.token.variable {
color: #889d90;
}
.token.entity,.token.operator,.token.url {
color: #67cdcc
}
.token.bold,.token.important {
font-weight: 700
}
.token.italic {
font-style: italic
}
.token.entity {
cursor: help
}
.token.inserted {
color: green
}

File diff suppressed because it is too large Load Diff

View File

@ -488,7 +488,7 @@ $(document).ready(function () {
//monaco //monaco
require(["vs/editor/editor.main"], () => { require(["vs/editor/editor.main"], () => {
editor_diff_stratin = monaco.editor.createDiffEditor(document.getElementById('diff_content'), editor_diff_stratin1 = monaco.editor.createDiffEditor(document.getElementById('diff_content1'),
{ {
language: 'toml', language: 'toml',
theme: 'tomlTheme-dark', theme: 'tomlTheme-dark',
@ -503,11 +503,7 @@ $(document).ready(function () {
modified: monaco.editor.createModel(rec2.stratvars_conf, 'toml'), modified: monaco.editor.createModel(rec2.stratvars_conf, 'toml'),
}); });
editor_diff_stratin1.setModel({ editor_diff_stratin2 = monaco.editor.createDiffEditor(document.getElementById('diff_content2'),
original: monaco.editor.createModel(rec1.add_data_conf, 'toml'),
modified: monaco.editor.createModel(rec2.add_data_conf, 'toml'),
});
editor_diff_stratin2 = monaco.editor.createDiffEditor(document.getElementById('diff_content'),
{ {
language: 'toml', language: 'toml',
theme: 'tomlTheme-dark', theme: 'tomlTheme-dark',
@ -516,8 +512,8 @@ $(document).ready(function () {
} }
); );
editor_diff_stratin2.setModel({ editor_diff_stratin2.setModel({
original: monaco.editor.createModel(record1.add_data_conf, 'toml'), original: monaco.editor.createModel(rec1.add_data_conf, 'toml'),
modified: monaco.editor.createModel(record2.add_data_conf, 'toml'), modified: monaco.editor.createModel(rec2.add_data_conf, 'toml'),
}); });
}); });

View File

@ -94,8 +94,9 @@ tbody, td, tfoot, th, thead, tr {
.tdmetrics { .tdmetrics {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
width: 201px; width: 132px;
white-space: nowrap; white-space: nowrap;
font-size: x-small;
} }
table.dataTable thead th, table.dataTable thead td, table.dataTable tfoot th, table.dataTable tfoot td { table.dataTable thead th, table.dataTable thead td, table.dataTable tfoot th, table.dataTable tfoot td {
@ -123,10 +124,15 @@ table.dataTable thead>tr>th.sorting_asc:before, table.dataTable thead>tr>th.sort
} }
.tdnote { .tdnote {
width: 188px; width: 188px;
font-size: x-small;
}
.tdsmall {
font-size: x-small;
} }
.tdname { .tdname {
width: 140px; width: 100px;
} }
.form-row { .form-row {
@ -200,7 +206,7 @@ html {
} }
.table>:not(caption)>*>* { .table>:not(caption)>*>* {
padding: 0.32rem 0.32rem; padding: 0.2rem 0.2rem 0.01rem 0.2rem;
} }
.flex-container { .flex-container {
@ -266,7 +272,7 @@ html {
overflow: auto; overflow: auto;
height: 568px; height: 568px;
flex-direction: column-reverse; flex-direction: column-reverse;
margin-left: 28px; margin-left: 14px;
width: 100%; width: 100%;
} }
} }
@ -277,7 +283,7 @@ html {
overflow: auto; overflow: auto;
height: 568px; height: 568px;
flex-direction: column-reverse; flex-direction: column-reverse;
margin-left: 28px; margin-left: 14px;
width: 130%; width: 130%;
} }
@ -353,10 +359,16 @@ pre {
padding-right: 30px; padding-right: 30px;
} }
.highlighted { /* .highlighted {
color: var(--bs-emphasis-color); color: var(--bs-emphasis-color);
background-color: var(--bs-gray-900); background-color: var(--bs-gray-900);
/* color: var(--bs-dark-text-emphasis); */ /* color: var(--bs-dark-text-emphasis); */
/* } */
.highlighted {
color: #989393;
background-color: #242a31;
/* color: var(--bs-dark-text-emphasis); */
} }
/* .switcher { /* .switcher {

View File

@ -45,7 +45,7 @@ def populate_all_indicators(data, state: StrategyState):
conf_bar = data['confirmed'] conf_bar = data['confirmed']
last_update_delta, avg_delta = process_delta() last_update_delta, avg_delta = process_delta()
state.ilog(lvl=1,e=f"-----{data['index']}-{conf_bar}--delta:{last_update_delta}---AVGdelta:{avg_delta}", data=data) state.ilog(lvl=1,e=f"----- {data['index']}-{conf_bar}--delta:{last_update_delta}---AVGdelta:{avg_delta}", data=data)
#kroky pro CONFIRMED BAR only #kroky pro CONFIRMED BAR only
if conf_bar == 1: if conf_bar == 1: