broadfield-dev commited on
Commit
810bb77
·
verified ·
1 Parent(s): 085e4f6

Rename templates/results.html to templates/results_partial.html

Browse files
templates/results.html DELETED
@@ -1,55 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Parsed Results - {{ filename }}</title>
7
- <script src="https://cdn.tailwindcss.com"></script>
8
- <style>
9
- .table-container { overflow-x: auto; }
10
- pre { white-space: pre-wrap; word-wrap: break-word; }
11
- </style>
12
- </head>
13
- <body class="bg-gray-900 text-gray-200 min-h-screen p-8 font-sans">
14
- <div class="max-w-7xl mx-auto bg-gray-800 p-6 rounded-xl shadow-2xl">
15
- <h1 class="text-3xl font-bold text-blue-400 mb-6">Parsed Results: {{ filename }}</h1>
16
- <div class="table-container">
17
- <table class="w-full border-collapse text-sm">
18
- <thead>
19
- <tr class="bg-gray-700 text-blue-300">
20
- <th class="p-4 text-left font-semibold">Part</th>
21
- <th class="p-4 text-left font-semibold">Category</th>
22
- <th class="p-4 text-left font-semibold">Node ID</th>
23
- <th class="p-4 text-left font-semibold">Parent Path</th>
24
- <th class="p-4 text-left font-semibold">Level</th>
25
- <th class="p-4 text-left font-semibold">Location</th>
26
- <th class="p-4 text-left font-semibold">Vector</th>
27
- <th class="p-4 text-left font-semibold">Source</th>
28
- </tr>
29
- </thead>
30
- <tbody>
31
- {% for part in parts %}
32
- <tr class="border-b border-gray-700 hover:bg-gray-600 transition-colors">
33
- <td class="p-4">{{ part.index }}</td>
34
- <td class="p-4">{{ part.category }}</td>
35
- <td class="p-4">{{ part.node_id }}</td>
36
- <td class="p-4">{{ part.parent_path }}</td>
37
- <td class="p-4">{{ part.level }}</td>
38
- <td class="p-4">Lines {{ part.location[0] }} to {{ part.location[1] }}</td>
39
- <td class="p-4">[{{ part.vector|join(', ') }}]</td>
40
- <td class="p-4">
41
- <pre class="text-xs text-gray-300" style="margin-left: {{ part.level * 1.5 }}rem;">{{ part.source }}</pre>
42
- </td>
43
- </tr>
44
- {% endfor %}
45
- </tbody>
46
- </table>
47
- </div>
48
- <div class="mt-8">
49
- <h2 class="text-2xl font-bold text-blue-400 mb-4">Reconstructed Code</h2>
50
- <pre class="bg-gray-900 p-4 rounded-lg text-gray-300 text-sm">{{ reconstructed_code }}</pre>
51
- </div>
52
- <a href="/" class="mt-6 inline-block bg-blue-500 text-white py-2 px-4 rounded-lg hover:bg-blue-600 transition-colors">Back to Upload</a>
53
- </div>
54
- </body>
55
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
templates/results_partial.html ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div id="results-table">
2
+ <h2 class="text-2xl font-bold text-blue-400 mb-4">Parsed Results: {{ filename }}</h2>
3
+ <div class="table-container">
4
+ <table class="w-full border-collapse text-sm">
5
+ <thead>
6
+ <tr class="bg-gray-700 text-blue-300">
7
+ <th class="p-4 text-left font-semibold">Part</th>
8
+ <th class="p-4 text-left font-semibold">Category</th>
9
+ <th class="p-4 text-left font-semibold">Node ID</th>
10
+ <th class="p-4 text-left font-semibold">Parent Path</th>
11
+ <th class="p-4 text-left font-semibold">Level</th>
12
+ <th class="p-4 text-left font-semibold">Location</th>
13
+ <th class="p-4 text-left font-semibold">Vector</th>
14
+ <th class="p-4 text-left font-semibold">Source</th>
15
+ </tr>
16
+ </thead>
17
+ <tbody>
18
+ {% for part in parts %}
19
+ <tr class="border-b border-gray-700 hover:bg-gray-600 transition-colors">
20
+ <td class="p-4">{{ part.index }}</td>
21
+ <td class="p-4">{{ part.category }}</td>
22
+ <td class="p-4">{{ part.node_id }}</td>
23
+ <td class="p-4">{{ part.parent_path }}</td>
24
+ <td class="p-4">{{ part.level }}</td>
25
+ <td class="p-4">Lines {{ part.location[0] }} to {{ part.location[1] }}</td>
26
+ <td class="p-4">[{{ part.vector|join(', ') }}]</td>
27
+ <td class="p-4">
28
+ <pre class="text-xs text-gray-300" style="margin-left: {{ part.level * 1.5 }}rem;">{{ part.source }}</pre>
29
+ </td>
30
+ </tr>
31
+ {% endfor %}
32
+ </tbody>
33
+ </table>
34
+ </div>
35
+ <div class="mt-8">
36
+ <h3 class="text-xl font-bold text-blue-400 mb-2">Reconstructed Code</h3>
37
+ <pre class="bg-gray-900 p-4 rounded-lg text-gray-300 text-sm">{{ reconstructed_code }}</pre>
38
+ </div>
39
+ <button onclick="togglePointCloud()" class="mt-4 bg-blue-500 text-white py-2 px-4 rounded-lg hover:bg-blue-600 transition">Toggle 3D Point Cloud</button>
40
+ </div>
41
+ <canvas id="point-cloud"></canvas>
42
+ <div id="point-details" class="mt-4">
43
+ <p class="text-gray-400">Hover over a point to see details</p>
44
+ </div>
45
+ <script>
46
+ window.parts = {{ parts|tojson }};
47
+ </script>