mirror of https://github.com/gogs/gogs.git
template: improve admin config page
parent
344b784d69
commit
18e45aab98
conf
locale
internal
assets
conf
route/admin
templates/admin
|
@ -53,6 +53,7 @@ All notable changes to Gogs are documented in this file.
|
|||
- Configuration option `[repository] PULL_REQUEST_QUEUE_LENGTH`
|
||||
- Configuration option `[session] ENABLE_SET_COOKIE`
|
||||
- Configuration option `[release.attachment] PATH`
|
||||
- Configuration option `[webhook] QUEUE_LENGTH`
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -325,8 +325,6 @@ DISABLE_REGULAR_ORG_CREATION = false
|
|||
[webhook]
|
||||
; Types are enabled for users to use, can be "gogs", "slack", "discord", "dingtalk"
|
||||
TYPES = gogs, slack, discord, dingtalk
|
||||
; Hook task queue length, increase if webhook shooting starts hanging
|
||||
QUEUE_LENGTH = 1000
|
||||
; Deliver timeout in seconds
|
||||
DELIVER_TIMEOUT = 15
|
||||
; Allow insecure certification
|
||||
|
|
|
@ -1284,34 +1284,48 @@ config.cache.host = Host
|
|||
config.http_config = HTTP configuration
|
||||
config.http.access_control_allow_origin = Access control allow origin
|
||||
|
||||
config.log_file_root_path = Log File Root Path
|
||||
config.attachment_config = Attachment configuration
|
||||
config.attachment.enabled = Enabled
|
||||
config.attachment.path = Path
|
||||
config.attachment.allowed_types = Allowed types
|
||||
config.attachment.max_size = Size limit
|
||||
config.attachment.max_files = Files limit
|
||||
|
||||
config.webhook_config = Webhook Configuration
|
||||
config.queue_length = Queue Length
|
||||
config.deliver_timeout = Deliver Timeout
|
||||
config.skip_tls_verify = Skip TLS Verify
|
||||
config.release_config = Release configuration
|
||||
config.release.attachment.enabled = Attachment enabled
|
||||
config.release.attachment.allowed_types = Attachment allowed types
|
||||
config.release.attachment.max_size = Attachment size limit
|
||||
config.release.attachment.max_files = Attachment files limit
|
||||
|
||||
config.oauth_config = OAuth Configuration
|
||||
config.oauth_enabled = Enabled
|
||||
config.picture_config = Picture configuration
|
||||
config.picture.avatar_upload_path = User avatar upload path
|
||||
config.picture.repo_avatar_upload_path = Repository avatar upload path
|
||||
config.picture.gravatar_source = Gravatar source
|
||||
config.picture.disable_gravatar = Disable Gravatar
|
||||
config.picture.enable_federated_avatar = Enable federated avatars
|
||||
|
||||
config.picture_config = Picture Configuration
|
||||
config.picture_service = Picture Service
|
||||
config.disable_gravatar = Disable Gravatar
|
||||
config.enable_federated_avatar = Enable Federated Avatars
|
||||
config.mirror_config = Mirror configuration
|
||||
config.mirror.default_interval = Default interval
|
||||
|
||||
config.git_config = Git Configuration
|
||||
config.git_disable_diff_highlight = Disable Diff Syntax Highlight
|
||||
config.git_max_diff_lines = Max Diff Lines (for a single file)
|
||||
config.git_max_diff_line_characters = Max Diff Characters (for a single line)
|
||||
config.git_max_diff_files = Max Diff Files (to be shown)
|
||||
config.git_gc_args = GC Arguments
|
||||
config.git_migrate_timeout = Migration Timeout
|
||||
config.git_mirror_timeout = Mirror Update Timeout
|
||||
config.git_clone_timeout = Clone Operation Timeout
|
||||
config.git_pull_timeout = Pull Operation Timeout
|
||||
config.git_gc_timeout = GC Operation Timeout
|
||||
config.webhook_config = Webhook configuration
|
||||
config.webhook.types = Types
|
||||
config.webhook.deliver_timeout = Deliver timeout
|
||||
config.webhook.skip_tls_verify = Skip TLS verify
|
||||
|
||||
config.log_config = Log Configuration
|
||||
config.git_config = Git configuration
|
||||
config.git.disable_diff_highlight = Disable diff syntax highlight
|
||||
config.git.max_diff_lines = Diff lines limit (for a single file)
|
||||
config.git.max_diff_line_characters = Diff characters limit (for a single line)
|
||||
config.git.max_diff_files = Diff files limit (for a single diff)
|
||||
config.git.gc_args = GC arguments
|
||||
config.git.migrate_timeout = Migration timeout
|
||||
config.git.mirror_timeout = Mirror fetch timeout
|
||||
config.git.clone_timeout = Clone timeout
|
||||
config.git.pull_timeout = Pull timeout
|
||||
config.git.gc_timeout = GC timeout
|
||||
|
||||
config.log_config = Log configuration
|
||||
config.log_file_root_path = Log file root path
|
||||
config.log_mode = Mode
|
||||
config.log_options = Options
|
||||
|
||||
|
@ -1383,6 +1397,7 @@ months = %d months %s
|
|||
years = %d years %s
|
||||
raw_seconds = seconds
|
||||
raw_minutes = minutes
|
||||
raw_hours = hours
|
||||
|
||||
[dropzone]
|
||||
default_message = Drop files here or click to upload.
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -293,7 +293,6 @@ var (
|
|||
// Webhook settings
|
||||
Webhook struct {
|
||||
Types []string
|
||||
QueueLength int
|
||||
DeliverTimeout int
|
||||
SkipTLSVerify bool `ini:"SKIP_TLS_VERIFY"`
|
||||
PagingNum int
|
||||
|
|
|
@ -27,7 +27,7 @@ import (
|
|||
"gogs.io/gogs/internal/sync"
|
||||
)
|
||||
|
||||
var HookQueue = sync.NewUniqueQueue(conf.Webhook.QueueLength)
|
||||
var HookQueue = sync.NewUniqueQueue(1000)
|
||||
|
||||
type HookContentType int
|
||||
|
||||
|
|
|
@ -207,16 +207,11 @@ func Config(c *context.Context) {
|
|||
c.Data["User"] = conf.User
|
||||
c.Data["Session"] = conf.Session
|
||||
c.Data["Cache"] = conf.Cache
|
||||
c.Data["HTTP"] = conf.HTTP
|
||||
|
||||
// TODO
|
||||
c.Data["Attachment"] = conf.Attachment
|
||||
c.Data["Release"] = conf.Release
|
||||
c.Data["Time"] = conf.Time
|
||||
c.Data["Picture"] = conf.Picture
|
||||
c.Data["HTTP"] = conf.HTTP
|
||||
c.Data["Mirror"] = conf.Mirror
|
||||
|
||||
// ???
|
||||
c.Data["Webhook"] = conf.Webhook
|
||||
c.Data["Git"] = conf.Git
|
||||
|
||||
|
|
|
@ -351,6 +351,61 @@
|
|||
</dl>
|
||||
</div>
|
||||
|
||||
{{/* Attachment settings */}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.attachment_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.attachment.enabled"}}</dt>
|
||||
<dd><i class="fa fa{{if .Attachment.Enabled}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.attachment.path"}}</dt>
|
||||
<dd><code>{{.Attachment.Path}}</code></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.attachment.allowed_types"}}</dt>
|
||||
<dd><code>{{.Attachment.AllowedTypes}}</code></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.attachment.max_size"}}</dt>
|
||||
<dd>{{.Attachment.MaxSize}} MB</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.attachment.max_files"}}</dt>
|
||||
<dd>{{.Attachment.MaxFiles}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
{{/* Release settings */}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.release_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.release.attachment.enabled"}}</dt>
|
||||
<dd><i class="fa fa{{if .Release.Attachment.Enabled}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.release.attachment.allowed_types"}}</dt>
|
||||
<dd><code>{{.Release.Attachment.AllowedTypes}}</code></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.release.attachment.max_size"}}</dt>
|
||||
<dd>{{.Release.Attachment.MaxSize}} MB</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.release.attachment.max_files"}}</dt>
|
||||
<dd>{{.Release.Attachment.MaxFiles}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
{{/* Picture settings */}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.picture_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.picture.avatar_upload_path"}}</dt>
|
||||
<dd><code>{{.Picture.AvatarUploadPath}}</code></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.picture.repo_avatar_upload_path"}}</dt>
|
||||
<dd><code>{{.Picture.RepositoryAvatarUploadPath}}</code></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.picture.gravatar_source"}}</dt>
|
||||
<dd><code>{{.Picture.GravatarSource}}</code></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.picture.disable_gravatar"}}</dt>
|
||||
<dd><i class="fa fa{{if .Picture.DisableGravatar}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.picture.enable_federated_avatar"}}</dt>
|
||||
<dd><i class="fa fa{{if .Picture.EnableFederatedAvatar}}-check{{end}}-square-o"></i></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
{{/* HTTP settings */}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.http_config"}}
|
||||
|
@ -368,58 +423,60 @@
|
|||
</dl>
|
||||
</div>
|
||||
|
||||
{{/* Mirror settings */}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.mirror_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.mirror.default_interval"}}</dt>
|
||||
<dd>{{.Mirror.DefaultInterval}} {{.i18n.Tr "tool.raw_hours"}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
{{/* Webhook settings */}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.webhook_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.queue_length"}}</dt>
|
||||
<dd>{{.Webhook.QueueLength}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
|
||||
<dt>{{.i18n.Tr "admin.config.webhook.types"}}</dt>
|
||||
<dd><code>{{.Webhook.Types}}</code></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.webhook.deliver_timeout"}}</dt>
|
||||
<dd>{{.Webhook.DeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.skip_tls_verify"}}</dt>
|
||||
<dt>{{.i18n.Tr "admin.config.webhook.skip_tls_verify"}}</dt>
|
||||
<dd><i class="fa fa{{if .Webhook.SkipTLSVerify}}-check{{end}}-square-o"></i></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.picture_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
|
||||
<dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.config.enable_federated_avatar"}}</dt>
|
||||
<dd><i class="fa fa{{if .EnableFederatedAvatar}}-check{{end}}-square-o"></i></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
{{/* Git settings */}}
|
||||
<h4 class="ui top attached header">
|
||||
{{.i18n.Tr "admin.config.git_config"}}
|
||||
</h4>
|
||||
<div class="ui attached table segment">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.config.git_disable_diff_highlight"}}</dt>
|
||||
<dt>{{.i18n.Tr "admin.config.git.disable_diff_highlight"}}</dt>
|
||||
<dd><i class="fa fa{{if .Git.DisableDiffHighlight}}-check{{end}}-square-o"></i></dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_max_diff_lines"}}</dt>
|
||||
<dt>{{.i18n.Tr "admin.config.git.max_diff_lines"}}</dt>
|
||||
<dd>{{.Git.MaxGitDiffLines}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_max_diff_line_characters"}}</dt>
|
||||
<dt>{{.i18n.Tr "admin.config.git.max_diff_line_characters"}}</dt>
|
||||
<dd>{{.Git.MaxGitDiffLineCharacters}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_max_diff_files"}}</dt>
|
||||
<dt>{{.i18n.Tr "admin.config.git.max_diff_files"}}</dt>
|
||||
<dd>{{.Git.MaxGitDiffFiles}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_gc_args"}}</dt>
|
||||
<dt>{{.i18n.Tr "admin.config.git.gc_args"}}</dt>
|
||||
<dd><code>{{.Git.GCArgs}}</code></dd>
|
||||
|
||||
<div class="ui divider"></div>
|
||||
<dt>{{.i18n.Tr "admin.config.git_migrate_timeout"}}</dt>
|
||||
|
||||
<dt>{{.i18n.Tr "admin.config.git.migrate_timeout"}}</dt>
|
||||
<dd>{{.Git.Timeout.Migrate}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_mirror_timeout"}}</dt>
|
||||
<dt>{{.i18n.Tr "admin.config.git.mirror_timeout"}}</dt>
|
||||
<dd>{{.Git.Timeout.Mirror}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_clone_timeout"}}</dt>
|
||||
<dt>{{.i18n.Tr "admin.config.git.clone_timeout"}}</dt>
|
||||
<dd>{{.Git.Timeout.Clone}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_pull_timeout"}}</dt>
|
||||
<dt>{{.i18n.Tr "admin.config.git.pull_timeout"}}</dt>
|
||||
<dd>{{.Git.Timeout.Pull}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.config.git_gc_timeout"}}</dt>
|
||||
<dt>{{.i18n.Tr "admin.config.git.gc_timeout"}}</dt>
|
||||
<dd>{{.Git.Timeout.GC}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue