|
|
|
@ -84,12 +84,21 @@
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
</thead>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
{{if .Repository.IsMirror}}
|
|
|
|
{{if and .Repository.IsMirror (not .PullMirror)}}
|
|
|
|
|
|
|
|
{{/* even if a repo is a pull mirror (IsMirror=true), the PullMirror might still be nil if the mirror migration is broken */}}
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<td colspan="4">
|
|
|
|
|
|
|
|
<span class="text red gt-db gt-py-4 gt-border-secondary-bottom">{{$.locale.Tr "repo.settings.mirror_settings.direction.pull"}}: {{$.locale.Tr "error.occurred"}}</span>
|
|
|
|
|
|
|
|
</td>
|
|
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
|
|
{{else if .PullMirror}}
|
|
|
|
<tbody>
|
|
|
|
<tbody>
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<td>{{(MirrorRemoteAddress $.Context .Repository .Mirror.GetRemoteName false).Address}}</td>
|
|
|
|
<td>{{(MirrorRemoteAddress $.Context .Repository .PullMirror.GetRemoteName false).Address}}</td>
|
|
|
|
<td>{{$.locale.Tr "repo.settings.mirror_settings.direction.pull"}}</td>
|
|
|
|
<td>{{$.locale.Tr "repo.settings.mirror_settings.direction.pull"}}</td>
|
|
|
|
<td>{{DateTime "full" .Mirror.UpdatedUnix}}</td>
|
|
|
|
<td>{{DateTime "full" .PullMirror.UpdatedUnix}}</td>
|
|
|
|
<td class="right aligned">
|
|
|
|
<td class="right aligned">
|
|
|
|
<form method="post" class="gt-dib">
|
|
|
|
<form method="post" class="gt-dib">
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
{{.CsrfTokenHtml}}
|
|
|
|
@ -107,15 +116,15 @@
|
|
|
|
<div class="inline field {{if .Err_EnablePrune}}error{{end}}">
|
|
|
|
<div class="inline field {{if .Err_EnablePrune}}error{{end}}">
|
|
|
|
<label>{{.locale.Tr "repo.mirror_prune"}}</label>
|
|
|
|
<label>{{.locale.Tr "repo.mirror_prune"}}</label>
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input id="enable_prune" name="enable_prune" type="checkbox" {{if .MirrorEnablePrune}}checked{{end}}>
|
|
|
|
<input id="enable_prune" name="enable_prune" type="checkbox" {{if .PullMirror.EnablePrune}}checked{{end}}>
|
|
|
|
<label>{{.locale.Tr "repo.mirror_prune_desc"}}</label>
|
|
|
|
<label>{{.locale.Tr "repo.mirror_prune_desc"}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="inline field {{if .Err_Interval}}error{{end}}">
|
|
|
|
<div class="inline field {{if .Err_Interval}}error{{end}}">
|
|
|
|
<label for="interval">{{.locale.Tr "repo.mirror_interval" .MinimumMirrorInterval}}</label>
|
|
|
|
<label for="interval">{{.locale.Tr "repo.mirror_interval" .MinimumMirrorInterval}}</label>
|
|
|
|
<input id="interval" name="interval" value="{{.MirrorInterval}}">
|
|
|
|
<input id="interval" name="interval" value="{{.PullMirror.Interval}}">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{$address := MirrorRemoteAddress $.Context .Repository .Mirror.GetRemoteName false}}
|
|
|
|
{{$address := MirrorRemoteAddress $.Context .Repository .PullMirror.GetRemoteName false}}
|
|
|
|
<div class="field {{if .Err_MirrorAddress}}error{{end}}">
|
|
|
|
<div class="field {{if .Err_MirrorAddress}}error{{end}}">
|
|
|
|
<label for="mirror_address">{{.locale.Tr "repo.mirror_address"}}</label>
|
|
|
|
<label for="mirror_address">{{.locale.Tr "repo.mirror_address"}}</label>
|
|
|
|
<input id="mirror_address" name="mirror_address" value="{{$address.Address}}" required>
|
|
|
|
<input id="mirror_address" name="mirror_address" value="{{$address.Address}}" required>
|
|
|
|
@ -142,13 +151,13 @@
|
|
|
|
<div class="inline field">
|
|
|
|
<div class="inline field">
|
|
|
|
<label>{{.locale.Tr "repo.mirror_lfs"}}</label>
|
|
|
|
<label>{{.locale.Tr "repo.mirror_lfs"}}</label>
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<div class="ui checkbox">
|
|
|
|
<input id="mirror_lfs" name="mirror_lfs" type="checkbox" {{if .Mirror.LFS}}checked{{end}}>
|
|
|
|
<input id="mirror_lfs" name="mirror_lfs" type="checkbox" {{if .PullMirror.LFS}}checked{{end}}>
|
|
|
|
<label>{{.locale.Tr "repo.mirror_lfs_desc"}}</label>
|
|
|
|
<label>{{.locale.Tr "repo.mirror_lfs_desc"}}</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="field {{if .Err_LFSEndpoint}}error{{end}}">
|
|
|
|
<div class="field {{if .Err_LFSEndpoint}}error{{end}}">
|
|
|
|
<label for="mirror_lfs_endpoint">{{.locale.Tr "repo.mirror_lfs_endpoint"}}</label>
|
|
|
|
<label for="mirror_lfs_endpoint">{{.locale.Tr "repo.mirror_lfs_endpoint"}}</label>
|
|
|
|
<input id="mirror_lfs_endpoint" name="mirror_lfs_endpoint" value="{{.Mirror.LFSEndpoint}}" placeholder="{{.locale.Tr "repo.migrate_options_lfs_endpoint.placeholder"}}">
|
|
|
|
<input id="mirror_lfs_endpoint" name="mirror_lfs_endpoint" value="{{.PullMirror.LFSEndpoint}}" placeholder="{{.locale.Tr "repo.migrate_options_lfs_endpoint.placeholder"}}">
|
|
|
|
<p class="help">{{.locale.Tr "repo.mirror_lfs_endpoint_desc" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery" | Str2html}}</p>
|
|
|
|
<p class="help">{{.locale.Tr "repo.mirror_lfs_endpoint_desc" "https://github.com/git-lfs/git-lfs/blob/main/docs/api/server-discovery.md#server-discovery" | Str2html}}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
|
|
|
@ -160,7 +169,7 @@
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</tbody>
|
|
|
|
<thead><tr><th colspan="4"></th></tr></thead>
|
|
|
|
<thead><tr><th colspan="4"></th></tr></thead>
|
|
|
|
{{end}}
|
|
|
|
{{end}}{{/* end if: IsMirror */}}
|
|
|
|
<tbody>
|
|
|
|
<tbody>
|
|
|
|
{{range .PushMirrors}}
|
|
|
|
{{range .PushMirrors}}
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
|