mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-04 08:17:24 -05:00
Finish new admin dashboard
This commit is contained in:
parent
81287ba022
commit
1aec1a2dda
@ -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 <b>%d</b> users, <b>%d</b> organizations, <b>%d</b> public keys, <b>%d</b> repositories, <b>%d</b> watches, <b>%d</b> stars, <b>%d</b> actions, <b>%d</b> accesses, <b>%d</b> issues, <b>%d</b> comments, <b>%d</b> social accounts, <b>%d</b> follows, <b>%d</b> mirrors, <b>%d</b> releases, <b>%d</b> login sources, <b>%d</b> webhooks, <b>%d</b> milestones, <b>%d</b> labels, <b>%d</b> hook tasks, <b>%d</b> teams, <b>%d</b> update tasks, <b>%d</b> 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 <a href="/%s">%s</a>
|
||||
commit_repo = pushed to <a href="/%s/src/%s">%s</a> at <a href="/%s">%s</a>
|
||||
|
@ -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 数据库统计:<b>%d</b> 位用户,<b>%d</b> 个组织,<b>%d</b> 个公钥,<b>%d</b> 个仓库,<b>%d</b> 个仓库关注,<b>%d</b> 个赞,<b>%d</b> 次行为,<b>%d</b> 条权限记录,<b>%d</b> 张工单,<b>%d</b> 次评论,<b>%d</b> 个社交帐号,<b>%d</b> 个用户关注,<b>%d</b> 个镜像,<b>%d</b> 个版本发布,<b>%d</b> 个登录源,<b>%d</b> 个 Web 钩子,<b>%d</b> 个里程碑,<b>%d</b> 个标签,<b>%d</b> 个钩子任务,<b>%d</b> 个团队,<b>%d</b> 个更新任务,<b>%d</b> 个附件。
|
||||
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 = 创建了仓库 <a href="/%s">%s</a>
|
||||
commit_repo = 推送了 <a href="/%s/src/%s">%s</a> 分支的代码到 <a href="/%s">%s</a>
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -7,3 +7,4 @@
|
||||
@import "gogs/settings";
|
||||
@import "gogs/issue";
|
||||
@import "gogs/organization";
|
||||
@import "gogs/admin";
|
23
public/ng/less/gogs/admin.less
Normal file
23
public/ng/less/gogs/admin.less
Normal file
@ -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;
|
||||
}
|
||||
}
|
@ -251,3 +251,21 @@ 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;
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
@import "../ui/var";
|
||||
|
||||
#admin-wrapper,
|
||||
#setting-wrapper {
|
||||
padding-bottom: 100px;
|
||||
}
|
||||
|
@ -10,8 +10,7 @@
|
||||
.panel-body {
|
||||
background-color: white;
|
||||
.panel-desc {
|
||||
padding: 0 40px;
|
||||
margin-bottom: 20px;
|
||||
padding: 0 40px 20px 40px;
|
||||
}
|
||||
}
|
||||
.panel-content {
|
||||
|
@ -321,10 +321,10 @@ optgroup {
|
||||
}
|
||||
|
||||
// table elements
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
background-color: transparent;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
td,
|
||||
|
@ -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()
|
||||
|
@ -1,143 +1,151 @@
|
||||
{{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">
|
||||
{{template "base/alert" .}}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Statistic
|
||||
</div>
|
||||
{{template "ng/base/head" .}}
|
||||
{{template "ng/base/header" .}}
|
||||
<div id="admin-wrapper">
|
||||
<div id="setting-wrapper" class="main-wrapper">
|
||||
<div id="repo-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.dashboard.statistic"}}</strong>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p class="admin-desc">
|
||||
{{.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}}
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="panel panel-radius">
|
||||
<div class="panel-header">
|
||||
<strong>{{.i18n.Tr "admin.dashboard.operations"}}</strong>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="admin-table">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{.i18n.Tr "admin.dashboard.operation_name"}}</th>
|
||||
<th>{{.i18n.Tr "admin.dashboard.operation_switch"}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.clean_unbind_oauth"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="/admin?op=1">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{.i18n.Tr "admin.dashboard.delete_inactivate_accounts"}}</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="/admin?op=2">{{.i18n.Tr "admin.dashboard.operation_run"}}</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="panel panel-radius">
|
||||
<div class="panel-header">
|
||||
<strong>{{.i18n.Tr "admin.dashboard.system_status"}}</strong>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>{{.i18n.Tr "admin.dashboard.server_uptime"}}</dt>
|
||||
<dd>{{.SysStatus.Uptime}}</dd>
|
||||
|
||||
<div class="panel-body">
|
||||
Gogs database has <b>{{.Stats.Counter.User}}</b> users, <b>{{.Stats.Counter.PublicKey}}</b> SSH keys, <b>{{.Stats.Counter.Repo}}</b> repositories, <b>{{.Stats.Counter.Watch}}</b> watches, <b>{{.Stats.Counter.Action}}</b> actions, <b>{{.Stats.Counter.Access}}</b> accesses, <b>{{.Stats.Counter.Issue}}</b> issues, <b>{{.Stats.Counter.Comment}}</b> comments, <b>{{.Stats.Counter.Mirror}}</b> mirrors, <b>{{.Stats.Counter.Oauth}}</b> oauthes, <b>{{.Stats.Counter.Release}}</b> releases, <b>{{.Stats.Counter.LoginSource}}</b> login sources, <b>{{.Stats.Counter.Webhook}}</b> webhooks, <b>{{.Stats.Counter.Milestone}}</b> milestones.
|
||||
</div>
|
||||
</div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.current_goroutine"}}</dt>
|
||||
<dd>{{.SysStatus.NumGoroutine}}</dd>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
Operations
|
||||
</div>
|
||||
<hr/>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.current_memory_usage"}}</dt>
|
||||
<dd>{{.SysStatus.MemAllocated}}</dd>
|
||||
|
||||
<div class="panel-body">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Op.</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Clean unbind OAuthes</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="/admin?op=1">Run</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Delete inactivate accounts</td>
|
||||
<td><i class="fa fa-caret-square-o-right"></i> <a href="/admin?op=2">Run</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.total_memory_allocated"}}</dt>
|
||||
<dd>{{.SysStatus.MemTotal}}</dd>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
System Monitor Status
|
||||
</div>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.memory_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.MemSys}}</dd>
|
||||
|
||||
<div class="panel-body">
|
||||
<dl class="dl-horizontal admin-dl-horizontal">
|
||||
<dt>Server Uptime</dt>
|
||||
<dd>{{.SysStatus.Uptime}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.pointer_lookup_times"}}</dt>
|
||||
<dd>{{.SysStatus.Lookups}}</dd>
|
||||
|
||||
<dt>Current Goroutines</dt>
|
||||
<dd>{{.SysStatus.NumGoroutine}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.memory_allocate_times"}}</dt>
|
||||
<dd>{{.SysStatus.MemMallocs}}</dd>
|
||||
|
||||
<hr/>
|
||||
<dt>Current Memory Usage</dt>
|
||||
<dd>{{.SysStatus.MemAllocated}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.memory_free_times"}}</dt>
|
||||
<dd>{{.SysStatus.MemFrees}}</dd>
|
||||
|
||||
<dt>Total Memory Allocated</dt>
|
||||
<dd>{{.SysStatus.MemTotal}}</dd>
|
||||
<hr/>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.current_heap_usage"}}</dt>
|
||||
<dd>{{.SysStatus.HeapAlloc}}</dd>
|
||||
|
||||
<dt>Memory Obtained</dt>
|
||||
<dd>{{.SysStatus.MemSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.HeapSys}}</dd>
|
||||
|
||||
<dt>Pointer Lookup Times</dt>
|
||||
<dd>{{.SysStatus.Lookups}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_idle"}}</dt>
|
||||
<dd>{{.SysStatus.HeapIdle}}</dd>
|
||||
|
||||
<dt>Memory Allocate Times</dt>
|
||||
<dd>{{.SysStatus.MemMallocs}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_in_use"}}</dt>
|
||||
<dd>{{.SysStatus.HeapInuse}}</dd>
|
||||
|
||||
<dt>Memory Free Times</dt>
|
||||
<dd>{{.SysStatus.MemFrees}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_memory_released"}}</dt>
|
||||
<dd>{{.SysStatus.HeapReleased}}</dd>
|
||||
|
||||
<hr/>
|
||||
<dt>Current Heap Usage</dt>
|
||||
<dd>{{.SysStatus.HeapAlloc}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.heap_objects"}}</dt>
|
||||
<dd>{{.SysStatus.HeapObjects}}</dd>
|
||||
|
||||
<dt>Heap Memory Obtained</dt>
|
||||
<dd>{{.SysStatus.HeapSys}}</dd>
|
||||
<hr/>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.bootstrap_stack_usage"}}</dt>
|
||||
<dd>{{.SysStatus.StackInuse}}</dd>
|
||||
|
||||
<dt>Heap Memory Idle</dt>
|
||||
<dd>{{.SysStatus.HeapIdle}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.stack_memory_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.StackSys}}</dd>
|
||||
|
||||
<dt>Heap Memory In Use</dt>
|
||||
<dd>{{.SysStatus.HeapInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mspan_structures_usage"}}</dt>
|
||||
<dd>{{.SysStatus.MSpanInuse}}</dd>
|
||||
|
||||
<dt>Heap Memory Released</dt>
|
||||
<dd>{{.SysStatus.HeapReleased}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mspan_structures_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.HeapSys}}</dd>
|
||||
|
||||
<dt>Heap Objects</dt>
|
||||
<dd>{{.SysStatus.HeapObjects}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mcache_structures_usage"}}</dt>
|
||||
<dd>{{.SysStatus.MCacheInuse}}</dd>
|
||||
|
||||
<hr/>
|
||||
<dt>Bootstrap Stack Usage</dt>
|
||||
<dd>{{.SysStatus.StackInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.mcache_structures_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.MCacheSys}}</dd>
|
||||
|
||||
<dt>Stack Memory Obtained</dt>
|
||||
<dd>{{.SysStatus.StackSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.BuckHashSys}}</dd>
|
||||
|
||||
<dt>MSpan Structures Usage</dt>
|
||||
<dd>{{.SysStatus.MSpanInuse}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.gc_metadata_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.GCSys}}</dd>
|
||||
|
||||
<dt>MSpan Structures Obtained</dt>
|
||||
<dd>{{.SysStatus.HeapSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.other_system_allocation_obtained"}}</dt>
|
||||
<dd>{{.SysStatus.OtherSys}}</dd>
|
||||
|
||||
<dt>MCache Structures Usage</dt>
|
||||
<dd>{{.SysStatus.MCacheInuse}}</dd>
|
||||
<hr>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.next_gc_recycle"}}</dt>
|
||||
<dd>{{.SysStatus.NextGC}}</dd>
|
||||
|
||||
<dt>MCache Structures Obtained</dt>
|
||||
<dd>{{.SysStatus.MCacheSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.last_gc_time"}}</dt>
|
||||
<dd>{{.SysStatus.LastGC}}</dd>
|
||||
|
||||
<dt>Profiling Bucket Hash Table Obtained</dt>
|
||||
<dd>{{.SysStatus.BuckHashSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.total_gc_pause"}}</dt>
|
||||
<dd>{{.SysStatus.PauseTotalNs}}</dd>
|
||||
|
||||
<dt>GC Metadada Obtained</dt>
|
||||
<dd>{{.SysStatus.GCSys}}</dd>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.last_gc_pause"}}</dt>
|
||||
<dd>{{.SysStatus.PauseNs}}</dd>
|
||||
|
||||
<dt>Other System Allocation Obtained</dt>
|
||||
<dd>{{.SysStatus.OtherSys}}</dd>
|
||||
|
||||
<hr/>
|
||||
<dt>Next GC Recycle</dt>
|
||||
<dd>{{.SysStatus.NextGC}}</dd>
|
||||
|
||||
<dt>Last GC Time</dt>
|
||||
<dd>{{.SysStatus.LastGC}} ago</dd>
|
||||
|
||||
<dt>Total GC Pause</dt>
|
||||
<dd>{{.SysStatus.PauseTotalNs}}</dd>
|
||||
|
||||
<dt>Last GC Pause</dt>
|
||||
<dd>{{.SysStatus.PauseNs}}</dd>
|
||||
|
||||
<dt>GC Times</dt>
|
||||
<dd>{{.SysStatus.NumGC}}</dd>
|
||||
</dl>
|
||||
<dt>{{.i18n.Tr "admin.dashboard.gc_times"}}</dt>
|
||||
<dd>{{.SysStatus.NumGC}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
{{template "ng/base/footer" .}}
|
@ -1,10 +1,14 @@
|
||||
<div id="user-setting-nav" class="col-md-2 admin-nav">
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item{{if .PageIsDashboard}} active{{end}}"><a href="/admin"><i class="fa fa-tachometer fa-lg"></i> Dashboard</a></li>
|
||||
<li class="list-group-item{{if .PageIsUsers}} active{{end}}"><a href="/admin/users"><i class="fa fa-users fa-lg"></i> Users</a></li>
|
||||
<li class="list-group-item{{if .PageIsRepos}} active{{end}}"><a href="/admin/repos"><i class="fa fa-book fa-lg"></i> Repositories</a></li>
|
||||
<li class="list-group-item{{if .PageIsAuths}} active{{end}}"><a href="/admin/auths"><i class="fa fa-certificate fa-lg"></i> Authentication</a></li>
|
||||
<li class="list-group-item{{if .PageIsConfig}} active{{end}}"><a href="/admin/config"><i class="fa fa-cogs fa-lg"></i> Configuration</a></li>
|
||||
<li class="list-group-item{{if .PageIsMonitor}} active{{end}}"><a href="/admin/monitor"><i class="fa fa-th fa-lg"></i> Monitoring</a></li>
|
||||
</ul>
|
||||
<div id="setting-menu" class="grid-1-5 panel panel-radius left">
|
||||
<p class="panel-header"><strong>{{.i18n.Tr "admin_panel"}}</strong></p>
|
||||
<div class="panel-body">
|
||||
<ul class="menu menu-vertical switching-list grid-1-5 left">
|
||||
<li {{if .PageIsAdminDashboard}}class="current"{{end}}><a href="/admin">{{.i18n.Tr "admin.dashboard"}}</a></li>
|
||||
<li {{if .PageIsAdminUsers}}class="current"{{end}}><a href="/admin/users">{{.i18n.Tr "admin.users"}}</a></li>
|
||||
<li {{if .PageIsAdminOrganizations}}class="current"{{end}}><a href="/admin/orgs">{{.i18n.Tr "admin.organizations"}}</a></li>
|
||||
<li {{if .PageIsAdminRepositories}}class="current"{{end}}><a href="/admin/repos">{{.i18n.Tr "admin.repositories"}}</a></li>
|
||||
<li {{if .PageIsAdminAuthentication}}class="current"{{end}}><a href="/admin/auths">{{.i18n.Tr "admin.authentication"}}</a></li>
|
||||
<li {{if .PageIsAdminConfig}}class="current"{{end}}><a href="/admin/config">{{.i18n.Tr "admin.config"}}</a></li>
|
||||
<li {{if .PageIsAdminMonitor}}class="current"{{end}}><a href="/admin/monitor">{{.i18n.Tr "admin.monitor"}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
@ -27,7 +27,9 @@
|
||||
<img src="{{.SignedUser.AvatarLink}}?s=28" alt="user-avatar" title="username"/>
|
||||
</a>
|
||||
<a class="navbar-right nav-item{{if .PageIsUserSetting}} active{{end}}" href="/user/settings" data-toggle="tooltip" data-placement="bottom" title="Settings"><i class="fa fa-cogs fa-lg"></i></a>
|
||||
{{if .IsAdmin}}<a class="navbar-right nav-item{{if .PageIsAdmin}} active{{end}}" href="/admin" data-toggle="tooltip" data-placement="bottom" title="Admin"><i class="fa fa-gear fa-lg"></i></a>{{end}}
|
||||
{{if .IsAdmin}}
|
||||
<a class="navbar-right nav-item{{if .PageIsAdmin}} active{{end}}" href="/admin" data-toggle="tooltip" data-placement="bottom" title="Admin"><i class="fa fa-gear fa-lg"></i></a>
|
||||
{{end}}
|
||||
<div class="navbar-right nav-item pull-right{{if .PageIsNewRepo}} active{{end}}" id="nav-repo-new" data-toggle="tooltip" data-placement="bottom" title="New Repo">
|
||||
<button type="button" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus-square fa-lg"></i></button>
|
||||
<div class="dropdown-menu">
|
||||
@ -45,21 +47,3 @@
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<!--<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse">
|
||||
<i class="fa fa-bars"></i>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/"><img src="/img/favicon.png" alt="Gogs Logo"></a>
|
||||
</div>
|
||||
|
||||
<div class="collapse navbar-collapse" id="gopmweb-navbar-collapse">
|
||||
<ul class="nav navbar-nav">
|
||||
<li><a>{{.Title}}</a></li>
|
||||
</ul>
|
||||
|
||||
<a href="/user/signin" class="navbar-right btn btn-success navbar-btn">Sign In</a>
|
||||
</div>
|
||||
</div>
|
||||
</nav>-->
|
||||
|
@ -19,7 +19,7 @@
|
||||
<a href="/user/settings" title="{{.i18n.Tr "account_settings"}}"><i class="octicon octicon-settings"></i></a>
|
||||
</li>
|
||||
{{if .IsAdmin}}
|
||||
<li class="right">
|
||||
<li class="right {{if .PageIsAdmin}}current{{end}}">
|
||||
<a href="/admin" title="{{.i18n.Tr "admin_panel"}}"><i class="octicon octicon-circuit-board"></i></a>
|
||||
</li>
|
||||
{{end}}
|
||||
|
@ -9,7 +9,7 @@
|
||||
<div class="setting-content">
|
||||
{{template "ng/base/alert" .}}
|
||||
<div id="setting-content">
|
||||
<div id="user-profile-setting-content" class="panel panel-radius">
|
||||
<div class="panel panel-radius">
|
||||
<div class="panel-header">
|
||||
<strong>{{.i18n.Tr "repo.settings.basic_settings"}}</strong>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user