|
| 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>CodeGraph - Interactive Visualization</title> |
| 7 | + <script src="https://d3js.org/d3.v7.min.js"></script> |
| 8 | + <style> |
| 9 | +/* STYLES_PLACEHOLDER */ |
| 10 | + </style> |
| 11 | +</head> |
| 12 | +<body> |
| 13 | + <div id="graph"></div> |
| 14 | + <div class="tooltip" id="tooltip"></div> |
| 15 | + |
| 16 | + <!-- Search box --> |
| 17 | + <div class="search-container"> |
| 18 | + <div class="search-box"> |
| 19 | + <input type="text" class="search-input" id="searchInput" placeholder="Search nodes... (Ctrl+F)" autocomplete="off"> |
| 20 | + <button class="search-clear" id="searchClear">×</button> |
| 21 | + <div class="autocomplete-list" id="autocompleteList"></div> |
| 22 | + </div> |
| 23 | + </div> |
| 24 | + |
| 25 | + <!-- Highlight info banner --> |
| 26 | + <div class="highlight-info" id="highlightInfo"> |
| 27 | + <span id="highlightText">Highlighting: </span> |
| 28 | + <button id="clearHighlight">Clear (Esc)</button> |
| 29 | + </div> |
| 30 | + |
| 31 | + <div class="panel controls" id="controls-panel"> |
| 32 | + <div class="panel-header"> |
| 33 | + <h4>Controls</h4> |
| 34 | + <button class="panel-toggle" title="Collapse">−</button> |
| 35 | + </div> |
| 36 | + <div class="panel-content"> |
| 37 | + <p><kbd>Ctrl+F</kbd> Search nodes</p> |
| 38 | + <p><kbd>Scroll</kbd> Zoom in/out</p> |
| 39 | + <p><kbd>Drag</kbd> on background - Pan</p> |
| 40 | + <p><kbd>Drag</kbd> on node - Pin node position</p> |
| 41 | + <p><kbd>Click</kbd> module/entity - Collapse/Expand</p> |
| 42 | + <p><kbd>Double-click</kbd> - Unpin / Focus on node</p> |
| 43 | + <p><kbd>Esc</kbd> Clear search highlight</p> |
| 44 | + </div> |
| 45 | + </div> |
| 46 | + <div class="panel legend" id="legend-panel"> |
| 47 | + <div class="panel-header"> |
| 48 | + <h4>Legend</h4> |
| 49 | + <button class="panel-toggle" title="Collapse">−</button> |
| 50 | + </div> |
| 51 | + <div class="panel-content"> |
| 52 | + <div class="legend-section"> |
| 53 | + <h4>Nodes</h4> |
| 54 | + <div class="legend-item"> |
| 55 | + <div class="legend-color legend-module"></div> |
| 56 | + <span>Module (.py file)</span> |
| 57 | + </div> |
| 58 | + <div class="legend-item"> |
| 59 | + <div class="legend-color legend-entity"></div> |
| 60 | + <span>Entity (function/class)</span> |
| 61 | + </div> |
| 62 | + <div class="legend-item"> |
| 63 | + <div class="legend-color legend-external"></div> |
| 64 | + <span>External dependency</span> |
| 65 | + </div> |
| 66 | + </div> |
| 67 | + <div class="legend-section"> |
| 68 | + <h4>Links</h4> |
| 69 | + <div class="legend-item"> |
| 70 | + <div class="legend-line legend-link-module"></div> |
| 71 | + <span>Module → Module</span> |
| 72 | + </div> |
| 73 | + <div class="legend-item"> |
| 74 | + <div class="legend-line legend-link-entity" style="border-top: 2px dashed #009c2c; background: none; height: 0;"></div> |
| 75 | + <span>Module → Entity</span> |
| 76 | + </div> |
| 77 | + <div class="legend-item"> |
| 78 | + <div class="legend-line legend-link-dep"></div> |
| 79 | + <span>Entity → Dependency</span> |
| 80 | + </div> |
| 81 | + </div> |
| 82 | + </div> |
| 83 | + </div> |
| 84 | + <div class="panel stats" id="stats"> |
| 85 | + <div class="panel-header"> |
| 86 | + <h4>Statistics</h4> |
| 87 | + <button class="panel-toggle" title="Collapse">−</button> |
| 88 | + </div> |
| 89 | + <div class="panel-content" id="stats-content"></div> |
| 90 | + </div> |
| 91 | + <div class="panel unlinked-modules" id="unlinked-modules"> |
| 92 | + <div class="panel-header"> |
| 93 | + <h4>Connections</h4> |
| 94 | + <button class="panel-toggle" title="Collapse">−</button> |
| 95 | + </div> |
| 96 | + <div class="panel-content"> |
| 97 | + <div class="unlinked-tabs"> |
| 98 | + <button class="unlinked-tab active" data-tab="unlinked-list">Unlinked <span class="count" id="unlinked-count"></span></button> |
| 99 | + <button class="unlinked-tab" data-tab="links-count-list">Links count <span class="count" id="links-count"></span></button> |
| 100 | + </div> |
| 101 | + <div id="unlinked-list" class="unlinked-tab-content active"></div> |
| 102 | + <div id="links-count-list" class="unlinked-tab-content"> |
| 103 | + <div class="links-filter"> |
| 104 | + <div class="filter-row"> |
| 105 | + <label><input type="checkbox" id="links-in-check" checked> Links in</label> |
| 106 | + <label><input type="checkbox" id="links-out-check" checked> Links out</label> |
| 107 | + </div> |
| 108 | + <div class="filter-row"> |
| 109 | + <span>More than:</span> |
| 110 | + <input type="number" id="links-threshold" value="5" min="0"> |
| 111 | + </div> |
| 112 | + </div> |
| 113 | + <div id="links-count-content"></div> |
| 114 | + </div> |
| 115 | + </div> |
| 116 | + </div> |
| 117 | + <div class="panel massive-objects" id="massive-objects"> |
| 118 | + <div class="panel-header"> |
| 119 | + <h4>Massive Objects <span class="count" id="massive-count"></span></h4> |
| 120 | + <button class="panel-toggle" title="Collapse">−</button> |
| 121 | + </div> |
| 122 | + <div class="panel-content"> |
| 123 | + <div class="filters"> |
| 124 | + <div class="filter-row"> |
| 125 | + <label><input type="checkbox" id="filter-modules" checked> Modules</label> |
| 126 | + <label><input type="checkbox" id="filter-classes" checked> Classes</label> |
| 127 | + <label><input type="checkbox" id="filter-functions" checked> Functions</label> |
| 128 | + </div> |
| 129 | + <div class="filter-row"> |
| 130 | + <span>Min lines:</span> |
| 131 | + <input type="number" id="massive-threshold" value="50" min="1"> |
| 132 | + </div> |
| 133 | + </div> |
| 134 | + <ul id="massive-list"></ul> |
| 135 | + </div> |
| 136 | + </div> |
| 137 | + <div class="panel size-toggle" id="size-toggle-panel"> |
| 138 | + <div class="panel-header"> |
| 139 | + <h4>Display</h4> |
| 140 | + <button class="panel-toggle" title="Collapse">−</button> |
| 141 | + </div> |
| 142 | + <div class="panel-content"> |
| 143 | + <label> |
| 144 | + <input type="checkbox" id="size-by-code" checked> |
| 145 | + Size by lines of code |
| 146 | + </label> |
| 147 | + <div class="display-section"> |
| 148 | + <h5>Show nodes</h5> |
| 149 | + <label><input type="checkbox" id="show-modules" checked> Modules</label> |
| 150 | + <label><input type="checkbox" id="show-classes" checked> Classes</label> |
| 151 | + <label><input type="checkbox" id="show-functions" checked> Functions</label> |
| 152 | + <label><input type="checkbox" id="show-external" checked> External</label> |
| 153 | + </div> |
| 154 | + <div class="display-section"> |
| 155 | + <h5>Show links</h5> |
| 156 | + <label><input type="checkbox" id="show-link-module" checked> Module → Module</label> |
| 157 | + <label><input type="checkbox" id="show-link-entity" checked> Module → Entity</label> |
| 158 | + <label><input type="checkbox" id="show-link-dependency" checked> Dependencies</label> |
| 159 | + </div> |
| 160 | + </div> |
| 161 | + </div> |
| 162 | + |
| 163 | + <script> |
| 164 | + const graphData = /* GRAPH_DATA_PLACEHOLDER */; |
| 165 | + |
| 166 | +/* SCRIPT_PLACEHOLDER */ |
| 167 | + </script> |
| 168 | +</body> |
| 169 | +</html> |
0 commit comments