From 1aec1a2ddae3a3714d6a167d85fcc1c69413b660 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 28 Aug 2014 22:29:00 +0800 Subject: [PATCH] Finish new admin dashboard --- conf/locale/locale_en-US.ini | 48 ++++++ conf/locale/locale_zh-CN.ini | 48 ++++++ models/models.go | 21 ++- models/org.go | 6 + models/user.go | 18 +-- public/ng/css/gogs.css | 42 +++++ public/ng/css/ui.css | 4 +- public/ng/less/gogs.less | 3 +- public/ng/less/gogs/admin.less | 23 +++ public/ng/less/gogs/base.less | 18 +++ public/ng/less/gogs/settings.less | 2 +- public/ng/less/ui/panel.less | 3 +- public/ng/less/ui/reset.less | 6 +- routers/admin/admin.go | 5 +- templates/admin/dashboard.tmpl | 232 ++++++++++++++------------- templates/admin/nav.tmpl | 22 +-- templates/base/navbar.tmpl | 22 +-- templates/ng/base/header.tmpl | 2 +- templates/repo/settings/options.tmpl | 2 +- 19 files changed, 360 insertions(+), 167 deletions(-) create mode 100644 public/ng/less/gogs/admin.less diff --git a/conf/locale/locale_en-US.ini b/conf/locale/locale_en-US.ini index e7ceb663d5..7882fedde8 100644 --- a/conf/locale/locale_en-US.ini +++ b/conf/locale/locale_en-US.ini @@ -292,6 +292,54 @@ teams.repositories = Team Repositories teams.add_team_repository = Add Team Repository teams.remove_repo = Remove +[admin] +dashboard = Dashboard +users = Users +organizations = Organizations +repositories = Repositories +authentication = Authentications +config = Configuration +monitor = Monitoring + +dashboard.statistic = Statistic +dashboard.operations = Operations +dashboard.system_status = System Monitor Status +dashboard.statistic_info = Gogs database has %d users, %d organizations, %d public keys, %d repositories, %d watches, %d stars, %d actions, %d accesses, %d issues, %d comments, %d social accounts, %d follows, %d mirrors, %d releases, %d login sources, %d webhooks, %d milestones, %d labels, %d hook tasks, %d teams, %d update tasks, %d attachments. +dashboard.operation_name = Operation Name +dashboard.operation_switch = Switch +dashboard.operation_run = Run +dashboard.clean_unbind_oauth = Clean unbound OAuthes +dashboard.delete_inactivate_accounts = Delete all inactivate accounts +dashboard.server_uptime = Server Uptime +dashboard.current_goroutine = Current Goroutines +dashboard.current_memory_usage = Current Memory Usage +dashboard.total_memory_allocated = Total Memory Allocated +dashboard.memory_obtained = Memory Obtained +dashboard.pointer_lookup_times = Pointer Lookup Times +dashboard.memory_allocate_times = Memory Allocate Times +dashboard.memory_free_times = Memory Free Times +dashboard.current_heap_usage = Current Heap Usage +dashboard.heap_memory_obtained = Heap Memory Obtained +dashboard.heap_memory_idle = Heap Memory Idle +dashboard.heap_memory_in_use = Heap Memory In Use +dashboard.heap_memory_released = Heap Memory Released +dashboard.heap_objects = Heap Objects +dashboard.bootstrap_stack_usage = Bootstrap Stack Usage +dashboard.stack_memory_obtained = Stack Memory Obtained +dashboard.mspan_structures_usage = MSpan Structures Usage +dashboard.mspan_structures_obtained = MSpan Structures Obtained +dashboard.mcache_structures_usage = MCache Structures Usage +dashboard.mcache_structures_obtained = MCache Structures Obtained +dashboard.profiling_bucket_hash_table_obtained = Profiling Bucket Hash Table Obtained +dashboard.gc_metadata_obtained = GC Metadada Obtained +dashboard.other_system_allocation_obtained = Other System Allocation Obtained +dashboard.next_gc_recycle = Next GC Recycle +dashboard.last_gc_time = Since Last GC Time +dashboard.total_gc_time = Total GC Pause +dashboard.total_gc_pause = Total GC Pause +dashboard.last_gc_pause = Last GC Pause +dashboard.gc_times = GC Times + [action] create_repo = created repository %s commit_repo = pushed to %s at %s diff --git a/conf/locale/locale_zh-CN.ini b/conf/locale/locale_zh-CN.ini index 0fa0ef4e48..384c36c020 100644 --- a/conf/locale/locale_zh-CN.ini +++ b/conf/locale/locale_zh-CN.ini @@ -292,6 +292,54 @@ teams.repositories = 团队仓库 teams.add_team_repository = 添加团队仓库 teams.remove_repo = 移除仓库 +[admin] +dashboard = 控制面板 +users = 用户管理 +organizations = 组织管理 +repositories = 仓库管理 +authentication = 权限认证管理 +config = 应用配置管理 +monitor = 应用监控面板 + +dashboard.statistic = 应用统计数据 +dashboard.operations = 管理员操作 +dashboard.system_status = 系统监视状态 +dashboard.statistic_info = Gogs 数据库统计:%d 位用户,%d 个组织,%d 个公钥,%d 个仓库,%d 个仓库关注,%d 个赞,%d 次行为,%d 条权限记录,%d 张工单,%d 次评论,%d 个社交帐号,%d 个用户关注,%d 个镜像,%d 个版本发布,%d 个登录源,%d 个 Web 钩子,%d 个里程碑,%d 个标签,%d 个钩子任务,%d 个团队,%d 个更新任务,%d 个附件。 +dashboard.operation_name = 操作名称 +dashboard.operation_switch = 开关 +dashboard.operation_run = 执行 +dashboard.clean_unbind_oauth = 清理未绑定社交帐号 +dashboard.delete_inactivate_accounts = 删除所有未激活帐户 +dashboard.server_uptime = 服务运行时间 +dashboard.current_goroutine = 当前 Goroutines 数量 +dashboard.current_memory_usage = 当前内存使用量 +dashboard.total_memory_allocated = 所有被分配的内存 +dashboard.memory_obtained = 内存占用量 +dashboard.pointer_lookup_times = 指针查找次数 +dashboard.memory_allocate_times = 内存分配次数 +dashboard.memory_free_times = 内存释放次数 +dashboard.current_heap_usage = 当前 Heap 内存使用量 +dashboard.heap_memory_obtained = Heap 内存占用量 +dashboard.heap_memory_idle = Heap 内存空闲量 +dashboard.heap_memory_in_use = 正在使用的 Heap 内存 +dashboard.heap_memory_released = 被释放的 Heap 内存 +dashboard.heap_objects = Heap 对象数量 +dashboard.bootstrap_stack_usage = 启动 Stack 使用量 +dashboard.stack_memory_obtained = 被分配的 Stack 内存 +dashboard.mspan_structures_usage = MSpan 结构内存使用量 +dashboard.mspan_structures_obtained = 被分配的 MSpan 结构内存 +dashboard.mcache_structures_usage = MCache 结构内存使用量 +dashboard.mcache_structures_obtained = 被分配的 MCache 结构内存 +dashboard.profiling_bucket_hash_table_obtained = 被分配的剖析哈希表内存 +dashboard.gc_metadata_obtained = 被分配的 GC 元数据内存 +dashboard.other_system_allocation_obtained = 其它被分配的系统内存 +dashboard.next_gc_recycle = 下次 GC 内存回收量 +dashboard.last_gc_time = 距离上次 GC 时间 +dashboard.total_gc_time = GC 执行时间总量 +dashboard.total_gc_pause = GC 暂停时间总量 +dashboard.last_gc_pause = 上次 GC 暂停时间 +dashboard.gc_times = GC 执行次数 + [action] create_repo = 创建了仓库 %s commit_repo = 推送了 %s 分支的代码到 %s diff --git a/models/models.go b/models/models.go index bf2586063b..bfab32cba1 100644 --- a/models/models.go +++ b/models/models.go @@ -142,27 +142,38 @@ func NewEngine() (err error) { type Statistic struct { Counter struct { - User, PublicKey, Repo, Watch, Action, Access, - Issue, Comment, Mirror, Oauth, Release, - LoginSource, Webhook, Milestone int64 + User, Org, PublicKey, + Repo, Watch, Star, Action, Access, + Issue, Comment, Oauth, Follow, + Mirror, Release, LoginSource, Webhook, + Milestone, Label, HookTask, + Team, UpdateTask, Attachment int64 } } func GetStatistic() (stats Statistic) { stats.Counter.User = CountUsers() - stats.Counter.Repo = CountRepositories() + stats.Counter.Org = CountOrganizations() stats.Counter.PublicKey, _ = x.Count(new(PublicKey)) + stats.Counter.Repo = CountRepositories() stats.Counter.Watch, _ = x.Count(new(Watch)) + stats.Counter.Star, _ = x.Count(new(Star)) stats.Counter.Action, _ = x.Count(new(Action)) stats.Counter.Access, _ = x.Count(new(Access)) stats.Counter.Issue, _ = x.Count(new(Issue)) stats.Counter.Comment, _ = x.Count(new(Comment)) - stats.Counter.Mirror, _ = x.Count(new(Mirror)) stats.Counter.Oauth, _ = x.Count(new(Oauth2)) + stats.Counter.Follow, _ = x.Count(new(Follow)) + stats.Counter.Mirror, _ = x.Count(new(Mirror)) stats.Counter.Release, _ = x.Count(new(Release)) stats.Counter.LoginSource, _ = x.Count(new(LoginSource)) stats.Counter.Webhook, _ = x.Count(new(Webhook)) stats.Counter.Milestone, _ = x.Count(new(Milestone)) + stats.Counter.Label, _ = x.Count(new(Label)) + stats.Counter.HookTask, _ = x.Count(new(HookTask)) + stats.Counter.Team, _ = x.Count(new(Team)) + stats.Counter.UpdateTask, _ = x.Count(new(UpdateTask)) + stats.Counter.Attachment, _ = x.Count(new(Attachment)) return } diff --git a/models/org.go b/models/org.go index 1c74c290e9..18ed68e6f4 100644 --- a/models/org.go +++ b/models/org.go @@ -159,6 +159,12 @@ func CreateOrganization(org, owner *User) (*User, error) { return org, sess.Commit() } +// CountOrganizations returns number of organizations. +func CountOrganizations() int64 { + count, _ := x.Where("type=1").Count(new(User)) + return count +} + // TODO: need some kind of mechanism to record failure. // DeleteOrganization completely and permanently deletes everything of organization. func DeleteOrganization(org *User) (err error) { diff --git a/models/user.go b/models/user.go index a74d803972..661fb1c220 100644 --- a/models/user.go +++ b/models/user.go @@ -45,13 +45,13 @@ var ( // User represents the object of individual and member of organization. type User struct { Id int64 - LowerName string `xorm:"unique not null"` - Name string `xorm:"unique not null"` + LowerName string `xorm:"UNIQUE NOT NULL"` + Name string `xorm:"UNIQUE NOT NULL"` FullName string - Email string `xorm:"unique not null"` - Passwd string `xorm:"not null"` + Email string `xorm:"UNIQUE NOT NULL"` + Passwd string `xorm:"NOT NULL"` LoginType LoginType - LoginSource int64 `xorm:"not null default 0"` + LoginSource int64 `xorm:"NOT NULL DEFAULT 0"` LoginName string Type UserType Orgs []*User `xorm:"-"` @@ -60,16 +60,16 @@ type User struct { NumFollowings int NumStars int NumRepos int - Avatar string `xorm:"varchar(2048) not null"` - AvatarEmail string `xorm:"not null"` + Avatar string `xorm:"VARCHAR(2048) NOT NULL"` + AvatarEmail string `xorm:"NOT NULL"` Location string Website string IsActive bool IsAdmin bool Rands string `xorm:"VARCHAR(10)"` Salt string `xorm:"VARCHAR(10)"` - Created time.Time `xorm:"created"` - Updated time.Time `xorm:"updated"` + Created time.Time `xorm:"CREATED"` + Updated time.Time `xorm:"UPDATED"` // For organization. Description string diff --git a/public/ng/css/gogs.css b/public/ng/css/gogs.css index 5ea7cf8f2d..dac5870064 100644 --- a/public/ng/css/gogs.css +++ b/public/ng/css/gogs.css @@ -234,6 +234,24 @@ img.avatar-100 { .text-black { color: #444444; } +.table { + width: 100%; + max-width: 100%; +} +.table > thead > tr > th, +.table > tbody > tr > th, +.table > tfoot > tr > th, +.table > thead > tr > td, +.table > tbody > tr > td, +.table > tfoot > tr > td { + border-top: 1px solid #e7eaec; + line-height: 1.42857; + padding: 8px; + vertical-align: top; +} +th { + text-align: left; +} .markdown { background-color: white; font-size: 16px; @@ -1342,6 +1360,7 @@ The register and sign-in page style width: 100%; list-style: none; } +#admin-wrapper, #setting-wrapper { padding-bottom: 100px; } @@ -1906,3 +1925,26 @@ textarea#issue-add-content { height: 40px; line-height: 40px; } +.admin-desc { + padding: 10px 20px; +} +.admin-table { + padding: 15px 20px 5px 20px; +} +.dl-horizontal dt { + float: left; + width: 160px; + clear: left; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.admin-dl-horizontal { + padding: 20px; +} +.admin-dl-horizontal > dt { + width: 250px; +} +.admin-dl-horizontal > dd { + margin-left: 240px; +} diff --git a/public/ng/css/ui.css b/public/ng/css/ui.css index a60e2c8410..644fd83886 100644 --- a/public/ng/css/ui.css +++ b/public/ng/css/ui.css @@ -261,6 +261,7 @@ optgroup { font-weight: bold; } table { + background-color: transparent; border-collapse: collapse; border-spacing: 0; } @@ -683,8 +684,7 @@ ul.menu-radius > li:last-child > a { background-color: white; } .panel .panel-body .panel-desc { - padding: 0 40px; - margin-bottom: 20px; + padding: 0 40px 20px 40px; } .panel .panel-content { padding: 1em 1.2em; diff --git a/public/ng/less/gogs.less b/public/ng/less/gogs.less index 7a94840822..a5cd26c42d 100644 --- a/public/ng/less/gogs.less +++ b/public/ng/less/gogs.less @@ -6,4 +6,5 @@ @import "gogs/repository"; @import "gogs/settings"; @import "gogs/issue"; -@import "gogs/organization"; \ No newline at end of file +@import "gogs/organization"; +@import "gogs/admin"; \ No newline at end of file diff --git a/public/ng/less/gogs/admin.less b/public/ng/less/gogs/admin.less new file mode 100644 index 0000000000..d327f681fd --- /dev/null +++ b/public/ng/less/gogs/admin.less @@ -0,0 +1,23 @@ +.admin-desc { + padding: 10px 20px; +} +.admin-table { + padding: 15px 20px 5px 20px; +} +.dl-horizontal dt { + float: left; + width: 160px; + clear: left; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.admin-dl-horizontal { + padding: 20px; + > dt { + width: 250px; + } + > dd { + margin-left: 240px; + } +} \ No newline at end of file diff --git a/public/ng/less/gogs/base.less b/public/ng/less/gogs/base.less index 1174e8e7a7..7ef7d24ccd 100644 --- a/public/ng/less/gogs/base.less +++ b/public/ng/less/gogs/base.less @@ -250,4 +250,22 @@ clear: both; } .text-black { color: #444444; +} +.table { + width: 100%; + max-width: 100%; +} +.table > thead > tr > th, +.table > tbody > tr > th, +.table > tfoot > tr > th, +.table > thead > tr > td, +.table > tbody > tr > td, +.table > tfoot > tr > td { + border-top: 1px solid #e7eaec; + line-height: 1.42857; + padding: 8px; + vertical-align: top; +} +th { + text-align: left; } \ No newline at end of file diff --git a/public/ng/less/gogs/settings.less b/public/ng/less/gogs/settings.less index ad50e4ffa8..cc922e3ffe 100644 --- a/public/ng/less/gogs/settings.less +++ b/public/ng/less/gogs/settings.less @@ -1,5 +1,5 @@ @import "../ui/var"; - +#admin-wrapper, #setting-wrapper { padding-bottom: 100px; } diff --git a/public/ng/less/ui/panel.less b/public/ng/less/ui/panel.less index dc77715d53..c4bba16e24 100644 --- a/public/ng/less/ui/panel.less +++ b/public/ng/less/ui/panel.less @@ -10,8 +10,7 @@ .panel-body { background-color: white; .panel-desc { - padding: 0 40px; - margin-bottom: 20px; + padding: 0 40px 20px 40px; } } .panel-content { diff --git a/public/ng/less/ui/reset.less b/public/ng/less/ui/reset.less index af497ca14d..36906ce5a7 100644 --- a/public/ng/less/ui/reset.less +++ b/public/ng/less/ui/reset.less @@ -321,10 +321,10 @@ optgroup { } // table elements - table { - border-collapse: collapse; - border-spacing: 0; + background-color: transparent; + border-collapse: collapse; + border-spacing: 0; } td, diff --git a/routers/admin/admin.go b/routers/admin/admin.go index 4091cb8999..ebc446b820 100644 --- a/routers/admin/admin.go +++ b/routers/admin/admin.go @@ -123,8 +123,9 @@ const ( ) func Dashboard(ctx *middleware.Context) { - ctx.Data["Title"] = "Admin Dashboard" - ctx.Data["PageIsDashboard"] = true + ctx.Data["Title"] = ctx.Tr("admin.dashboard") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminDashboard"] = true // Run operation. op, _ := com.StrTo(ctx.Query("op")).Int() diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index aa2080d83e..81c262e2e0 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -1,143 +1,151 @@ -{{template "base/head" .}} -{{template "base/navbar" .}} -
- {{template "admin/nav" .}} -
- {{template "base/alert" .}} -
-
- Statistic -
+{{template "ng/base/head" .}} +{{template "ng/base/header" .}} +
+
+
+ {{template "admin/nav" .}} +
+
+ {{template "ng/base/alert" .}} +
+
+
+ {{.i18n.Tr "admin.dashboard.statistic"}} +
+
+

+ {{.i18n.Tr "admin.dashboard.statistic_info" .Stats.Counter.User .Stats.Counter.Org .Stats.Counter.PublicKey .Stats.Counter.Repo .Stats.Counter.Watch .Stats.Counter.Star .Stats.Counter.Action .Stats.Counter.Access .Stats.Counter.Issue .Stats.Counter.Comment .Stats.Counter.Oauth .Stats.Counter.Follow .Stats.Counter.Mirror .Stats.Counter.Release .Stats.Counter.LoginSource .Stats.Counter.Webhook .Stats.Counter.Milestone .Stats.Counter.Label .Stats.Counter.HookTask .Stats.Counter.Team .Stats.Counter.UpdateTask .Stats.Counter.Attachment | Str2html}} +

+
+
+
+
+ {{.i18n.Tr "admin.dashboard.operations"}} +
+
+
+ + + + + + + + + + + + + + + + + +
{{.i18n.Tr "admin.dashboard.operation_name"}}{{.i18n.Tr "admin.dashboard.operation_switch"}}
{{.i18n.Tr "admin.dashboard.clean_unbind_oauth"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
{{.i18n.Tr "admin.dashboard.delete_inactivate_accounts"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
+
+
+
+
+
+
+ {{.i18n.Tr "admin.dashboard.system_status"}} +
+
+
+
{{.i18n.Tr "admin.dashboard.server_uptime"}}
+
{{.SysStatus.Uptime}}
-
- Gogs database has {{.Stats.Counter.User}} users, {{.Stats.Counter.PublicKey}} SSH keys, {{.Stats.Counter.Repo}} repositories, {{.Stats.Counter.Watch}} watches, {{.Stats.Counter.Action}} actions, {{.Stats.Counter.Access}} accesses, {{.Stats.Counter.Issue}} issues, {{.Stats.Counter.Comment}} comments, {{.Stats.Counter.Mirror}} mirrors, {{.Stats.Counter.Oauth}} oauthes, {{.Stats.Counter.Release}} releases, {{.Stats.Counter.LoginSource}} login sources, {{.Stats.Counter.Webhook}} webhooks, {{.Stats.Counter.Milestone}} milestones. -
-
+
{{.i18n.Tr "admin.dashboard.current_goroutine"}}
+
{{.SysStatus.NumGoroutine}}
-
-
- Operations -
+
+
{{.i18n.Tr "admin.dashboard.current_memory_usage"}}
+
{{.SysStatus.MemAllocated}}
-
- - - - - - - - - - - - - - - - - -
NameOp.
Clean unbind OAuthes Run
Delete inactivate accounts Run
-
-
+
{{.i18n.Tr "admin.dashboard.total_memory_allocated"}}
+
{{.SysStatus.MemTotal}}
-
-
- System Monitor Status -
+
{{.i18n.Tr "admin.dashboard.memory_obtained"}}
+
{{.SysStatus.MemSys}}
-
-
-
Server Uptime
-
{{.SysStatus.Uptime}}
+
{{.i18n.Tr "admin.dashboard.pointer_lookup_times"}}
+
{{.SysStatus.Lookups}}
-
Current Goroutines
-
{{.SysStatus.NumGoroutine}}
+
{{.i18n.Tr "admin.dashboard.memory_allocate_times"}}
+
{{.SysStatus.MemMallocs}}
-
-
Current Memory Usage
-
{{.SysStatus.MemAllocated}}
+
{{.i18n.Tr "admin.dashboard.memory_free_times"}}
+
{{.SysStatus.MemFrees}}
-
Total Memory Allocated
-
{{.SysStatus.MemTotal}}
+
+
{{.i18n.Tr "admin.dashboard.current_heap_usage"}}
+
{{.SysStatus.HeapAlloc}}
-
Memory Obtained
-
{{.SysStatus.MemSys}}
+
{{.i18n.Tr "admin.dashboard.heap_memory_obtained"}}
+
{{.SysStatus.HeapSys}}
-
Pointer Lookup Times
-
{{.SysStatus.Lookups}}
+
{{.i18n.Tr "admin.dashboard.heap_memory_idle"}}
+
{{.SysStatus.HeapIdle}}
-
Memory Allocate Times
-
{{.SysStatus.MemMallocs}}
+
{{.i18n.Tr "admin.dashboard.heap_memory_in_use"}}
+
{{.SysStatus.HeapInuse}}
-
Memory Free Times
-
{{.SysStatus.MemFrees}}
+
{{.i18n.Tr "admin.dashboard.heap_memory_released"}}
+
{{.SysStatus.HeapReleased}}
-
-
Current Heap Usage
-
{{.SysStatus.HeapAlloc}}
+
{{.i18n.Tr "admin.dashboard.heap_objects"}}
+
{{.SysStatus.HeapObjects}}
-
Heap Memory Obtained
-
{{.SysStatus.HeapSys}}
+
+
{{.i18n.Tr "admin.dashboard.bootstrap_stack_usage"}}
+
{{.SysStatus.StackInuse}}
-
Heap Memory Idle
-
{{.SysStatus.HeapIdle}}
+
{{.i18n.Tr "admin.dashboard.stack_memory_obtained"}}
+
{{.SysStatus.StackSys}}
-
Heap Memory In Use
-
{{.SysStatus.HeapInuse}}
+
{{.i18n.Tr "admin.dashboard.mspan_structures_usage"}}
+
{{.SysStatus.MSpanInuse}}
-
Heap Memory Released
-
{{.SysStatus.HeapReleased}}
+
{{.i18n.Tr "admin.dashboard.mspan_structures_obtained"}}
+
{{.SysStatus.HeapSys}}
-
Heap Objects
-
{{.SysStatus.HeapObjects}}
+
{{.i18n.Tr "admin.dashboard.mcache_structures_usage"}}
+
{{.SysStatus.MCacheInuse}}
-
-
Bootstrap Stack Usage
-
{{.SysStatus.StackInuse}}
+
{{.i18n.Tr "admin.dashboard.mcache_structures_obtained"}}
+
{{.SysStatus.MCacheSys}}
-
Stack Memory Obtained
-
{{.SysStatus.StackSys}}
+
{{.i18n.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}
+
{{.SysStatus.BuckHashSys}}
-
MSpan Structures Usage
-
{{.SysStatus.MSpanInuse}}
+
{{.i18n.Tr "admin.dashboard.gc_metadata_obtained"}}
+
{{.SysStatus.GCSys}}
-
MSpan Structures Obtained
-
{{.SysStatus.HeapSys}}
+
{{.i18n.Tr "admin.dashboard.other_system_allocation_obtained"}}
+
{{.SysStatus.OtherSys}}
-
MCache Structures Usage
-
{{.SysStatus.MCacheInuse}}
+
+
{{.i18n.Tr "admin.dashboard.next_gc_recycle"}}
+
{{.SysStatus.NextGC}}
-
MCache Structures Obtained
-
{{.SysStatus.MCacheSys}}
+
{{.i18n.Tr "admin.dashboard.last_gc_time"}}
+
{{.SysStatus.LastGC}}
-
Profiling Bucket Hash Table Obtained
-
{{.SysStatus.BuckHashSys}}
+
{{.i18n.Tr "admin.dashboard.total_gc_pause"}}
+
{{.SysStatus.PauseTotalNs}}
-
GC Metadada Obtained
-
{{.SysStatus.GCSys}}
+
{{.i18n.Tr "admin.dashboard.last_gc_pause"}}
+
{{.SysStatus.PauseNs}}
-
Other System Allocation Obtained
-
{{.SysStatus.OtherSys}}
- -
-
Next GC Recycle
-
{{.SysStatus.NextGC}}
- -
Last GC Time
-
{{.SysStatus.LastGC}} ago
- -
Total GC Pause
-
{{.SysStatus.PauseTotalNs}}
- -
Last GC Pause
-
{{.SysStatus.PauseNs}}
- -
GC Times
-
{{.SysStatus.NumGC}}
-
+
{{.i18n.Tr "admin.dashboard.gc_times"}}
+
{{.SysStatus.NumGC}}
+ +
+
+
+
-{{template "base/footer" .}} \ No newline at end of file +{{template "ng/base/footer" .}} \ No newline at end of file diff --git a/templates/admin/nav.tmpl b/templates/admin/nav.tmpl index b78e0bd17d..fa9b173e02 100644 --- a/templates/admin/nav.tmpl +++ b/templates/admin/nav.tmpl @@ -1,10 +1,14 @@ -
- + \ No newline at end of file diff --git a/templates/base/navbar.tmpl b/templates/base/navbar.tmpl index dcb9a644c1..75096a4e43 100644 --- a/templates/base/navbar.tmpl +++ b/templates/base/navbar.tmpl @@ -27,7 +27,9 @@ user-avatar - {{if .IsAdmin}}{{end}} + {{if .IsAdmin}} + + {{end}} - diff --git a/templates/ng/base/header.tmpl b/templates/ng/base/header.tmpl index ce1e170319..31533d2727 100644 --- a/templates/ng/base/header.tmpl +++ b/templates/ng/base/header.tmpl @@ -19,7 +19,7 @@ {{if .IsAdmin}} -
  • +
  • {{end}} diff --git a/templates/repo/settings/options.tmpl b/templates/repo/settings/options.tmpl index 4cc67c9d57..fb6cda2aae 100644 --- a/templates/repo/settings/options.tmpl +++ b/templates/repo/settings/options.tmpl @@ -9,7 +9,7 @@
    {{template "ng/base/alert" .}}
    -
    +
    {{.i18n.Tr "repo.settings.basic_settings"}}