mirror of
https://github.com/gogs/gogs.git
synced 2025-05-29 02:33:41 +00:00
admin/config: add UI for [http] section (#3987)
This commit is contained in:
parent
221aa8968a
commit
e1e76d3f88
@ -1139,6 +1139,7 @@ auths.still_in_used = This authentication is still used by some users, please de
|
||||
auths.deletion_success = Authentication has been deleted successfully!
|
||||
auths.login_source_exist = Login source '%s' already exists.
|
||||
|
||||
config.not_set = (not set)
|
||||
config.server_config = Server Configuration
|
||||
config.app_name = Application Name
|
||||
config.app_ver = Application Version
|
||||
@ -1175,6 +1176,9 @@ config.disable_http_git = Disable HTTP Git
|
||||
config.enable_local_path_migration = Enable Local Path Migration
|
||||
config.commits_fetch_concurrency = Commits Fetch Concurrency
|
||||
|
||||
config.http_config = HTTP Configuration
|
||||
config.http_access_control_allow_origin = Access Control Allow Origin
|
||||
|
||||
config.db_config = Database Configuration
|
||||
config.db_type = Type
|
||||
config.db_host = Host
|
||||
|
File diff suppressed because one or more lines are too long
@ -3127,6 +3127,9 @@ footer .ui.language .menu {
|
||||
background-color: #f7f7f7;
|
||||
padding: 5px;
|
||||
}
|
||||
.admin.config code {
|
||||
color: #db2828;
|
||||
}
|
||||
.admin.config .log-config table tbody tr td:first-child {
|
||||
width: 100px;
|
||||
}
|
||||
|
@ -65,6 +65,9 @@
|
||||
background-color: #f7f7f7;
|
||||
padding: 5px;
|
||||
}
|
||||
code {
|
||||
color: #db2828;
|
||||
}
|
||||
.log-config {
|
||||
table tbody tr td {
|
||||
&:first-child {
|
||||
|
@ -208,9 +208,10 @@ func Config(c *context.Context) {
|
||||
c.Data["RepoRootPath"] = setting.RepoRootPath
|
||||
c.Data["ScriptType"] = setting.ScriptType
|
||||
c.Data["Repository"] = setting.Repository
|
||||
c.Data["HTTP"] = setting.HTTP
|
||||
|
||||
c.Data["Service"] = setting.Service
|
||||
c.Data["DbCfg"] = models.DbCfg
|
||||
c.Data["Service"] = setting.Service
|
||||
c.Data["Webhook"] = setting.Webhook
|
||||
|
||||
c.Data["MailerEnabled"] = false
|
||||
|
@ -33,11 +33,11 @@
|
||||
<div class="ui divider"></div>
|
||||
|
||||
<dt>{{.i18n.Tr "admin.config.static_file_root_path"}}</dt>
|
||||
<dd>{{.StaticRootPath}}</dd>
|
||||
<dd><code>{{.StaticRootPath}}</code></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt>
|
||||
<dd>{{.LogRootPath}}</dd>
|
||||
<dd><code>{{.LogRootPath}}</code></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.reverse_auth_user"}}</dt>
|
||||
<dd>{{.ReverseProxyAuthUser}}</dd>
|
||||
<dd><code>{{.ReverseProxyAuthUser}}</code></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
@ -76,30 +76,49 @@
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<!-- Repository Configuration -->
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.repo_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.repo_root_path"}}</dt>
|
||||
<dd>{{.RepoRootPath}}</dd>
|
||||
<dd><code>{{.RepoRootPath}}</code></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.script_type"}}</dt>
|
||||
<dd><code>{{.ScriptType}}</code></dd>
|
||||
<dd>{{.ScriptType}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.repo_force_private"}}</dt>
|
||||
<dd><i class="fa fa{{if .Repository.ForcePrivate}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.max_creation_limit"}}</dt>
|
||||
<dd><code>{{.Repository.MaxCreationLimit}}</code></dd>
|
||||
<dd>{{.Repository.MaxCreationLimit}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.preferred_licenses"}}</dt>
|
||||
<dd><code>{{Join .Repository.PreferredLicenses ", "}}</code></dd>
|
||||
<dd>{{Join .Repository.PreferredLicenses ", "}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.disable_http_git"}}</dt>
|
||||
<dd><i class="fa fa{{if .Repository.DisableHTTPGit}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.enable_local_path_migration"}}</dt>
|
||||
<dd><i class="fa fa{{if .Repository.EnableLocalPathMigration}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.commits_fetch_concurrency"}}</dt>
|
||||
<dd><code>{{.Repository.CommitsFetchConcurrency}}</code></dd>
|
||||
<dd>{{.Repository.CommitsFetchConcurrency}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<!-- HTTP Configuration -->
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.http_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.http_access_control_allow_origin"}}</dt>
|
||||
<dd>
|
||||
{{if .HTTP.AccessControlAllowOrigin}}
|
||||
<code>{{.HTTP.AccessControlAllowOrigin}}</code>
|
||||
{{else}}
|
||||
<i>{{.i18n.Tr "admin.config.not_set"}}</i>
|
||||
{{end}}
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<!-- Database Configuration -->
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.db_config"}}
|
||||
</h4>
|
||||
|
Loading…
x
Reference in New Issue
Block a user