diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2023-09-16 18:03:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-16 16:03:02 +0000 |
commit | c766140dad3408048ad843d0e7b4ab5d9f5777c6 (patch) | |
tree | 49cd37606ae0cb252cd16264c111c3cf5b00088d /templates/repo/settings/options.tmpl | |
parent | 5e039b05801a2ceeb29b23c657110af02834b57e (diff) | |
download | gitea-c766140dad3408048ad843d0e7b4ab5d9f5777c6.tar.gz gitea-c766140dad3408048ad843d0e7b4ab5d9f5777c6.zip |
Add `RemoteAddress` to mirrors (#26952)
This PR adds a new field `RemoteAddress` to both mirror types which
contains the sanitized remote address for easier (database) access to
that information. Will be used in the audit PR if merged.
Diffstat (limited to 'templates/repo/settings/options.tmpl')
-rw-r--r-- | templates/repo/settings/options.tmpl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 16944506f1..78700e05b7 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -123,7 +123,7 @@ {{else if $isWorkingPullMirror}} <tbody> <tr> - <td>{{(MirrorRemoteAddress $.Context .Repository .PullMirror.GetRemoteName false).Address}}</td> + <td>{{.PullMirror.RemoteAddress}}</td> <td>{{$.locale.Tr "repo.settings.mirror_settings.direction.pull"}}</td> <td>{{DateTime "full" .PullMirror.UpdatedUnix}}</td> <td class="right aligned"> @@ -200,8 +200,7 @@ <tbody> {{range .PushMirrors}} <tr> - {{$address := MirrorRemoteAddress $.Context $.Repository .GetRemoteName true}} - <td class="gt-word-break">{{$address.Address}}</td> + <td class="gt-word-break">{{.RemoteAddress}}</td> <td>{{$.locale.Tr "repo.settings.mirror_settings.direction.push"}}</td> <td>{{if .LastUpdateUnix}}{{DateTime "full" .LastUpdateUnix}}{{else}}{{$.locale.Tr "never"}}{{end}} {{if .LastError}}<div class="ui red label" data-tooltip-content="{{.LastError}}">{{$.locale.Tr "error"}}</div>{{end}}</td> <td class="right aligned"> @@ -211,7 +210,7 @@ data-tooltip-content="{{$.locale.Tr "repo.settings.mirror_settings.push_mirror.edit_sync_time"}}" data-modal-push-mirror-edit-id="{{.ID}}" data-modal-push-mirror-edit-interval="{{.Interval}}" - data-modal-push-mirror-edit-address="{{$address.Address}}" + data-modal-push-mirror-edit-address="{{.RemoteAddress}}" > {{svg "octicon-pencil" 14}} </button> |