summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorAllen Wild <aswild@users.noreply.github.com>2018-03-27 10:13:20 -0400
committerLunny Xiao <xiaolunwen@gmail.com>2018-03-27 22:13:20 +0800
commit15c6bb500b8b395ab7ca61498f5415b9f583213c (patch)
tree5832b47e529ea73d3421161ed17dcebdb29f721b /templates
parent321cc2a3d0f267f8b0f5bb4365572636f1ce0443 (diff)
downloadgitea-15c6bb500b8b395ab7ca61498f5415b9f583213c.tar.gz
gitea-15c6bb500b8b395ab7ca61498f5415b9f583213c.zip
Add repository setting to enable/disable health checks (#3607)
New Feature: * Repository struct field for IsFsckEnabled (default true of course) * Admin Settings section on repo options page, accessible only by admin users Possible Enhancements: * There's no way to force running health checks on all repos regardless of their IsFsckEnabled setting. This would be useful if there were an admin API or dashboard button to run fsck immediately. Issue: https://github.com/go-gitea/gitea/issues/1712 Signed-off-by: Allen Wild <allenwild93@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/settings/options.tmpl23
1 files changed, 23 insertions, 0 deletions
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl
index 01814dcca8..8470d6a5e2 100644
--- a/templates/repo/settings/options.tmpl
+++ b/templates/repo/settings/options.tmpl
@@ -236,6 +236,29 @@
</form>
</div>
+ {{if .IsAdmin}}
+ <h4 class="ui top attached header">
+ {{.i18n.Tr "repo.settings.admin_settings"}}
+ </h4>
+ <div class="ui attached segment">
+ <form class="ui form" method="post">
+ {{.CsrfTokenHtml}}
+ <input type="hidden" name="action" value="admin">
+ <div class="field">
+ <div class="ui checkbox">
+ <input name="enable_health_check" type="checkbox" {{if .Repository.IsFsckEnabled}}checked{{end}}>
+ <label>{{.i18n.Tr "repo.settings.admin_enable_health_check"}}</label>
+ </div>
+ </div>
+
+ <div class="ui divider"></div>
+ <div class="field">
+ <button class="ui green button">{{$.i18n.Tr "repo.settings.update_settings"}}</button>
+ </div>
+ </form>
+ </div>
+ {{end}}
+
{{if .IsRepositoryOwner}}
<h4 class="ui top attached warning header">
{{.i18n.Tr "repo.settings.danger_zone"}}