{{ define "title" }}Administration Panel — Facette{{ end }}

{{ define "head" }}
		<script src="{{ .URLPrefix }}{{ asset "/static/jquery.js" }}"></script>
		<script src="{{ .URLPrefix }}{{ asset "/static/i18next.js" }}"></script>
		<script src="{{ .URLPrefix }}{{ asset "/static/moment.js" }}"></script>
		<script src="{{ .URLPrefix }}{{ asset "/static/facette.js" }}"></script>
{{ end }}

{{ define "content" }}
		<article>
			<header>
				<h1>Administration Panel</h1>
			</header>

			<section class="scrollarea full">{{ if .ReadOnly }}
				<div class="mesgitem warning">Important: this instance is running in <strong>read-only mode</strong>.</div>

				{{ end }}{{ if not .HideBuildDetails }}
				<h1>Build Information</h1>

				<table class="infotable">
					<tr>
						<th>Version:</th>
						<td>{{ .Build.Version }}</td>
					</tr>
					<tr>
						<th>Build Date:</th>
						<td>{{ .Build.BuildDate }}</td>
					</tr>
					<tr>
						<th>Compiler:</th>
						<td>{{ .Build.Compiler }}</td>
					</tr>
					<tr>
						<th>Built-in Connectors:</th>
						<td>{{ range $index, $connector := .Build.Connectors }}{{ if gt $index 0 }}<br>{{ end }}{{ $connector }}{{ end }}</td>
					</tr>
				</table>

				{{ end }}
				<h1>Catalog statistics</h1>

				<table class="infotable">
					<tr>
						<th>Total Origins:</th>
						<td> {{ .Stats.Origins }}</td>
					</tr>
					<tr>
						<th>Total Sources:</th>
						<td>{{ .Stats.Sources }}</td>
					</tr>
					<tr>
						<th>Total Metrics:</th>
						<td>{{ .Stats.Metrics }}</td>
					</tr>
				</table>

				<h1>Library statistics</h1>

				<table class="infotable">
					<tr>
						<th>Total Collections:</th>
						<td>{{ .Stats.Collections }}</td>
					</tr>
					<tr>
						<th>Total Graphs:</th>
						<td>{{ .Stats.Graphs }}</td>
					</tr>
					<tr>
						<th>Total Source Groups:</th>
						<td>{{ .Stats.SourceGroups }}</td>
					</tr>
					<tr>
						<th>Total Metric Groups:</th>
						<td>{{ .Stats.MetricGroups }}</td>
					</tr>
				</table>
			</section>
		</article>
{{ end }}
