Clean up AppURL, remove legacy origin-url webcomponent (#37090)
1. `origin-url` was introduced in the past when there was no good
framework support to detect current host url
* It is not needed anymore
* Removing it makes the code clearer
2. Separate template helper functions for different templates (web
page/mail)
3. The "AppURL" info is removed from admin config page: it doesn't
really help.
* We already have various app url checks at many places
This commit is contained in:
@@ -11,19 +11,19 @@
|
||||
# {{ctx.Locale.Tr "packages.rpm.distros.redhat"}}
|
||||
{{- range $group := .Groups}}
|
||||
{{- if $group}}{{$group = print "/" $group}}{{end}}
|
||||
dnf config-manager --add-repo <origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/rpm{{$group}}.repo"></origin-url>
|
||||
dnf config-manager --add-repo {{ctx.AppFullLink}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/rpm{{$group}}.repo
|
||||
{{- end}}
|
||||
|
||||
# Fedora 41+ (DNF5)
|
||||
{{- range $group := .Groups}}
|
||||
{{- if $group}}{{$group = print "/" $group}}{{end}}
|
||||
dnf config-manager addrepo --from-repofile=<origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/rpm{{$group}}.repo"></origin-url>
|
||||
dnf config-manager addrepo --from-repofile={{ctx.AppFullLink}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/rpm{{$group}}.repo
|
||||
{{- end}}
|
||||
|
||||
# {{ctx.Locale.Tr "packages.rpm.distros.suse"}}
|
||||
{{- range $group := .Groups}}
|
||||
{{- if $group}}{{$group = print "/" $group}}{{end}}
|
||||
zypper addrepo <origin-url data-url="{{AppSubUrl}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/rpm{{$group}}.repo"></origin-url>
|
||||
zypper addrepo {{ctx.AppFullLink}}/api/packages/{{$.PackageDescriptor.Owner.Name}}/rpm{{$group}}.repo
|
||||
{{- end}}</code></pre></div>
|
||||
</div>
|
||||
<div class="field">
|
||||
|
||||
Reference in New Issue
Block a user