From 868d921f7bb30a3bd5c690b484722fc35c0d8211 Mon Sep 17 00:00:00 2001 From: crackcomm Date: Tue, 1 Apr 2014 05:21:59 +0200 Subject: [PATCH 1/2] Description list instead of div's in admin Dashboard & Configuration. --- public/css/gogs.css | 10 +++ templates/admin/config.tmpl | 143 +++++++++++++++++++++++---------- templates/admin/dashboard.tmpl | 121 ++++++++++++++++++++-------- 3 files changed, 198 insertions(+), 76 deletions(-) diff --git a/public/css/gogs.css b/public/css/gogs.css index 965c90962c..4071220466 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -1231,3 +1231,13 @@ html, body { #footer a { color: #000; } + +/* admin dashboard/configuration */ + +.dl-horizontal > dt { + width: 320px; +} + +.dl-horizontal > dd { + margin-left: 340px; +} diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index ab805d8dea..d7c3ba761d 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -9,15 +9,24 @@
-
Application Name: {{AppName}}
-
Application Version: {{AppVer}}
-
Application URL: {{.AppUrl}}
-
Domain: {{.Domain}}
-
-
Run User: {{.RunUser}}
-
Run Mode: {{.RunMode}}
-
-
Repository Root Path: {{.RepoRootPath}}
+
+
Application Name
+
{{AppName}}
+
Application Version
+
{{AppVer}}
+
Application URL
+
{{.AppUrl}}
+
Domain
+
{{.Domain}}
+
+
Run User
+
{{.RunUser}}
+
Run Mode
+
{{.RunMode}}
+
+
Repository Root Path
+
{{.RepoRootPath}}
+
@@ -27,12 +36,20 @@
-
Type: {{.DbCfg.Type}}
-
Host: {{.DbCfg.Host}}
-
Name: {{.DbCfg.Name}}
-
User: {{.DbCfg.User}}
-
SslMode: {{.DbCfg.SslMode}} (for "postgres" only)
-
Path: {{.DbCfg.Path}} (for "sqlite3" only)
+
+
Type
+
{{.DbCfg.Type}}
+
Host
+
{{.DbCfg.Host}}
+
Name
+
{{.DbCfg.Name}}
+
User
+
{{.DbCfg.User}}
+
SslMode
+
{{.DbCfg.SslMode}} (for "postgres" only)
+
Path
+
{{.DbCfg.Path}} (for "sqlite3" only)
+
@@ -42,14 +59,23 @@
-
Register Email Confirmation:
-
Disenable Registeration:
-
Require Sign In View:
-
Mail Notification:
-
Enable Cache Avatar:
-
-
Active Code Lives: {{.Service.ActiveCodeLives}} minutes
-
Reset Password Code Lives: {{.Service.ResetPwdCodeLives}} minutes
+
+
Register Email Confirmation
+
+
Disenable Registeration
+
+
Require Sign In View
+
+
Mail Notification
+
+
Enable Cache Avatar
+
+
+
Active Code Lives
+
{{.Service.ActiveCodeLives}} minutes
+
Reset Password Code Lives
+
{{.Service.ResetPwdCodeLives}} minutes
+
@@ -59,10 +85,16 @@
-
Enabled:
-
Name: {{.Mailer.Name}}
-
Host: {{.Mailer.Host}}
-
User: {{.Mailer.User}}
+
+
Enabled
+
+
Name
+
{{.Mailer.Name}}
+
Host
+
{{.Mailer.Host}}
+
User
+
{{.Mailer.User}}
+
@@ -72,9 +104,12 @@
-
Cache Adapter: {{.CacheAdapter}}
-
Cache Config:
-
{{.CacheConfig}}
+
+
Cache Adapter
+
{{.CacheAdapter}}
+
Cache Config
+
{{.CacheConfig}}
+
@@ -84,16 +119,28 @@
-
Session Provider: {{.SessionProvider}}
-
Cookie Name: {{.SessionConfig.CookieName}}
-
Enable Set Cookie:
-
GC Interval Time: {{.SessionConfig.GcIntervalTime}} seconds
-
Session Life Time: {{.SessionConfig.SessionLifeTime}} seconds
-
HTTPS Only:
-
Cookie Life Time: {{.SessionConfig.CookieLifeTime}} seconds
-
Session ID Hash Function: {{.SessionConfig.SessionIDHashFunc}}
-
Session ID Hash Key: {{.SessionConfig.SessionIDHashKey}}
-
Provider Config: {{.SessionConfig.ProviderConfig}}
+
+
Session Provider
+
{{.SessionProvider}}
+
Cookie Name
+
{{.SessionConfig.CookieName}}
+
Enable Set Cookie
+
+
GC Interval Time
+
{{.SessionConfig.GcIntervalTime}} seconds
+
Session Life Time
+
{{.SessionConfig.SessionLifeTime}} seconds
+
HTTPS Only
+
+
Cookie Life Time
+
{{.SessionConfig.CookieLifeTime}} seconds
+
Session ID Hash Function
+
{{.SessionConfig.SessionIDHashFunc}}
+
Session ID Hash Key
+
{{.SessionConfig.SessionIDHashKey}}
+
Provider Config
+
{{.SessionConfig.ProviderConfig}}
+
@@ -103,7 +150,10 @@
-
Picture Service: {{.PictureService}}
+
+
Picture Service
+
{{.PictureService}}
+
@@ -113,9 +163,14 @@
-
Log Mode: {{.LogMode}}
-
Log Config:
-
{{.LogConfig}}
+
+
Log Mode
+
{{.LogMode}}
+
Log Config
+
+
{{.LogConfig}}
+
+
diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index e0b31817aa..ef64e57916 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -19,38 +19,95 @@
-
Server Uptime: {{.SysStatus.Uptime}}
-
Current Goroutines: {{.SysStatus.NumGoroutine}}
-
-
Current Memory Usage: {{.SysStatus.MemAllocated}}
-
Total Memory Allocated: {{.SysStatus.MemTotal}}
-
Memory Obtained: {{.SysStatus.MemSys}}
-
Pointer Lookup Times: {{.SysStatus.Lookups}}
-
Memory Allocate Times: {{.SysStatus.MemMallocs}}
-
Memory Free Times: {{.SysStatus.MemFrees}}
-
-
Current Heap Usage: {{.SysStatus.HeapAlloc}}
-
Heap Memory Obtained: {{.SysStatus.HeapSys}}
-
Heap Memory Idle: {{.SysStatus.HeapIdle}}
-
Heap Memory In Use: {{.SysStatus.HeapInuse}}
-
Heap Memory Released: {{.SysStatus.HeapReleased}}
-
Heap Objects: {{.SysStatus.HeapObjects}}
-
-
Bootstrap Stack Usage: {{.SysStatus.StackInuse}}
-
Stack Memory Obtained: {{.SysStatus.StackSys}}
-
MSpan Structures Usage: {{.SysStatus.MSpanInuse}}
-
MSpan Structures Obtained: {{.SysStatus.HeapSys}}
-
MCache Structures Usage: {{.SysStatus.MCacheInuse}}
-
MCache Structures Obtained: {{.SysStatus.MCacheSys}}
-
Profiling Bucket Hash Table Obtained: {{.SysStatus.BuckHashSys}}
-
GC Metadada Obtained: {{.SysStatus.GCSys}}
-
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}}
+
+
Server Uptime
+
{{.SysStatus.Uptime}}
+ +
Current Goroutines
+
{{.SysStatus.NumGoroutine}}
+ +
+
Current Memory Usage
+
{{.SysStatus.MemAllocated}}
+ +
Total Memory Allocated
+
{{.SysStatus.MemTotal}}
+ +
Memory Obtained
+
{{.SysStatus.MemSys}}
+ +
Pointer Lookup Times
+
{{.SysStatus.Lookups}}
+ +
Memory Allocate Times
+
{{.SysStatus.MemMallocs}}
+ +
Memory Free Times
+
{{.SysStatus.MemFrees}}
+ +
+
Current Heap Usage
+
{{.SysStatus.HeapAlloc}}
+ +
Heap Memory Obtained
+
{{.SysStatus.HeapSys}}
+ +
Heap Memory Idle
+
{{.SysStatus.HeapIdle}}
+ +
Heap Memory In Use
+
{{.SysStatus.HeapInuse}}
+ +
Heap Memory Released
+
{{.SysStatus.HeapReleased}}
+ +
Heap Objects
+
{{.SysStatus.HeapObjects}}
+ +
+
Bootstrap Stack Usage
+
{{.SysStatus.StackInuse}}
+ +
Stack Memory Obtained
+
{{.SysStatus.StackSys}}
+ +
MSpan Structures Usage
+
{{.SysStatus.MSpanInuse}}
+ +
MSpan Structures Obtained
+
{{.SysStatus.HeapSys}}
+ +
MCache Structures Usage
+
{{.SysStatus.MCacheInuse}}
+ +
MCache Structures Obtained
+
{{.SysStatus.MCacheSys}}
+ +
Profiling Bucket Hash Table Obtained
+
{{.SysStatus.BuckHashSys}}
+ +
GC Metadada Obtained
+
{{.SysStatus.GCSys}}
+ +
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}}
+
From 5a07b5430eb7858d6bb4198a7ea874f3a91b346f Mon Sep 17 00:00:00 2001 From: crackcomm Date: Tue, 1 Apr 2014 05:44:30 +0200 Subject: [PATCH 2/2] .admin-dl-horizontal --- public/css/gogs.css | 4 ++-- templates/admin/config.tmpl | 16 ++++++++-------- templates/admin/dashboard.tmpl | 2 +- templates/repo/single_file.tmpl | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/public/css/gogs.css b/public/css/gogs.css index 4071220466..a018a9dbae 100755 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -1234,10 +1234,10 @@ html, body { /* admin dashboard/configuration */ -.dl-horizontal > dt { +.admin-dl-horizontal > dt { width: 320px; } -.dl-horizontal > dd { +.admin-dl-horizontal > dd { margin-left: 340px; } diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index d7c3ba761d..96c52fb5a0 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -9,7 +9,7 @@
-
+
Application Name
{{AppName}}
Application Version
@@ -36,7 +36,7 @@
-
+
Type
{{.DbCfg.Type}}
Host
@@ -59,7 +59,7 @@
-
+
Register Email Confirmation
Disenable Registeration
@@ -85,7 +85,7 @@
-
+
Enabled
Name
@@ -104,7 +104,7 @@
-
+
Cache Adapter
{{.CacheAdapter}}
Cache Config
@@ -119,7 +119,7 @@
-
+
Session Provider
{{.SessionProvider}}
Cookie Name
@@ -150,7 +150,7 @@
-
+
Picture Service
{{.PictureService}}
@@ -163,7 +163,7 @@
-
+
Log Mode
{{.LogMode}}
Log Config
diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index ef64e57916..31970f7ac4 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -19,7 +19,7 @@
-
+
Server Uptime
{{.SysStatus.Uptime}}
diff --git a/templates/repo/single_file.tmpl b/templates/repo/single_file.tmpl index 9199ca91f7..6127a57674 100644 --- a/templates/repo/single_file.tmpl +++ b/templates/repo/single_file.tmpl @@ -13,11 +13,11 @@ {{end}} {{if not .ReadmeInSingle}} {{end}}