Hide sync ssh keys button on admin dashboard if ssh disabled or builtin-ssh enabled (#13072)
Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
parent
529c5ffe12
commit
f06ee37e24
2 changed files with 3 additions and 0 deletions
|
@ -131,6 +131,7 @@ func Dashboard(ctx *context.Context) {
|
||||||
// FIXME: update periodically
|
// FIXME: update periodically
|
||||||
updateSystemStatus()
|
updateSystemStatus()
|
||||||
ctx.Data["SysStatus"] = sysStatus
|
ctx.Data["SysStatus"] = sysStatus
|
||||||
|
ctx.Data["SSH"] = setting.SSH
|
||||||
ctx.HTML(200, tplDashboard)
|
ctx.HTML(200, tplDashboard)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,11 +35,13 @@
|
||||||
<td>{{.i18n.Tr "admin.dashboard.git_gc_repos"}}</td>
|
<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>
|
<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>
|
</tr>
|
||||||
|
{{if and (not .SSH.Disabled) (not .SSH.StartBuiltinServer)}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}<br/>
|
<td>{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}<br/>
|
||||||
{{.i18n.Tr "admin.dashboard.resync_all_sshkeys.desc"}}</td>
|
{{.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>
|
<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>
|
</tr>
|
||||||
|
{{end}}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{.i18n.Tr "admin.dashboard.resync_all_hooks"}}</td>
|
<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>
|
<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>
|
||||||
|
|
Loading…
Reference in a new issue