71 lines
2.2 KiB
HTML
71 lines
2.2 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}{{ name }} - Project Detail{% endblock %}
|
|
|
|
{% block content %}
|
|
<h2>📦 {{ name }}</h2>
|
|
|
|
{% if project.error %}
|
|
<div class="card">
|
|
<p class="text-muted">Error: {{ project.error }}</p>
|
|
</div>
|
|
{% else %}
|
|
<div class="grid-2">
|
|
<div>
|
|
<div class="card">
|
|
<h3>Repository Info</h3>
|
|
<p><strong>Path:</strong> <span class="text-small">{{ project.path }}</span></p>
|
|
<p><strong>Branch:</strong> {{ project.branch or 'N/A' }}</p>
|
|
<p><strong>Status:</strong> {{ project.status }}</p>
|
|
{% if project.gitea_repo %}
|
|
<p><strong>Gitea:</strong> <a href="http://localhost:3000/admin/{{ project.gitea_repo }}" target="_blank">{{ project.gitea_repo }} ↗</a></p>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h3>Latest Commit</h3>
|
|
{% if project.commit_hash %}
|
|
<p><strong>Hash:</strong> <span class="text-small">{{ project.commit_hash }}</span></p>
|
|
<p><strong>Message:</strong> {{ project.commit_msg }}</p>
|
|
<p><strong>Time:</strong> {% if project.commit_time %}{{ project.commit_time|int|dt }} ({{ project.commit_time|int|rel }}){% else %}N/A{% endif %}</p>
|
|
{% else %}
|
|
<p class="text-muted">No commits found</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<div class="card">
|
|
<h3>Git Status</h3>
|
|
{% if project.status_porcelain %}
|
|
<pre>{{ project.status_porcelain }}</pre>
|
|
{% else %}
|
|
<p class="text-muted">Clean working directory</p>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if project.diff_stat %}
|
|
<div class="card">
|
|
<h3>Last Commit Diff Stat</h3>
|
|
<pre>{{ project.diff_stat }}</pre>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card mt-20">
|
|
<h3>Recent Commits (last 10)</h3>
|
|
{% if project.recent_commits %}
|
|
<pre>{% for commit in project.recent_commits %}{{ commit }}
|
|
{% endfor %}</pre>
|
|
{% else %}
|
|
<p class="text-muted">No commits found</p>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<p class="mt-20">
|
|
<a href="/projects" class="btn">← Back to Projects</a>
|
|
</p>
|
|
{% endblock %}
|