|
| 1 | +<!DOCTYPE html> |
| 2 | +<html xmlns:th="http://www.thymeleaf.org"> |
| 3 | +<body> |
| 4 | +<div th:fragment="content"> |
| 5 | + |
| 6 | + <!-- Back navigation (for HTMX fragment loads) --> |
| 7 | + <div class="mb-4"> |
| 8 | + <button hx-get="/ui/fragments/kinds" hx-target="#content" hx-swap="innerHTML" |
| 9 | + class="text-sm text-brand-600 dark:text-brand-400 hover:underline flex items-center gap-1"> |
| 10 | + <svg class="w-4 h-4" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M15 19l-7-7 7-7"/></svg> |
| 11 | + Back |
| 12 | + </button> |
| 13 | + </div> |
| 14 | + |
| 15 | + <div th:if="${detail == null}" class="text-center py-12"> |
| 16 | + <p class="text-muted dark:text-muted-dark">Node not found.</p> |
| 17 | + </div> |
| 18 | + |
| 19 | + <div th:if="${detail != null}" class="space-y-6"> |
| 20 | + |
| 21 | + <!-- Node header card --> |
| 22 | + <div class="bg-card dark:bg-card-dark rounded-lg border border-slate-200 dark:border-slate-700 overflow-hidden"> |
| 23 | + <div class="h-1 bg-gradient-to-r from-brand-400 to-brand-600"></div> |
| 24 | + <div class="p-6"> |
| 25 | + <div class="flex items-start justify-between gap-4"> |
| 26 | + <div> |
| 27 | + <h1 class="text-xl font-bold mb-1" th:text="${detail['label']}">Label</h1> |
| 28 | + <div class="flex items-center gap-2 text-sm text-muted dark:text-muted-dark"> |
| 29 | + <span class="capitalize font-medium" th:text="${detail['kind']}">kind</span> |
| 30 | + <span th:if="${detail['layer'] != null}" |
| 31 | + class="inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium uppercase tracking-wide bg-brand-100 dark:bg-brand-900/30 text-brand-700 dark:text-brand-300" |
| 32 | + th:text="${detail['layer']}">layer</span> |
| 33 | + </div> |
| 34 | + </div> |
| 35 | + <div class="text-right text-xs text-muted dark:text-muted-dark"> |
| 36 | + <div class="font-mono select-all break-all max-w-xs" th:text="${detail['id']}">id</div> |
| 37 | + </div> |
| 38 | + </div> |
| 39 | + </div> |
| 40 | + </div> |
| 41 | + |
| 42 | + <!-- Properties table --> |
| 43 | + <div class="bg-card dark:bg-card-dark rounded-lg border border-slate-200 dark:border-slate-700 p-6"> |
| 44 | + <h2 class="font-semibold mb-4">Properties</h2> |
| 45 | + <dl class="grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-3 text-sm"> |
| 46 | + <div th:if="${detail['fqn'] != null}"> |
| 47 | + <dt class="text-muted dark:text-muted-dark">FQN</dt> |
| 48 | + <dd class="font-mono text-xs select-all break-all" th:text="${detail['fqn']}">fqn</dd> |
| 49 | + </div> |
| 50 | + <div th:if="${detail['module'] != null}"> |
| 51 | + <dt class="text-muted dark:text-muted-dark">Module</dt> |
| 52 | + <dd th:text="${detail['module']}">module</dd> |
| 53 | + </div> |
| 54 | + <div th:if="${detail['file_path'] != null}"> |
| 55 | + <dt class="text-muted dark:text-muted-dark">File</dt> |
| 56 | + <dd class="font-mono text-xs select-all break-all" th:text="${detail['file_path']}">file</dd> |
| 57 | + </div> |
| 58 | + <div th:if="${detail['line_start'] != null}"> |
| 59 | + <dt class="text-muted dark:text-muted-dark">Lines</dt> |
| 60 | + <dd th:text="${detail['line_start'] + (detail['line_end'] != null ? ' - ' + detail['line_end'] : '')}">1-10</dd> |
| 61 | + </div> |
| 62 | + </dl> |
| 63 | + |
| 64 | + <!-- Annotations --> |
| 65 | + <div th:if="${detail['annotations'] != null and !detail['annotations'].isEmpty()}" class="mt-4 pt-4 border-t border-slate-200 dark:border-slate-700"> |
| 66 | + <h3 class="text-sm font-medium text-muted dark:text-muted-dark mb-2">Annotations</h3> |
| 67 | + <div class="flex flex-wrap gap-1.5"> |
| 68 | + <span th:each="ann : ${detail['annotations']}" |
| 69 | + class="text-xs px-2 py-0.5 rounded-full bg-violet-100 dark:bg-violet-900/30 text-violet-700 dark:text-violet-300 font-mono select-all" |
| 70 | + th:text="${ann}">@annotation</span> |
| 71 | + </div> |
| 72 | + </div> |
| 73 | + |
| 74 | + <!-- Extra properties --> |
| 75 | + <div th:if="${detail['properties'] != null and !detail['properties'].isEmpty()}" class="mt-4 pt-4 border-t border-slate-200 dark:border-slate-700"> |
| 76 | + <h3 class="text-sm font-medium text-muted dark:text-muted-dark mb-2">Extra Properties</h3> |
| 77 | + <dl class="space-y-1 text-sm"> |
| 78 | + <div th:each="prop : ${detail['properties']}" class="flex gap-2"> |
| 79 | + <dt class="text-muted dark:text-muted-dark font-mono text-xs min-w-[120px]" th:text="${prop.key}">key</dt> |
| 80 | + <dd class="font-mono text-xs select-all break-all" th:text="${prop.value}">value</dd> |
| 81 | + </div> |
| 82 | + </dl> |
| 83 | + </div> |
| 84 | + </div> |
| 85 | + |
| 86 | + <!-- Outgoing edges --> |
| 87 | + <div class="bg-card dark:bg-card-dark rounded-lg border border-slate-200 dark:border-slate-700 p-6"> |
| 88 | + <h2 class="font-semibold mb-4"> |
| 89 | + Outgoing Edges |
| 90 | + <span th:if="${detail['outgoing_edges'] != null}" |
| 91 | + class="text-sm font-normal text-muted dark:text-muted-dark" |
| 92 | + th:text="'(' + ${#lists.size(detail['outgoing_edges'])} + ')'"> |
| 93 | + (0) |
| 94 | + </span> |
| 95 | + </h2> |
| 96 | + <div th:if="${detail['outgoing_edges'] == null or detail['outgoing_edges'].isEmpty()}" |
| 97 | + class="text-sm text-muted dark:text-muted-dark italic"> |
| 98 | + No outgoing edges. |
| 99 | + </div> |
| 100 | + <div th:if="${detail['outgoing_edges'] != null and !detail['outgoing_edges'].isEmpty()}" class="space-y-2"> |
| 101 | + <div th:each="edge : ${detail['outgoing_edges']}" |
| 102 | + class="flex items-center gap-3 text-sm p-2 rounded hover:bg-slate-50 dark:hover:bg-slate-800/50 transition-colors"> |
| 103 | + <span class="text-xs font-mono px-2 py-0.5 rounded-full bg-emerald-100 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-300 uppercase" |
| 104 | + th:text="${edge['kind']}">CALLS</span> |
| 105 | + <svg class="w-4 h-4 text-muted dark:text-muted-dark shrink-0" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M5 12h14M12 5l7 7-7 7"/></svg> |
| 106 | + <a th:if="${edge['target'] != null}" |
| 107 | + th:href="@{/ui/node/{id}(id=${edge['target']})}" |
| 108 | + class="text-brand-600 dark:text-brand-400 hover:underline font-mono text-xs truncate" |
| 109 | + th:text="${edge['target']}">target</a> |
| 110 | + <span th:if="${edge['target'] == null}" class="text-muted dark:text-muted-dark text-xs italic">unknown target</span> |
| 111 | + </div> |
| 112 | + </div> |
| 113 | + </div> |
| 114 | + |
| 115 | + <!-- Incoming nodes --> |
| 116 | + <div class="bg-card dark:bg-card-dark rounded-lg border border-slate-200 dark:border-slate-700 p-6"> |
| 117 | + <h2 class="font-semibold mb-4"> |
| 118 | + Incoming Nodes |
| 119 | + <span th:if="${detail['incoming_nodes'] != null}" |
| 120 | + class="text-sm font-normal text-muted dark:text-muted-dark" |
| 121 | + th:text="'(' + ${#lists.size(detail['incoming_nodes'])} + ')'"> |
| 122 | + (0) |
| 123 | + </span> |
| 124 | + </h2> |
| 125 | + <div th:if="${detail['incoming_nodes'] == null or detail['incoming_nodes'].isEmpty()}" |
| 126 | + class="text-sm text-muted dark:text-muted-dark italic"> |
| 127 | + No incoming nodes. |
| 128 | + </div> |
| 129 | + <div th:if="${detail['incoming_nodes'] != null and !detail['incoming_nodes'].isEmpty()}" class="space-y-2"> |
| 130 | + <div th:each="node : ${detail['incoming_nodes']}" |
| 131 | + class="flex items-center gap-3 text-sm p-2 rounded hover:bg-slate-50 dark:hover:bg-slate-800/50 transition-colors"> |
| 132 | + <span class="text-xs font-mono px-2 py-0.5 rounded-full bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 capitalize" |
| 133 | + th:text="${node['kind']}">class</span> |
| 134 | + <svg class="w-4 h-4 text-muted dark:text-muted-dark shrink-0" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24"><path d="M19 12H5M12 19l-7-7 7-7"/></svg> |
| 135 | + <a th:href="@{/ui/node/{id}(id=${node['id']})}" |
| 136 | + class="text-brand-600 dark:text-brand-400 hover:underline truncate" |
| 137 | + th:text="${node['label']}">label</a> |
| 138 | + </div> |
| 139 | + </div> |
| 140 | + </div> |
| 141 | + </div> |
| 142 | +</div> |
| 143 | +</body> |
| 144 | +</html> |
0 commit comments