From e1c04f043b9e40c8edc54eab6ccc3189aa2b4a9f Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Tue, 13 Oct 2015 01:40:35 +0200 Subject: [PATCH 1/5] Implement new ui to dashboard --- public/less/_admin.less | 21 +++++++++ templates/admin/dashboard.tmpl | 81 ++++++++++++++++------------------ 2 files changed, 60 insertions(+), 42 deletions(-) diff --git a/public/less/_admin.less b/public/less/_admin.less index d0c65129ca..f1f236d93e 100644 --- a/public/less/_admin.less +++ b/public/less/_admin.less @@ -25,4 +25,25 @@ max-width: 200px; } } + + .admin-desc,.admin-table { + padding: 20px; + } + + dl.admin-dl-horizontal { + padding: 20px; + margin: 0; + dd{ + margin-left: 240px; + } + dt { + font-weight: bolder; + float: left; + width: 250px; + clear: left; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + } } \ No newline at end of file diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index 847f488095..33dd5be980 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -1,28 +1,26 @@ -{{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"}} -
-
+{{template "base/head" .}} +
+
+
+ {{template "admin/navbar" .}} +
+ {{template "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"}} +

+
+
@@ -49,16 +47,16 @@
-
-
-
-
-
- {{.i18n.Tr "admin.dashboard.system_status"}} -
-
-
-
{{.i18n.Tr "admin.dashboard.server_uptime"}}
+
+
+ + +

+ {{.i18n.Tr "admin.dashboard.statistic"}} +

+
+
+
{{.i18n.Tr "admin.dashboard.server_uptime"}}
{{.SysStatus.Uptime}}
{{.i18n.Tr "admin.dashboard.current_goroutine"}}
@@ -145,13 +143,12 @@
{{.i18n.Tr "admin.dashboard.gc_times"}}
{{.SysStatus.NumGC}}
-
-
-
-
-
-
+
+
+ +
+
-{{template "ng/base/footer" .}} +{{template "base/footer" .}} From 2717ada14cc62addf4aabd911753620cf3fe229f Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Tue, 13 Oct 2015 02:04:04 +0200 Subject: [PATCH 2/5] Little fix --- public/less/_admin.less | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/public/less/_admin.less b/public/less/_admin.less index f1f236d93e..9cd7c7c331 100644 --- a/public/less/_admin.less +++ b/public/less/_admin.less @@ -26,10 +26,14 @@ } } - .admin-desc,.admin-table { + .admin-desc { padding: 20px; } - + .admin-table{ + .table{ + width: 100%; + } + } dl.admin-dl-horizontal { padding: 20px; margin: 0; From ae0fadeb0ea593d1f341b824dc1d46ae2f8e8b2e Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Tue, 13 Oct 2015 02:08:13 +0200 Subject: [PATCH 3/5] To quick to copy-paste --- templates/admin/dashboard.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index 33dd5be980..eeb64bec03 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -52,7 +52,7 @@

- {{.i18n.Tr "admin.dashboard.statistic"}} + {{.i18n.Tr "admin.dashboard.system_status"}}

From 4dd731cb53283417c8f6ca605f0b0c95ca384a5e Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Wed, 14 Oct 2015 01:05:32 +0200 Subject: [PATCH 4/5] Fix indent .less --- public/less/_admin.less | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/less/_admin.less b/public/less/_admin.less index 9cd7c7c331..40fefd32ee 100644 --- a/public/less/_admin.less +++ b/public/less/_admin.less @@ -31,14 +31,14 @@ } .admin-table{ .table{ - width: 100%; + width: 100%; } } dl.admin-dl-horizontal { padding: 20px; - margin: 0; + margin: 0; dd{ - margin-left: 240px; + margin-left: 240px; } dt { font-weight: bolder; @@ -50,4 +50,4 @@ white-space: nowrap; } } -} \ No newline at end of file +} From 5edc2f6d6ccfca8089def783f82b0e9af3abfa7e Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Wed, 14 Oct 2015 01:09:33 +0200 Subject: [PATCH 5/5] Fix indent tmpl --- templates/admin/dashboard.tmpl | 266 +++++++++++++++------------------ 1 file changed, 118 insertions(+), 148 deletions(-) diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index eeb64bec03..23c02aedf4 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -1,154 +1,124 @@ + + {{template "base/head" .}}
-
-
- {{template "admin/navbar" .}} -
- {{template "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}} -

+
+
+ {{template "admin/navbar" .}} +
+ {{template "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.delete_inactivate_accounts"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
{{.i18n.Tr "admin.dashboard.delete_repo_archives"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
{{.i18n.Tr "admin.dashboard.git_gc_repos"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
{{.i18n.Tr "admin.dashboard.resync_all_update_hooks"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
+
+
+
+

+ {{.i18n.Tr "admin.dashboard.system_status"}} +

+
+
+
{{.i18n.Tr "admin.dashboard.server_uptime"}}
+
{{.SysStatus.Uptime}}
+
{{.i18n.Tr "admin.dashboard.current_goroutine"}}
+
{{.SysStatus.NumGoroutine}}
+
+
{{.i18n.Tr "admin.dashboard.current_memory_usage"}}
+
{{.SysStatus.MemAllocated}}
+
{{.i18n.Tr "admin.dashboard.total_memory_allocated"}}
+
{{.SysStatus.MemTotal}}
+
{{.i18n.Tr "admin.dashboard.memory_obtained"}}
+
{{.SysStatus.MemSys}}
+
{{.i18n.Tr "admin.dashboard.pointer_lookup_times"}}
+
{{.SysStatus.Lookups}}
+
{{.i18n.Tr "admin.dashboard.memory_allocate_times"}}
+
{{.SysStatus.MemMallocs}}
+
{{.i18n.Tr "admin.dashboard.memory_free_times"}}
+
{{.SysStatus.MemFrees}}
+
+
{{.i18n.Tr "admin.dashboard.current_heap_usage"}}
+
{{.SysStatus.HeapAlloc}}
+
{{.i18n.Tr "admin.dashboard.heap_memory_obtained"}}
+
{{.SysStatus.HeapSys}}
+
{{.i18n.Tr "admin.dashboard.heap_memory_idle"}}
+
{{.SysStatus.HeapIdle}}
+
{{.i18n.Tr "admin.dashboard.heap_memory_in_use"}}
+
{{.SysStatus.HeapInuse}}
+
{{.i18n.Tr "admin.dashboard.heap_memory_released"}}
+
{{.SysStatus.HeapReleased}}
+
{{.i18n.Tr "admin.dashboard.heap_objects"}}
+
{{.SysStatus.HeapObjects}}
+
+
{{.i18n.Tr "admin.dashboard.bootstrap_stack_usage"}}
+
{{.SysStatus.StackInuse}}
+
{{.i18n.Tr "admin.dashboard.stack_memory_obtained"}}
+
{{.SysStatus.StackSys}}
+
{{.i18n.Tr "admin.dashboard.mspan_structures_usage"}}
+
{{.SysStatus.MSpanInuse}}
+
{{.i18n.Tr "admin.dashboard.mspan_structures_obtained"}}
+
{{.SysStatus.HeapSys}}
+
{{.i18n.Tr "admin.dashboard.mcache_structures_usage"}}
+
{{.SysStatus.MCacheInuse}}
+
{{.i18n.Tr "admin.dashboard.mcache_structures_obtained"}}
+
{{.SysStatus.MCacheSys}}
+
{{.i18n.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}
+
{{.SysStatus.BuckHashSys}}
+
{{.i18n.Tr "admin.dashboard.gc_metadata_obtained"}}
+
{{.SysStatus.GCSys}}
+
{{.i18n.Tr "admin.dashboard.other_system_allocation_obtained"}}
+
{{.SysStatus.OtherSys}}
+
+
{{.i18n.Tr "admin.dashboard.next_gc_recycle"}}
+
{{.SysStatus.NextGC}}
+
{{.i18n.Tr "admin.dashboard.last_gc_time"}}
+
{{.SysStatus.LastGC}}
+
{{.i18n.Tr "admin.dashboard.total_gc_pause"}}
+
{{.SysStatus.PauseTotalNs}}
+
{{.i18n.Tr "admin.dashboard.last_gc_pause"}}
+
{{.SysStatus.PauseNs}}
+
{{.i18n.Tr "admin.dashboard.gc_times"}}
+
{{.SysStatus.NumGC}}
+
+
+
+
-
- - -

- {{.i18n.Tr "admin.dashboard.operations"}} -

-
- -
- - - - - - - - - - - - - - - - - - - - - - - -
{{.i18n.Tr "admin.dashboard.delete_inactivate_accounts"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
{{.i18n.Tr "admin.dashboard.delete_repo_archives"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
{{.i18n.Tr "admin.dashboard.git_gc_repos"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
{{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
{{.i18n.Tr "admin.dashboard.resync_all_update_hooks"}} {{.i18n.Tr "admin.dashboard.operation_run"}}
-
-
-
- - -

- {{.i18n.Tr "admin.dashboard.system_status"}} -

-
-
-
{{.i18n.Tr "admin.dashboard.server_uptime"}}
-
{{.SysStatus.Uptime}}
- -
{{.i18n.Tr "admin.dashboard.current_goroutine"}}
-
{{.SysStatus.NumGoroutine}}
- -
-
{{.i18n.Tr "admin.dashboard.current_memory_usage"}}
-
{{.SysStatus.MemAllocated}}
- -
{{.i18n.Tr "admin.dashboard.total_memory_allocated"}}
-
{{.SysStatus.MemTotal}}
- -
{{.i18n.Tr "admin.dashboard.memory_obtained"}}
-
{{.SysStatus.MemSys}}
- -
{{.i18n.Tr "admin.dashboard.pointer_lookup_times"}}
-
{{.SysStatus.Lookups}}
- -
{{.i18n.Tr "admin.dashboard.memory_allocate_times"}}
-
{{.SysStatus.MemMallocs}}
- -
{{.i18n.Tr "admin.dashboard.memory_free_times"}}
-
{{.SysStatus.MemFrees}}
- -
-
{{.i18n.Tr "admin.dashboard.current_heap_usage"}}
-
{{.SysStatus.HeapAlloc}}
- -
{{.i18n.Tr "admin.dashboard.heap_memory_obtained"}}
-
{{.SysStatus.HeapSys}}
- -
{{.i18n.Tr "admin.dashboard.heap_memory_idle"}}
-
{{.SysStatus.HeapIdle}}
- -
{{.i18n.Tr "admin.dashboard.heap_memory_in_use"}}
-
{{.SysStatus.HeapInuse}}
- -
{{.i18n.Tr "admin.dashboard.heap_memory_released"}}
-
{{.SysStatus.HeapReleased}}
- -
{{.i18n.Tr "admin.dashboard.heap_objects"}}
-
{{.SysStatus.HeapObjects}}
- -
-
{{.i18n.Tr "admin.dashboard.bootstrap_stack_usage"}}
-
{{.SysStatus.StackInuse}}
- -
{{.i18n.Tr "admin.dashboard.stack_memory_obtained"}}
-
{{.SysStatus.StackSys}}
- -
{{.i18n.Tr "admin.dashboard.mspan_structures_usage"}}
-
{{.SysStatus.MSpanInuse}}
- -
{{.i18n.Tr "admin.dashboard.mspan_structures_obtained"}}
-
{{.SysStatus.HeapSys}}
- -
{{.i18n.Tr "admin.dashboard.mcache_structures_usage"}}
-
{{.SysStatus.MCacheInuse}}
- -
{{.i18n.Tr "admin.dashboard.mcache_structures_obtained"}}
-
{{.SysStatus.MCacheSys}}
- -
{{.i18n.Tr "admin.dashboard.profiling_bucket_hash_table_obtained"}}
-
{{.SysStatus.BuckHashSys}}
- -
{{.i18n.Tr "admin.dashboard.gc_metadata_obtained"}}
-
{{.SysStatus.GCSys}}
- -
{{.i18n.Tr "admin.dashboard.other_system_allocation_obtained"}}
-
{{.SysStatus.OtherSys}}
- -
-
{{.i18n.Tr "admin.dashboard.next_gc_recycle"}}
-
{{.SysStatus.NextGC}}
- -
{{.i18n.Tr "admin.dashboard.last_gc_time"}}
-
{{.SysStatus.LastGC}}
- -
{{.i18n.Tr "admin.dashboard.total_gc_pause"}}
-
{{.SysStatus.PauseTotalNs}}
- -
{{.i18n.Tr "admin.dashboard.last_gc_pause"}}
-
{{.SysStatus.PauseNs}}
- -
{{.i18n.Tr "admin.dashboard.gc_times"}}
-
{{.SysStatus.NumGC}}
-
-
-
- -
-
{{template "base/footer" .}} +