Implement WHMCS Addon Dashboard with API for stats and integrate billing provider logic
Some checks failed
CI / Node — lint, typecheck, test, build (push) Failing after 10s
CI / Go — node-agent tests (push) Failing after 8s
CI / Go — edge-gateway build (push) Successful in 17s

This commit is contained in:
smueller
2026-06-26 15:11:29 +02:00
parent 15cf302afc
commit 4b20efe4bc
30 changed files with 1414 additions and 16 deletions

View File

@@ -0,0 +1,55 @@
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">HexaHost GameCloud — Dashboard</h3>
</div>
<div class="panel-body">
<p>
<a href="{{modulelink}}" class="btn btn-default">Dashboard</a>
<a href="{{modulelink}}&action=events" class="btn btn-default">Events</a>
<a href="{{modulelink}}&action=reconciliation" class="btn btn-default">Reconciliation</a>
<a href="{{modulelink}}&action=poll" class="btn btn-primary">Poll events now</a>
</p>
<div class="row">
<div class="col-md-3">
<div class="well text-center">
<h4>{{health.status}}</h4>
<small>API status</small>
</div>
</div>
<div class="col-md-3">
<div class="well text-center">
<h4>{{stats.linkedServices}}</h4>
<small>Linked services</small>
</div>
</div>
<div class="col-md-3">
<div class="well text-center">
<h4>{{unlinkedWhmcsServices}}</h4>
<small>Unlinked WHMCS services</small>
</div>
</div>
<div class="col-md-3">
<div class="well text-center">
<h4>{{stats.pendingEvents}}</h4>
<small>Pending GameCloud events</small>
</div>
</div>
</div>
<table class="table table-striped">
<tbody>
<tr><th>Addon version</th><td>{{version}}</td></tr>
<tr><th>Integration ID</th><td>{{stats.integrationId}}</td></tr>
<tr><th>Billing provider</th><td>{{stats.billingProvider}}</td></tr>
<tr><th>Linked clients</th><td>{{stats.linkedClients}}</td></tr>
<tr><th>Open reconciliation issues</th><td>{{stats.openReconciliationIssues}}</td></tr>
<tr><th>Dead-letter events</th><td>{{stats.deadLetterEvents}}</td></tr>
<tr><th>Usage exports</th><td>{{stats.exportedUsagePeriods}}</td></tr>
<tr><th>Last reconciliation</th><td>{{stats.lastReconciliationAt}}</td></tr>
<tr><th>Last event sync</th><td>{{stats.lastEventSyncAt}}</td></tr>
<tr><th>Last error</th><td>{{lastError}}</td></tr>
</tbody>
</table>
</div>
</div>

View File

@@ -0,0 +1,27 @@
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">GameCloud Events</h3>
</div>
<div class="panel-body">
<p>
<a href="{{modulelink}}" class="btn btn-default">Dashboard</a>
<a href="{{modulelink}}&action=poll" class="btn btn-primary">Poll &amp; auto-ack</a>
</p>
<p>Pending local copies: <strong>{{pendingCount}}</strong> · Dead letter: <strong>{{deadLetterCount}}</strong></p>
<table class="table table-bordered table-condensed">
<thead>
<tr>
<th>ID</th>
<th>Type</th>
<th>Status</th>
<th>Payload</th>
<th>Created</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{{events.rows}}
</tbody>
</table>
</div>
</div>

View File

@@ -0,0 +1,29 @@
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Reconciliation</h3>
</div>
<div class="panel-body">
<p>
<a href="{{modulelink}}" class="btn btn-default">Dashboard</a>
<a href="{{modulelink}}&action=reconciliation&run=1&dry=1" class="btn btn-default">Dry run</a>
<a href="{{modulelink}}&action=reconciliation&run=1&repair=1" class="btn btn-warning">Live + auto-repair</a>
</p>
{{reconciliation.result}}
<h4>Recent runs</h4>
<table class="table table-bordered table-condensed">
<thead>
<tr>
<th>Run ID</th>
<th>Mode</th>
<th>Issues</th>
<th>Created</th>
</tr>
</thead>
<tbody>
{{reconciliation.rows}}
</tbody>
</table>
</div>
</div>