This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
package views
|
||||
|
||||
import "vctp/components/core"
|
||||
import (
|
||||
"strings"
|
||||
"vctp/components/core"
|
||||
)
|
||||
|
||||
type BuildInfo struct {
|
||||
BuildTime string
|
||||
@@ -8,6 +11,14 @@ type BuildInfo struct {
|
||||
GoVersion string
|
||||
}
|
||||
|
||||
func truncateSHA(sha string) string {
|
||||
trimmed := strings.TrimSpace(sha)
|
||||
if len(trimmed) <= 14 {
|
||||
return trimmed
|
||||
}
|
||||
return trimmed[:14] + "..."
|
||||
}
|
||||
|
||||
templ Index(info BuildInfo) {
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
@@ -41,15 +52,15 @@ templ Index(info BuildInfo) {
|
||||
</div>
|
||||
<div class="web2-card">
|
||||
<p class="web2-kpi-label">SHA1 Version</p>
|
||||
<p class="web2-kpi-value">{ info.SHA1Ver }</p>
|
||||
<p class="web2-kpi-value web2-kpi-value-mono web2-kpi-truncate" title={ info.SHA1Ver }>{ truncateSHA(info.SHA1Ver) }</p>
|
||||
</div>
|
||||
<div class="web2-card">
|
||||
<p class="web2-kpi-label">Go Runtime</p>
|
||||
<p class="web2-kpi-value">{ info.GoVersion }</p>
|
||||
</div>
|
||||
</section>
|
||||
<section class="grid gap-6 lg:grid-cols-3">
|
||||
<div class="web2-card">
|
||||
<section class="web2-index-sections">
|
||||
<div class="web2-card web2-card-overview web2-index-overview">
|
||||
<h2 class="mb-2">Overview</h2>
|
||||
<p class="web2-page-subtitle">
|
||||
vCTP is a vSphere Chargeback Tracking Platform.
|
||||
@@ -61,7 +72,7 @@ templ Index(info BuildInfo) {
|
||||
Use <code class="web2-code">/api/auth/me</code> to inspect active claims and roles during integration and diagnostics.
|
||||
</p>
|
||||
</div>
|
||||
<div class="web2-card">
|
||||
<div class="web2-card web2-card-featured web2-index-featured">
|
||||
<h2 class="mb-2">Snapshots and Reports</h2>
|
||||
<div class="web2-paragraphs web2-page-subtitle">
|
||||
<p>Hourly snapshots capture inventory per vCenter (concurrency via <code class="web2-code">hourly_snapshot_concurrency</code>), then daily and monthly summaries are derived from those snapshots.</p>
|
||||
@@ -76,7 +87,7 @@ templ Index(info BuildInfo) {
|
||||
<p>Monthly aggregation reports include a Daily Totals sheet with full-day interval labels (YYYY-MM-DD to YYYY-MM-DD) and prorated totals.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="web2-card">
|
||||
<div class="web2-card web2-index-wide">
|
||||
<h2 class="mb-2">Prorating and Aggregation</h2>
|
||||
<div class="web2-paragraphs web2-page-subtitle">
|
||||
<p><code class="web2-code">SamplesPresent</code> is the count of snapshots in which the VM appears; <code class="web2-code">TotalSamples</code> is the count of unique snapshot times for that vCenter/day.</p>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user