diff options
author | lunnyxiao <xiaolunwen@gmail.com> | 2014-08-29 11:25:03 +0800 |
---|---|---|
committer | lunnyxiao <xiaolunwen@gmail.com> | 2014-08-29 11:25:03 +0800 |
commit | a6ec6def8dde232cf250e95ef95b14950031771e (patch) | |
tree | 892e5eb38fd4057aebc9576dcd88e23dcfd85772 /models/models.go | |
parent | c40e815763f8360b892cc5bbdd09725c1df6902f (diff) | |
parent | 1aec1a2ddae3a3714d6a167d85fcc1c69413b660 (diff) | |
download | gitea-a6ec6def8dde232cf250e95ef95b14950031771e.tar.gz gitea-a6ec6def8dde232cf250e95ef95b14950031771e.zip |
Merge branch 'dev' of github.com:gogits/gogs into dev
Diffstat (limited to 'models/models.go')
-rw-r--r-- | models/models.go | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/models/models.go b/models/models.go index 186ddf41aa..4e2e08cf83 100644 --- a/models/models.go +++ b/models/models.go @@ -143,27 +143,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 } |