summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--routers/admin/admin.go1
-rw-r--r--templates/admin/dashboard.tmpl2
2 files changed, 3 insertions, 0 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go
index 5dbc321e9d..d0f027f5f8 100644
--- a/routers/admin/admin.go
+++ b/routers/admin/admin.go
@@ -131,6 +131,7 @@ func Dashboard(ctx *context.Context) {
// FIXME: update periodically
updateSystemStatus()
ctx.Data["SysStatus"] = sysStatus
+ ctx.Data["SSH"] = setting.SSH
ctx.HTML(200, tplDashboard)
}
diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl
index 99c215493d..d52f82fb63 100644
--- a/templates/admin/dashboard.tmpl
+++ b/templates/admin/dashboard.tmpl
@@ -35,11 +35,13 @@
<td>{{.i18n.Tr "admin.dashboard.git_gc_repos"}}</td>
<td><button type="submit" class="ui green button" name="op" value="git_gc_repos">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
</tr>
+ {{if and (not .SSH.Disabled) (not .SSH.StartBuiltinServer)}}
<tr>
<td>{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}<br/>
{{.i18n.Tr "admin.dashboard.resync_all_sshkeys.desc"}}</td>
<td><button type="submit" class="ui green button" name="op" value="resync_all_sshkeys">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>
</tr>
+ {{end}}
<tr>
<td>{{.i18n.Tr "admin.dashboard.resync_all_hooks"}}</td>
<td><button type="submit" class="ui green button" name="op" value="resync_all_hooks">{{svg "octicon-play"}} {{.i18n.Tr "admin.dashboard.operation_run"}}</button></td>