summaryrefslogtreecommitdiffstats
path: root/models/models.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-04-14 04:11:33 -0400
committerUnknown <joe2010xtmf@163.com>2014-04-14 04:11:33 -0400
commitc36e7d322e74a55749ce2c2934c6fcfa82cff274 (patch)
treedbd2c05336815be91f1c59d654ce6f6f24d72872 /models/models.go
parent57f84fb0516d46b27c60554730956f0c9dff68dd (diff)
downloadgitea-c36e7d322e74a55749ce2c2934c6fcfa82cff274.tar.gz
gitea-c36e7d322e74a55749ce2c2934c6fcfa82cff274.zip
Mirror updates
Diffstat (limited to 'models/models.go')
-rw-r--r--models/models.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/models/models.go b/models/models.go
index 0e20a1ab2f..d485489586 100644
--- a/models/models.go
+++ b/models/models.go
@@ -120,7 +120,10 @@ func NewEngine() (err error) {
type Statistic struct {
Counter struct {
- User, PublicKey, Repo, Watch, Action, Access int64
+ User, PublicKey, Repo,
+ Watch, Action, Access,
+ Issue, Comment,
+ Mirror, Oauth, Release int64
}
}
@@ -131,5 +134,10 @@ func GetStatistic() (stats Statistic) {
stats.Counter.Watch, _ = orm.Count(new(Watch))
stats.Counter.Action, _ = orm.Count(new(Action))
stats.Counter.Access, _ = orm.Count(new(Access))
+ stats.Counter.Issue, _ = orm.Count(new(Issue))
+ stats.Counter.Comment, _ = orm.Count(new(Comment))
+ stats.Counter.Mirror, _ = orm.Count(new(Mirror))
+ stats.Counter.Oauth, _ = orm.Count(new(Oauth2))
+ stats.Counter.Release, _ = orm.Count(new(Release))
return
}