Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -492,6 +492,7 @@ const SELLS = __SELLS__;
|
|
| 492 |
const TRANSFERS = __TRANSFERS__;
|
| 493 |
const LOOPS = __LOOPS__;
|
| 494 |
const FRESH = __FRESH__;
|
|
|
|
| 495 |
|
| 496 |
function draw() {
|
| 497 |
const container = document.getElementById("arc-container");
|
|
@@ -788,6 +789,15 @@ function draw() {
|
|
| 788 |
// NEW — detect Fresh Buys
|
| 789 |
const fresh = FRESH.filter(x => x[0] === nodeName || x[1] === nodeName)
|
| 790 |
.map(x => x[0] === nodeName ? x[1] : x[0]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 791 |
|
| 792 |
const box = document.getElementById("info-box");
|
| 793 |
box.innerHTML = `
|
|
@@ -798,6 +808,7 @@ function draw() {
|
|
| 798 |
<b>Transfers:</b> ${transfers.length ? transfers.join(", ") : "<span style='color:#777'>None</span>"}<br>
|
| 799 |
<b>Loops:</b> ${loops.length ? loops.join(", ") : "<span style='color:#777'>None</span>"}<br>
|
| 800 |
<b>Fresh Buys:</b> ${fresh.length ? fresh.join(", ") : "<span style='color:#777'>None</span>"}
|
|
|
|
| 801 |
</div>
|
| 802 |
`;
|
| 803 |
}
|
|
@@ -865,6 +876,8 @@ def make_arc_html(nodes, node_type, buys, sells, transfers, loops, fresh):
|
|
| 865 |
.replace("__TRANSFERS__", transfers_json)
|
| 866 |
.replace("__LOOPS__", loops_json)
|
| 867 |
.replace("__FRESH__", fresh_json)
|
|
|
|
|
|
|
| 868 |
)
|
| 869 |
return html
|
| 870 |
|
|
|
|
| 492 |
const TRANSFERS = __TRANSFERS__;
|
| 493 |
const LOOPS = __LOOPS__;
|
| 494 |
const FRESH = __FRESH__;
|
| 495 |
+
const COMPLETE_EXIT = __COMPLETE_EXIT__;
|
| 496 |
|
| 497 |
function draw() {
|
| 498 |
const container = document.getElementById("arc-container");
|
|
|
|
| 789 |
// NEW — detect Fresh Buys
|
| 790 |
const fresh = FRESH.filter(x => x[0] === nodeName || x[1] === nodeName)
|
| 791 |
.map(x => x[0] === nodeName ? x[1] : x[0]);
|
| 792 |
+
|
| 793 |
+
// NEW — detect Complete Exits
|
| 794 |
+
const exits = [];
|
| 795 |
+
COMPLETE_EXIT = __COMPLETE_EXIT__; // inject the map (see below)
|
| 796 |
+
if (COMPLETE_EXIT[nodeName]) {
|
| 797 |
+
exits.push(...COMPLETE_EXIT[nodeName]);
|
| 798 |
+
}
|
| 799 |
+
|
| 800 |
+
|
| 801 |
|
| 802 |
const box = document.getElementById("info-box");
|
| 803 |
box.innerHTML = `
|
|
|
|
| 808 |
<b>Transfers:</b> ${transfers.length ? transfers.join(", ") : "<span style='color:#777'>None</span>"}<br>
|
| 809 |
<b>Loops:</b> ${loops.length ? loops.join(", ") : "<span style='color:#777'>None</span>"}<br>
|
| 810 |
<b>Fresh Buys:</b> ${fresh.length ? fresh.join(", ") : "<span style='color:#777'>None</span>"}
|
| 811 |
+
<b>Complete Exits:</b> ${exits.length ? exits.join(", ") : "<span style='color:#777'>None</span>"}<br>
|
| 812 |
</div>
|
| 813 |
`;
|
| 814 |
}
|
|
|
|
| 876 |
.replace("__TRANSFERS__", transfers_json)
|
| 877 |
.replace("__LOOPS__", loops_json)
|
| 878 |
.replace("__FRESH__", fresh_json)
|
| 879 |
+
.replace("__COMPLETE_EXIT__", json.dumps(COMPLETE_EXIT))
|
| 880 |
+
|
| 881 |
)
|
| 882 |
return html
|
| 883 |
|