From 1e8a6164262bafd6878269b153c43686977c4603 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 17 Jun 2019 02:24:49 +0800 Subject: [PATCH] show lfs config on admin panel (#7220) --- options/locale/locale_en-US.ini | 5 +++++ routers/admin/admin.go | 1 + templates/admin/config.tmpl | 16 ++++++++++++++++ 3 files changed, 22 insertions(+) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 71c76fd9b6..97e4e3f91c 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1722,6 +1722,11 @@ config.ssh_keygen_path = Keygen ('ssh-keygen') Path config.ssh_minimum_key_size_check = Minimum Key Size Check config.ssh_minimum_key_sizes = Minimum Key Sizes +config.lfs_config = LFS Configuration +config.lfs_enabled = Enabled +config.lfs_content_path = LFS Content Path +config.lfs_http_auth_expiry = LFS HTTP Auth Expiry + config.db_config = Database Configuration config.db_type = Type config.db_host = Host diff --git a/routers/admin/admin.go b/routers/admin/admin.go index b4eac2c677..2836b7ddc7 100644 --- a/routers/admin/admin.go +++ b/routers/admin/admin.go @@ -225,6 +225,7 @@ func Config(ctx *context.Context) { ctx.Data["ReverseProxyAuthEmail"] = setting.ReverseProxyAuthEmail ctx.Data["SSH"] = setting.SSH + ctx.Data["LFS"] = setting.LFS ctx.Data["Service"] = setting.Service ctx.Data["DbCfg"] = models.DbCfg diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 7a81eb2668..b8bf1ec028 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -96,6 +96,22 @@ +

+ {{.i18n.Tr "admin.config.lfs_config"}} +

+
+
+
{{.i18n.Tr "admin.config.lfs_enabled"}}
+
+ {{if .LFS.StartServer}} +
{{.i18n.Tr "admin.config.lfs_content_path"}}
+
{{.LFS.ContentPath}}
+
{{.i18n.Tr "admin.config.lfs_http_auth_expiry"}}
+
{{.LFS.HTTPAuthExpiry}}
+ {{end}} +
+
+

{{.i18n.Tr "admin.config.db_config"}}