mirror of
https://github.com/YuzuZensai/Git-Identity-Audit.git
synced 2026-09-13 10:49:12 +00:00
324 lines
12 KiB
HTML
324 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Git Identity Audit Report</title>
|
|
<style>
|
|
:root { color-scheme: light dark; }
|
|
body { font-family: -apple-system, Segoe UI, Roboto, sans-serif; margin: 0; padding: 2rem; max-width: 1100px; margin: 0 auto; }
|
|
h1 { font-size: 1.5rem; margin-bottom: 0.15rem; }
|
|
h2 { font-size: 1.1rem; margin: 2rem 0 0.75rem; }
|
|
.meta { color: #888; margin-bottom: 1.5rem; font-size: 0.9rem; }
|
|
|
|
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
|
|
.card { border: 1px solid rgba(128,128,128,0.3); border-radius: 8px; padding: 0.75rem 1rem; }
|
|
.card .value { font-size: 1.6rem; font-weight: 600; }
|
|
.card .label { color: #888; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
|
|
|
|
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 1rem; }
|
|
@media (max-width: 800px) { .charts { grid-template-columns: 1fr; } }
|
|
.chart-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; font-size: 0.82rem; }
|
|
.chart-label { width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
|
|
.chart-bar-track { flex: 1; background: rgba(128,128,128,0.15); border-radius: 3px; height: 14px; position: relative; }
|
|
.chart-bar-fill { background: #4a90d9; height: 100%; border-radius: 3px; }
|
|
.chart-count { width: 3rem; color: #888; }
|
|
|
|
.controls { display: flex; gap: 0.75rem; margin: 1.5rem 0 1rem; align-items: center; }
|
|
#search { flex: 1; padding: 0.5rem; font-size: 1rem; }
|
|
button { padding: 0.5rem 1rem; font-size: 0.9rem; cursor: pointer; }
|
|
|
|
.identity { border: 1px solid rgba(128,128,128,0.3); border-radius: 8px; margin-bottom: 0.6rem; }
|
|
.identity summary { cursor: pointer; padding: 0.6rem 0.9rem; list-style: none; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
|
|
.identity summary::-webkit-details-marker { display: none; }
|
|
.identity summary .who { font-weight: 600; }
|
|
.identity summary .email { color: #888; font-weight: 400; margin-left: 0.4rem; }
|
|
.identity summary .stats { color: #888; font-size: 0.85rem; white-space: nowrap; }
|
|
.badge-pushed-by { display: inline-block; margin-left: 0.4rem; padding: 0.05rem 0.4rem; border-radius: 4px; font-size: 0.72rem; font-weight: 600; background: rgba(63,185,80,0.15); color: #3fb950; }
|
|
|
|
.events { border: 1px solid rgba(128,128,128,0.3); border-radius: 8px; }
|
|
.events table { width: 100%; border-collapse: collapse; }
|
|
.events th, .events td { text-align: left; padding: 0.4rem 0.9rem; font-size: 0.85rem; border-top: 1px solid rgba(128,128,128,0.15); }
|
|
.events th { color: #888; font-weight: 500; }
|
|
.events .empty { padding: 0.9rem; color: #888; font-size: 0.85rem; }
|
|
.identity table { width: 100%; border-collapse: collapse; margin: 0 0 0.6rem; }
|
|
.identity th, .identity td { text-align: left; padding: 0.3rem 0.9rem; font-size: 0.85rem; border-top: 1px solid rgba(128,128,128,0.15); }
|
|
.identity th { color: #888; font-weight: 500; cursor: pointer; user-select: none; }
|
|
|
|
#count { color: #888; font-size: 0.85rem; margin-top: 0.5rem; }
|
|
.hidden { display: none !important; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>Git Identity Audit Report</h1>
|
|
<div class="meta">Generated {{.GeneratedAt}}</div>
|
|
|
|
<div class="cards">
|
|
<div class="card"><div class="value" id="stat-entries">0</div><div class="label">Identity entries</div></div>
|
|
<div class="card"><div class="value" id="stat-identities">0</div><div class="label">Unique identities</div></div>
|
|
<div class="card"><div class="value" id="stat-repos">0</div><div class="label">Repos scanned</div></div>
|
|
<div class="card"><div class="value" id="stat-range">-</div><div class="label">Date range</div></div>
|
|
</div>
|
|
|
|
<div class="charts">
|
|
<div>
|
|
<h2>Top identities by commits</h2>
|
|
<div id="chart-identities"></div>
|
|
</div>
|
|
<div>
|
|
<h2>Top repos by commits</h2>
|
|
<div id="chart-repos"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2>Identities</h2>
|
|
<div class="controls">
|
|
<input id="search" type="text" placeholder="Filter by name, email, repo, field...">
|
|
<button id="toggle-all">Expand all</button>
|
|
<button id="export">Export CSV</button>
|
|
</div>
|
|
<div id="groups"></div>
|
|
<div id="count"></div>
|
|
|
|
<h2>GitHub Activity</h2>
|
|
<div class="meta">Recent public events for the token owner, used to cross-reference which GitHub login pushed each commit.</div>
|
|
<div class="events"><div id="events-body"></div></div>
|
|
|
|
<script>
|
|
var DATA = {{.DataJSON}};
|
|
var EVENTS = {{.EventsJSON}} || [];
|
|
var COLS = ["Field", "Repo", "CommitSHA", "Date", "PushedByLogin"];
|
|
|
|
function groupData(data) {
|
|
var map = {};
|
|
data.forEach(function(e) {
|
|
var key = e.Name + " |