summaryrefslogtreecommitdiffstats
path: root/models/models.go
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-08-28 22:29:00 +0800
committerUnknwon <joe2010xtmf@163.com>2014-08-28 22:29:00 +0800
commit1aec1a2ddae3a3714d6a167d85fcc1c69413b660 (patch)
tree07fb6534ac71aea4edca41d39ececd7d81976b04 /models/models.go
parent81287ba022ae906f1f9eb5b1324567cd93771b4e (diff)
downloadgitea-1aec1a2ddae3a3714d6a167d85fcc1c69413b660.tar.gz
gitea-1aec1a2ddae3a3714d6a167d85fcc1c69413b660.zip
Finish new admin dashboard
Diffstat (limited to 'models/models.go')
-rw-r--r--models/models.go21
1 files changed, 16 insertions, 5 deletions
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
}