224 lines
7.1 KiB
HTML
224 lines
7.1 KiB
HTML
{{define "home.html"}}
|
|
<!doctype html>
|
|
<html lang="{{.Language}}">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<title>
|
|
{{.Title}}
|
|
· DoGaMa
|
|
</title>
|
|
<link rel="stylesheet" href="/static/app.v2.css">
|
|
<link rel="stylesheet" href="/static/theme.v2.css">
|
|
</head>
|
|
<body class="app-body">
|
|
{{template "sidebar" .}}
|
|
<main class="app-main">
|
|
<header class="page-heading dashboard-header">
|
|
<div>
|
|
<p class="eyebrow">
|
|
{{.Msg "dashboard.eyebrow"}}
|
|
</p>
|
|
<h1>
|
|
{{.Msg "dashboard.heading"}}
|
|
</h1>
|
|
<p>
|
|
{{.Msg "dashboard.introduction"}}
|
|
</p>
|
|
</div>
|
|
<label class="instance-search">
|
|
<span class="sr-only">
|
|
{{.Msg "dashboard.search"}}
|
|
</span>
|
|
<input id="instance-search" type="search" placeholder="{{.Msg "dashboard.search_placeholder"}}" autocomplete="off">
|
|
<kbd>
|
|
/
|
|
</kbd>
|
|
</label>
|
|
</header>
|
|
<section class="summary-grid" aria-label="{{.Msg "dashboard.summary"}}">
|
|
<article class="summary-card total">
|
|
<span>
|
|
{{.Msg "dashboard.total"}}
|
|
</span>
|
|
<strong>
|
|
{{len .Instances}}
|
|
</strong>
|
|
</article>
|
|
<article class="summary-card running">
|
|
<span>
|
|
{{.Msg "dashboard.running"}}
|
|
</span>
|
|
<strong>
|
|
{{index .StatusCounts "running"}}
|
|
</strong>
|
|
</article>
|
|
<article class="summary-card stopped">
|
|
<span>
|
|
{{.Msg "dashboard.stopped"}}
|
|
</span>
|
|
<strong>
|
|
{{index .StatusCounts "stopped"}}
|
|
</strong>
|
|
</article>
|
|
<article class="summary-card updating">
|
|
<span>
|
|
{{.Msg "dashboard.updating"}}
|
|
</span>
|
|
<strong>
|
|
{{index .StatusCounts "updating"}}
|
|
</strong>
|
|
</article>
|
|
<article class="summary-card error">
|
|
<span>
|
|
{{.Msg "dashboard.error"}}
|
|
</span>
|
|
<strong>
|
|
{{index .StatusCounts "error"}}
|
|
</strong>
|
|
</article>
|
|
</section>
|
|
<section class="dashboard-section" aria-labelledby="instances-heading">
|
|
<div class="section-heading">
|
|
<div>
|
|
<p class="eyebrow">
|
|
{{.Msg "dashboard.instances_eyebrow"}}
|
|
</p>
|
|
<h2 id="instances-heading">
|
|
{{.Msg "dashboard.instances"}}
|
|
</h2>
|
|
</div>
|
|
</div>
|
|
{{if .Instances}}
|
|
<div class="instance-grid">
|
|
{{range .Instances}}
|
|
<a class="instance-card" href="/instances/{{.ID}}" data-instance-card data-search="{{.Preview.Game.Name}} {{.Preview.DisplayName}}">
|
|
<div class="instance-art">
|
|
{{if .Preview.Game.ArtworkURL}}
|
|
<img src="{{.Preview.Game.ArtworkURL}}" alt="">
|
|
{{else}}
|
|
<span>
|
|
◈
|
|
</span>
|
|
{{end}}
|
|
<span class="status-badge status-{{statusClass .LifecycleState}}">
|
|
<i>
|
|
</i>
|
|
{{statusLabel .LifecycleState}}
|
|
</span>
|
|
</div>
|
|
<div class="instance-card-body">
|
|
<p class="game-name">
|
|
{{.Preview.Game.Name}}
|
|
</p>
|
|
<h3>
|
|
{{.Preview.DisplayName}}
|
|
</h3>
|
|
<p class="instance-id">
|
|
{{.ID}}
|
|
</p>
|
|
</div>
|
|
</a>
|
|
{{end}}
|
|
</div>
|
|
<p class="search-empty" data-search-empty hidden>
|
|
{{.Msg "dashboard.no_match"}}
|
|
</p>
|
|
{{else}}
|
|
<div class="empty-state">
|
|
<span class="empty-icon">
|
|
◈
|
|
</span>
|
|
<h2>
|
|
{{.Msg "dashboard.empty_heading"}}
|
|
</h2>
|
|
<p>
|
|
{{.Msg "dashboard.empty_copy"}}
|
|
</p>
|
|
</div>
|
|
{{end}}
|
|
</section>
|
|
<div class="instance-detail-lower">
|
|
<section class="panel" aria-labelledby="activity-heading">
|
|
<div class="section-heading">
|
|
<div>
|
|
<p class="eyebrow">
|
|
{{.Msg "dashboard.activity_eyebrow"}}
|
|
</p>
|
|
<h2 id="activity-heading">
|
|
{{.Msg "dashboard.recent_activity"}}
|
|
</h2>
|
|
</div>
|
|
</div>
|
|
{{if .RecentActivity}}
|
|
<ul>
|
|
{{range .RecentActivity}}
|
|
<li>
|
|
{{activityLabel .Action}}
|
|
·
|
|
{{.Instance}}
|
|
·
|
|
{{.Actor}}
|
|
</li>
|
|
{{end}}
|
|
</ul>
|
|
{{else}}
|
|
<p class="muted">
|
|
{{.Msg "dashboard.no_activity"}}
|
|
</p>
|
|
{{end}}
|
|
</section>
|
|
<section class="panel" aria-labelledby="system-heading">
|
|
<div class="section-heading">
|
|
<div>
|
|
<p class="eyebrow">
|
|
{{.Msg "dashboard.system_eyebrow"}}
|
|
</p>
|
|
<h2 id="system-heading">
|
|
{{.Msg "dashboard.system_status"}}
|
|
</h2>
|
|
</div>
|
|
</div>
|
|
<ul>
|
|
<li>
|
|
{{.Msg "dashboard.agent"}}
|
|
:
|
|
{{if .SystemStatus.AgentAvailable}}
|
|
{{if .SystemStatus.AgentOnline}}
|
|
{{.Msg "dashboard.online"}}
|
|
{{else}}
|
|
{{.Msg "dashboard.offline"}}
|
|
{{end}}
|
|
{{else}}
|
|
{{.Msg "dashboard.unavailable"}}
|
|
{{end}}
|
|
</li>
|
|
<li>
|
|
{{.Msg "dashboard.database"}}
|
|
:
|
|
{{if .SystemStatus.DatabaseHealthy}}
|
|
{{.Msg "dashboard.healthy"}}
|
|
{{else}}
|
|
{{.Msg "dashboard.unavailable"}}
|
|
{{end}}
|
|
</li>
|
|
<li>
|
|
{{.Msg "dashboard.storage"}}
|
|
:
|
|
{{if .SystemStatus.StorageAvailable}}
|
|
{{storagePercent .SystemStatus.StorageUsed .SystemStatus.StorageTotal}}
|
|
%
|
|
{{else}}
|
|
{{.Msg "dashboard.unavailable"}}
|
|
{{end}}
|
|
</li>
|
|
</ul>
|
|
</section>
|
|
</div>
|
|
</main>
|
|
<script src="/static/app.v2.js">
|
|
</script>
|
|
</body>
|
|
</html>
|
|
{{end}}
|