mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-12-17 20:53:41 +00:00
122 lines
6.2 KiB
Django/Jinja
122 lines
6.2 KiB
Django/Jinja
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>{{ repository }}</title>
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<script src="https://kit.fontawesome.com/0d6d6d5226.js" crossorigin="anonymous"></script>
|
|
<link href="https://unpkg.com/bootstrap-table@1.18.3/dist/bootstrap-table.min.css" rel="stylesheet">
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">
|
|
|
|
{% include "style.jinja2" %}
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="container">
|
|
<h1>ahriman
|
|
{% if authorized %}
|
|
<img src="https://img.shields.io/badge/version-{{ version }}-informational" alt="{{ version }}">
|
|
<img src="https://img.shields.io/badge/architecture-{{ architecture }}-informational" alt="{{ architecture }}">
|
|
<img src="https://img.shields.io/badge/service%20status-{{ service.status }}-{{ service.status_color }}" alt="{{ service.status }}" title="{{ service.timestamp }}">
|
|
{% endif %}
|
|
</h1>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<table id="packages" class="table table-striped table-hover" cellspacing="0"
|
|
data-toggle="table"
|
|
data-pagination="true"
|
|
data-page-siz="10"
|
|
data-page-list="[10, 25, 50, 100, all]"
|
|
data-search="true"
|
|
data-show-columns="true"
|
|
data-show-export="true"
|
|
data-sortable="true">
|
|
<thead class="table-primary">
|
|
<tr>
|
|
<th data-sortable="true">package base</th>
|
|
<th data-sortable="true">packages</th>
|
|
<th data-sortable="true">version</th>
|
|
<th data-sortable="true">last update</th>
|
|
<th data-sortable="true">status</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
{% if authorized %}
|
|
{% for package in packages %}
|
|
<tr>
|
|
<td><a href="{{ package.web_url }}" title="{{ package.base }}">{{ package.base }}</a></td>
|
|
<td>{{ package.packages|join("<br>"|safe) }}</td>
|
|
<td>{{ package.version }}</td>
|
|
<td>{{ package.timestamp }}</td>
|
|
<td class="table-{{ package.status_color }}">{{ package.status }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
{% else %}
|
|
<tr>
|
|
<td colspan="100%">In order to see statuses you must login first</td>
|
|
</tr>
|
|
{% endif %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="container">
|
|
<footer class="d-flex flex-wrap justify-content-between align-items-center border-top">
|
|
<ul class="nav">
|
|
<li><a class="nav-link" href="https://github.com/arcan1s/ahriman" title="sources">ahriman</a></li>
|
|
<li><a class="nav-link" href="https://github.com/arcan1s/ahriman/releases" title="releases list">releases</a></li>
|
|
<li><a class="nav-link" href="https://github.com/arcan1s/ahriman/issues" title="issues tracker">report a bug</a></li>
|
|
</ul>
|
|
|
|
{% if auth_enabled %}
|
|
{% if auth_username is none %}
|
|
<button type="button" class="btn btn-link" data-bs-toggle="modal" data-bs-target="#loginForm" style="text-decoration: none">login</button>
|
|
{% else %}
|
|
<form action="/logout" method="post">
|
|
<button type="submit" class="btn btn-link" style="text-decoration: none">logout ({{ auth_username }})</button>
|
|
</form>
|
|
{% endif %}
|
|
{% endif %}
|
|
</footer>
|
|
</div>
|
|
|
|
<div id="loginForm" tabindex="-1" role="dialog" class="modal fade">
|
|
<div class="modal-dialog modal-login">
|
|
<div class="modal-content">
|
|
<form action="/login" method="post">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title">login</h4>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="form-group">
|
|
<label for="username" class="col-form-label">username</label>
|
|
<input id="username" type="text" class="form-control" placeholder="enter username" name="username" required>
|
|
</div>
|
|
<div class="form-group">
|
|
<label for="password" class="col-form-label">password</label>
|
|
<input id="password" type="password" class="form-control" placeholder="enter username" name="password" required>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<input type="submit" class="btn btn-primary" value="Login">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="https://cdn.jsdelivr.net/npm/jquery/dist/jquery.min.js"></script>
|
|
<script src="https://unpkg.com/tableexport.jquery.plugin/tableExport.min.js"></script>
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj" crossorigin="anonymous"></script>
|
|
<script src="https://unpkg.com/bootstrap-table@1.18.3/dist/bootstrap-table.min.js"></script>
|
|
<script src="https://unpkg.com/bootstrap-table@1.18.3/dist/extensions/export/bootstrap-table-export.min.js"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|