blob: 7084831a9965f82323dc7f3a524766ddb0692cc2 (
plain)
1
2
3
4
5
6
7
8
9
10
|
from config import render, db
class Mirror(object):
def GET(self):
mirror_count = db.query('SELECT MIRROR,COUNT(UUID) AS HOSTS FROM HOST_MIRRORS NATURAL JOIN GENTOO_MIRRORS GROUP BY MIRROR')
mirror_data = dict()
for t in mirror_count:
mirror_data[t['MIRROR']] = {'HOSTS':t['HOSTS']}
return render.mirror(mirror_data)
|