Admin Member content pane: every page, link, source, zone, ad, postback, upload, profile, broadcast, audience and video members made, in one list

- GET /api/admin/content?type=&q=&from=&to=&flagged=1&page=&per=&fresh=1 (admin only, read-only): content.js normalizes
  rows from each module's own adminAll() (new one-pass accessors in pages, rotator, sources, zones, postbacks,
  audiences, messages.adminBroadcasts, videomaker.adminJobs) plus ads.adminList and accounts.listAll; owner shown as
  @username, email and member #; created in Central time; totals per type; busiest hosts in the current view
- Flags: open member reports on an ad, dead or parked destinations, burned link domains, failing postbacks,
  admin-paused zones, home-page demo links. No deny list exists yet
- Row actions only reuse existing moderation routes (campaign pause/resume, zone pause/resume); "Open member" jumps
  to the member card; page Preview works for drafts and is never counted (admin allowed on ?preview=1)
- Uploads: /uploads files now recorded with their uploader in uploads-index.json; older files get the owner from
  whatever uses them (campaign creative, profile, wall offer)
- Credits > Your purchases: buys made from linked positions are included, labelled "Position N"
- Cache tags: admin.css 20261018a, admin.js 20261018b, credits-screen.js 20261018b

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-18 07:01:58 -05:00
parent f4b3058a58
commit afede88c4a
15 changed files with 464 additions and 16 deletions
+23 -2
View File
@@ -9,7 +9,7 @@
<link rel="stylesheet" href="/assets/cr.css?v=20261018c">
<style>@import url("/assets/site.css?v=ls20260916a") layer(legacy);</style>
<link rel="stylesheet" href="/assets/tools.css?v=20261008a">
<link rel="stylesheet" href="/assets/admin.css?v=20261012a">
<link rel="stylesheet" href="/assets/admin.css?v=20261018a">
</head>
<body>
<div id="page">
@@ -44,6 +44,7 @@
<button data-pane="house" class="nb" type="button" title="House ads"><svg viewBox="0 0 24 24"><path d="M3 11l14-5v12L3 13v-2z"/><path d="M17 8a4 4 0 0 1 0 8M7 13v5a2 2 0 0 0 4 0v-3"/></svg><span class="lbl">House ads</span></button>
<button data-pane="campaigns" class="nb" type="button" title="All campaigns"><svg viewBox="0 0 24 24"><path d="M4 6h16M4 12h16M4 18h10"/></svg><span class="lbl">All campaigns</span></button>
<button data-pane="members" class="nb" type="button" title="Members"><svg viewBox="0 0 24 24"><circle cx="12" cy="7" r="3.2"/><circle cx="5" cy="17" r="2.6"/><circle cx="19" cy="17" r="2.6"/><path d="M12 10v3M12 13l-5 2M12 13l5 2"/></svg><span class="lbl">Members</span></button>
<button data-pane="content" class="nb" type="button" title="Member content"><svg viewBox="0 0 24 24"><path d="M12 3l9 5-9 5-9-5z"/><path d="M3 13l9 5 9-5"/><path d="M3 17.5l9 5 9-5" opacity=".55"/></svg><span class="lbl">Member content</span><span class="pill" id="ctBadge" hidden></span></button>
<button data-pane="reports" class="nb" type="button" title="Reports"><svg viewBox="0 0 24 24"><path d="M12 3l9 16H3z"/><path d="M12 10v4M12 17v.5"/></svg><span class="lbl">Reports</span><span class="pill" id="repBadge" hidden></span></button>
<button data-pane="traffic" class="nb" type="button" title="Traffic"><svg viewBox="0 0 24 24"><path d="M3 17l6-6 4 4 8-8"/><path d="M14 7h7v7"/></svg><span class="lbl">Traffic</span></button>
<button data-pane="zones" class="nb" type="button" title="Zones"><svg viewBox="0 0 24 24"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 10h18M8 15h8"/></svg><span class="lbl">Zones</span></button>
@@ -216,6 +217,26 @@
</div>
</div>
<div class="pane" id="pane-content" hidden>
<div class="ct-totals" id="ctTotals"></div>
<div class="card">
<div class="card-head"><h3>Everything members made</h3><span class="sub" id="ctSub">newest first</span></div>
<div class="ct-tabs" id="ctTabs" role="tablist" aria-label="Content type"></div>
<div class="ct-filters">
<input id="ctQ" type="search" autocomplete="off" placeholder="Search owner, @username, member #, URL, domain or text">
<label class="small">From <input type="date" id="ctFrom"></label>
<label class="small">To <input type="date" id="ctTo"></label>
<label class="ct-chk small"><input type="checkbox" id="ctFlagged"> Flagged only</label>
<button type="button" class="btn small sec" id="ctClear">Clear</button>
<button type="button" class="btn small sec" id="ctRefresh">Refresh</button>
</div>
<p class="small muted" id="ctNote" style="margin:8px 0 6px">Dates are Central time. Flags: open member reports on an ad, a destination that failed its health check, a host that is one of our burned link domains, failing postbacks, admin-paused zones and home-page demo links. LinkSpin has no destination deny list yet, so the busiest hosts below are the quickest way to spot a cluster: click one to filter by it. Opening a short link counts as a click on it; page previews are never counted.</p>
<div class="ct-hosts" id="ctHosts"></div>
<div class="tablewrap"><table class="adm-table ct-table" id="ctTable"></table></div>
<div class="ct-pager" id="ctPager"></div>
</div>
</div>
<div class="pane" id="pane-reports" hidden>
<div class="card">
<div class="card-head"><h3>Counters audit</h3><span class="sub" id="audSub">views vs delivery logs, charges vs shows</span></div>
@@ -451,6 +472,6 @@
</div>
<script src="/assets/common.js?v=20261016a"></script>
<script src="/assets/admin.js?v=20261018a"></script>
<script src="/assets/admin.js?v=20261018b"></script>
</body>
</html>