FossilRepo

fossilrepo / templates / fossil / repo_settings.html
1
{% extends "base.html" %}
2
{% block title %}Settings — {{ project.name }} — Fossilrepo{% endblock %}
3
4
{% block content %}
5
<h1 class="text-2xl font-bold text-gray-100 mb-2">{{ project.name }}</h1>
6
{% include "fossil/_project_nav.html" %}
7
8
<div class="max-w-2xl space-y-6">
9
10
<!-- Repository Info -->
11
<div class="rounded-lg bg-gray-800 border border-gray-700 p-5">
12
<h2 class="text-lg font-semibold text-gray-200 mb-4">Repository Info</h2>
13
<dl class="space-y-3">
14
<div class="flex items-center justify-between">
15
<dt class="text-sm text-gray-400">Filename</dt>
16
<dd class="text-sm text-gray-200 font-mono">{{ fossil_repo.filename }}</dd>
17
</div>
18
{% if repo_info.file_size %}
19
<div class="flex items-center justify-between">
20
<dt class="text-sm text-gray-400">File size</dt>
21
<dd class="text-sm text-gray-200">{{ repo_info.file_size|filesizeformat }}</dd>
22
</div>
23
{% endif %}
24
{% if repo_info.project_code %}
25
<div class="flex items-center justify-between">
26
<dt class="text-sm text-gray-400">Project code</dt>
27
<dd class="text-sm text-gray-200 font-mono truncate max-w-xs">{{ repo_info.project_code }}</dd>
28
</div>
29
{% endif %}
30
{% if repo_info.checkin_count is not None %}
31
<div class="flex items-center justify-between">
32
<dt class="text-sm text-gray-400">Checkins</dt>
33
<dd class="text-sm text-gray-200">{{ repo_info.checkin_count|default:"0" }}</dd>
34
</div>
35
{% endif %}
36
{% if repo_info.ticket_count is not None %}
37
<div class="flex items-center justify-between">
38
<dt class="text-sm text-gray-400">Tickets</dt>
39
<dd class="text-sm text-gray-200">{{ repo_info.ticket_count|default:"0" }}</dd>
40
</div>
41
{% endif %}
42
{% if repo_info.wiki_page_count is not None %}
43
<div class="flex items-center justify-between">
44
<dt class="text-sm text-gray-400">Wiki pages</dt>
45
<dd class="text-sm text-gray-200">{{ repo_info.wiki_page_count|default:"0" }}</dd>
46
</div>
47
{% endif %}
48
{% if fossil_repo.last_sync_at %}
49
<div class="flex items-center justify-between">
50
<dt class="text-sm text-gray-400">Last synced</dt>
51
<dd class="text-sm text-gray-200">{{ fossil_repo.last_sync_at|timesince }} ago</dd>
52
</div>
53
{% endif %}
54
{% if repo_info.file_path %}
55
<div class="flex items-center justify-between">
56
<dt class="text-sm text-gray-400">File path</dt>
57
<dd class="text-sm text-gray-400 font-mono truncate max-w-xs" title="{{ repo_info.file_path }}">{{ repo_info.file_path }}</dd>
58
</div>
59
{% endif %}
60
{% if not repo_info.exists_on_disk %}
61
<div class="rounded-md bg-yellow-900/30 border border-yellow-800 px-3 py-2 mt-2">
62
<p class="text-sm text-yellow-300">Repository file not found on disk.</p>
63
</div>
64
{% endif %}
65
</dl>
66
</div>
67
68
<!-- Remote URL -->
69
<div class="rounded-lg bg-gray-800 border border-gray-700 p-5">
70
<h2 class="text-lg font-semibold text-gray-200 mb-4">Remote</h2>
71
<form method="post">
72
{% csrf_token %}
73
<input type="hidden" name="action" value="update_remote">
74
<div>
75
<label class="block text-sm font-medium text-gray-300 mb-1">Remote URL</label>
76
<input type="url" name="remote_url"
77
value="{{ fossil_repo.remote_url }}"
78
placeholder="https://fossil-scm.org/home"
79
class="w-full rounded-md border-gray-700 bg-gray-900 text-gray-100 shadow-sm focus:border-brand focus:ring-brand sm:text-sm px-3 py-2 font-mono">
80
<p class="mt-1 text-xs text-gray-500">Upstream Fossil server URL for sync operations</p>
81
</div>
82
<div class="mt-3">
83
<button type="submit"
84
class="rounded-md bg-brand px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-brand-hover">
85
Save Remote
86
</button>
87
</div>
88
</form>
89
</div>
90
91
<!-- Clone URLs -->
92
<div class="rounded-lg bg-gray-800 border border-gray-700 p-5">
93
<h2 class="text-lg font-semibold text-gray-200 mb-4">Clone URLs</h2>
94
<div class="space-y-3">
95
<div>
96
<label class="block text-xs font-medium text-gray-400 mb-1">HTTP</label>
97
<div class="flex items-center gap-2">
98
<input type="text" readonly
99
value="{{ request.scheme }}://{{ request.get_host }}/projects/{{ project.slug }}/fossil/xfer"
100
class="flex-1 rounded-md border-gray-700 bg-gray-900 text-gray-300 text-sm px-3 py-2 font-mono">
101
</div>
102
</div>
103
</div>
104
<p class="mt-3 text-xs text-gray-500">Use these URLs to clone this repository with <code>fossil clone</code>.</p>
105
</div>
106
107
<!-- Actions -->
108
<div class="rounded-lg bg-gray-800 border border-gray-700 p-5">
109
<h2 class="text-lg font-semibold text-gray-200 mb-4">Actions</h2>
110
<div class="flex flex-wrap items-center gap-x-3 gap-y-2">
111
<form method="post">
112
{% csrf_token %}
113
<input type="hidden" name="action" value="sync_metadata">
114
<button type="submit"
115
class="inline-flex items-center gap-2 rounded-md bg-gray-700 px-4 py-2 text-sm font-medium text-gray-200 ring-1 ring-inset ring-gray-600 hover:bg-gray-600"
116
{% if not repo_info.exists_on_disk %}disabled{% endif %}>
117
<svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
118
<path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182" />
119
</svg>
120
Sync Metadata
121
</button>
122
</form>
123
{% if fossil_repo.remote_url %}
124
<form method="post">
125
{% csrf_token %}
126
<input type="hidden" name="action" value="pull_remote">
127
<button type="submit"
128
class="inline-flex items-center gap-2 rounded-md bg-brand px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-brand-hover"
129
{% if not repo_info.exists_on_disk %}disabled{% endif %}>
130
<svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
131
<path stroke-linecap="round" stroke-linejoin="round" d="M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3" />
132
</svg>
133
Pull from Remote
134
</button>
135
</form>
136
{% endif %}
137
</div>
138
</div>
139
140
<!-- API Tokens & Branch Protection -->
141
<div class="rounded-lg bg-gray-800 border border-gray-700 p-5">
142
<h2 class="text-lg font-semibold text-gray-200 mb-4">Management</h2>
143
<div class="space-y-3">
144
<a href="{% url 'fossil:api_tokens' slug=project.slug %}"
145
class="flex items-center justify-between rounded-md bg-gray-700/50 px-4 py-3 hover:bg-gray-700 transition-colors">
146
<div>
147
<p class="text-sm font-medium text-gray-200">API Tokens</p>
148
<p class="text-xs text-gray-500">Manage tokens for CI/CD systems and automation.</p>
149
</div>
150
<svg class="h-4 w-4 text-gray-400" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
151
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5"/>
152
</svg>
153
</a>
154
<a href="{% url 'fossil:branch_protections' slug=project.slug %}"
155
class="flex items-center justify-between rounded-md bg-gray-700/50 px-4 py-3 hover:bg-gray-700 transition-colors">
156
<div>
157
<p class="text-sm font-medium text-gray-200">Branch Protection</p>
158
<p class="text-xs text-gray-500">Protect branches from unreviewed changes.</p>
159
</div>
160
<svg class="h-4 w-4 text-gray-400" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
161
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5"/>
162
</svg>
163
</a>
164
<a href="{% url 'fossil:webhooks' slug=project.slug %}"
165
class="flex items-center justify-between rounded-md bg-gray-700/50 px-4 py-3 hover:bg-gray-700 transition-colors">
166
<div>
167
<p class="text-sm font-medium text-gray-200">Webhooks</p>
168
<p class="text-xs text-gray-500">Configure outbound event notifications.</p>
169
</div>
170
<svg class="h-4 w-4 text-gray-400" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
171
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5"/>
172
</svg>
173
</a>
174
</div>
175
</div>
176
177
<!-- Danger Zone -->
178
<div class="rounded-lg border-2 border-red-900/50 p-5">
179
<h2 class="text-lg font-semibold text-red-400 mb-2">Danger Zone</h2>
180
<p class="text-sm text-gray-400 mb-4">Destructive operations that cannot be undone.</p>
181
<div class="rounded-md bg-gray-800 border border-gray-700 px-4 py-3 flex flex-wrap items-center justify-between gap-3">
182
<div>
183
<p class="text-sm font-medium text-gray-200">Delete this repository</p>
184
<p class="text-xs text-gray-500">Permanently removes the .fossil file and all associated data.</p>
185
</div>
186
<button disabled
187
class="rounded-md bg-red-900/50 px-4 py-2 text-sm font-medium text-red-400 cursor-not-allowed opacity-50"
188
title="Repository deletion is not yet available">
189
Delete
190
</button>
191
</div>
192
</div>
193
194
</div>
195
{% endblock %}
196

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button