mirror of https://github.com/go-gitea/gitea.git
Finish all new admin pages.
This commit is contained in:
parent
66d51804c9
commit
9bc63bda7d
|
@ -5,7 +5,7 @@ Gogs(Go Git Service) is a painless self-hosted Git Service written in Go.
|
||||||
|
|
||||||
![Demo](http://gowalker.org/public/gogs_demo.gif)
|
![Demo](http://gowalker.org/public/gogs_demo.gif)
|
||||||
|
|
||||||
##### Current version: 0.4.8 Beta
|
##### Current version: 0.4.9 Beta
|
||||||
|
|
||||||
### NOTICES
|
### NOTICES
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ Gogs(Go Git Service) 是一个基于 Go 语言的自助 Git 服务。
|
||||||
|
|
||||||
![Demo](http://gowalker.org/public/gogs_demo.gif)
|
![Demo](http://gowalker.org/public/gogs_demo.gif)
|
||||||
|
|
||||||
##### 当前版本:0.4.8 Beta
|
##### 当前版本:0.4.9 Beta
|
||||||
|
|
||||||
## 开发目的
|
## 开发目的
|
||||||
|
|
||||||
|
|
|
@ -404,6 +404,80 @@ auths.update_success = Authorization setting has been successfully updated.
|
||||||
auths.update = Update Authorization Setting
|
auths.update = Update Authorization Setting
|
||||||
auths.delete = Delete This Authorization
|
auths.delete = Delete This Authorization
|
||||||
|
|
||||||
|
config.server_config = Server Configuration
|
||||||
|
config.app_name = Application Name
|
||||||
|
config.app_ver = Application Version
|
||||||
|
config.app_url = Application URL
|
||||||
|
config.domain = Domain
|
||||||
|
config.offline_mode = Offline Mode
|
||||||
|
config.disable_router_log = Disable Router Log
|
||||||
|
config.run_user = Run User
|
||||||
|
config.run_mode = Run Mode
|
||||||
|
config.repo_root_path = Repository Root Path
|
||||||
|
config.static_file_root_path = Static File Root Path
|
||||||
|
config.log_file_root_path = Log File Root Path
|
||||||
|
config.script_type = Script Type
|
||||||
|
config.reverse_auth_user = Reverse Authentication User
|
||||||
|
config.db_config = Database Configuration
|
||||||
|
config.db_type = Type
|
||||||
|
config.db_host = Host
|
||||||
|
config.db_name = Name
|
||||||
|
config.db_user = User
|
||||||
|
config.db_ssl_mode = SSL Mode
|
||||||
|
config.db_ssl_mode_helper = (for "postgres" only)
|
||||||
|
config.db_path = Path
|
||||||
|
config.db_path_helper = (for "sqlite3" only)
|
||||||
|
config.service_config = Service Configuration
|
||||||
|
config.register_email_confirm = Register Email Confirmation
|
||||||
|
config.disable_register = Disable Registration
|
||||||
|
config.require_sign_in_view = Require Sign In View
|
||||||
|
config.mail_notify = Mail Notification
|
||||||
|
config.enable_cache_avatar = Enable Cache Avatar
|
||||||
|
config.active_code_lives = Active Code Lives
|
||||||
|
config.reset_password_code_lives = Reset Password Code Lives
|
||||||
|
config.webhook_config = Webhook Configuration
|
||||||
|
config.task_interval = Task Interval
|
||||||
|
config.deliver_timeout = Deliver Timeout
|
||||||
|
config.mailer_config = Mailer Configuration
|
||||||
|
config.mailer_enabled = Enabled
|
||||||
|
config.mailer_name = Name
|
||||||
|
config.mailer_host = Host
|
||||||
|
config.mailer_user = User
|
||||||
|
config.oauth_config = OAuth Configuration
|
||||||
|
config.oauth_enabled = Enabled
|
||||||
|
config.cache_config = Cache Configuration
|
||||||
|
config.cache_adapter = Cache Adapter
|
||||||
|
config.cache_interval = Cache Interval
|
||||||
|
config.cache_conn = Cache Connection
|
||||||
|
config.session_config = Session Configuration
|
||||||
|
config.session_provider = Session Provider
|
||||||
|
config.provider_config = Provider Config
|
||||||
|
config.cookie_name = Cookie Name
|
||||||
|
config.enable_set_cookie = Enable Set Cookie
|
||||||
|
config.gc_interval_time = GC Interval Time
|
||||||
|
config.session_life_time = Session Life Time
|
||||||
|
config.https_only = HTTPS Only
|
||||||
|
config.cookie_life_time = Cookie Life Time
|
||||||
|
config.session_hash_function = Session ID Hash Function
|
||||||
|
config.session_hash_key = Session ID Hash Key
|
||||||
|
config.picture_config = Picture Configuration
|
||||||
|
config.picture_service = Picture Service
|
||||||
|
config.disable_gravatar = Disable Gravatar
|
||||||
|
config.log_config = Log Configuration
|
||||||
|
config.log_mode = Log Mode
|
||||||
|
config.log_config = Log Config
|
||||||
|
|
||||||
|
monitor.cron = Cron Tasks
|
||||||
|
monitor.name = Name
|
||||||
|
monitor.schedule = Schedule
|
||||||
|
monitor.next = Next Time
|
||||||
|
monitor.previous = Previous Time
|
||||||
|
monitor.execute_times = Execute Times
|
||||||
|
monitor.process = Running Processes
|
||||||
|
monitor.desc = Description
|
||||||
|
monitor.start = Start Time
|
||||||
|
monitor.execute_time = Execution Time
|
||||||
|
|
||||||
[action]
|
[action]
|
||||||
create_repo = created repository <a href="/%s">%s</a>
|
create_repo = created repository <a href="/%s">%s</a>
|
||||||
commit_repo = pushed to <a href="/%s/src/%s">%s</a> at <a href="/%s">%s</a>
|
commit_repo = pushed to <a href="/%s/src/%s">%s</a> at <a href="/%s">%s</a>
|
||||||
|
@ -428,6 +502,8 @@ days = %d days %s
|
||||||
weeks = %d weeks %s
|
weeks = %d weeks %s
|
||||||
months = %d months %s
|
months = %d months %s
|
||||||
years = %d years %s
|
years = %d years %s
|
||||||
|
raw_seconds = seconds
|
||||||
|
raw_minutes = minutes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -403,6 +403,80 @@ auths.update_success = 授权认证设置更新成功!
|
||||||
auths.update = 更新授权认证信息
|
auths.update = 更新授权认证信息
|
||||||
auths.delete = 删除该授权认证
|
auths.delete = 删除该授权认证
|
||||||
|
|
||||||
|
config.server_config = 服务器配置
|
||||||
|
config.app_name = 应用名称
|
||||||
|
config.app_ver = 应用版本
|
||||||
|
config.app_url = 应用 URL
|
||||||
|
config.domain = 应用域名
|
||||||
|
config.offline_mode = 离线模式
|
||||||
|
config.disable_router_log = 关闭路由日志
|
||||||
|
config.run_user = 运行用户
|
||||||
|
config.run_mode = 运行模式
|
||||||
|
config.repo_root_path = 仓库根目录
|
||||||
|
config.static_file_root_path = 静态文件根目录
|
||||||
|
config.log_file_root_path = 日志文件根目录
|
||||||
|
config.script_type = 脚本类型
|
||||||
|
config.reverse_auth_user = 反向代理认证
|
||||||
|
config.db_config = 数据库配置
|
||||||
|
config.db_type = 数据库类型
|
||||||
|
config.db_host = 主机地址
|
||||||
|
config.db_name = 数据库名称
|
||||||
|
config.db_user = 连接用户
|
||||||
|
config.db_ssl_mode = SSL 模式
|
||||||
|
config.db_ssl_mode_helper = (仅限 "postgres" 使用)
|
||||||
|
config.db_path = 数据库路径
|
||||||
|
config.db_path_helper = (仅限 "sqlite3" 使用)
|
||||||
|
config.service_config = 服务配置
|
||||||
|
config.register_email_confirm = 注册邮件确认
|
||||||
|
config.disable_register = 关闭注册功能
|
||||||
|
config.require_sign_in_view = 强制登录浏览
|
||||||
|
config.mail_notify = 邮件通知提醒
|
||||||
|
config.enable_cache_avatar = 开启缓存头像
|
||||||
|
config.active_code_lives = 激活用户链接有效期
|
||||||
|
config.reset_password_code_lives = 重置密码链接有效期
|
||||||
|
config.webhook_config = Web 钩子配置
|
||||||
|
config.task_interval = 任务周期
|
||||||
|
config.deliver_timeout = 推送超时
|
||||||
|
config.mailer_config = 邮件配置
|
||||||
|
config.mailer_enabled = 启用服务
|
||||||
|
config.mailer_name = 发送者名称
|
||||||
|
config.mailer_host = 邮件主机地址
|
||||||
|
config.mailer_user = 发送者帐号
|
||||||
|
config.oauth_config = 社交帐号配置
|
||||||
|
config.oauth_enabled = 启用服务
|
||||||
|
config.cache_config = Cache 配置
|
||||||
|
config.cache_adapter = Cache 适配器
|
||||||
|
config.cache_interval = Cache 周期
|
||||||
|
config.cache_conn = Cache 连接字符串
|
||||||
|
config.session_config = Session 配置
|
||||||
|
config.session_provider = Session 提供者
|
||||||
|
config.provider_config = 提供者配置
|
||||||
|
config.cookie_name = Cookie 名称
|
||||||
|
config.enable_set_cookie = 启用设置 Cookie
|
||||||
|
config.gc_interval_time = GC 周期
|
||||||
|
config.session_life_time = Session 生命周期
|
||||||
|
config.https_only = 仅限 HTTPS
|
||||||
|
config.cookie_life_time = Cookie 生命周期
|
||||||
|
config.session_hash_function = Session ID 哈希函数
|
||||||
|
config.session_hash_key = Session ID 哈希健值
|
||||||
|
config.picture_config = 图片配置
|
||||||
|
config.picture_service = 图片服务
|
||||||
|
config.disable_gravatar = 禁用 Gravatar 头像
|
||||||
|
config.log_config = 日志配置
|
||||||
|
config.log_mode = 日志模式
|
||||||
|
config.log_config = 日志配置
|
||||||
|
|
||||||
|
monitor.cron = Cron 任务
|
||||||
|
monitor.name = 任务名称
|
||||||
|
monitor.schedule = 任务安排
|
||||||
|
monitor.next = 下次执行时间
|
||||||
|
monitor.previous = 上次执行时间
|
||||||
|
monitor.execute_times = 执行次数
|
||||||
|
monitor.process = 运行中进程
|
||||||
|
monitor.desc = 进程描述
|
||||||
|
monitor.start = 开始时间
|
||||||
|
monitor.execute_time = 已执行时间
|
||||||
|
|
||||||
[action]
|
[action]
|
||||||
create_repo = 创建了仓库 <a href="/%s">%s</a>
|
create_repo = 创建了仓库 <a href="/%s">%s</a>
|
||||||
commit_repo = 推送了 <a href="/%s/src/%s">%s</a> 分支的代码到 <a href="/%s">%s</a>
|
commit_repo = 推送了 <a href="/%s/src/%s">%s</a> 分支的代码到 <a href="/%s">%s</a>
|
||||||
|
@ -427,6 +501,8 @@ days = %d 天%s
|
||||||
weeks = %d 周%s
|
weeks = %d 周%s
|
||||||
months = %d 月%s
|
months = %d 月%s
|
||||||
years = %d 年%s
|
years = %d 年%s
|
||||||
|
raw_seconds = 秒
|
||||||
|
raw_minutes = 分钟
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
2
gogs.go
2
gogs.go
|
@ -17,7 +17,7 @@ import (
|
||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.4.8.0829 Alpha"
|
const APP_VER = "0.4.9.0830 Alpha"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
|
|
@ -371,7 +371,7 @@ func newSessionService() {
|
||||||
SessionConfig.Maxlifetime = Cfg.MustInt64("session", "SESSION_LIFE_TIME", 86400)
|
SessionConfig.Maxlifetime = Cfg.MustInt64("session", "SESSION_LIFE_TIME", 86400)
|
||||||
SessionConfig.SessionIDHashFunc = Cfg.MustValueRange("session", "SESSION_ID_HASHFUNC",
|
SessionConfig.SessionIDHashFunc = Cfg.MustValueRange("session", "SESSION_ID_HASHFUNC",
|
||||||
"sha1", []string{"sha1", "sha256", "md5"})
|
"sha1", []string{"sha1", "sha256", "md5"})
|
||||||
SessionConfig.SessionIDHashKey = Cfg.MustValue("session", "SESSION_ID_HASHKEY")
|
SessionConfig.SessionIDHashKey = Cfg.MustValue("session", "SESSION_ID_HASHKEY", string(com.RandomCreateBytes(16)))
|
||||||
|
|
||||||
if SessionProvider == "file" {
|
if SessionProvider == "file" {
|
||||||
os.MkdirAll(path.Dir(SessionConfig.ProviderConfig), os.ModePerm)
|
os.MkdirAll(path.Dir(SessionConfig.ProviderConfig), os.ModePerm)
|
||||||
|
|
|
@ -22,10 +22,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
DASHBOARD base.TplName = "admin/dashboard"
|
DASHBOARD base.TplName = "admin/dashboard"
|
||||||
CONFIG base.TplName = "admin/config"
|
CONFIG base.TplName = "admin/config"
|
||||||
MONITOR_PROCESS base.TplName = "admin/monitor/process"
|
MONITOR base.TplName = "admin/monitor"
|
||||||
MONITOR_CRON base.TplName = "admin/monitor/cron"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -155,8 +154,9 @@ func Dashboard(ctx *middleware.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Config(ctx *middleware.Context) {
|
func Config(ctx *middleware.Context) {
|
||||||
ctx.Data["Title"] = "Server Configuration"
|
ctx.Data["Title"] = ctx.Tr("admin.users")
|
||||||
ctx.Data["PageIsConfig"] = true
|
ctx.Data["PageIsAdmin"] = true
|
||||||
|
ctx.Data["PageIsAdminConfig"] = true
|
||||||
|
|
||||||
ctx.Data["AppUrl"] = setting.AppUrl
|
ctx.Data["AppUrl"] = setting.AppUrl
|
||||||
ctx.Data["Domain"] = setting.Domain
|
ctx.Data["Domain"] = setting.Domain
|
||||||
|
@ -212,18 +212,10 @@ func Config(ctx *middleware.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Monitor(ctx *middleware.Context) {
|
func Monitor(ctx *middleware.Context) {
|
||||||
ctx.Data["Title"] = "Monitoring Center"
|
ctx.Data["Title"] = ctx.Tr("admin.monitor")
|
||||||
ctx.Data["PageIsMonitor"] = true
|
ctx.Data["PageIsAdmin"] = true
|
||||||
|
ctx.Data["PageIsAdminMonitor"] = true
|
||||||
tab := ctx.Query("tab")
|
ctx.Data["Processes"] = process.Processes
|
||||||
switch tab {
|
ctx.Data["Entries"] = cron.ListEntries()
|
||||||
case "process":
|
ctx.HTML(200, MONITOR)
|
||||||
ctx.Data["PageIsMonitorProcess"] = true
|
|
||||||
ctx.Data["Processes"] = process.Processes
|
|
||||||
ctx.HTML(200, MONITOR_PROCESS)
|
|
||||||
default:
|
|
||||||
ctx.Data["PageIsMonitorCron"] = true
|
|
||||||
ctx.Data["Entries"] = cron.ListEntries()
|
|
||||||
ctx.HTML(200, MONITOR_CRON)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.4.8.0829 Alpha
|
0.4.9.0830 Alpha
|
|
@ -1,232 +1,230 @@
|
||||||
{{template "base/head" .}}
|
{{template "ng/base/head" .}}
|
||||||
{{template "base/navbar" .}}
|
{{template "ng/base/header" .}}
|
||||||
<div id="body" class="container" data-page="admin">
|
<div id="admin-wrapper">
|
||||||
{{template "admin/nav" .}}
|
<div id="setting-wrapper" class="main-wrapper">
|
||||||
<div id="admin-container" class="col-md-10">
|
<div id="admin-setting" class="container clear">
|
||||||
<div class="panel panel-default">
|
{{template "admin/nav" .}}
|
||||||
<div class="panel-heading">
|
<div class="grid-4-5 left">
|
||||||
Server Configuration
|
<div class="setting-content">
|
||||||
</div>
|
{{template "ng/base/alert" .}}
|
||||||
|
<div id="setting-content">
|
||||||
<div class="panel-body">
|
<div class="panel panel-radius">
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<div class="panel-header">
|
||||||
<dt>Application Name</dt>
|
<strong>{{.i18n.Tr "admin.config.server_config"}}</strong>
|
||||||
<dd>{{AppName}}</dd>
|
</div>
|
||||||
<dt>Application Version</dt>
|
<div class="panel-body">
|
||||||
<dd>{{AppVer}}</dd>
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<dt>Application URL</dt>
|
<dt>{{.i18n.Tr "admin.config.app_name"}}</dt>
|
||||||
<dd>{{.AppUrl}}</dd>
|
<dd>{{AppName}}</dd>
|
||||||
<dt>Domain</dt>
|
<dt>{{.i18n.Tr "admin.config.app_ver"}}</dt>
|
||||||
<dd>{{.Domain}}</dd>
|
<dd>{{AppVer}}</dd>
|
||||||
<dt>Offline Mode</dt>
|
<dt>{{.i18n.Tr "admin.config.app_url"}}</dt>
|
||||||
<dd><i class="fa fa{{if .OfflineMode}}-check{{end}}-square-o"></i></dd>
|
<dd>{{.AppUrl}}</dd>
|
||||||
<dt>Disable Router Log</dt>
|
<dt>{{.i18n.Tr "admin.config.domain"}}</dt>
|
||||||
<dd><i class="fa fa{{if .DisableRouterLog}}-check{{end}}-square-o"></i></dd>
|
<dd>{{.Domain}}</dd>
|
||||||
<hr/>
|
<dt>{{.i18n.Tr "admin.config.offline_mode"}}</dt>
|
||||||
<dt>Run User</dt>
|
<dd><i class="fa fa{{if .OfflineMode}}-check{{end}}-square-o"></i></dd>
|
||||||
<dd>{{.RunUser}}</dd>
|
<dt>{{.i18n.Tr "admin.config.disable_router_log"}}</dt>
|
||||||
<dt>Run Mode</dt>
|
<dd><i class="fa fa{{if .DisableRouterLog}}-check{{end}}-square-o"></i></dd>
|
||||||
<dd>{{.RunMode}}</dd>
|
<hr/>
|
||||||
<hr/>
|
<dt>{{.i18n.Tr "admin.config.run_user"}}</dt>
|
||||||
<dt>Repository Root Path</dt>
|
<dd>{{.RunUser}}</dd>
|
||||||
<dd>{{.RepoRootPath}}</dd>
|
<dt>{{.i18n.Tr "admin.config.run_mode"}}</dt>
|
||||||
<dt>Static File Root Path</dt>
|
<dd>{{.RunMode}}</dd>
|
||||||
<dd>{{.StaticRootPath}}</dd>
|
<hr/>
|
||||||
<dt>Log File Root Path</dt>
|
<dt>{{.i18n.Tr "admin.config.repo_root_path"}}</dt>
|
||||||
<dd>{{.LogRootPath}}</dd>
|
<dd>{{.RepoRootPath}}</dd>
|
||||||
<dt>Script Type</dt>
|
<dt>{{.i18n.Tr "admin.config.static_file_root_path"}}</dt>
|
||||||
<dd>{{.ScriptType}}</dd>
|
<dd>{{.StaticRootPath}}</dd>
|
||||||
<dt>Reverse Authentication User</dt>
|
<dt>{{.i18n.Tr "admin.config.log_file_root_path"}}</dt>
|
||||||
<dd>{{.ReverseProxyAuthUser}}</dd>
|
<dd>{{.LogRootPath}}</dd>
|
||||||
</dl>
|
<dt>{{.i18n.Tr "admin.config.script_type"}}</dt>
|
||||||
</div>
|
<dd>{{.ScriptType}}</dd>
|
||||||
</div>
|
<dt>{{.i18n.Tr "admin.config.reverse_auth_user"}}</dt>
|
||||||
|
<dd>{{.ReverseProxyAuthUser}}</dd>
|
||||||
<div class="panel panel-default">
|
</dl>
|
||||||
<div class="panel-heading">
|
</div>
|
||||||
Database Configuration
|
</div>
|
||||||
</div>
|
<br>
|
||||||
|
<div class="panel panel-radius">
|
||||||
<div class="panel-body">
|
<div class="panel-header">
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<strong>{{.i18n.Tr "admin.config.db_config"}}</strong>
|
||||||
<dt>Type</dt>
|
</div>
|
||||||
<dd>{{.DbCfg.Type}}</dd>
|
<div class="panel-body">
|
||||||
<dt>Host</dt>
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<dd>{{.DbCfg.Host}}</dd>
|
<dt>{{.i18n.Tr "admin.config.db_type"}}</dt>
|
||||||
<dt>Name</dt>
|
<dd>{{.DbCfg.Type}}</dd>
|
||||||
<dd>{{.DbCfg.Name}}</dd>
|
<dt>{{.i18n.Tr "admin.config.db_host"}}</dt>
|
||||||
<dt>User</dt>
|
<dd>{{.DbCfg.Host}}</dd>
|
||||||
<dd>{{.DbCfg.User}}</dd>
|
<dt>{{.i18n.Tr "admin.config.db_name"}}</dt>
|
||||||
<dt>SslMode</dt>
|
<dd>{{.DbCfg.Name}}</dd>
|
||||||
<dd>{{.DbCfg.SslMode}} (for "postgres" only)</dd>
|
<dt>{{.i18n.Tr "admin.config.db_user"}}</dt>
|
||||||
<dt>Path</dt>
|
<dd>{{.DbCfg.User}}</dd>
|
||||||
<dd>{{.DbCfg.Path}} (for "sqlite3" only)</dd>
|
<dt>{{.i18n.Tr "admin.config.db_ssl_mode"}}</dt>
|
||||||
</dl>
|
<dd>{{.DbCfg.SslMode}} {{.i18n.Tr "admin.config.db_ssl_mode_helper"}}</dd>
|
||||||
</div>
|
<dt>{{.i18n.Tr "admin.config.db_path"}}</dt>
|
||||||
</div>
|
<dd>{{.DbCfg.Path}} {{.i18n.Tr "admin.config.db_path_helper"}}</dd>
|
||||||
|
</dl>
|
||||||
<div class="panel panel-default">
|
</div>
|
||||||
<div class="panel-heading">
|
</div>
|
||||||
Service Configuration
|
<br>
|
||||||
</div>
|
<div class="panel panel-radius">
|
||||||
|
<div class="panel-header">
|
||||||
<div class="panel-body">
|
<strong>{{.i18n.Tr "admin.config.service_config"}}</strong>
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
</div>
|
||||||
<dt>Register Email Confirmation</dt>
|
<div class="panel-body">
|
||||||
<dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<dt>Disable Registration</dt>
|
<dt>{{.i18n.Tr "admin.config.register_email_confirm"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>Require Sign In View</dt>
|
<dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>Mail Notification</dt>
|
<dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>Enable Cache Avatar</dt>
|
<dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Service.EnableCacheAvatar}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Service.EnableNotifyMail}}-check{{end}}-square-o"></i></dd>
|
||||||
<hr/>
|
<dt>{{.i18n.Tr "admin.config.enable_cache_avatar"}}</dt>
|
||||||
<dt>Active Code Lives</dt>
|
<dd><i class="fa fa{{if .Service.EnableCacheAvatar}}-check{{end}}-square-o"></i></dd>
|
||||||
<dd>{{.Service.ActiveCodeLives}} minutes</dd>
|
<hr/>
|
||||||
<dt>Reset Password Code Lives</dt>
|
<dt>{{.i18n.Tr "admin.config.active_code_lives"}}</dt>
|
||||||
<dd>{{.Service.ResetPwdCodeLives}} minutes</dd>
|
<dd>{{.Service.ActiveCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
|
||||||
</dl>
|
<dt>{{.i18n.Tr "admin.config.reset_password_code_lives"}}</dt>
|
||||||
</div>
|
<dd>{{.Service.ResetPwdCodeLives}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
|
||||||
</div>
|
</dl>
|
||||||
|
</div>
|
||||||
<div class="panel panel-default">
|
</div>
|
||||||
<div class="panel-heading">
|
<br>
|
||||||
Webhook Configuration
|
<div class="panel panel-radius">
|
||||||
</div>
|
<div class="panel-header">
|
||||||
|
<strong>{{.i18n.Tr "admin.config.webhook_config"}}</strong>
|
||||||
<div class="panel-body">
|
</div>
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<div class="panel-body">
|
||||||
<dt>Task Interval</dt>
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<dd>{{.WebhookTaskInterval}} minutes</dd>
|
<dt>{{.i18n.Tr "admin.config.task_interval"}}</dt>
|
||||||
<dt>Deliver Timeout</dt>
|
<dd>{{.WebhookTaskInterval}} {{.i18n.Tr "tool.raw_minutes"}}</dd>
|
||||||
<dd>{{.WebhookDeliverTimeout}} seconds</dd>
|
<dt>{{.i18n.Tr "admin.config.deliver_timeout"}}</dt>
|
||||||
</dl>
|
<dd>{{.WebhookDeliverTimeout}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||||
</div>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="panel panel-default">
|
<br>
|
||||||
<div class="panel-heading">
|
<div class="panel panel-radius">
|
||||||
Mailer Configuration
|
<div class="panel-header">
|
||||||
</div>
|
<strong>{{.i18n.Tr "admin.config.mailer_config"}}</strong>
|
||||||
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<dt>Enabled</dt>
|
<dt>{{.i18n.Tr "admin.config.mailer_enabled"}}</dt>
|
||||||
<dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
|
||||||
{{if .MailerEnabled}}<dt>Name</dt>
|
{{if .MailerEnabled}}<dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
|
||||||
<dd>{{.Mailer.Name}}</dd>
|
<dd>{{.Mailer.Name}}</dd>
|
||||||
<dt>Host</dt>
|
<dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
|
||||||
<dd>{{.Mailer.Host}}</dd>
|
<dd>{{.Mailer.Host}}</dd>
|
||||||
<dt>User</dt>
|
<dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>
|
||||||
<dd>{{.Mailer.User}}</dd>{{end}}
|
<dd>{{.Mailer.User}}</dd>{{end}}
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-radius">
|
||||||
<div class="panel-heading">
|
<div class="panel-header">
|
||||||
OAuth Configuration
|
<strong>{{.i18n.Tr "admin.config.oauth_config"}}</strong>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
<div class="panel-body">
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dt>{{.i18n.Tr "admin.config.oauth_enabled"}}</dt>
|
||||||
<dt>Enabled</dt>
|
<dd><i class="fa fa{{if .OauthEnabled}}-check{{end}}-square-o"></i></dd>
|
||||||
<dd><i class="fa fa{{if .OauthEnabled}}-check{{end}}-square-o"></i></dd>
|
{{if .OauthEnabled}}<dt>GitHub</dt>
|
||||||
{{if .OauthEnabled}}<dt>GitHub</dt>
|
<dd><i class="fa fa{{if .Oauther.GitHub}}-check{{end}}-square-o"></i></dd>
|
||||||
<dd><i class="fa fa{{if .Oauther.GitHub}}-check{{end}}-square-o"></i></dd>
|
<dt>Google</dt>
|
||||||
<dt>Google</dt>
|
<dd><i class="fa fa{{if .Oauther.Google}}-check{{end}}-square-o"></i></dd>
|
||||||
<dd><i class="fa fa{{if .Oauther.Google}}-check{{end}}-square-o"></i></dd>
|
<dt>腾讯 QQ</dt>
|
||||||
<dt>Tencent QQ</dt>
|
<dd><i class="fa fa{{if .Oauther.Tencent}}-check{{end}}-square-o"></i></dd>
|
||||||
<dd><i class="fa fa{{if .Oauther.Tencent}}-check{{end}}-square-o"></i></dd>
|
<dt>新浪微博</dt>
|
||||||
<dt>Weibo</dt>
|
<dd><i class="fa fa{{if .Oauther.Weibo}}-check{{end}}-square-o"></i></dd>
|
||||||
<dd><i class="fa fa{{if .Oauther.Weibo}}-check{{end}}-square-o"></i></dd>
|
{{end}}
|
||||||
{{end}}
|
</dl>
|
||||||
</dl>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<br>
|
||||||
|
<div class="panel panel-radius">
|
||||||
<div class="panel panel-default">
|
<div class="panel-header">
|
||||||
<div class="panel-heading">
|
<strong>{{.i18n.Tr "admin.config.cache_config"}}</strong>
|
||||||
Cache Configuration
|
</div>
|
||||||
</div>
|
<div class="panel-body">
|
||||||
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<div class="panel-body">
|
<dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dd>{{.CacheAdapter}}</dd>
|
||||||
<dt>Cache Adapter</dt>
|
<dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
|
||||||
<dd>{{.CacheAdapter}}</dd>
|
<dd>{{.CacheInternal}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||||
<dt>Cache Config</dt>
|
<dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
|
||||||
<dd><div style="padding-top: 5px;"><pre>{{.CacheConfig}}</pre></div></dd>
|
<dd><pre>{{.CacheConn}}</pre></dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br>
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-radius">
|
||||||
<div class="panel-heading">
|
<div class="panel-header">
|
||||||
Session Configuration
|
<strong>{{.i18n.Tr "admin.config.session_config"}}</strong>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
<div class="panel-body">
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dt>{{.i18n.Tr "admin.config.session_provider"}}</dt>
|
||||||
<dt>Session Provider</dt>
|
<dd>{{.SessionProvider}}</dd>
|
||||||
<dd>{{.SessionProvider}}</dd>
|
<dt>{{.i18n.Tr "admin.config.provider_config"}}</dt>
|
||||||
<dt>Cookie Name</dt>
|
<dd><pre>{{.SessionConfig.ProviderConfig}}</pre></dd>
|
||||||
<dd>{{.SessionConfig.CookieName}}</dd>
|
<dt>{{.i18n.Tr "admin.config.cookie_name"}}</dt>
|
||||||
<dt>Enable Set Cookie</dt>
|
<dd>{{.SessionConfig.CookieName}}</dd>
|
||||||
<dd><i class="fa fa{{if .SessionConfig.EnableSetCookie}}-check{{end}}-square-o"></i></dd>
|
<dt>{{.i18n.Tr "admin.config.enable_set_cookie"}}</dt>
|
||||||
<dt>GC Interval Time</dt>
|
<dd><i class="fa fa{{if .SessionConfig.EnableSetCookie}}-check{{end}}-square-o"></i></dd>
|
||||||
<dd>{{.SessionConfig.Gclifetime}} seconds</dd>
|
<dt>{{.i18n.Tr "admin.config.gc_interval_time"}}</dt>
|
||||||
<dt>Session Life Time</dt>
|
<dd>{{.SessionConfig.Gclifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||||
<dd>{{.SessionConfig.Maxlifetime}} seconds</dd>
|
<dt>{{.i18n.Tr "admin.config.session_life_time"}}</dt>
|
||||||
<dt>HTTPS Only</dt>
|
<dd>{{.SessionConfig.Maxlifetime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||||
<dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
|
<dt>{{.i18n.Tr "admin.config.https_only"}}</dt>
|
||||||
<dt>Cookie Life Time</dt>
|
<dd><i class="fa fa{{if .SessionConfig.Secure}}-check{{end}}-square-o"></i></dd>
|
||||||
<dd>{{.SessionConfig.CookieLifeTime}} seconds</dd>
|
<dt>{{.i18n.Tr "admin.config.cookie_life_time"}}</dt>
|
||||||
<dt>Session ID Hash Function</dt>
|
<dd>{{.SessionConfig.CookieLifeTime}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
|
||||||
<dd>{{.SessionConfig.SessionIDHashFunc}}</dd>
|
<dt>{{.i18n.Tr "admin.config.session_hash_function"}}</dt>
|
||||||
<dt>Session ID Hash Key</dt>
|
<dd>{{.SessionConfig.SessionIDHashFunc}}</dd>
|
||||||
<dd>{{.SessionConfig.SessionIDHashKey}}</dd>
|
<dt>{{.i18n.Tr "admin.config.session_hash_key"}}</dt>
|
||||||
<dt>Provider Config</dt>
|
<dd>{{.SessionConfig.SessionIDHashKey}}</dd>
|
||||||
<dd>{{.SessionConfig.ProviderConfig}}</dd>
|
</dl>
|
||||||
</dl>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<br>
|
||||||
|
<div class="panel panel-radius">
|
||||||
<div class="panel panel-default">
|
<div class="panel-header">
|
||||||
<div class="panel-heading">
|
<strong>{{.i18n.Tr "admin.config.picture_config"}}</strong>
|
||||||
Picture Configuration
|
</div>
|
||||||
</div>
|
<div class="panel-body">
|
||||||
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
<div class="panel-body">
|
<dt>{{.i18n.Tr "admin.config.picture_service"}}</dt>
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dd>{{.PictureService}}</dd>
|
||||||
<dt>Picture Service</dt>
|
<dt>{{.i18n.Tr "admin.config.disable_gravatar"}}</dt>
|
||||||
<dd>{{.PictureService}}</dd>
|
<dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>Disable Gravatar</dt>
|
</dl>
|
||||||
<dd><i class="fa fa{{if .DisableGravatar}}-check{{end}}-square-o"></i></dd>
|
</div>
|
||||||
</dl>
|
</div>
|
||||||
</div>
|
<br>
|
||||||
</div>
|
<div class="panel panel-radius">
|
||||||
|
<div class="panel-header">
|
||||||
<div class="panel panel-default">
|
<strong>{{.i18n.Tr "admin.config.log_config"}}</strong>
|
||||||
<div class="panel-heading">
|
</div>
|
||||||
Log Configuration
|
<div class="panel-body">
|
||||||
</div>
|
<dl class="dl-horizontal admin-dl-horizontal">
|
||||||
|
{{range .Loggers}}
|
||||||
<div class="panel-body">
|
<dt>{{$.i18n.Tr "admin.config.log_mode"}}</dt>
|
||||||
<dl class="dl-horizontal admin-dl-horizontal">
|
<dd>{{.Mode}}</dd>
|
||||||
{{range .Loggers}}
|
<dt>{{$.i18n.Tr "admin.config.log_config"}}</dt>
|
||||||
<dt>Log Mode</dt>
|
<dd><pre>{{.Config}}</pre></dd>
|
||||||
<dd>{{.Mode}}</dd>
|
{{end}}
|
||||||
<dt>Log Config</dt>
|
</dl>
|
||||||
<dd>
|
</div>
|
||||||
<div style="padding-top: 5px;"><pre>{{.Config}}</pre></div>
|
</div>
|
||||||
</dd>
|
</div>
|
||||||
{{end}}
|
</div>
|
||||||
</dl>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{template "base/footer" .}}
|
{{template "ng/base/footer" .}}
|
|
@ -0,0 +1,74 @@
|
||||||
|
{{template "ng/base/head" .}}
|
||||||
|
{{template "ng/base/header" .}}
|
||||||
|
<div id="admin-wrapper">
|
||||||
|
<div id="setting-wrapper" class="main-wrapper">
|
||||||
|
<div id="admin-setting" class="container clear">
|
||||||
|
{{template "admin/nav" .}}
|
||||||
|
<div class="grid-4-5 left">
|
||||||
|
<div class="setting-content">
|
||||||
|
{{template "ng/base/alert" .}}
|
||||||
|
<div id="setting-content">
|
||||||
|
<div class="panel panel-radius">
|
||||||
|
<div class="panel-header">
|
||||||
|
<strong>{{.i18n.Tr "admin.monitor.cron"}}</strong>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body admin-panel">
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>{{.i18n.Tr "admin.monitor.name"}}</th>
|
||||||
|
<th>{{.i18n.Tr "admin.monitor.schedule"}}</th>
|
||||||
|
<th>{{.i18n.Tr "admin.monitor.next"}}</th>
|
||||||
|
<th>{{.i18n.Tr "admin.monitor.previous"}}</th>
|
||||||
|
<th>{{.i18n.Tr "admin.monitor.execute_times"}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{{range .Entries}}
|
||||||
|
<tr>
|
||||||
|
<td>{{.Description}}</td>
|
||||||
|
<td>{{.Spec}}</td>
|
||||||
|
<td>{{.Next}}</td>
|
||||||
|
<td>{{.Prev}}</td>
|
||||||
|
<td>{{.ExecTimes}}</td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<br>
|
||||||
|
<div class="panel panel-radius">
|
||||||
|
<div class="panel-header">
|
||||||
|
<strong>{{.i18n.Tr "admin.monitor.process"}}</strong>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body admin-panel">
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Pid</th>
|
||||||
|
<th>{{.i18n.Tr "admin.monitor.desc"}}</th>
|
||||||
|
<th>{{.i18n.Tr "admin.monitor.start"}}</th>
|
||||||
|
<th>{{.i18n.Tr "admin.monitor.execute_time"}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{{range .Processes}}
|
||||||
|
<tr>
|
||||||
|
<td>{{.Pid}}</td>
|
||||||
|
<td>{{.Description}}</td>
|
||||||
|
<td>{{.Start}}</td>
|
||||||
|
<td>{{TimeSince .Start}}</td>
|
||||||
|
</tr>
|
||||||
|
{{end}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{template "ng/base/footer" .}}
|
|
@ -1,40 +0,0 @@
|
||||||
{{template "base/head" .}}
|
|
||||||
{{template "base/navbar" .}}
|
|
||||||
<div id="body" class="container" data-page="admin">
|
|
||||||
{{template "admin/nav" .}}
|
|
||||||
<div id="admin-container" class="col-md-10">
|
|
||||||
<ul class="nav nav-tabs">
|
|
||||||
<li{{if .PageIsMonitorCron}} class="active"{{end}}><a href="/admin/monitor">Cron Tasks</a></li>
|
|
||||||
<li{{if .PageIsMonitorProcess}} class="active"{{end}}><a href="/admin/monitor?tab=process">Processes</a></li>
|
|
||||||
</ul>
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-body">
|
|
||||||
{{if .PageIsMonitorCron}}
|
|
||||||
<table class="table table-striped">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Name</th>
|
|
||||||
<th>Schedule</th>
|
|
||||||
<th>Next Time</th>
|
|
||||||
<th>Previous Time</th>
|
|
||||||
<th>Execute Times</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{{range .Entries}}
|
|
||||||
<tr>
|
|
||||||
<td>{{.Description}}</td>
|
|
||||||
<td>{{.Spec}}</td>
|
|
||||||
<td>{{.Next}}</td>
|
|
||||||
<td>{{.Prev}}</td>
|
|
||||||
<td>{{.ExecTimes}}</td>
|
|
||||||
</tr>
|
|
||||||
{{end}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{template "base/footer" .}}
|
|
|
@ -1,38 +0,0 @@
|
||||||
{{template "base/head" .}}
|
|
||||||
{{template "base/navbar" .}}
|
|
||||||
<div id="body" class="container" data-page="admin">
|
|
||||||
{{template "admin/nav" .}}
|
|
||||||
<div id="admin-container" class="col-md-10">
|
|
||||||
<ul class="nav nav-tabs">
|
|
||||||
<li{{if .PageIsMonitorCron}} class="active"{{end}}><a href="/admin/monitor">Cron Tasks</a></li>
|
|
||||||
<li{{if .PageIsMonitorProcess}} class="active"{{end}}><a href="/admin/monitor?tab=process">Processes</a></li>
|
|
||||||
</ul>
|
|
||||||
<div class="panel panel-default">
|
|
||||||
<div class="panel-body">
|
|
||||||
{{if .PageIsMonitorProcess}}
|
|
||||||
<table class="table table-striped">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Pid</th>
|
|
||||||
<th>Description</th>
|
|
||||||
<th>Start Time</th>
|
|
||||||
<th>Execution Time</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{{range .Processes}}
|
|
||||||
<tr>
|
|
||||||
<td>{{.Pid}}</td>
|
|
||||||
<td>{{.Description}}</td>
|
|
||||||
<td>{{.Start}}</td>
|
|
||||||
<td>{{TimeSince .Start}}</td>
|
|
||||||
</tr>
|
|
||||||
{{end}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{template "base/footer" .}}
|
|
Loading…
Reference in New Issue